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

Function RunAsmJsTest

deps/v8/test/mjsunit/wasm/asm-wasm-heap.js:57–69  ·  view source on GitHub ↗
(asmfunc, expect)

Source from the content-addressed store, hash-verified

55}
56
57function RunAsmJsTest(asmfunc, expect) {
58 var asm_source = asmfunc.toString();
59 var nonasm_source = asm_source.replace(new RegExp("use asm"), "");
60
61 print("Testing " + asmfunc.name + " (js)...");
62 var js_module = eval("(" + nonasm_source + ")")(stdlib, {}, buffer);
63 expect(js_module);
64
65 print("Testing " + asmfunc.name + " (asm.js)...");
66 var asm_module = asmfunc(stdlib, {}, buffer);
67 assertTrue(%IsAsmWasmCode(asmfunc));
68 expect(asm_module);
69}
70
71function LoadAt_i32(stdlib, foreign, buffer) {
72 "use asm";

Callers 1

asm-wasm-heap.jsFile · 0.70

Calls 5

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

Tested by

no test coverage detected