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

Function RunAsmJsTest

deps/v8/test/mjsunit/wasm/asm-wasm-f32.js:29–42  ·  view source on GitHub ↗
(asmfunc, expect)

Source from the content-addressed store, hash-verified

27}
28
29function RunAsmJsTest(asmfunc, expect) {
30 var asm_source = asmfunc.toString();
31 var nonasm_source = asm_source.replace(new RegExp("use asm"), "");
32 var stdlib = {Math: Math};
33
34 print("Testing " + asmfunc.name + " (js)...");
35 var js_module = eval("(" + nonasm_source + ")")(stdlib);
36 expect(js_module);
37
38 print("Testing " + asmfunc.name + " (asm.js)...");
39 var asm_module = asmfunc(stdlib);
40 assertTrue(%IsAsmWasmCode(asmfunc));
41 expect(asm_module);
42}
43
44var fround = Math.fround;
45var Math_ceil = Math.ceil;

Callers 1

asm-wasm-f32.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