Index: test/mjsunit/wasm/embenchen/zlib.js |
diff --git a/test/mjsunit/wasm/embenchen/zlib.js b/test/mjsunit/wasm/embenchen/zlib.js |
index 852469879795ea2dbc95013fdbe64cc081890a25..1628babecfc4d24eb5885aad942b84c196ca478a 100644 |
--- a/test/mjsunit/wasm/embenchen/zlib.js |
+++ b/test/mjsunit/wasm/embenchen/zlib.js |
@@ -1,5 +1,5 @@ |
// Modified embenchen to direct to asm-wasm. |
-// Flags: --expose-wasm |
+// Flags: --validate-asm --allow-natives-syntax |
var EXPECTED_OUTPUT = 'sizes: 100000,25906\nok.\n'; |
var Module = { |
@@ -5687,7 +5687,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); |
@@ -14539,9 +14540,10 @@ function stackSave() { |
var FUNCTION_TABLE_iii = [b2,_deflate_stored,_deflate_fast,_deflate_slow]; |
return { _strlen: _strlen, _free: _free, _main: _main, _memset: _memset, _malloc: _malloc, _memcpy: _memcpy, 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, dynCall_iiii: dynCall_iiii, dynCall_vii: dynCall_vii, dynCall_iii: dynCall_iii }; |
-}).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, "invoke_iiii": invoke_iiii, "invoke_vii": invoke_vii, "invoke_iii": invoke_iii, "_send": _send, "___setErrNo": ___setErrNo, "___assert_fail": ___assert_fail, "_fflush": _fflush, "_pwrite": _pwrite, "__reallyNegative": __reallyNegative, "_sbrk": _sbrk, "___errno_location": ___errno_location, "_emscripten_memcpy_big": _emscripten_memcpy_big, "_fileno": _fileno, "_sysconf": _sysconf, "_puts": _puts, "_mkport": _mkport, "_write": _write, "_llvm_bswap_i32": _llvm_bswap_i32, "_fputc": _fputc, "_abort": _abort, "_fwrite": _fwrite, "_time": _time, "_fprintf": _fprintf, "__formatString": __formatString, "_fputs": _fputs, "_printf": _printf, "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, "invoke_iiii": invoke_iiii, "invoke_vii": invoke_vii, "invoke_iii": invoke_iii, "_send": _send, "___setErrNo": ___setErrNo, "___assert_fail": ___assert_fail, "_fflush": _fflush, "_pwrite": _pwrite, "__reallyNegative": __reallyNegative, "_sbrk": _sbrk, "___errno_location": ___errno_location, "_emscripten_memcpy_big": _emscripten_memcpy_big, "_fileno": _fileno, "_sysconf": _sysconf, "_puts": _puts, "_mkport": _mkport, "_write": _write, "_llvm_bswap_i32": _llvm_bswap_i32, "_fputc": _fputc, "_abort": _abort, "_fwrite": _fwrite, "_time": _time, "_fprintf": _fprintf, "__formatString": __formatString, "_fputs": _fputs, "_printf": _printf, "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 _free = Module["_free"] = asm["_free"]; |
var _main = Module["_main"] = asm["_main"]; |