summaryrefslogtreecommitdiff
path: root/test/wasm2js/emscripten.2asm.js.opt
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2020-11-05 16:10:10 -0800
committerGitHub <noreply@github.com>2020-11-05 16:10:10 -0800
commit040a7cc3721292669609cc8020bd11ad6930d321 (patch)
treee192d281f37be7bba102861feceee6e6acdba510 /test/wasm2js/emscripten.2asm.js.opt
parent2887e516eb2a4564ddca76ec42282822af24dd97 (diff)
downloadbinaryen-040a7cc3721292669609cc8020bd11ad6930d321.tar.gz
binaryen-040a7cc3721292669609cc8020bd11ad6930d321.tar.bz2
binaryen-040a7cc3721292669609cc8020bd11ad6930d321.zip
wasm2js: Remove global dict arguments to asmFunc (#3325)
Diffstat (limited to 'test/wasm2js/emscripten.2asm.js.opt')
-rw-r--r--test/wasm2js/emscripten.2asm.js.opt57
1 files changed, 21 insertions, 36 deletions
diff --git a/test/wasm2js/emscripten.2asm.js.opt b/test/wasm2js/emscripten.2asm.js.opt
index bd813d0f6..0e438f81d 100644
--- a/test/wasm2js/emscripten.2asm.js.opt
+++ b/test/wasm2js/emscripten.2asm.js.opt
@@ -1,26 +1,26 @@
function instantiate(asmLibraryArg, wasmMemory) {
-function asmFunc(global, env, buffer) {
+function asmFunc(env, buffer) {
var FUNCTION_TABLE = env.table;
- var HEAP8 = new global.Int8Array(buffer);
- var HEAP16 = new global.Int16Array(buffer);
- var HEAP32 = new global.Int32Array(buffer);
- var HEAPU8 = new global.Uint8Array(buffer);
- var HEAPU16 = new global.Uint16Array(buffer);
- var HEAPU32 = new global.Uint32Array(buffer);
- var HEAPF32 = new global.Float32Array(buffer);
- var HEAPF64 = new global.Float64Array(buffer);
- var Math_imul = global.Math.imul;
- var Math_fround = global.Math.fround;
- var Math_abs = global.Math.abs;
- var Math_clz32 = global.Math.clz32;
- var Math_min = global.Math.min;
- var Math_max = global.Math.max;
- var Math_floor = global.Math.floor;
- var Math_ceil = global.Math.ceil;
- var Math_sqrt = global.Math.sqrt;
+ var HEAP8 = new Int8Array(buffer);
+ var HEAP16 = new Int16Array(buffer);
+ var HEAP32 = new Int32Array(buffer);
+ var HEAPU8 = new Uint8Array(buffer);
+ var HEAPU16 = new Uint16Array(buffer);
+ var HEAPU32 = new Uint32Array(buffer);
+ var HEAPF32 = new Float32Array(buffer);
+ var HEAPF64 = new Float64Array(buffer);
+ var Math_imul = Math.imul;
+ var Math_fround = Math.fround;
+ var Math_abs = Math.abs;
+ var Math_clz32 = Math.clz32;
+ var Math_min = Math.min;
+ var Math_max = Math.max;
+ var Math_floor = Math.floor;
+ var Math_ceil = Math.ceil;
+ var Math_sqrt = Math.sqrt;
var abort = env.abort;
- var nan = global.NaN;
- var infinity = global.Infinity;
+ var nan = NaN;
+ var infinity = Infinity;
var syscall$6 = env.__syscall6;
var syscall$54 = env.__syscall54;
// EMSCRIPTEN_START_FUNCS
@@ -217,21 +217,6 @@ base64DecodeToExistingUint8Array(bufferView, 1443, "Cw==");
base64DecodeToExistingUint8Array(bufferView, 1455, "CgAAAAAKAAAAAAkLAAAAAAALAAAL");
base64DecodeToExistingUint8Array(bufferView, 1501, "DA==");
base64DecodeToExistingUint8Array(bufferView, 1513, "DAAAAAAMAAAAAAkMAAAAAAAMAAAMAAAwMTIzNDU2Nzg5QUJDREVGLTBYKzBYIDBYLTB4KzB4IDB4AGluZgBJTkYAbmFuAE5BTgAu");
-return asmFunc({
- 'Int8Array': Int8Array,
- 'Int16Array': Int16Array,
- 'Int32Array': Int32Array,
- 'Uint8Array': Uint8Array,
- 'Uint16Array': Uint16Array,
- 'Uint32Array': Uint32Array,
- 'Float32Array': Float32Array,
- 'Float64Array': Float64Array,
- 'NaN': NaN,
- 'Infinity': Infinity,
- 'Math': Math
- },
- asmLibraryArg,
- wasmMemory.buffer
-)
+return asmFunc(asmLibraryArg, wasmMemory.buffer)
} \ No newline at end of file