Index: test/mjsunit/wasm/embenchen/primes.js |
diff --git a/test/mjsunit/wasm/embenchen/primes.js b/test/mjsunit/wasm/embenchen/primes.js |
index bca6e4b1c1a408a65fa83c4b96a937ddf9cac93f..95cb6535e782c67a20f0ef1f5e689cc57ed961f3 100644 |
--- a/test/mjsunit/wasm/embenchen/primes.js |
+++ b/test/mjsunit/wasm/embenchen/primes.js |
@@ -1,5 +1,5 @@ |
// Modified embenchen to direct to asm-wasm. |
-// Flags: --expose-wasm |
+// Flags: --validate-asm --allow-natives-syntax |
var EXPECTED_OUTPUT = 'lastprime: 387677.\n'; |
var Module = { |
@@ -5454,7 +5454,8 @@ function asmPrintFloat(x, y) { |
Module.print('float ' + x + ',' + y);// + ' ' + new Error().stack); |
} |
// EMSCRIPTEN_START_ASM |
-var asm = Wasm.instantiateModuleFromAsm((function Module(global, env, buffer) { |
+var ModuleFunc; |
+var asm = (ModuleFunc = function(global, env, buffer) { |
'use asm'; |
var HEAP8 = new global.Int8Array(buffer); |
var HEAP16 = new global.Int16Array(buffer); |
@@ -5776,9 +5777,10 @@ function stackSave() { |
return { _strlen: _strlen, _memcpy: _memcpy, _main: _main, _memset: _memset, runPostSets: runPostSets, stackAlloc: stackAlloc, stackSave: stackSave, stackRestore: stackRestore, setThrew: setThrew, setTempRet0: setTempRet0, setTempRet1: setTempRet1, setTempRet2: setTempRet2, setTempRet3: setTempRet3, setTempRet4: setTempRet4, setTempRet5: setTempRet5, setTempRet6: setTempRet6, setTempRet7: setTempRet7, setTempRet8: setTempRet8, setTempRet9: setTempRet9 }; |
-}).toString(), |
+}) |
// EMSCRIPTEN_END_ASM |
-{ "Math": Math, "Int8Array": Int8Array, "Int16Array": Int16Array, "Int32Array": Int32Array, "Uint8Array": Uint8Array, "Uint16Array": Uint16Array, "Uint32Array": Uint32Array, "Float32Array": Float32Array, "Float64Array": Float64Array }, { "abort": abort, "assert": assert, "asmPrintInt": asmPrintInt, "asmPrintFloat": asmPrintFloat, "min": Math_min, "_free": _free, "_emscripten_memcpy_big": _emscripten_memcpy_big, "_printf": _printf, "_send": _send, "_pwrite": _pwrite, "_sqrtf": _sqrtf, "__reallyNegative": __reallyNegative, "_fwrite": _fwrite, "_malloc": _malloc, "_mkport": _mkport, "_fprintf": _fprintf, "___setErrNo": ___setErrNo, "__formatString": __formatString, "_fileno": _fileno, "_fflush": _fflush, "_write": _write, "STACKTOP": STACKTOP, "STACK_MAX": STACK_MAX, "tempDoublePtr": tempDoublePtr, "ABORT": ABORT, "NaN": NaN, "Infinity": Infinity }, buffer); |
+({ "Math": Math, "Int8Array": Int8Array, "Int16Array": Int16Array, "Int32Array": Int32Array, "Uint8Array": Uint8Array, "Uint16Array": Uint16Array, "Uint32Array": Uint32Array, "Float32Array": Float32Array, "Float64Array": Float64Array }, { "abort": abort, "assert": assert, "asmPrintInt": asmPrintInt, "asmPrintFloat": asmPrintFloat, "min": Math_min, "_free": _free, "_emscripten_memcpy_big": _emscripten_memcpy_big, "_printf": _printf, "_send": _send, "_pwrite": _pwrite, "_sqrtf": _sqrtf, "__reallyNegative": __reallyNegative, "_fwrite": _fwrite, "_malloc": _malloc, "_mkport": _mkport, "_fprintf": _fprintf, "___setErrNo": ___setErrNo, "__formatString": __formatString, "_fileno": _fileno, "_fflush": _fflush, "_write": _write, "STACKTOP": STACKTOP, "STACK_MAX": STACK_MAX, "tempDoublePtr": tempDoublePtr, "ABORT": ABORT, "NaN": NaN, "Infinity": Infinity }, buffer); |
+assertTrue(%IsAsmWasmCode(ModuleFunc)); |
var _strlen = Module["_strlen"] = asm["_strlen"]; |
var _memcpy = Module["_memcpy"] = asm["_memcpy"]; |
var _main = Module["_main"] = asm["_main"]; |