MCPcopy Create free account
hub / github.com/nodejs/node / RunAsmJsTest

Function RunAsmJsTest

deps/v8/test/mjsunit/wasm/asm-wasm-expr.js:85–97  ·  view source on GitHub ↗
(asmfunc, expect)

Source from the content-addressed store, hash-verified

83}
84
85function RunAsmJsTest(asmfunc, expect) {
86 var asm_source = asmfunc.toString();
87 var nonasm_source = asm_source.replace(new RegExp("use asm"), "");
88
89 print("Testing " + asmfunc.name + " (js)...");
90 var js_module = eval("(" + nonasm_source + ")")(stdlib, {}, buffer);
91 expect(js_module);
92
93 print("Testing " + asmfunc.name + " (asm.js)...");
94 var asm_module = asmfunc(stdlib, {}, buffer);
95 assertTrue(%IsAsmWasmCode(asmfunc));
96 expect(asm_module);
97}
98
99var test = 0;
100

Callers

nothing calls this directly

Calls 5

expectFunction · 0.70
printFunction · 0.50
evalFunction · 0.50
assertTrueFunction · 0.50
toStringMethod · 0.45

Tested by

no test coverage detected