summaryrefslogtreecommitdiff
path: root/test/wasm2js
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
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')
-rw-r--r--test/wasm2js/add_div.2asm.js39
-rw-r--r--test/wasm2js/add_div.2asm.js.opt39
-rw-r--r--test/wasm2js/atomic_fence.2asm.js73
-rw-r--r--test/wasm2js/atomic_fence.2asm.js.opt39
-rw-r--r--test/wasm2js/atomics_32.2asm.js55
-rw-r--r--test/wasm2js/atomics_32.2asm.js.opt55
-rw-r--r--test/wasm2js/base64.2asm.js39
-rw-r--r--test/wasm2js/base64.2asm.js.opt39
-rw-r--r--test/wasm2js/br.2asm.js39
-rw-r--r--test/wasm2js/br_table.2asm.js39
-rw-r--r--test/wasm2js/br_table_hoisting.2asm.js39
-rw-r--r--test/wasm2js/br_table_hoisting.2asm.js.opt39
-rw-r--r--test/wasm2js/br_table_temp.2asm.js39
-rw-r--r--test/wasm2js/br_table_temp.2asm.js.opt39
-rw-r--r--test/wasm2js/br_table_to_loop.2asm.js39
-rw-r--r--test/wasm2js/br_table_to_loop.2asm.js.opt39
-rw-r--r--test/wasm2js/break-drop.2asm.js39
-rw-r--r--test/wasm2js/bulk-memory.2asm.js313
-rw-r--r--test/wasm2js/bulk-memory.2asm.js.opt313
-rw-r--r--test/wasm2js/comments.2asm.js78
-rw-r--r--test/wasm2js/conversions-modified.2asm.js39
-rw-r--r--test/wasm2js/conversions-modified.2asm.js.opt39
-rw-r--r--test/wasm2js/deterministic.2asm.js55
-rw-r--r--test/wasm2js/deterministic.2asm.js.opt55
-rw-r--r--test/wasm2js/dot_import.2asm.js39
-rw-r--r--test/wasm2js/dot_import.2asm.js.opt39
-rw-r--r--test/wasm2js/dynamicLibrary.2asm.js55
-rw-r--r--test/wasm2js/dynamicLibrary.2asm.js.opt55
-rw-r--r--test/wasm2js/empty_export.2asm.js39
-rw-r--r--test/wasm2js/empty_export.2asm.js.opt39
-rw-r--r--test/wasm2js/empty_table.2asm.js39
-rw-r--r--test/wasm2js/emscripten-grow-no.2asm.js57
-rw-r--r--test/wasm2js/emscripten-grow-no.2asm.js.opt57
-rw-r--r--test/wasm2js/emscripten-grow-yes.2asm.js75
-rw-r--r--test/wasm2js/emscripten-grow-yes.2asm.js.opt75
-rw-r--r--test/wasm2js/emscripten.2asm.js57
-rw-r--r--test/wasm2js/emscripten.2asm.js.opt57
-rw-r--r--test/wasm2js/endianness.2asm.js73
-rw-r--r--test/wasm2js/excess_fallthrough.2asm.js39
-rw-r--r--test/wasm2js/excess_fallthrough.2asm.js.opt39
-rw-r--r--test/wasm2js/f32.2asm.js39
-rw-r--r--test/wasm2js/f32_cmp.2asm.js39
-rw-r--r--test/wasm2js/f64_cmp.2asm.js39
-rw-r--r--test/wasm2js/fac.2asm.js39
-rw-r--r--test/wasm2js/float-ops.2asm.js39
-rw-r--r--test/wasm2js/float-ops.2asm.js.opt39
-rw-r--r--test/wasm2js/float_literals-modified.2asm.js39
-rw-r--r--test/wasm2js/float_literals-modified.2asm.js.opt39
-rw-r--r--test/wasm2js/float_misc.2asm.js39
-rw-r--r--test/wasm2js/forward.2asm.js39
-rw-r--r--test/wasm2js/func-ptr-offset.2asm.js39
-rw-r--r--test/wasm2js/func-ptr-offset.2asm.js.opt39
-rw-r--r--test/wasm2js/func_ptrs.2asm.js117
-rw-r--r--test/wasm2js/get-set-local.2asm.js39
-rw-r--r--test/wasm2js/get-set-local.2asm.js.opt39
-rw-r--r--test/wasm2js/get_local.2asm.js39
-rw-r--r--test/wasm2js/global_i64.2asm.js39
-rw-r--r--test/wasm2js/global_i64.2asm.js.opt39
-rw-r--r--test/wasm2js/grow-memory-tricky.2asm.js73
-rw-r--r--test/wasm2js/grow-memory-tricky.2asm.js.opt73
-rw-r--r--test/wasm2js/grow_memory.2asm.js73
-rw-r--r--test/wasm2js/i32.2asm.js39
-rw-r--r--test/wasm2js/i64-add-sub.2asm.js39
-rw-r--r--test/wasm2js/i64-add-sub.2asm.js.opt39
-rw-r--r--test/wasm2js/i64-ctz.2asm.js39
-rw-r--r--test/wasm2js/i64-ctz.2asm.js.opt39
-rw-r--r--test/wasm2js/i64-lowering.2asm.js39
-rw-r--r--test/wasm2js/i64-lowering.2asm.js.opt39
-rw-r--r--test/wasm2js/i64-rotate.2asm.js39
-rw-r--r--test/wasm2js/i64-rotate.2asm.js.opt39
-rw-r--r--test/wasm2js/i64-select.2asm.js39
-rw-r--r--test/wasm2js/i64-select.2asm.js.opt39
-rw-r--r--test/wasm2js/i64-shifts.2asm.js39
-rw-r--r--test/wasm2js/i64-shifts.2asm.js.opt39
-rw-r--r--test/wasm2js/if_unreachable.2asm.js39
-rw-r--r--test/wasm2js/if_unreachable.2asm.js.opt39
-rw-r--r--test/wasm2js/indirect-select.2asm.js39
-rw-r--r--test/wasm2js/indirect-select.2asm.js.opt39
-rw-r--r--test/wasm2js/int_exprs.2asm.js741
-rw-r--r--test/wasm2js/labels.2asm.js39
-rw-r--r--test/wasm2js/left-to-right.2asm.js73
-rw-r--r--test/wasm2js/minified-memory.2asm.js73
-rw-r--r--test/wasm2js/minified-memory.2asm.js.opt73
-rw-r--r--test/wasm2js/minus_minus.2asm.js39
-rw-r--r--test/wasm2js/minus_minus.2asm.js.opt39
-rw-r--r--test/wasm2js/nested-selects.2asm.js39
-rw-r--r--test/wasm2js/nested-selects.2asm.js.opt39
-rw-r--r--test/wasm2js/ordering.2asm.js39
-rw-r--r--test/wasm2js/ordering.2asm.js.opt39
-rw-r--r--test/wasm2js/reinterpret.2asm.js39
-rw-r--r--test/wasm2js/reinterpret.2asm.js.opt39
-rw-r--r--test/wasm2js/reinterpret_scratch.2asm.js55
-rw-r--r--test/wasm2js/reinterpret_scratch.2asm.js.opt55
-rw-r--r--test/wasm2js/set_local.2asm.js39
-rw-r--r--test/wasm2js/sign_ext.2asm.js39
-rw-r--r--test/wasm2js/sign_ext.2asm.js.opt39
-rw-r--r--test/wasm2js/stack-modified.2asm.js39
-rw-r--r--test/wasm2js/stack-modified.2asm.js.opt39
-rw-r--r--test/wasm2js/start_func.2asm.js73
-rw-r--r--test/wasm2js/start_func.2asm.js.opt73
-rw-r--r--test/wasm2js/switch.2asm.js39
-rw-r--r--test/wasm2js/tee_local.2asm.js39
-rw-r--r--test/wasm2js/traps.2asm.js190
-rw-r--r--test/wasm2js/unaligned.2asm.js55
-rw-r--r--test/wasm2js/unaligned.2asm.js.opt55
-rw-r--r--test/wasm2js/unary-ops.2asm.js39
-rw-r--r--test/wasm2js/unary-ops.2asm.js.opt39
-rw-r--r--test/wasm2js/unreachable-get-cycle.2asm.js39
-rw-r--r--test/wasm2js/unreachable-get-cycle.2asm.js.opt39
-rw-r--r--test/wasm2js/unreachable-insts.2asm.js39
-rw-r--r--test/wasm2js/unreachable-insts.2asm.js.opt39
-rw-r--r--test/wasm2js/unreachable-later.2asm.js39
-rw-r--r--test/wasm2js/unreachable-later.2asm.js.opt39
113 files changed, 2336 insertions, 4233 deletions
diff --git a/test/wasm2js/add_div.2asm.js b/test/wasm2js/add_div.2asm.js
index 1b1ebae7e..6a8896863 100644
--- a/test/wasm2js/add_div.2asm.js
+++ b/test/wasm2js/add_div.2asm.js
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function foo($0) {
$0 = $0 | 0;
return (($0 >>> 0) / (100 >>> 0) | 0) + (($0 | 0) / (-100 | 0) | 0) | 0 | 0;
@@ -22,19 +22,6 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var foo = retasmFunc.foo;
diff --git a/test/wasm2js/add_div.2asm.js.opt b/test/wasm2js/add_div.2asm.js.opt
index 85a64172f..9199e21ba 100644
--- a/test/wasm2js/add_div.2asm.js.opt
+++ b/test/wasm2js/add_div.2asm.js.opt
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function foo($0) {
$0 = $0 | 0;
return (($0 | 0) / -100 | 0) + (($0 >>> 0) / 100 | 0) | 0;
@@ -22,19 +22,6 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var foo = retasmFunc.foo;
diff --git a/test/wasm2js/atomic_fence.2asm.js b/test/wasm2js/atomic_fence.2asm.js
index 5ce7d8ce1..4bde4a32e 100644
--- a/test/wasm2js/atomic_fence.2asm.js
+++ b/test/wasm2js/atomic_fence.2asm.js
@@ -1,25 +1,25 @@
-function asmFunc(global, env, buffer) {
- 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;
+function asmFunc(env, buffer) {
+ 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;
function $0() {
}
@@ -34,17 +34,17 @@ function asmFunc(global, env, buffer) {
var newPages = oldPages + pagesToAdd | 0;
if ((oldPages < newPages) && (newPages < 65536)) {
var newBuffer = new ArrayBuffer(Math_imul(newPages, 65536));
- var newHEAP8 = new global.Int8Array(newBuffer);
+ var newHEAP8 = new Int8Array(newBuffer);
newHEAP8.set(HEAP8);
HEAP8 = newHEAP8;
- HEAP8 = new global.Int8Array(newBuffer);
- HEAP16 = new global.Int16Array(newBuffer);
- HEAP32 = new global.Int32Array(newBuffer);
- HEAPU8 = new global.Uint8Array(newBuffer);
- HEAPU16 = new global.Uint16Array(newBuffer);
- HEAPU32 = new global.Uint32Array(newBuffer);
- HEAPF32 = new global.Float32Array(newBuffer);
- HEAPF64 = new global.Float64Array(newBuffer);
+ HEAP8 = new Int8Array(newBuffer);
+ HEAP16 = new Int16Array(newBuffer);
+ HEAP32 = new Int32Array(newBuffer);
+ HEAPU8 = new Uint8Array(newBuffer);
+ HEAPU16 = new Uint16Array(newBuffer);
+ HEAPU32 = new Uint32Array(newBuffer);
+ HEAPF32 = new Float32Array(newBuffer);
+ HEAPF64 = new Float64Array(newBuffer);
buffer = newBuffer;
}
return oldPages;
@@ -57,20 +57,7 @@ function asmFunc(global, env, buffer) {
var memasmFunc = new ArrayBuffer(1507328);
var bufferView = new Uint8Array(memasmFunc);
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
},
memasmFunc
);
diff --git a/test/wasm2js/atomic_fence.2asm.js.opt b/test/wasm2js/atomic_fence.2asm.js.opt
index a52324d34..ba58088de 100644
--- a/test/wasm2js/atomic_fence.2asm.js.opt
+++ b/test/wasm2js/atomic_fence.2asm.js.opt
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function $0() {
}
@@ -21,19 +21,6 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var atomic_fence = retasmFunc.atomic_fence;
diff --git a/test/wasm2js/atomics_32.2asm.js b/test/wasm2js/atomics_32.2asm.js
index c01f71706..12cdbe8ff 100644
--- a/test/wasm2js/atomics_32.2asm.js
+++ b/test/wasm2js/atomics_32.2asm.js
@@ -67,27 +67,27 @@
var memorySegments = {};
-function asmFunc(global, env, buffer) {
- 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;
+function asmFunc(env, buffer) {
+ 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;
function $0() {
var i64toi32_i32$0 = 0, i64toi32_i32$2 = 0, i64toi32_i32$1 = 0;
Atomics.compareExchange(HEAP8, 1024, 1, 2) | 0;
@@ -151,20 +151,7 @@ for (var base64ReverseLookup = new Uint8Array(123/*'z'+1*/), i = 25; i >= 0; --i
}
memorySegments[0] = base64DecodeToExistingUint8Array(new Uint8Array(6), 0, "aGVsbG8s");
memorySegments[1] = base64DecodeToExistingUint8Array(new Uint8Array(6), 0, "d29ybGQh");
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
},
memasmFunc
);
diff --git a/test/wasm2js/atomics_32.2asm.js.opt b/test/wasm2js/atomics_32.2asm.js.opt
index 516d67aee..4a7a5d85f 100644
--- a/test/wasm2js/atomics_32.2asm.js.opt
+++ b/test/wasm2js/atomics_32.2asm.js.opt
@@ -67,27 +67,27 @@
var memorySegments = {};
-function asmFunc(global, env, buffer) {
- 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;
+function asmFunc(env, buffer) {
+ 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;
function $0() {
Atomics.compareExchange(HEAP8, 1024, 1, 2) | 0;
Atomics.compareExchange(HEAP16, 512, 1, 2) | 0;
@@ -147,20 +147,7 @@ for (var base64ReverseLookup = new Uint8Array(123/*'z'+1*/), i = 25; i >= 0; --i
}
memorySegments[0] = base64DecodeToExistingUint8Array(new Uint8Array(6), 0, "aGVsbG8s");
memorySegments[1] = base64DecodeToExistingUint8Array(new Uint8Array(6), 0, "d29ybGQh");
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
},
memasmFunc
);
diff --git a/test/wasm2js/base64.2asm.js b/test/wasm2js/base64.2asm.js
index 6444e8c31..f2a42641c 100644
--- a/test/wasm2js/base64.2asm.js
+++ b/test/wasm2js/base64.2asm.js
@@ -1,34 +1,21 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
return {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
diff --git a/test/wasm2js/base64.2asm.js.opt b/test/wasm2js/base64.2asm.js.opt
index 6444e8c31..f2a42641c 100644
--- a/test/wasm2js/base64.2asm.js.opt
+++ b/test/wasm2js/base64.2asm.js.opt
@@ -1,34 +1,21 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
return {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
diff --git a/test/wasm2js/br.2asm.js b/test/wasm2js/br.2asm.js
index c60de9fc2..bdaed6a41 100644
--- a/test/wasm2js/br.2asm.js
+++ b/test/wasm2js/br.2asm.js
@@ -1,18 +1,18 @@
import { setTempRet0 } from 'env';
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 setTempRet0 = env.setTempRet0;
var i64toi32_i32$HIGH_BITS = 0;
function dummy() {
@@ -715,20 +715,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
setTempRet0
});
export var type_i32 = retasmFunc.type_i32;
diff --git a/test/wasm2js/br_table.2asm.js b/test/wasm2js/br_table.2asm.js
index 5e1c2c05c..9944a7495 100644
--- a/test/wasm2js/br_table.2asm.js
+++ b/test/wasm2js/br_table.2asm.js
@@ -1,18 +1,18 @@
import { setTempRet0 } from 'env';
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 setTempRet0 = env.setTempRet0;
var i64toi32_i32$HIGH_BITS = 0;
function dummy() {
@@ -13420,20 +13420,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
setTempRet0
});
export var type_i32 = retasmFunc.type_i32;
diff --git a/test/wasm2js/br_table_hoisting.2asm.js b/test/wasm2js/br_table_hoisting.2asm.js
index e7f8d03e0..8f4b37eb0 100644
--- a/test/wasm2js/br_table_hoisting.2asm.js
+++ b/test/wasm2js/br_table_hoisting.2asm.js
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function zed($0) {
$0 = $0 | 0;
zed($0 | 0);
@@ -176,20 +176,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var foo1 = retasmFunc.foo1;
export var foo2 = retasmFunc.foo2;
diff --git a/test/wasm2js/br_table_hoisting.2asm.js.opt b/test/wasm2js/br_table_hoisting.2asm.js.opt
index 0af270551..fcbee7aa1 100644
--- a/test/wasm2js/br_table_hoisting.2asm.js.opt
+++ b/test/wasm2js/br_table_hoisting.2asm.js.opt
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function zed($0) {
zed($0);
}
@@ -166,20 +166,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var foo1 = retasmFunc.foo1;
export var foo2 = retasmFunc.foo2;
diff --git a/test/wasm2js/br_table_temp.2asm.js b/test/wasm2js/br_table_temp.2asm.js
index 99d7ceeef..a7302adae 100644
--- a/test/wasm2js/br_table_temp.2asm.js
+++ b/test/wasm2js/br_table_temp.2asm.js
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function dummy() {
}
@@ -13263,20 +13263,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var type_i32 = retasmFunc.type_i32;
export var type_i64 = retasmFunc.type_i64;
diff --git a/test/wasm2js/br_table_temp.2asm.js.opt b/test/wasm2js/br_table_temp.2asm.js.opt
index c96c0f18e..acaffa70b 100644
--- a/test/wasm2js/br_table_temp.2asm.js.opt
+++ b/test/wasm2js/br_table_temp.2asm.js.opt
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function dummy() {
}
@@ -12687,20 +12687,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var type_i32 = retasmFunc.type_i32;
export var type_i64 = retasmFunc.type_i64;
diff --git a/test/wasm2js/br_table_to_loop.2asm.js b/test/wasm2js/br_table_to_loop.2asm.js
index 3c0acdf6f..406711ae0 100644
--- a/test/wasm2js/br_table_to_loop.2asm.js
+++ b/test/wasm2js/br_table_to_loop.2asm.js
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function $0() {
block : {
loop : while (1) switch (1 | 0) {
@@ -40,20 +40,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var exp1 = retasmFunc.exp1;
export var exp2 = retasmFunc.exp2;
diff --git a/test/wasm2js/br_table_to_loop.2asm.js.opt b/test/wasm2js/br_table_to_loop.2asm.js.opt
index 1e3f4f762..a161c406c 100644
--- a/test/wasm2js/br_table_to_loop.2asm.js.opt
+++ b/test/wasm2js/br_table_to_loop.2asm.js.opt
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function $0() {
while (1) continue;
}
@@ -26,20 +26,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var exp1 = retasmFunc.exp1;
export var exp2 = retasmFunc.exp2;
diff --git a/test/wasm2js/break-drop.2asm.js b/test/wasm2js/break-drop.2asm.js
index 45bf464bb..c022da64f 100644
--- a/test/wasm2js/break-drop.2asm.js
+++ b/test/wasm2js/break-drop.2asm.js
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function $0() {
}
@@ -31,20 +31,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var br = retasmFunc.br;
export var br_if = retasmFunc.br_if;
diff --git a/test/wasm2js/bulk-memory.2asm.js b/test/wasm2js/bulk-memory.2asm.js
index 5983db235..2b7431486 100644
--- a/test/wasm2js/bulk-memory.2asm.js
+++ b/test/wasm2js/bulk-memory.2asm.js
@@ -1,36 +1,23 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
return {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
@@ -46,27 +33,27 @@ var retasmFunc = asmFunc({
bufferView.fill(value, dest, dest + size);
}
-function asmFunc(global, env, buffer) {
- 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;
+function asmFunc(env, buffer) {
+ 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;
function $0($0_1, $1_1, $2) {
$0_1 = $0_1 | 0;
$1_1 = $1_1 | 0;
@@ -89,17 +76,17 @@ function asmFunc(global, env, buffer) {
var newPages = oldPages + pagesToAdd | 0;
if ((oldPages < newPages) && (newPages < 65536)) {
var newBuffer = new ArrayBuffer(Math_imul(newPages, 65536));
- var newHEAP8 = new global.Int8Array(newBuffer);
+ var newHEAP8 = new Int8Array(newBuffer);
newHEAP8.set(HEAP8);
HEAP8 = newHEAP8;
- HEAP8 = new global.Int8Array(newBuffer);
- HEAP16 = new global.Int16Array(newBuffer);
- HEAP32 = new global.Int32Array(newBuffer);
- HEAPU8 = new global.Uint8Array(newBuffer);
- HEAPU16 = new global.Uint16Array(newBuffer);
- HEAPU32 = new global.Uint32Array(newBuffer);
- HEAPF32 = new global.Float32Array(newBuffer);
- HEAPF64 = new global.Float64Array(newBuffer);
+ HEAP8 = new Int8Array(newBuffer);
+ HEAP16 = new Int16Array(newBuffer);
+ HEAP32 = new Int32Array(newBuffer);
+ HEAPU8 = new Uint8Array(newBuffer);
+ HEAPU16 = new Uint16Array(newBuffer);
+ HEAPU32 = new Uint32Array(newBuffer);
+ HEAPF32 = new Float32Array(newBuffer);
+ HEAPF64 = new Float64Array(newBuffer);
buffer = newBuffer;
}
return oldPages;
@@ -113,20 +100,7 @@ function asmFunc(global, env, buffer) {
var memasmFunc = new ArrayBuffer(65536);
var bufferView = new Uint8Array(memasmFunc);
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
},
memasmFunc
);
@@ -144,27 +118,27 @@ export var load8_u = retasmFunc.load8_u;
bufferView.copyWithin(dest, source, source + size);
}
-function asmFunc(global, env, buffer) {
- 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;
+function asmFunc(env, buffer) {
+ 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;
function $0($0_1, $1_1, $2) {
$0_1 = $0_1 | 0;
$1_1 = $1_1 | 0;
@@ -209,20 +183,7 @@ for (var base64ReverseLookup = new Uint8Array(123/*'z'+1*/), i = 25; i >= 0; --i
return uint8Array;
}
base64DecodeToExistingUint8Array(bufferView, 0, "qrvM3Q==");
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
},
memasmFunc
);
@@ -242,27 +203,27 @@ export var load8_u = retasmFunc.load8_u;
var memorySegments = {};
-function asmFunc(global, env, buffer) {
- 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;
+function asmFunc(env, buffer) {
+ 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;
function $0($0_1, $1_1, $2) {
$0_1 = $0_1 | 0;
$1_1 = $1_1 | 0;
@@ -285,17 +246,17 @@ function asmFunc(global, env, buffer) {
var newPages = oldPages + pagesToAdd | 0;
if ((oldPages < newPages) && (newPages < 65536)) {
var newBuffer = new ArrayBuffer(Math_imul(newPages, 65536));
- var newHEAP8 = new global.Int8Array(newBuffer);
+ var newHEAP8 = new Int8Array(newBuffer);
newHEAP8.set(HEAP8);
HEAP8 = newHEAP8;
- HEAP8 = new global.Int8Array(newBuffer);
- HEAP16 = new global.Int16Array(newBuffer);
- HEAP32 = new global.Int32Array(newBuffer);
- HEAPU8 = new global.Uint8Array(newBuffer);
- HEAPU16 = new global.Uint16Array(newBuffer);
- HEAPU32 = new global.Uint32Array(newBuffer);
- HEAPF32 = new global.Float32Array(newBuffer);
- HEAPF64 = new global.Float64Array(newBuffer);
+ HEAP8 = new Int8Array(newBuffer);
+ HEAP16 = new Int16Array(newBuffer);
+ HEAP32 = new Int32Array(newBuffer);
+ HEAPU8 = new Uint8Array(newBuffer);
+ HEAPU16 = new Uint16Array(newBuffer);
+ HEAPU32 = new Uint32Array(newBuffer);
+ HEAPF32 = new Float32Array(newBuffer);
+ HEAPF64 = new Float64Array(newBuffer);
buffer = newBuffer;
}
return oldPages;
@@ -329,20 +290,7 @@ for (var base64ReverseLookup = new Uint8Array(123/*'z'+1*/), i = 25; i >= 0; --i
return uint8Array;
}
memorySegments[0] = base64DecodeToExistingUint8Array(new Uint8Array(4), 0, "qrvM3Q==");
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
},
memasmFunc
);
@@ -367,27 +315,27 @@ export var load8_u = retasmFunc.load8_u;
var memorySegments = {};
-function asmFunc(global, env, buffer) {
- 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;
+function asmFunc(env, buffer) {
+ 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;
function $0() {
wasm2js_data_drop(0);
}
@@ -414,17 +362,17 @@ function asmFunc(global, env, buffer) {
var newPages = oldPages + pagesToAdd | 0;
if ((oldPages < newPages) && (newPages < 65536)) {
var newBuffer = new ArrayBuffer(Math_imul(newPages, 65536));
- var newHEAP8 = new global.Int8Array(newBuffer);
+ var newHEAP8 = new Int8Array(newBuffer);
newHEAP8.set(HEAP8);
HEAP8 = newHEAP8;
- HEAP8 = new global.Int8Array(newBuffer);
- HEAP16 = new global.Int16Array(newBuffer);
- HEAP32 = new global.Int32Array(newBuffer);
- HEAPU8 = new global.Uint8Array(newBuffer);
- HEAPU16 = new global.Uint16Array(newBuffer);
- HEAPU32 = new global.Uint32Array(newBuffer);
- HEAPF32 = new global.Float32Array(newBuffer);
- HEAPF64 = new global.Float64Array(newBuffer);
+ HEAP8 = new Int8Array(newBuffer);
+ HEAP16 = new Int16Array(newBuffer);
+ HEAP32 = new Int32Array(newBuffer);
+ HEAPU8 = new Uint8Array(newBuffer);
+ HEAPU16 = new Uint16Array(newBuffer);
+ HEAPU32 = new Uint32Array(newBuffer);
+ HEAPF32 = new Float32Array(newBuffer);
+ HEAPF64 = new Float64Array(newBuffer);
buffer = newBuffer;
}
return oldPages;
@@ -461,20 +409,7 @@ for (var base64ReverseLookup = new Uint8Array(123/*'z'+1*/), i = 25; i >= 0; --i
}
memorySegments[0] = base64DecodeToExistingUint8Array(new Uint8Array(0), 0, "");
base64DecodeToExistingUint8Array(bufferView, 0, "");
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
},
memasmFunc
);
diff --git a/test/wasm2js/bulk-memory.2asm.js.opt b/test/wasm2js/bulk-memory.2asm.js.opt
index 2003ea126..77e682c41 100644
--- a/test/wasm2js/bulk-memory.2asm.js.opt
+++ b/test/wasm2js/bulk-memory.2asm.js.opt
@@ -1,36 +1,23 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
return {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
@@ -46,27 +33,27 @@ var retasmFunc = asmFunc({
bufferView.fill(value, dest, dest + size);
}
-function asmFunc(global, env, buffer) {
- 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;
+function asmFunc(env, buffer) {
+ 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;
function $0($0_1, $1_1, $2) {
$0_1 = $0_1 | 0;
$1_1 = $1_1 | 0;
@@ -89,17 +76,17 @@ function asmFunc(global, env, buffer) {
var newPages = oldPages + pagesToAdd | 0;
if ((oldPages < newPages) && (newPages < 65536)) {
var newBuffer = new ArrayBuffer(Math_imul(newPages, 65536));
- var newHEAP8 = new global.Int8Array(newBuffer);
+ var newHEAP8 = new Int8Array(newBuffer);
newHEAP8.set(HEAP8);
HEAP8 = newHEAP8;
- HEAP8 = new global.Int8Array(newBuffer);
- HEAP16 = new global.Int16Array(newBuffer);
- HEAP32 = new global.Int32Array(newBuffer);
- HEAPU8 = new global.Uint8Array(newBuffer);
- HEAPU16 = new global.Uint16Array(newBuffer);
- HEAPU32 = new global.Uint32Array(newBuffer);
- HEAPF32 = new global.Float32Array(newBuffer);
- HEAPF64 = new global.Float64Array(newBuffer);
+ HEAP8 = new Int8Array(newBuffer);
+ HEAP16 = new Int16Array(newBuffer);
+ HEAP32 = new Int32Array(newBuffer);
+ HEAPU8 = new Uint8Array(newBuffer);
+ HEAPU16 = new Uint16Array(newBuffer);
+ HEAPU32 = new Uint32Array(newBuffer);
+ HEAPF32 = new Float32Array(newBuffer);
+ HEAPF64 = new Float64Array(newBuffer);
buffer = newBuffer;
}
return oldPages;
@@ -113,20 +100,7 @@ function asmFunc(global, env, buffer) {
var memasmFunc = new ArrayBuffer(65536);
var bufferView = new Uint8Array(memasmFunc);
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
},
memasmFunc
);
@@ -144,27 +118,27 @@ export var load8_u = retasmFunc.load8_u;
bufferView.copyWithin(dest, source, source + size);
}
-function asmFunc(global, env, buffer) {
- 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;
+function asmFunc(env, buffer) {
+ 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;
function $0($0_1, $1_1, $2) {
$0_1 = $0_1 | 0;
$1_1 = $1_1 | 0;
@@ -209,20 +183,7 @@ for (var base64ReverseLookup = new Uint8Array(123/*'z'+1*/), i = 25; i >= 0; --i
return uint8Array;
}
base64DecodeToExistingUint8Array(bufferView, 0, "qrvM3Q==");
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
},
memasmFunc
);
@@ -242,27 +203,27 @@ export var load8_u = retasmFunc.load8_u;
var memorySegments = {};
-function asmFunc(global, env, buffer) {
- 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;
+function asmFunc(env, buffer) {
+ 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;
function $0($0_1, $1_1, $2) {
$0_1 = $0_1 | 0;
$1_1 = $1_1 | 0;
@@ -285,17 +246,17 @@ function asmFunc(global, env, buffer) {
var newPages = oldPages + pagesToAdd | 0;
if ((oldPages < newPages) && (newPages < 65536)) {
var newBuffer = new ArrayBuffer(Math_imul(newPages, 65536));
- var newHEAP8 = new global.Int8Array(newBuffer);
+ var newHEAP8 = new Int8Array(newBuffer);
newHEAP8.set(HEAP8);
HEAP8 = newHEAP8;
- HEAP8 = new global.Int8Array(newBuffer);
- HEAP16 = new global.Int16Array(newBuffer);
- HEAP32 = new global.Int32Array(newBuffer);
- HEAPU8 = new global.Uint8Array(newBuffer);
- HEAPU16 = new global.Uint16Array(newBuffer);
- HEAPU32 = new global.Uint32Array(newBuffer);
- HEAPF32 = new global.Float32Array(newBuffer);
- HEAPF64 = new global.Float64Array(newBuffer);
+ HEAP8 = new Int8Array(newBuffer);
+ HEAP16 = new Int16Array(newBuffer);
+ HEAP32 = new Int32Array(newBuffer);
+ HEAPU8 = new Uint8Array(newBuffer);
+ HEAPU16 = new Uint16Array(newBuffer);
+ HEAPU32 = new Uint32Array(newBuffer);
+ HEAPF32 = new Float32Array(newBuffer);
+ HEAPF64 = new Float64Array(newBuffer);
buffer = newBuffer;
}
return oldPages;
@@ -329,47 +290,34 @@ for (var base64ReverseLookup = new Uint8Array(123/*'z'+1*/), i = 25; i >= 0; --i
return uint8Array;
}
memorySegments[0] = base64DecodeToExistingUint8Array(new Uint8Array(4), 0, "qrvM3Q==");
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
},
memasmFunc
);
export var init = retasmFunc.init;
export var load8_u = retasmFunc.load8_u;
-function asmFunc(global, env, buffer) {
- 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;
+function asmFunc(env, buffer) {
+ 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;
function $0() {
}
@@ -390,17 +338,17 @@ function asmFunc(global, env, buffer) {
var newPages = oldPages + pagesToAdd | 0;
if ((oldPages < newPages) && (newPages < 65536)) {
var newBuffer = new ArrayBuffer(Math_imul(newPages, 65536));
- var newHEAP8 = new global.Int8Array(newBuffer);
+ var newHEAP8 = new Int8Array(newBuffer);
newHEAP8.set(HEAP8);
HEAP8 = newHEAP8;
- HEAP8 = new global.Int8Array(newBuffer);
- HEAP16 = new global.Int16Array(newBuffer);
- HEAP32 = new global.Int32Array(newBuffer);
- HEAPU8 = new global.Uint8Array(newBuffer);
- HEAPU16 = new global.Uint16Array(newBuffer);
- HEAPU32 = new global.Uint32Array(newBuffer);
- HEAPF32 = new global.Float32Array(newBuffer);
- HEAPF64 = new global.Float64Array(newBuffer);
+ HEAP8 = new Int8Array(newBuffer);
+ HEAP16 = new Int16Array(newBuffer);
+ HEAP32 = new Int32Array(newBuffer);
+ HEAPU8 = new Uint8Array(newBuffer);
+ HEAPU16 = new Uint16Array(newBuffer);
+ HEAPU32 = new Uint32Array(newBuffer);
+ HEAPF32 = new Float32Array(newBuffer);
+ HEAPF64 = new Float64Array(newBuffer);
buffer = newBuffer;
}
return oldPages;
@@ -416,20 +364,7 @@ function asmFunc(global, env, buffer) {
var memasmFunc = new ArrayBuffer(65536);
var bufferView = new Uint8Array(memasmFunc);
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
},
memasmFunc
);
diff --git a/test/wasm2js/comments.2asm.js b/test/wasm2js/comments.2asm.js
index c6d13626f..e3ceaac4f 100644
--- a/test/wasm2js/comments.2asm.js
+++ b/test/wasm2js/comments.2asm.js
@@ -1,68 +1,42 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
return {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
return {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
diff --git a/test/wasm2js/conversions-modified.2asm.js b/test/wasm2js/conversions-modified.2asm.js
index 6280333a4..68bb60d19 100644
--- a/test/wasm2js/conversions-modified.2asm.js
+++ b/test/wasm2js/conversions-modified.2asm.js
@@ -30,19 +30,19 @@ import { setTempRet0 } from 'env';
f32ScratchView[2] = value;
}
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 setTempRet0 = env.setTempRet0;
var i64toi32_i32$HIGH_BITS = 0;
function $0(x) {
@@ -618,20 +618,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
setTempRet0
});
export var i64_extend_s_i32 = retasmFunc.i64_extend_s_i32;
diff --git a/test/wasm2js/conversions-modified.2asm.js.opt b/test/wasm2js/conversions-modified.2asm.js.opt
index 072a3bbc6..2cbf228b1 100644
--- a/test/wasm2js/conversions-modified.2asm.js.opt
+++ b/test/wasm2js/conversions-modified.2asm.js.opt
@@ -30,19 +30,19 @@ import { setTempRet0 } from 'env';
f32ScratchView[2] = value;
}
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 setTempRet0 = env.setTempRet0;
var i64toi32_i32$HIGH_BITS = 0;
function $3($0) {
@@ -209,20 +209,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
setTempRet0
});
export var i64_extend_s_i32 = retasmFunc.i64_extend_s_i32;
diff --git a/test/wasm2js/deterministic.2asm.js b/test/wasm2js/deterministic.2asm.js
index 9b98a8695..b465f0d57 100644
--- a/test/wasm2js/deterministic.2asm.js
+++ b/test/wasm2js/deterministic.2asm.js
@@ -1,27 +1,27 @@
-function asmFunc(global, env) {
+function asmFunc(env) {
var memory = env.memory;
var buffer = memory.buffer;
- 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 global$0 = -44;
function $0() {
if ((global$0 >>> 0) / ((HEAP32[0 >> 2] | 0) >>> 0) | 0) {
@@ -41,20 +41,7 @@ function asmFunc(global, env) {
var memasmFunc = new ArrayBuffer(65536);
var bufferView = new Uint8Array(memasmFunc);
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
memory: { buffer : memasmFunc }
});
export var foo = retasmFunc.foo;
diff --git a/test/wasm2js/deterministic.2asm.js.opt b/test/wasm2js/deterministic.2asm.js.opt
index 0875a5180..be4f26cfe 100644
--- a/test/wasm2js/deterministic.2asm.js.opt
+++ b/test/wasm2js/deterministic.2asm.js.opt
@@ -1,27 +1,27 @@
-function asmFunc(global, env) {
+function asmFunc(env) {
var memory = env.memory;
var buffer = memory.buffer;
- 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;
function $0() {
if (4294967252 / HEAPU32[0] | 0) {
abort()
@@ -40,20 +40,7 @@ function asmFunc(global, env) {
var memasmFunc = new ArrayBuffer(65536);
var bufferView = new Uint8Array(memasmFunc);
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
memory: { buffer : memasmFunc }
});
export var foo = retasmFunc.foo;
diff --git a/test/wasm2js/dot_import.2asm.js b/test/wasm2js/dot_import.2asm.js
index 98c1d0156..dcdd7da07 100644
--- a/test/wasm2js/dot_import.2asm.js
+++ b/test/wasm2js/dot_import.2asm.js
@@ -1,18 +1,18 @@
import { ba_se } from 'mod.ule';
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 base = env.ba_se;
function $0() {
base();
@@ -23,20 +23,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
ba_se
});
export var exported = retasmFunc.exported;
diff --git a/test/wasm2js/dot_import.2asm.js.opt b/test/wasm2js/dot_import.2asm.js.opt
index 98c1d0156..dcdd7da07 100644
--- a/test/wasm2js/dot_import.2asm.js.opt
+++ b/test/wasm2js/dot_import.2asm.js.opt
@@ -1,18 +1,18 @@
import { ba_se } from 'mod.ule';
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 base = env.ba_se;
function $0() {
base();
@@ -23,20 +23,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
ba_se
});
export var exported = retasmFunc.exported;
diff --git a/test/wasm2js/dynamicLibrary.2asm.js b/test/wasm2js/dynamicLibrary.2asm.js
index 48057ed9c..b570fab36 100644
--- a/test/wasm2js/dynamicLibrary.2asm.js
+++ b/test/wasm2js/dynamicLibrary.2asm.js
@@ -12,29 +12,29 @@ function Table(ret) {
return ret;
}
-function asmFunc(global, env) {
+function asmFunc(env) {
var memory = env.memory;
var buffer = memory.buffer;
- 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 import$memoryBase = env.memoryBase | 0;
var import$tableBase = env.tableBase | 0;
function foo() {
@@ -84,20 +84,7 @@ for (var base64ReverseLookup = new Uint8Array(123/*'z'+1*/), i = 25; i >= 0; --i
return uint8Array;
}
base64DecodeToExistingUint8Array(bufferView, memoryBase, "ZHluYW1pYyBkYXRh");
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
memory: { buffer : memasmFunc }
});
export var baz = retasmFunc.baz;
diff --git a/test/wasm2js/dynamicLibrary.2asm.js.opt b/test/wasm2js/dynamicLibrary.2asm.js.opt
index 76ec540d9..4d7b4ac42 100644
--- a/test/wasm2js/dynamicLibrary.2asm.js.opt
+++ b/test/wasm2js/dynamicLibrary.2asm.js.opt
@@ -12,29 +12,29 @@ function Table(ret) {
return ret;
}
-function asmFunc(global, env) {
+function asmFunc(env) {
var memory = env.memory;
var buffer = memory.buffer;
- 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 import$memoryBase = env.memoryBase | 0;
var import$tableBase = env.tableBase | 0;
function foo() {
@@ -76,20 +76,7 @@ for (var base64ReverseLookup = new Uint8Array(123/*'z'+1*/), i = 25; i >= 0; --i
return uint8Array;
}
base64DecodeToExistingUint8Array(bufferView, memoryBase, "ZHluYW1pYyBkYXRh");
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
memory: { buffer : memasmFunc }
});
export var baz = retasmFunc.baz;
diff --git a/test/wasm2js/empty_export.2asm.js b/test/wasm2js/empty_export.2asm.js
index cff3b2dc7..d63128f38 100644
--- a/test/wasm2js/empty_export.2asm.js
+++ b/test/wasm2js/empty_export.2asm.js
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function foo() {
}
@@ -21,19 +21,6 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var $ = retasmFunc.$;
diff --git a/test/wasm2js/empty_export.2asm.js.opt b/test/wasm2js/empty_export.2asm.js.opt
index cff3b2dc7..d63128f38 100644
--- a/test/wasm2js/empty_export.2asm.js.opt
+++ b/test/wasm2js/empty_export.2asm.js.opt
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function foo() {
}
@@ -21,19 +21,6 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var $ = retasmFunc.$;
diff --git a/test/wasm2js/empty_table.2asm.js b/test/wasm2js/empty_table.2asm.js
index 6444e8c31..f2a42641c 100644
--- a/test/wasm2js/empty_table.2asm.js
+++ b/test/wasm2js/empty_table.2asm.js
@@ -1,34 +1,21 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
return {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
diff --git a/test/wasm2js/emscripten-grow-no.2asm.js b/test/wasm2js/emscripten-grow-no.2asm.js
index 3b9c81248..998527287 100644
--- a/test/wasm2js/emscripten-grow-no.2asm.js
+++ b/test/wasm2js/emscripten-grow-no.2asm.js
@@ -1,27 +1,27 @@
function instantiate(asmLibraryArg, wasmMemory) {
-function asmFunc(global, env) {
+function asmFunc(env) {
var memory = env.memory;
var buffer = memory.buffer;
- 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;
// EMSCRIPTEN_START_FUNCS
;
// EMSCRIPTEN_END_FUNCS
@@ -66,21 +66,6 @@ for (var base64ReverseLookup = new Uint8Array(123/*'z'+1*/), i = 25; i >= 0; --i
return uint8Array;
}
base64DecodeToExistingUint8Array(bufferView, 1600, "YWJj");
-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
diff --git a/test/wasm2js/emscripten-grow-no.2asm.js.opt b/test/wasm2js/emscripten-grow-no.2asm.js.opt
index 3b9c81248..998527287 100644
--- a/test/wasm2js/emscripten-grow-no.2asm.js.opt
+++ b/test/wasm2js/emscripten-grow-no.2asm.js.opt
@@ -1,27 +1,27 @@
function instantiate(asmLibraryArg, wasmMemory) {
-function asmFunc(global, env) {
+function asmFunc(env) {
var memory = env.memory;
var buffer = memory.buffer;
- 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;
// EMSCRIPTEN_START_FUNCS
;
// EMSCRIPTEN_END_FUNCS
@@ -66,21 +66,6 @@ for (var base64ReverseLookup = new Uint8Array(123/*'z'+1*/), i = 25; i >= 0; --i
return uint8Array;
}
base64DecodeToExistingUint8Array(bufferView, 1600, "YWJj");
-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
diff --git a/test/wasm2js/emscripten-grow-yes.2asm.js b/test/wasm2js/emscripten-grow-yes.2asm.js
index 157b5510d..3cb5371b1 100644
--- a/test/wasm2js/emscripten-grow-yes.2asm.js
+++ b/test/wasm2js/emscripten-grow-yes.2asm.js
@@ -1,28 +1,28 @@
function instantiate(asmLibraryArg, wasmMemory) {
-function asmFunc(global, env) {
+function asmFunc(env) {
var memory = env.memory;
var buffer = memory.buffer;
memory.grow = __wasm_memory_grow;
- 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;
// EMSCRIPTEN_START_FUNCS
;
// EMSCRIPTEN_END_FUNCS
@@ -37,17 +37,17 @@ function asmFunc(global, env) {
var newPages = oldPages + pagesToAdd | 0;
if ((oldPages < newPages) && (newPages < 65536)) {
var newBuffer = new ArrayBuffer(Math_imul(newPages, 65536));
- var newHEAP8 = new global.Int8Array(newBuffer);
+ var newHEAP8 = new Int8Array(newBuffer);
newHEAP8.set(HEAP8);
HEAP8 = newHEAP8;
- HEAP8 = new global.Int8Array(newBuffer);
- HEAP16 = new global.Int16Array(newBuffer);
- HEAP32 = new global.Int32Array(newBuffer);
- HEAPU8 = new global.Uint8Array(newBuffer);
- HEAPU16 = new global.Uint16Array(newBuffer);
- HEAPU32 = new global.Uint32Array(newBuffer);
- HEAPF32 = new global.Float32Array(newBuffer);
- HEAPF64 = new global.Float64Array(newBuffer);
+ HEAP8 = new Int8Array(newBuffer);
+ HEAP16 = new Int16Array(newBuffer);
+ HEAP32 = new Int32Array(newBuffer);
+ HEAPU8 = new Uint8Array(newBuffer);
+ HEAPU16 = new Uint16Array(newBuffer);
+ HEAPU32 = new Uint32Array(newBuffer);
+ HEAPF32 = new Float32Array(newBuffer);
+ HEAPF64 = new Float64Array(newBuffer);
buffer = newBuffer;
memory.buffer = newBuffer;
}
@@ -90,21 +90,6 @@ for (var base64ReverseLookup = new Uint8Array(123/*'z'+1*/), i = 25; i >= 0; --i
return uint8Array;
}
base64DecodeToExistingUint8Array(bufferView, 1600, "YWJj");
-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
diff --git a/test/wasm2js/emscripten-grow-yes.2asm.js.opt b/test/wasm2js/emscripten-grow-yes.2asm.js.opt
index 157b5510d..3cb5371b1 100644
--- a/test/wasm2js/emscripten-grow-yes.2asm.js.opt
+++ b/test/wasm2js/emscripten-grow-yes.2asm.js.opt
@@ -1,28 +1,28 @@
function instantiate(asmLibraryArg, wasmMemory) {
-function asmFunc(global, env) {
+function asmFunc(env) {
var memory = env.memory;
var buffer = memory.buffer;
memory.grow = __wasm_memory_grow;
- 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;
// EMSCRIPTEN_START_FUNCS
;
// EMSCRIPTEN_END_FUNCS
@@ -37,17 +37,17 @@ function asmFunc(global, env) {
var newPages = oldPages + pagesToAdd | 0;
if ((oldPages < newPages) && (newPages < 65536)) {
var newBuffer = new ArrayBuffer(Math_imul(newPages, 65536));
- var newHEAP8 = new global.Int8Array(newBuffer);
+ var newHEAP8 = new Int8Array(newBuffer);
newHEAP8.set(HEAP8);
HEAP8 = newHEAP8;
- HEAP8 = new global.Int8Array(newBuffer);
- HEAP16 = new global.Int16Array(newBuffer);
- HEAP32 = new global.Int32Array(newBuffer);
- HEAPU8 = new global.Uint8Array(newBuffer);
- HEAPU16 = new global.Uint16Array(newBuffer);
- HEAPU32 = new global.Uint32Array(newBuffer);
- HEAPF32 = new global.Float32Array(newBuffer);
- HEAPF64 = new global.Float64Array(newBuffer);
+ HEAP8 = new Int8Array(newBuffer);
+ HEAP16 = new Int16Array(newBuffer);
+ HEAP32 = new Int32Array(newBuffer);
+ HEAPU8 = new Uint8Array(newBuffer);
+ HEAPU16 = new Uint16Array(newBuffer);
+ HEAPU32 = new Uint32Array(newBuffer);
+ HEAPF32 = new Float32Array(newBuffer);
+ HEAPF64 = new Float64Array(newBuffer);
buffer = newBuffer;
memory.buffer = newBuffer;
}
@@ -90,21 +90,6 @@ for (var base64ReverseLookup = new Uint8Array(123/*'z'+1*/), i = 25; i >= 0; --i
return uint8Array;
}
base64DecodeToExistingUint8Array(bufferView, 1600, "YWJj");
-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
diff --git a/test/wasm2js/emscripten.2asm.js b/test/wasm2js/emscripten.2asm.js
index dedf750a4..9d08b03a2 100644
--- a/test/wasm2js/emscripten.2asm.js
+++ b/test/wasm2js/emscripten.2asm.js
@@ -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
@@ -224,21 +224,6 @@ for (var base64ReverseLookup = new Uint8Array(123/*'z'+1*/), i = 25; i >= 0; --i
}
base64DecodeToExistingUint8Array(bufferView, 1024, "aGVsbG8sIHdvcmxkIQoAAJwMAAAtKyAgIDBYMHgAKG51bGwpAAAAAAAAAAAAAAAAEQAKABEREQAAAAAFAAAAAAAACQAAAAALAAAAAAAAAAARAA8KERERAwoHAAETCQsLAAAJBgsAAAsABhEAAAAREREAAAAAAAAAAAAAAAAAAAAACwAAAAAAAAAAEQAKChEREQAKAAACAAkLAAAACQALAAALAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAwAAAAADAAAAAAJDAAAAAAADAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAANAAAABA0AAAAACQ4AAAAAAA4AAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAADwAAAAAPAAAAAAkQAAAAAAAQAAAQAAASAAAAEhISAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABIAAAASEhIAAAAAAAAJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALAAAAAAAAAAAAAAAKAAAAAAoAAAAACQsAAAAAAAsAAAsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAADAAAAAAMAAAAAAkMAAAAAAAMAAAMAAAwMTIzNDU2Nzg5QUJDREVGLTBYKzBYIDBYLTB4KzB4IDB4AGluZgBJTkYAbmFuAE5BTgAuAA==");
base64DecodeToExistingUint8Array(bufferView, 1600, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=");
-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
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
diff --git a/test/wasm2js/endianness.2asm.js b/test/wasm2js/endianness.2asm.js
index cf4925f5b..d6c557a22 100644
--- a/test/wasm2js/endianness.2asm.js
+++ b/test/wasm2js/endianness.2asm.js
@@ -30,27 +30,27 @@ import { setTempRet0 } from 'env';
return f32ScratchView[2];
}
-function asmFunc(global, env, buffer) {
- 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;
+function asmFunc(env, buffer) {
+ 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 setTempRet0 = env.setTempRet0;
var i64toi32_i32$HIGH_BITS = 0;
function i16_store_little(address, value) {
@@ -659,17 +659,17 @@ function asmFunc(global, env, buffer) {
var newPages = oldPages + pagesToAdd | 0;
if ((oldPages < newPages) && (newPages < 65536)) {
var newBuffer = new ArrayBuffer(Math_imul(newPages, 65536));
- var newHEAP8 = new global.Int8Array(newBuffer);
+ var newHEAP8 = new Int8Array(newBuffer);
newHEAP8.set(HEAP8);
HEAP8 = newHEAP8;
- HEAP8 = new global.Int8Array(newBuffer);
- HEAP16 = new global.Int16Array(newBuffer);
- HEAP32 = new global.Int32Array(newBuffer);
- HEAPU8 = new global.Uint8Array(newBuffer);
- HEAPU16 = new global.Uint16Array(newBuffer);
- HEAPU32 = new global.Uint32Array(newBuffer);
- HEAPF32 = new global.Float32Array(newBuffer);
- HEAPF64 = new global.Float64Array(newBuffer);
+ HEAP8 = new Int8Array(newBuffer);
+ HEAP16 = new Int16Array(newBuffer);
+ HEAP32 = new Int32Array(newBuffer);
+ HEAPU8 = new Uint8Array(newBuffer);
+ HEAPU16 = new Uint16Array(newBuffer);
+ HEAPU32 = new Uint32Array(newBuffer);
+ HEAPF32 = new Float32Array(newBuffer);
+ HEAPF64 = new Float64Array(newBuffer);
buffer = newBuffer;
}
return oldPages;
@@ -698,20 +698,7 @@ function asmFunc(global, env, buffer) {
var memasmFunc = new ArrayBuffer(65536);
var bufferView = new Uint8Array(memasmFunc);
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
setTempRet0
},
memasmFunc
diff --git a/test/wasm2js/excess_fallthrough.2asm.js b/test/wasm2js/excess_fallthrough.2asm.js
index 3c8d09bf4..7afed50d3 100644
--- a/test/wasm2js/excess_fallthrough.2asm.js
+++ b/test/wasm2js/excess_fallthrough.2asm.js
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function bar() {
}
@@ -41,19 +41,6 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var foo = retasmFunc.foo;
diff --git a/test/wasm2js/excess_fallthrough.2asm.js.opt b/test/wasm2js/excess_fallthrough.2asm.js.opt
index 0dc045a5a..0a935b246 100644
--- a/test/wasm2js/excess_fallthrough.2asm.js.opt
+++ b/test/wasm2js/excess_fallthrough.2asm.js.opt
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function foo($0) {
$0 = $0 | 0;
abort();
@@ -22,19 +22,6 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var foo = retasmFunc.foo;
diff --git a/test/wasm2js/f32.2asm.js b/test/wasm2js/f32.2asm.js
index 55b58af19..f99d0f97f 100644
--- a/test/wasm2js/f32.2asm.js
+++ b/test/wasm2js/f32.2asm.js
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function $0(x, y) {
x = Math_fround(x);
y = Math_fround(y);
@@ -111,20 +111,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var add = retasmFunc.add;
export var sub = retasmFunc.sub;
diff --git a/test/wasm2js/f32_cmp.2asm.js b/test/wasm2js/f32_cmp.2asm.js
index 326902d6b..fdd72dc9a 100644
--- a/test/wasm2js/f32_cmp.2asm.js
+++ b/test/wasm2js/f32_cmp.2asm.js
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function $0(x, y) {
x = Math_fround(x);
y = Math_fround(y);
@@ -58,20 +58,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var eq = retasmFunc.eq;
export var ne = retasmFunc.ne;
diff --git a/test/wasm2js/f64_cmp.2asm.js b/test/wasm2js/f64_cmp.2asm.js
index 1123be87e..754298954 100644
--- a/test/wasm2js/f64_cmp.2asm.js
+++ b/test/wasm2js/f64_cmp.2asm.js
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function $0(x, y) {
x = +x;
y = +y;
@@ -58,20 +58,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var eq = retasmFunc.eq;
export var ne = retasmFunc.ne;
diff --git a/test/wasm2js/fac.2asm.js b/test/wasm2js/fac.2asm.js
index 5c581e35d..116036940 100644
--- a/test/wasm2js/fac.2asm.js
+++ b/test/wasm2js/fac.2asm.js
@@ -1,18 +1,18 @@
import { setTempRet0 } from 'env';
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 setTempRet0 = env.setTempRet0;
var i64toi32_i32$HIGH_BITS = 0;
function $0($0_1, $0$hi) {
@@ -573,20 +573,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
setTempRet0
});
export var fac_rec = retasmFunc.fac_rec;
diff --git a/test/wasm2js/float-ops.2asm.js b/test/wasm2js/float-ops.2asm.js
index 7cbebb218..685b7bd9c 100644
--- a/test/wasm2js/float-ops.2asm.js
+++ b/test/wasm2js/float-ops.2asm.js
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function $1($0, $1_1) {
$0 = Math_fround($0);
$1_1 = Math_fround($1_1);
@@ -504,20 +504,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var f32_add = retasmFunc.f32_add;
export var f32_sub = retasmFunc.f32_sub;
diff --git a/test/wasm2js/float-ops.2asm.js.opt b/test/wasm2js/float-ops.2asm.js.opt
index fd13fe56d..c0c49f062 100644
--- a/test/wasm2js/float-ops.2asm.js.opt
+++ b/test/wasm2js/float-ops.2asm.js.opt
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function $1($0, $1_1) {
$0 = Math_fround($0);
$1_1 = Math_fround($1_1);
@@ -314,20 +314,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var f32_add = retasmFunc.f32_add;
export var f32_sub = retasmFunc.f32_sub;
diff --git a/test/wasm2js/float_literals-modified.2asm.js b/test/wasm2js/float_literals-modified.2asm.js
index 3792f9c74..143a36dc3 100644
--- a/test/wasm2js/float_literals-modified.2asm.js
+++ b/test/wasm2js/float_literals-modified.2asm.js
@@ -18,19 +18,19 @@ import { setTempRet0 } from 'env';
f32ScratchView[2] = value;
}
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 setTempRet0 = env.setTempRet0;
var i64toi32_i32$HIGH_BITS = 0;
function $0() {
@@ -1147,20 +1147,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
setTempRet0
});
export var f32_nan = retasmFunc.f32_nan;
diff --git a/test/wasm2js/float_literals-modified.2asm.js.opt b/test/wasm2js/float_literals-modified.2asm.js.opt
index 88a833e1e..5772a095e 100644
--- a/test/wasm2js/float_literals-modified.2asm.js.opt
+++ b/test/wasm2js/float_literals-modified.2asm.js.opt
@@ -14,19 +14,19 @@ import { setTempRet0 } from 'env';
f64ScratchView[0] = value;
}
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 setTempRet0 = env.setTempRet0;
var i64toi32_i32$HIGH_BITS = 0;
function $0() {
@@ -363,20 +363,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
setTempRet0
});
export var f32_nan = retasmFunc.f32_nan;
diff --git a/test/wasm2js/float_misc.2asm.js b/test/wasm2js/float_misc.2asm.js
index 0ba6e60e9..a96284d4f 100644
--- a/test/wasm2js/float_misc.2asm.js
+++ b/test/wasm2js/float_misc.2asm.js
@@ -29,19 +29,19 @@
f32ScratchView[2] = value;
}
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function $0(x, y) {
x = Math_fround(x);
y = Math_fround(y);
@@ -298,20 +298,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var f32_add = retasmFunc.f32_add;
export var f32_sub = retasmFunc.f32_sub;
diff --git a/test/wasm2js/forward.2asm.js b/test/wasm2js/forward.2asm.js
index 1a66c9d56..2377ff039 100644
--- a/test/wasm2js/forward.2asm.js
+++ b/test/wasm2js/forward.2asm.js
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function even(n) {
n = n | 0;
var $10 = 0;
@@ -40,20 +40,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var even = retasmFunc.even;
export var odd = retasmFunc.odd;
diff --git a/test/wasm2js/func-ptr-offset.2asm.js b/test/wasm2js/func-ptr-offset.2asm.js
index 2cb5e290e..154cde9de 100644
--- a/test/wasm2js/func-ptr-offset.2asm.js
+++ b/test/wasm2js/func-ptr-offset.2asm.js
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function t1() {
return 1 | 0;
}
@@ -35,19 +35,6 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var call = retasmFunc.call;
diff --git a/test/wasm2js/func-ptr-offset.2asm.js.opt b/test/wasm2js/func-ptr-offset.2asm.js.opt
index b6e55fc40..dfd4f3dca 100644
--- a/test/wasm2js/func-ptr-offset.2asm.js.opt
+++ b/test/wasm2js/func-ptr-offset.2asm.js.opt
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function t1() {
return 1;
}
@@ -35,19 +35,6 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var call = retasmFunc.call;
diff --git a/test/wasm2js/func_ptrs.2asm.js b/test/wasm2js/func_ptrs.2asm.js
index 046c68039..d8a87dcd5 100644
--- a/test/wasm2js/func_ptrs.2asm.js
+++ b/test/wasm2js/func_ptrs.2asm.js
@@ -1,18 +1,18 @@
import { print_i32 } from 'spectest';
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 print = env.print_i32;
function $3() {
return 13 | 0;
@@ -41,20 +41,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
print_i32
});
export var one = retasmFunc.one;
@@ -62,19 +49,19 @@ export var two = retasmFunc.two;
export var three = retasmFunc.three;
export var four = retasmFunc.four;
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function t1() {
return 1 | 0;
}
@@ -112,37 +99,24 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var callt = retasmFunc.callt;
export var callu = retasmFunc.callu;
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function t1() {
return 1 | 0;
}
@@ -162,19 +136,6 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var callt = retasmFunc.callt;
diff --git a/test/wasm2js/get-set-local.2asm.js b/test/wasm2js/get-set-local.2asm.js
index 3f5790de0..ad8208c0e 100644
--- a/test/wasm2js/get-set-local.2asm.js
+++ b/test/wasm2js/get-set-local.2asm.js
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function $1($0, r, r$hi) {
$0 = $0 | 0;
r = r | 0;
@@ -60,19 +60,6 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var check_extend_ui32 = retasmFunc.check_extend_ui32;
diff --git a/test/wasm2js/get-set-local.2asm.js.opt b/test/wasm2js/get-set-local.2asm.js.opt
index 3a6590125..6f8059de4 100644
--- a/test/wasm2js/get-set-local.2asm.js.opt
+++ b/test/wasm2js/get-set-local.2asm.js.opt
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function legalstub$1($0, $1, $2) {
return !$2 & ($0 | 0) == ($1 | 0);
}
@@ -21,19 +21,6 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var check_extend_ui32 = retasmFunc.check_extend_ui32;
diff --git a/test/wasm2js/get_local.2asm.js b/test/wasm2js/get_local.2asm.js
index 09a30db37..607e418c2 100644
--- a/test/wasm2js/get_local.2asm.js
+++ b/test/wasm2js/get_local.2asm.js
@@ -1,18 +1,18 @@
import { setTempRet0 } from 'env';
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 setTempRet0 = env.setTempRet0;
var i64toi32_i32$HIGH_BITS = 0;
function $0() {
@@ -240,20 +240,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
setTempRet0
});
export var type_local_i32 = retasmFunc.type_local_i32;
diff --git a/test/wasm2js/global_i64.2asm.js b/test/wasm2js/global_i64.2asm.js
index c599efffc..91956e50b 100644
--- a/test/wasm2js/global_i64.2asm.js
+++ b/test/wasm2js/global_i64.2asm.js
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 f = -1412567121;
var f$hi = 305419896;
function call($0, $0$hi) {
@@ -33,19 +33,6 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var exp = retasmFunc.exp;
diff --git a/test/wasm2js/global_i64.2asm.js.opt b/test/wasm2js/global_i64.2asm.js.opt
index 268ab21ad..eafc74d37 100644
--- a/test/wasm2js/global_i64.2asm.js.opt
+++ b/test/wasm2js/global_i64.2asm.js.opt
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function $1() {
}
@@ -21,19 +21,6 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var exp = retasmFunc.exp;
diff --git a/test/wasm2js/grow-memory-tricky.2asm.js b/test/wasm2js/grow-memory-tricky.2asm.js
index 230791c87..00dad8b1a 100644
--- a/test/wasm2js/grow-memory-tricky.2asm.js
+++ b/test/wasm2js/grow-memory-tricky.2asm.js
@@ -1,25 +1,25 @@
-function asmFunc(global, env, buffer) {
- 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;
+function asmFunc(env, buffer) {
+ 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;
function $0() {
var wasm2js_i32$0 = 0, wasm2js_i32$1 = 0;
(wasm2js_i32$0 = 0, wasm2js_i32$1 = __wasm_memory_grow(1 | 0)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1;
@@ -46,17 +46,17 @@ function asmFunc(global, env, buffer) {
var newPages = oldPages + pagesToAdd | 0;
if ((oldPages < newPages) && (newPages < 65536)) {
var newBuffer = new ArrayBuffer(Math_imul(newPages, 65536));
- var newHEAP8 = new global.Int8Array(newBuffer);
+ var newHEAP8 = new Int8Array(newBuffer);
newHEAP8.set(HEAP8);
HEAP8 = newHEAP8;
- HEAP8 = new global.Int8Array(newBuffer);
- HEAP16 = new global.Int16Array(newBuffer);
- HEAP32 = new global.Int32Array(newBuffer);
- HEAPU8 = new global.Uint8Array(newBuffer);
- HEAPU16 = new global.Uint16Array(newBuffer);
- HEAPU32 = new global.Uint32Array(newBuffer);
- HEAPF32 = new global.Float32Array(newBuffer);
- HEAPF64 = new global.Float64Array(newBuffer);
+ HEAP8 = new Int8Array(newBuffer);
+ HEAP16 = new Int16Array(newBuffer);
+ HEAP32 = new Int32Array(newBuffer);
+ HEAPU8 = new Uint8Array(newBuffer);
+ HEAPU16 = new Uint16Array(newBuffer);
+ HEAPU32 = new Uint32Array(newBuffer);
+ HEAPF32 = new Float32Array(newBuffer);
+ HEAPF64 = new Float64Array(newBuffer);
buffer = newBuffer;
}
return oldPages;
@@ -81,20 +81,7 @@ function asmFunc(global, env, buffer) {
var memasmFunc = new ArrayBuffer(65536);
var bufferView = new Uint8Array(memasmFunc);
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
},
memasmFunc
);
diff --git a/test/wasm2js/grow-memory-tricky.2asm.js.opt b/test/wasm2js/grow-memory-tricky.2asm.js.opt
index 176d1085f..7f3afb29c 100644
--- a/test/wasm2js/grow-memory-tricky.2asm.js.opt
+++ b/test/wasm2js/grow-memory-tricky.2asm.js.opt
@@ -1,25 +1,25 @@
-function asmFunc(global, env, buffer) {
- 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;
+function asmFunc(env, buffer) {
+ 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;
function $0() {
var wasm2js_i32$0 = 0, wasm2js_i32$1 = 0;
(wasm2js_i32$0 = 0, wasm2js_i32$1 = __wasm_memory_grow(1)), HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1;
@@ -36,17 +36,17 @@ function asmFunc(global, env, buffer) {
var newPages = oldPages + pagesToAdd | 0;
if ((oldPages < newPages) && (newPages < 65536)) {
var newBuffer = new ArrayBuffer(Math_imul(newPages, 65536));
- var newHEAP8 = new global.Int8Array(newBuffer);
+ var newHEAP8 = new Int8Array(newBuffer);
newHEAP8.set(HEAP8);
HEAP8 = newHEAP8;
- HEAP8 = new global.Int8Array(newBuffer);
- HEAP16 = new global.Int16Array(newBuffer);
- HEAP32 = new global.Int32Array(newBuffer);
- HEAPU8 = new global.Uint8Array(newBuffer);
- HEAPU16 = new global.Uint16Array(newBuffer);
- HEAPU32 = new global.Uint32Array(newBuffer);
- HEAPF32 = new global.Float32Array(newBuffer);
- HEAPF64 = new global.Float64Array(newBuffer);
+ HEAP8 = new Int8Array(newBuffer);
+ HEAP16 = new Int16Array(newBuffer);
+ HEAP32 = new Int32Array(newBuffer);
+ HEAPU8 = new Uint8Array(newBuffer);
+ HEAPU16 = new Uint16Array(newBuffer);
+ HEAPU32 = new Uint32Array(newBuffer);
+ HEAPF32 = new Float32Array(newBuffer);
+ HEAPF64 = new Float64Array(newBuffer);
buffer = newBuffer;
}
return oldPages;
@@ -71,20 +71,7 @@ function asmFunc(global, env, buffer) {
var memasmFunc = new ArrayBuffer(65536);
var bufferView = new Uint8Array(memasmFunc);
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
},
memasmFunc
);
diff --git a/test/wasm2js/grow_memory.2asm.js b/test/wasm2js/grow_memory.2asm.js
index 5a952950b..fdad41817 100644
--- a/test/wasm2js/grow_memory.2asm.js
+++ b/test/wasm2js/grow_memory.2asm.js
@@ -1,25 +1,25 @@
-function asmFunc(global, env, buffer) {
- 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;
+function asmFunc(env, buffer) {
+ 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;
function $0(var$0) {
var$0 = var$0 | 0;
return __wasm_memory_grow(var$0 | 0) | 0;
@@ -39,17 +39,17 @@ function asmFunc(global, env, buffer) {
var newPages = oldPages + pagesToAdd | 0;
if ((oldPages < newPages) && (newPages < 65536)) {
var newBuffer = new ArrayBuffer(Math_imul(newPages, 65536));
- var newHEAP8 = new global.Int8Array(newBuffer);
+ var newHEAP8 = new Int8Array(newBuffer);
newHEAP8.set(HEAP8);
HEAP8 = newHEAP8;
- HEAP8 = new global.Int8Array(newBuffer);
- HEAP16 = new global.Int16Array(newBuffer);
- HEAP32 = new global.Int32Array(newBuffer);
- HEAPU8 = new global.Uint8Array(newBuffer);
- HEAPU16 = new global.Uint16Array(newBuffer);
- HEAPU32 = new global.Uint32Array(newBuffer);
- HEAPF32 = new global.Float32Array(newBuffer);
- HEAPF64 = new global.Float64Array(newBuffer);
+ HEAP8 = new Int8Array(newBuffer);
+ HEAP16 = new Int16Array(newBuffer);
+ HEAP32 = new Int32Array(newBuffer);
+ HEAPU8 = new Uint8Array(newBuffer);
+ HEAPU16 = new Uint16Array(newBuffer);
+ HEAPU32 = new Uint32Array(newBuffer);
+ HEAPF32 = new Float32Array(newBuffer);
+ HEAPF64 = new Float64Array(newBuffer);
buffer = newBuffer;
}
return oldPages;
@@ -74,20 +74,7 @@ function asmFunc(global, env, buffer) {
var memasmFunc = new ArrayBuffer(65536);
var bufferView = new Uint8Array(memasmFunc);
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
},
memasmFunc
);
diff --git a/test/wasm2js/i32.2asm.js b/test/wasm2js/i32.2asm.js
index 0b4bd61ab..196314363 100644
--- a/test/wasm2js/i32.2asm.js
+++ b/test/wasm2js/i32.2asm.js
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function $0(x, y) {
x = x | 0;
y = y | 0;
@@ -258,20 +258,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var add = retasmFunc.add;
export var sub = retasmFunc.sub;
diff --git a/test/wasm2js/i64-add-sub.2asm.js b/test/wasm2js/i64-add-sub.2asm.js
index e14a21fc0..46fd6be5b 100644
--- a/test/wasm2js/i64-add-sub.2asm.js
+++ b/test/wasm2js/i64-add-sub.2asm.js
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function $1($0, $0$hi, $1_1, $1$hi, r, r$hi) {
$0 = $0 | 0;
$0$hi = $0$hi | 0;
@@ -229,20 +229,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var check_add_i64 = retasmFunc.check_add_i64;
export var check_sub_i64 = retasmFunc.check_sub_i64;
diff --git a/test/wasm2js/i64-add-sub.2asm.js.opt b/test/wasm2js/i64-add-sub.2asm.js.opt
index d44e7657d..16c3dc46f 100644
--- a/test/wasm2js/i64-add-sub.2asm.js.opt
+++ b/test/wasm2js/i64-add-sub.2asm.js.opt
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function $1($0, $1_1, $2, $3, $4, $5) {
$0 = $0 | 0;
$1_1 = $1_1 | 0;
@@ -39,20 +39,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var check_add_i64 = retasmFunc.check_add_i64;
export var check_sub_i64 = retasmFunc.check_sub_i64;
diff --git a/test/wasm2js/i64-ctz.2asm.js b/test/wasm2js/i64-ctz.2asm.js
index 1d1095990..1cc870068 100644
--- a/test/wasm2js/i64-ctz.2asm.js
+++ b/test/wasm2js/i64-ctz.2asm.js
@@ -1,18 +1,18 @@
import { setTempRet0 } from 'env';
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 setTempRet0 = env.setTempRet0;
var i64toi32_i32$HIGH_BITS = 0;
function popcnt64($0, $0$hi) {
@@ -232,20 +232,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
setTempRet0
});
export var a = retasmFunc.a;
diff --git a/test/wasm2js/i64-ctz.2asm.js.opt b/test/wasm2js/i64-ctz.2asm.js.opt
index 9edec2848..aaacbfc51 100644
--- a/test/wasm2js/i64-ctz.2asm.js.opt
+++ b/test/wasm2js/i64-ctz.2asm.js.opt
@@ -1,18 +1,18 @@
import { setTempRet0 } from 'env';
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 setTempRet0 = env.setTempRet0;
var i64toi32_i32$HIGH_BITS = 0;
function legalstub$popcnt64($0, $1) {
@@ -70,20 +70,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
setTempRet0
});
export var a = retasmFunc.a;
diff --git a/test/wasm2js/i64-lowering.2asm.js b/test/wasm2js/i64-lowering.2asm.js
index 628079ac1..47f0ef3a8 100644
--- a/test/wasm2js/i64-lowering.2asm.js
+++ b/test/wasm2js/i64-lowering.2asm.js
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function $1($0, $0$hi, $1_1, $1$hi) {
$0 = $0 | 0;
$0$hi = $0$hi | 0;
@@ -788,20 +788,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var eq_i64 = retasmFunc.eq_i64;
export var ne_i64 = retasmFunc.ne_i64;
diff --git a/test/wasm2js/i64-lowering.2asm.js.opt b/test/wasm2js/i64-lowering.2asm.js.opt
index 1908dffe4..d4a7576df 100644
--- a/test/wasm2js/i64-lowering.2asm.js.opt
+++ b/test/wasm2js/i64-lowering.2asm.js.opt
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function legalstub$1($0, $1, $2, $3) {
return ($0 | 0) == ($2 | 0) & ($1 | 0) == ($3 | 0);
}
@@ -66,20 +66,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var eq_i64 = retasmFunc.eq_i64;
export var ne_i64 = retasmFunc.ne_i64;
diff --git a/test/wasm2js/i64-rotate.2asm.js b/test/wasm2js/i64-rotate.2asm.js
index b30b79bab..bac728fd0 100644
--- a/test/wasm2js/i64-rotate.2asm.js
+++ b/test/wasm2js/i64-rotate.2asm.js
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 i64toi32_i32$HIGH_BITS = 0;
function $1($0, $0$hi, $1_1, $1$hi, $2_1, $2$hi) {
$0 = $0 | 0;
@@ -441,20 +441,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var rotl = retasmFunc.rotl;
export var rotr = retasmFunc.rotr;
diff --git a/test/wasm2js/i64-rotate.2asm.js.opt b/test/wasm2js/i64-rotate.2asm.js.opt
index 4eb245df5..614a030fe 100644
--- a/test/wasm2js/i64-rotate.2asm.js.opt
+++ b/test/wasm2js/i64-rotate.2asm.js.opt
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 i64toi32_i32$HIGH_BITS = 0;
function legalstub$1($0, $1, $2, $3, $4, $5) {
return (__wasm_rotl_i64($0, $1, $2) | 0) == ($4 | 0) & ($5 | 0) == (i64toi32_i32$HIGH_BITS | 0);
@@ -120,20 +120,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var rotl = retasmFunc.rotl;
export var rotr = retasmFunc.rotr;
diff --git a/test/wasm2js/i64-select.2asm.js b/test/wasm2js/i64-select.2asm.js
index 6444e8c31..f2a42641c 100644
--- a/test/wasm2js/i64-select.2asm.js
+++ b/test/wasm2js/i64-select.2asm.js
@@ -1,34 +1,21 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
return {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
diff --git a/test/wasm2js/i64-select.2asm.js.opt b/test/wasm2js/i64-select.2asm.js.opt
index 6444e8c31..f2a42641c 100644
--- a/test/wasm2js/i64-select.2asm.js.opt
+++ b/test/wasm2js/i64-select.2asm.js.opt
@@ -1,34 +1,21 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
return {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
diff --git a/test/wasm2js/i64-shifts.2asm.js b/test/wasm2js/i64-shifts.2asm.js
index 88c4465d5..9894785f1 100644
--- a/test/wasm2js/i64-shifts.2asm.js
+++ b/test/wasm2js/i64-shifts.2asm.js
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function $1($0, $0$hi, $1_1, $1$hi, $2_1, $2$hi) {
$0 = $0 | 0;
$0$hi = $0$hi | 0;
@@ -246,20 +246,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var shl_i64 = retasmFunc.shl_i64;
export var shr_i64 = retasmFunc.shr_i64;
diff --git a/test/wasm2js/i64-shifts.2asm.js.opt b/test/wasm2js/i64-shifts.2asm.js.opt
index 54cc05097..92efd9070 100644
--- a/test/wasm2js/i64-shifts.2asm.js.opt
+++ b/test/wasm2js/i64-shifts.2asm.js.opt
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function $1($0, $1_1, $2_1, $3, $4) {
$0 = $0 | 0;
$1_1 = $1_1 | 0;
@@ -62,20 +62,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var shl_i64 = retasmFunc.shl_i64;
export var shr_i64 = retasmFunc.shr_i64;
diff --git a/test/wasm2js/if_unreachable.2asm.js b/test/wasm2js/if_unreachable.2asm.js
index 6444e8c31..f2a42641c 100644
--- a/test/wasm2js/if_unreachable.2asm.js
+++ b/test/wasm2js/if_unreachable.2asm.js
@@ -1,34 +1,21 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
return {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
diff --git a/test/wasm2js/if_unreachable.2asm.js.opt b/test/wasm2js/if_unreachable.2asm.js.opt
index 6444e8c31..f2a42641c 100644
--- a/test/wasm2js/if_unreachable.2asm.js.opt
+++ b/test/wasm2js/if_unreachable.2asm.js.opt
@@ -1,34 +1,21 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
return {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
diff --git a/test/wasm2js/indirect-select.2asm.js b/test/wasm2js/indirect-select.2asm.js
index b3c5664d3..4e40cc9e7 100644
--- a/test/wasm2js/indirect-select.2asm.js
+++ b/test/wasm2js/indirect-select.2asm.js
@@ -1,19 +1,19 @@
import { table } from 'env';
-function asmFunc(global, env) {
+function asmFunc(env) {
var FUNCTION_TABLE = env.table;
- 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 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;
function $0(x) {
x = x | 0;
return FUNCTION_TABLE[(x ? 1 : 0) | 0]() | 0 | 0;
@@ -30,20 +30,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
table
});
export var foo_true = retasmFunc.foo_true;
diff --git a/test/wasm2js/indirect-select.2asm.js.opt b/test/wasm2js/indirect-select.2asm.js.opt
index 3a7e9b61c..e61bb6324 100644
--- a/test/wasm2js/indirect-select.2asm.js.opt
+++ b/test/wasm2js/indirect-select.2asm.js.opt
@@ -1,19 +1,19 @@
import { table } from 'env';
-function asmFunc(global, env) {
+function asmFunc(env) {
var FUNCTION_TABLE = env.table;
- 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 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;
function $0($0_1) {
$0_1 = $0_1 | 0;
return FUNCTION_TABLE[!!$0_1 | 0]() | 0;
@@ -30,20 +30,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
table
});
export var foo_true = retasmFunc.foo_true;
diff --git a/test/wasm2js/int_exprs.2asm.js b/test/wasm2js/int_exprs.2asm.js
index 551960c25..cf9a3528e 100644
--- a/test/wasm2js/int_exprs.2asm.js
+++ b/test/wasm2js/int_exprs.2asm.js
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function $0(x, y) {
x = x | 0;
y = y | 0;
@@ -229,20 +229,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var i32_no_fold_cmp_s_offset = retasmFunc.i32_no_fold_cmp_s_offset;
export var i32_no_fold_cmp_u_offset = retasmFunc.i32_no_fold_cmp_u_offset;
@@ -250,19 +237,19 @@ export var i64_no_fold_cmp_s_offset = retasmFunc.i64_no_fold_cmp_s_offset;
export var i64_no_fold_cmp_u_offset = retasmFunc.i64_no_fold_cmp_u_offset;
import { setTempRet0 } from 'env';
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 setTempRet0 = env.setTempRet0;
var i64toi32_i32$HIGH_BITS = 0;
function $0(x, x$hi) {
@@ -326,38 +313,25 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
setTempRet0
});
export var i64_no_fold_wrap_extend_s = retasmFunc.i64_no_fold_wrap_extend_s;
import { setTempRet0 } from 'env';
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 setTempRet0 = env.setTempRet0;
var i64toi32_i32$HIGH_BITS = 0;
function $0(x, x$hi) {
@@ -420,38 +394,25 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
setTempRet0
});
export var i64_no_fold_wrap_extend_u = retasmFunc.i64_no_fold_wrap_extend_u;
import { setTempRet0 } from 'env';
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 setTempRet0 = env.setTempRet0;
var i64toi32_i32$HIGH_BITS = 0;
function $0(x) {
@@ -626,20 +587,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
setTempRet0
});
export var i32_no_fold_shl_shr_s = retasmFunc.i32_no_fold_shl_shr_s;
@@ -648,19 +596,19 @@ export var i64_no_fold_shl_shr_s = retasmFunc.i64_no_fold_shl_shr_s;
export var i64_no_fold_shl_shr_u = retasmFunc.i64_no_fold_shl_shr_u;
import { setTempRet0 } from 'env';
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 setTempRet0 = env.setTempRet0;
var i64toi32_i32$HIGH_BITS = 0;
function $0(x) {
@@ -835,20 +783,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
setTempRet0
});
export var i32_no_fold_shr_s_shl = retasmFunc.i32_no_fold_shr_s_shl;
@@ -857,19 +792,19 @@ export var i64_no_fold_shr_s_shl = retasmFunc.i64_no_fold_shr_s_shl;
export var i64_no_fold_shr_u_shl = retasmFunc.i64_no_fold_shr_u_shl;
import { setTempRet0 } from 'env';
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 setTempRet0 = env.setTempRet0;
var __wasm_intrinsics_temp_i64 = 0;
var __wasm_intrinsics_temp_i64$hi = 0;
@@ -1663,20 +1598,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
setTempRet0
});
export var i32_no_fold_div_s_mul = retasmFunc.i32_no_fold_div_s_mul;
@@ -1685,19 +1607,19 @@ export var i64_no_fold_div_s_mul = retasmFunc.i64_no_fold_div_s_mul;
export var i64_no_fold_div_u_mul = retasmFunc.i64_no_fold_div_u_mul;
import { setTempRet0 } from 'env';
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 setTempRet0 = env.setTempRet0;
var __wasm_intrinsics_temp_i64 = 0;
var __wasm_intrinsics_temp_i64$hi = 0;
@@ -2397,20 +2319,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
setTempRet0
});
export var i32_no_fold_div_s_self = retasmFunc.i32_no_fold_div_s_self;
@@ -2419,19 +2328,19 @@ export var i64_no_fold_div_s_self = retasmFunc.i64_no_fold_div_s_self;
export var i64_no_fold_div_u_self = retasmFunc.i64_no_fold_div_u_self;
import { setTempRet0 } from 'env';
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 setTempRet0 = env.setTempRet0;
var __wasm_intrinsics_temp_i64 = 0;
var __wasm_intrinsics_temp_i64$hi = 0;
@@ -3113,20 +3022,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
setTempRet0
});
export var i32_no_fold_rem_s_self = retasmFunc.i32_no_fold_rem_s_self;
@@ -3135,19 +3031,19 @@ export var i64_no_fold_rem_s_self = retasmFunc.i64_no_fold_rem_s_self;
export var i64_no_fold_rem_u_self = retasmFunc.i64_no_fold_rem_u_self;
import { setTempRet0 } from 'env';
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 setTempRet0 = env.setTempRet0;
var __wasm_intrinsics_temp_i64 = 0;
var __wasm_intrinsics_temp_i64$hi = 0;
@@ -3941,20 +3837,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
setTempRet0
});
export var i32_no_fold_mul_div_s = retasmFunc.i32_no_fold_mul_div_s;
@@ -3963,19 +3846,19 @@ export var i64_no_fold_mul_div_s = retasmFunc.i64_no_fold_mul_div_s;
export var i64_no_fold_mul_div_u = retasmFunc.i64_no_fold_mul_div_u;
import { setTempRet0 } from 'env';
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 setTempRet0 = env.setTempRet0;
var __wasm_intrinsics_temp_i64 = 0;
var __wasm_intrinsics_temp_i64$hi = 0;
@@ -4611,39 +4494,26 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
setTempRet0
});
export var i32_no_fold_div_s_2 = retasmFunc.i32_no_fold_div_s_2;
export var i64_no_fold_div_s_2 = retasmFunc.i64_no_fold_div_s_2;
import { setTempRet0 } from 'env';
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 setTempRet0 = env.setTempRet0;
var __wasm_intrinsics_temp_i64 = 0;
var __wasm_intrinsics_temp_i64$hi = 0;
@@ -5261,39 +5131,26 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
setTempRet0
});
export var i32_no_fold_rem_s_2 = retasmFunc.i32_no_fold_rem_s_2;
export var i64_no_fold_rem_s_2 = retasmFunc.i64_no_fold_rem_s_2;
import { setTempRet0 } from 'env';
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 setTempRet0 = env.setTempRet0;
var __wasm_intrinsics_temp_i64 = 0;
var __wasm_intrinsics_temp_i64$hi = 0;
@@ -5993,20 +5850,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
setTempRet0
});
export var i32_div_s_0 = retasmFunc.i32_div_s_0;
@@ -6015,19 +5859,19 @@ export var i64_div_s_0 = retasmFunc.i64_div_s_0;
export var i64_div_u_0 = retasmFunc.i64_div_u_0;
import { setTempRet0 } from 'env';
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 setTempRet0 = env.setTempRet0;
var __wasm_intrinsics_temp_i64 = 0;
var __wasm_intrinsics_temp_i64$hi = 0;
@@ -6727,20 +6571,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
setTempRet0
});
export var i32_div_s_3 = retasmFunc.i32_div_s_3;
@@ -6749,19 +6580,19 @@ export var i64_div_s_3 = retasmFunc.i64_div_s_3;
export var i64_div_u_3 = retasmFunc.i64_div_u_3;
import { setTempRet0 } from 'env';
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 setTempRet0 = env.setTempRet0;
var __wasm_intrinsics_temp_i64 = 0;
var __wasm_intrinsics_temp_i64$hi = 0;
@@ -7461,20 +7292,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
setTempRet0
});
export var i32_div_s_5 = retasmFunc.i32_div_s_5;
@@ -7483,19 +7301,19 @@ export var i64_div_s_5 = retasmFunc.i64_div_s_5;
export var i64_div_u_5 = retasmFunc.i64_div_u_5;
import { setTempRet0 } from 'env';
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 setTempRet0 = env.setTempRet0;
var __wasm_intrinsics_temp_i64 = 0;
var __wasm_intrinsics_temp_i64$hi = 0;
@@ -8195,20 +8013,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
setTempRet0
});
export var i32_div_s_7 = retasmFunc.i32_div_s_7;
@@ -8217,19 +8022,19 @@ export var i64_div_s_7 = retasmFunc.i64_div_s_7;
export var i64_div_u_7 = retasmFunc.i64_div_u_7;
import { setTempRet0 } from 'env';
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 setTempRet0 = env.setTempRet0;
var __wasm_intrinsics_temp_i64 = 0;
var __wasm_intrinsics_temp_i64$hi = 0;
@@ -8911,20 +8716,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
setTempRet0
});
export var i32_rem_s_3 = retasmFunc.i32_rem_s_3;
@@ -8933,19 +8725,19 @@ export var i64_rem_s_3 = retasmFunc.i64_rem_s_3;
export var i64_rem_u_3 = retasmFunc.i64_rem_u_3;
import { setTempRet0 } from 'env';
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 setTempRet0 = env.setTempRet0;
var __wasm_intrinsics_temp_i64 = 0;
var __wasm_intrinsics_temp_i64$hi = 0;
@@ -9627,20 +9419,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
setTempRet0
});
export var i32_rem_s_5 = retasmFunc.i32_rem_s_5;
@@ -9649,19 +9428,19 @@ export var i64_rem_s_5 = retasmFunc.i64_rem_s_5;
export var i64_rem_u_5 = retasmFunc.i64_rem_u_5;
import { setTempRet0 } from 'env';
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 setTempRet0 = env.setTempRet0;
var __wasm_intrinsics_temp_i64 = 0;
var __wasm_intrinsics_temp_i64$hi = 0;
@@ -10343,20 +10122,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
setTempRet0
});
export var i32_rem_s_7 = retasmFunc.i32_rem_s_7;
@@ -10365,19 +10131,19 @@ export var i64_rem_s_7 = retasmFunc.i64_rem_s_7;
export var i64_rem_u_7 = retasmFunc.i64_rem_u_7;
import { setTempRet0 } from 'env';
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 setTempRet0 = env.setTempRet0;
var __wasm_intrinsics_temp_i64 = 0;
var __wasm_intrinsics_temp_i64$hi = 0;
@@ -11013,20 +10779,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
setTempRet0
});
export var i32_no_fold_div_neg1 = retasmFunc.i32_no_fold_div_neg1;
diff --git a/test/wasm2js/labels.2asm.js b/test/wasm2js/labels.2asm.js
index a9300bd40..21575bdcb 100644
--- a/test/wasm2js/labels.2asm.js
+++ b/test/wasm2js/labels.2asm.js
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function $0() {
var $0_1 = 0;
exit : {
@@ -341,20 +341,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var block = retasmFunc.block;
export var loop1 = retasmFunc.loop1;
diff --git a/test/wasm2js/left-to-right.2asm.js b/test/wasm2js/left-to-right.2asm.js
index 54a909cef..ee2ff63b1 100644
--- a/test/wasm2js/left-to-right.2asm.js
+++ b/test/wasm2js/left-to-right.2asm.js
@@ -25,27 +25,27 @@
f32ScratchView[2] = value;
}
-function asmFunc(global, env, buffer) {
- 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;
+function asmFunc(env, buffer) {
+ 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 __wasm_intrinsics_temp_i64 = 0;
var __wasm_intrinsics_temp_i64$hi = 0;
var i64toi32_i32$HIGH_BITS = 0;
@@ -2048,17 +2048,17 @@ function asmFunc(global, env, buffer) {
var newPages = oldPages + pagesToAdd | 0;
if ((oldPages < newPages) && (newPages < 65536)) {
var newBuffer = new ArrayBuffer(Math_imul(newPages, 65536));
- var newHEAP8 = new global.Int8Array(newBuffer);
+ var newHEAP8 = new Int8Array(newBuffer);
newHEAP8.set(HEAP8);
HEAP8 = newHEAP8;
- HEAP8 = new global.Int8Array(newBuffer);
- HEAP16 = new global.Int16Array(newBuffer);
- HEAP32 = new global.Int32Array(newBuffer);
- HEAPU8 = new global.Uint8Array(newBuffer);
- HEAPU16 = new global.Uint16Array(newBuffer);
- HEAPU32 = new global.Uint32Array(newBuffer);
- HEAPF32 = new global.Float32Array(newBuffer);
- HEAPF64 = new global.Float64Array(newBuffer);
+ HEAP8 = new Int8Array(newBuffer);
+ HEAP16 = new Int16Array(newBuffer);
+ HEAP32 = new Int32Array(newBuffer);
+ HEAPU8 = new Uint8Array(newBuffer);
+ HEAPU16 = new Uint16Array(newBuffer);
+ HEAPU32 = new Uint32Array(newBuffer);
+ HEAPF32 = new Float32Array(newBuffer);
+ HEAPF64 = new Float64Array(newBuffer);
buffer = newBuffer;
}
return oldPages;
@@ -2165,20 +2165,7 @@ function asmFunc(global, env, buffer) {
var memasmFunc = new ArrayBuffer(65536);
var bufferView = new Uint8Array(memasmFunc);
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
},
memasmFunc
);
diff --git a/test/wasm2js/minified-memory.2asm.js b/test/wasm2js/minified-memory.2asm.js
index e9a89166c..88edd06b7 100644
--- a/test/wasm2js/minified-memory.2asm.js
+++ b/test/wasm2js/minified-memory.2asm.js
@@ -1,28 +1,28 @@
-function asmFunc(global, env) {
+function asmFunc(env) {
var memory = env.a;
var buffer = memory.buffer;
memory.grow = __wasm_memory_grow;
- 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;
function $0() {
return HEAP32[0 >> 2] | 0 | 0;
}
@@ -37,17 +37,17 @@ function asmFunc(global, env) {
var newPages = oldPages + pagesToAdd | 0;
if ((oldPages < newPages) && (newPages < 65536)) {
var newBuffer = new ArrayBuffer(Math_imul(newPages, 65536));
- var newHEAP8 = new global.Int8Array(newBuffer);
+ var newHEAP8 = new Int8Array(newBuffer);
newHEAP8.set(HEAP8);
HEAP8 = newHEAP8;
- HEAP8 = new global.Int8Array(newBuffer);
- HEAP16 = new global.Int16Array(newBuffer);
- HEAP32 = new global.Int32Array(newBuffer);
- HEAPU8 = new global.Uint8Array(newBuffer);
- HEAPU16 = new global.Uint16Array(newBuffer);
- HEAPU32 = new global.Uint32Array(newBuffer);
- HEAPF32 = new global.Float32Array(newBuffer);
- HEAPF64 = new global.Float64Array(newBuffer);
+ HEAP8 = new Int8Array(newBuffer);
+ HEAP16 = new Int16Array(newBuffer);
+ HEAP32 = new Int32Array(newBuffer);
+ HEAPU8 = new Uint8Array(newBuffer);
+ HEAPU16 = new Uint16Array(newBuffer);
+ HEAPU32 = new Uint32Array(newBuffer);
+ HEAPF32 = new Float32Array(newBuffer);
+ HEAPF64 = new Float64Array(newBuffer);
buffer = newBuffer;
memory.buffer = newBuffer;
}
@@ -61,20 +61,7 @@ function asmFunc(global, env) {
var memasmFunc = new ArrayBuffer(65536);
var bufferView = new Uint8Array(memasmFunc);
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
a: { buffer : memasmFunc }
});
export var foo = retasmFunc.foo;
diff --git a/test/wasm2js/minified-memory.2asm.js.opt b/test/wasm2js/minified-memory.2asm.js.opt
index 2a09422ec..b50143249 100644
--- a/test/wasm2js/minified-memory.2asm.js.opt
+++ b/test/wasm2js/minified-memory.2asm.js.opt
@@ -1,28 +1,28 @@
-function asmFunc(global, env) {
+function asmFunc(env) {
var memory = env.a;
var buffer = memory.buffer;
memory.grow = __wasm_memory_grow;
- 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;
function $0() {
return HEAP32[0];
}
@@ -37,17 +37,17 @@ function asmFunc(global, env) {
var newPages = oldPages + pagesToAdd | 0;
if ((oldPages < newPages) && (newPages < 65536)) {
var newBuffer = new ArrayBuffer(Math_imul(newPages, 65536));
- var newHEAP8 = new global.Int8Array(newBuffer);
+ var newHEAP8 = new Int8Array(newBuffer);
newHEAP8.set(HEAP8);
HEAP8 = newHEAP8;
- HEAP8 = new global.Int8Array(newBuffer);
- HEAP16 = new global.Int16Array(newBuffer);
- HEAP32 = new global.Int32Array(newBuffer);
- HEAPU8 = new global.Uint8Array(newBuffer);
- HEAPU16 = new global.Uint16Array(newBuffer);
- HEAPU32 = new global.Uint32Array(newBuffer);
- HEAPF32 = new global.Float32Array(newBuffer);
- HEAPF64 = new global.Float64Array(newBuffer);
+ HEAP8 = new Int8Array(newBuffer);
+ HEAP16 = new Int16Array(newBuffer);
+ HEAP32 = new Int32Array(newBuffer);
+ HEAPU8 = new Uint8Array(newBuffer);
+ HEAPU16 = new Uint16Array(newBuffer);
+ HEAPU32 = new Uint32Array(newBuffer);
+ HEAPF32 = new Float32Array(newBuffer);
+ HEAPF64 = new Float64Array(newBuffer);
buffer = newBuffer;
memory.buffer = newBuffer;
}
@@ -61,20 +61,7 @@ function asmFunc(global, env) {
var memasmFunc = new ArrayBuffer(65536);
var bufferView = new Uint8Array(memasmFunc);
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
a: { buffer : memasmFunc }
});
export var foo = retasmFunc.foo;
diff --git a/test/wasm2js/minus_minus.2asm.js b/test/wasm2js/minus_minus.2asm.js
index 36c60f10c..da2fc0492 100644
--- a/test/wasm2js/minus_minus.2asm.js
+++ b/test/wasm2js/minus_minus.2asm.js
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function $0() {
return ~~- -7094.0 | 0;
}
@@ -25,19 +25,6 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var func_44_invoker = retasmFunc.func_44_invoker;
diff --git a/test/wasm2js/minus_minus.2asm.js.opt b/test/wasm2js/minus_minus.2asm.js.opt
index ff58a1eaa..893a67a55 100644
--- a/test/wasm2js/minus_minus.2asm.js.opt
+++ b/test/wasm2js/minus_minus.2asm.js.opt
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function $1() {
}
@@ -21,19 +21,6 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var func_44_invoker = retasmFunc.func_44_invoker;
diff --git a/test/wasm2js/nested-selects.2asm.js b/test/wasm2js/nested-selects.2asm.js
index bcd76170b..d7fb48557 100644
--- a/test/wasm2js/nested-selects.2asm.js
+++ b/test/wasm2js/nested-selects.2asm.js
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function $1($0) {
$0 = $0 | 0;
return (($0 | 0) < (0 | 0) ? -1 : ($0 | 0) > (0 | 0) ? 1 : 0) | 0;
@@ -22,19 +22,6 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var sign = retasmFunc.sign;
diff --git a/test/wasm2js/nested-selects.2asm.js.opt b/test/wasm2js/nested-selects.2asm.js.opt
index 852d99960..f9762e6d8 100644
--- a/test/wasm2js/nested-selects.2asm.js.opt
+++ b/test/wasm2js/nested-selects.2asm.js.opt
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function $1($0) {
$0 = $0 | 0;
return (($0 | 0) < 0 ? -1 : ($0 | 0) > 0) | 0;
@@ -22,19 +22,6 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var sign = retasmFunc.sign;
diff --git a/test/wasm2js/ordering.2asm.js b/test/wasm2js/ordering.2asm.js
index f671e2d21..1d3a4da9e 100644
--- a/test/wasm2js/ordering.2asm.js
+++ b/test/wasm2js/ordering.2asm.js
@@ -1,19 +1,19 @@
import { table } from 'env';
-function asmFunc(global, env) {
+function asmFunc(env) {
var FUNCTION_TABLE = env.table;
- 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 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;
function main() {
var wasm2js_i32$0 = 0, wasm2js_i32$1 = 0, wasm2js_i32$2 = 0;
FUNCTION_TABLE[foo(2 | 0) | 0 | 0](1) | 0;
@@ -53,20 +53,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
table
});
export var main = retasmFunc.main;
diff --git a/test/wasm2js/ordering.2asm.js.opt b/test/wasm2js/ordering.2asm.js.opt
index 9d3cee6f9..da3325e6b 100644
--- a/test/wasm2js/ordering.2asm.js.opt
+++ b/test/wasm2js/ordering.2asm.js.opt
@@ -1,19 +1,19 @@
import { table } from 'env';
-function asmFunc(global, env) {
+function asmFunc(env) {
var FUNCTION_TABLE = env.table;
- 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 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;
function main() {
FUNCTION_TABLE[1](1) | 0;
FUNCTION_TABLE[4](1) | 0;
@@ -44,20 +44,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
table
});
export var main = retasmFunc.main;
diff --git a/test/wasm2js/reinterpret.2asm.js b/test/wasm2js/reinterpret.2asm.js
index a84b56c0d..9f5454c38 100644
--- a/test/wasm2js/reinterpret.2asm.js
+++ b/test/wasm2js/reinterpret.2asm.js
@@ -29,19 +29,19 @@
return f32ScratchView[2];
}
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function $1($0) {
$0 = $0 | 0;
return ((wasm2js_scratch_store_f32((wasm2js_scratch_store_i32(2, $0), wasm2js_scratch_load_f32())), wasm2js_scratch_load_i32(2)) | 0) == ($0 | 0) | 0;
@@ -96,20 +96,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var i32_roundtrip = retasmFunc.i32_roundtrip;
export var i64_roundtrip = retasmFunc.i64_roundtrip;
diff --git a/test/wasm2js/reinterpret.2asm.js.opt b/test/wasm2js/reinterpret.2asm.js.opt
index 7ddd6aa0b..2e9610d05 100644
--- a/test/wasm2js/reinterpret.2asm.js.opt
+++ b/test/wasm2js/reinterpret.2asm.js.opt
@@ -29,19 +29,19 @@
return f32ScratchView[2];
}
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function $1($0) {
$0 = $0 | 0;
return ((wasm2js_scratch_store_f32((wasm2js_scratch_store_i32(2, $0), wasm2js_scratch_load_f32())), wasm2js_scratch_load_i32(2)) | 0) == ($0 | 0) | 0;
@@ -68,20 +68,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var i32_roundtrip = retasmFunc.i32_roundtrip;
export var i64_roundtrip = retasmFunc.i64_roundtrip;
diff --git a/test/wasm2js/reinterpret_scratch.2asm.js b/test/wasm2js/reinterpret_scratch.2asm.js
index 83ad38dc6..1083cba98 100644
--- a/test/wasm2js/reinterpret_scratch.2asm.js
+++ b/test/wasm2js/reinterpret_scratch.2asm.js
@@ -17,27 +17,27 @@
f32ScratchView[2] = value;
}
-function asmFunc(global, env, buffer) {
- 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;
+function asmFunc(env, buffer) {
+ 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;
function $0() {
var i64toi32_i32$1 = 0, i64toi32_i32$0 = 0, $0_1 = Math_fround(0);
wasm2js_scratch_store_f64(+(305419896.0));
@@ -59,20 +59,7 @@ function asmFunc(global, env, buffer) {
var memasmFunc = new ArrayBuffer(65536);
var bufferView = new Uint8Array(memasmFunc);
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
},
memasmFunc
);
diff --git a/test/wasm2js/reinterpret_scratch.2asm.js.opt b/test/wasm2js/reinterpret_scratch.2asm.js.opt
index 7dd385e06..36f85c0d1 100644
--- a/test/wasm2js/reinterpret_scratch.2asm.js.opt
+++ b/test/wasm2js/reinterpret_scratch.2asm.js.opt
@@ -13,27 +13,27 @@
f64ScratchView[0] = value;
}
-function asmFunc(global, env, buffer) {
- 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;
+function asmFunc(env, buffer) {
+ 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;
function $0() {
var $0_1 = 0;
wasm2js_scratch_store_f64(305419896.0);
@@ -54,20 +54,7 @@ function asmFunc(global, env, buffer) {
var memasmFunc = new ArrayBuffer(65536);
var bufferView = new Uint8Array(memasmFunc);
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
},
memasmFunc
);
diff --git a/test/wasm2js/set_local.2asm.js b/test/wasm2js/set_local.2asm.js
index 8fc0b698a..6a857e570 100644
--- a/test/wasm2js/set_local.2asm.js
+++ b/test/wasm2js/set_local.2asm.js
@@ -1,18 +1,18 @@
import { setTempRet0 } from 'env';
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 setTempRet0 = env.setTempRet0;
var i64toi32_i32$HIGH_BITS = 0;
function $0() {
@@ -219,20 +219,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
setTempRet0
});
export var type_local_i32 = retasmFunc.type_local_i32;
diff --git a/test/wasm2js/sign_ext.2asm.js b/test/wasm2js/sign_ext.2asm.js
index 3530c46ee..a51b91690 100644
--- a/test/wasm2js/sign_ext.2asm.js
+++ b/test/wasm2js/sign_ext.2asm.js
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function $0(x) {
x = x | 0;
return x << 24 >> 24 | 0;
@@ -28,20 +28,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var test8 = retasmFunc.test8;
export var test16 = retasmFunc.test16;
diff --git a/test/wasm2js/sign_ext.2asm.js.opt b/test/wasm2js/sign_ext.2asm.js.opt
index 6e3c4eb40..e58b9eb2d 100644
--- a/test/wasm2js/sign_ext.2asm.js.opt
+++ b/test/wasm2js/sign_ext.2asm.js.opt
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function $0($0_1) {
$0_1 = $0_1 | 0;
return $0_1 << 24 >> 24;
@@ -28,20 +28,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var test8 = retasmFunc.test8;
export var test16 = retasmFunc.test16;
diff --git a/test/wasm2js/stack-modified.2asm.js b/test/wasm2js/stack-modified.2asm.js
index 3cbda4341..609cfd255 100644
--- a/test/wasm2js/stack-modified.2asm.js
+++ b/test/wasm2js/stack-modified.2asm.js
@@ -1,18 +1,18 @@
import { setTempRet0 } from 'env';
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 setTempRet0 = env.setTempRet0;
var i64toi32_i32$HIGH_BITS = 0;
function $0(var$0, var$0$hi) {
@@ -570,20 +570,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
setTempRet0
});
export var fac_expr = retasmFunc.fac_expr;
diff --git a/test/wasm2js/stack-modified.2asm.js.opt b/test/wasm2js/stack-modified.2asm.js.opt
index 9a9a10314..c86f71bc4 100644
--- a/test/wasm2js/stack-modified.2asm.js.opt
+++ b/test/wasm2js/stack-modified.2asm.js.opt
@@ -1,18 +1,18 @@
import { setTempRet0 } from 'env';
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 setTempRet0 = env.setTempRet0;
var i64toi32_i32$HIGH_BITS = 0;
function $0($0_1, $1) {
@@ -67,20 +67,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
setTempRet0
});
export var fac_expr = retasmFunc.fac_expr;
diff --git a/test/wasm2js/start_func.2asm.js b/test/wasm2js/start_func.2asm.js
index c18514dba..13b60abdb 100644
--- a/test/wasm2js/start_func.2asm.js
+++ b/test/wasm2js/start_func.2asm.js
@@ -1,25 +1,25 @@
-function asmFunc(global, env, buffer) {
- 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;
+function asmFunc(env, buffer) {
+ 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;
function foo() {
HEAP32[1 >> 2] = 2;
}
@@ -35,17 +35,17 @@ function asmFunc(global, env, buffer) {
var newPages = oldPages + pagesToAdd | 0;
if ((oldPages < newPages) && (newPages < 65536)) {
var newBuffer = new ArrayBuffer(Math_imul(newPages, 65536));
- var newHEAP8 = new global.Int8Array(newBuffer);
+ var newHEAP8 = new Int8Array(newBuffer);
newHEAP8.set(HEAP8);
HEAP8 = newHEAP8;
- HEAP8 = new global.Int8Array(newBuffer);
- HEAP16 = new global.Int16Array(newBuffer);
- HEAP32 = new global.Int32Array(newBuffer);
- HEAPU8 = new global.Uint8Array(newBuffer);
- HEAPU16 = new global.Uint16Array(newBuffer);
- HEAPU32 = new global.Uint32Array(newBuffer);
- HEAPF32 = new global.Float32Array(newBuffer);
- HEAPF64 = new global.Float64Array(newBuffer);
+ HEAP8 = new Int8Array(newBuffer);
+ HEAP16 = new Int16Array(newBuffer);
+ HEAP32 = new Int32Array(newBuffer);
+ HEAPU8 = new Uint8Array(newBuffer);
+ HEAPU16 = new Uint16Array(newBuffer);
+ HEAPU32 = new Uint32Array(newBuffer);
+ HEAPF32 = new Float32Array(newBuffer);
+ HEAPF64 = new Float64Array(newBuffer);
buffer = newBuffer;
}
return oldPages;
@@ -58,20 +58,7 @@ function asmFunc(global, env, buffer) {
var memasmFunc = new ArrayBuffer(65536);
var bufferView = new Uint8Array(memasmFunc);
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
},
memasmFunc
);
diff --git a/test/wasm2js/start_func.2asm.js.opt b/test/wasm2js/start_func.2asm.js.opt
index 6ff7c1cba..8b7b8e873 100644
--- a/test/wasm2js/start_func.2asm.js.opt
+++ b/test/wasm2js/start_func.2asm.js.opt
@@ -1,25 +1,25 @@
-function asmFunc(global, env, buffer) {
- 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;
+function asmFunc(env, buffer) {
+ 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;
function foo() {
HEAP32[0] = 2;
}
@@ -35,17 +35,17 @@ function asmFunc(global, env, buffer) {
var newPages = oldPages + pagesToAdd | 0;
if ((oldPages < newPages) && (newPages < 65536)) {
var newBuffer = new ArrayBuffer(Math_imul(newPages, 65536));
- var newHEAP8 = new global.Int8Array(newBuffer);
+ var newHEAP8 = new Int8Array(newBuffer);
newHEAP8.set(HEAP8);
HEAP8 = newHEAP8;
- HEAP8 = new global.Int8Array(newBuffer);
- HEAP16 = new global.Int16Array(newBuffer);
- HEAP32 = new global.Int32Array(newBuffer);
- HEAPU8 = new global.Uint8Array(newBuffer);
- HEAPU16 = new global.Uint16Array(newBuffer);
- HEAPU32 = new global.Uint32Array(newBuffer);
- HEAPF32 = new global.Float32Array(newBuffer);
- HEAPF64 = new global.Float64Array(newBuffer);
+ HEAP8 = new Int8Array(newBuffer);
+ HEAP16 = new Int16Array(newBuffer);
+ HEAP32 = new Int32Array(newBuffer);
+ HEAPU8 = new Uint8Array(newBuffer);
+ HEAPU16 = new Uint16Array(newBuffer);
+ HEAPU32 = new Uint32Array(newBuffer);
+ HEAPF32 = new Float32Array(newBuffer);
+ HEAPF64 = new Float64Array(newBuffer);
buffer = newBuffer;
}
return oldPages;
@@ -58,20 +58,7 @@ function asmFunc(global, env, buffer) {
var memasmFunc = new ArrayBuffer(65536);
var bufferView = new Uint8Array(memasmFunc);
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
},
memasmFunc
);
diff --git a/test/wasm2js/switch.2asm.js b/test/wasm2js/switch.2asm.js
index 3664145c6..4aadb0752 100644
--- a/test/wasm2js/switch.2asm.js
+++ b/test/wasm2js/switch.2asm.js
@@ -1,18 +1,18 @@
import { setTempRet0 } from 'env';
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 setTempRet0 = env.setTempRet0;
var i64toi32_i32$HIGH_BITS = 0;
function $0(i) {
@@ -182,20 +182,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
setTempRet0
});
export var stmt = retasmFunc.stmt;
diff --git a/test/wasm2js/tee_local.2asm.js b/test/wasm2js/tee_local.2asm.js
index 002baae1e..7e8e0747d 100644
--- a/test/wasm2js/tee_local.2asm.js
+++ b/test/wasm2js/tee_local.2asm.js
@@ -1,18 +1,18 @@
import { setTempRet0 } from 'env';
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 setTempRet0 = env.setTempRet0;
var i64toi32_i32$HIGH_BITS = 0;
function $0() {
@@ -326,20 +326,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
setTempRet0
});
export var type_local_i32 = retasmFunc.type_local_i32;
diff --git a/test/wasm2js/traps.2asm.js b/test/wasm2js/traps.2asm.js
index 497761090..c2ba3bc6f 100644
--- a/test/wasm2js/traps.2asm.js
+++ b/test/wasm2js/traps.2asm.js
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 __wasm_intrinsics_temp_i64 = 0;
var __wasm_intrinsics_temp_i64$hi = 0;
var i64toi32_i32$HIGH_BITS = 0;
@@ -728,39 +728,26 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var no_dce_i32_div_s = retasmFunc.no_dce_i32_div_s;
export var no_dce_i32_div_u = retasmFunc.no_dce_i32_div_u;
export var no_dce_i64_div_s = retasmFunc.no_dce_i64_div_s;
export var no_dce_i64_div_u = retasmFunc.no_dce_i64_div_u;
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 __wasm_intrinsics_temp_i64 = 0;
var __wasm_intrinsics_temp_i64$hi = 0;
var i64toi32_i32$HIGH_BITS = 0;
@@ -1459,39 +1446,26 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var no_dce_i32_rem_s = retasmFunc.no_dce_i32_rem_s;
export var no_dce_i32_rem_u = retasmFunc.no_dce_i32_rem_u;
export var no_dce_i64_rem_s = retasmFunc.no_dce_i64_rem_s;
export var no_dce_i64_rem_u = retasmFunc.no_dce_i64_rem_u;
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
function $0(x) {
x = Math_fround(x);
~~x;
@@ -1592,20 +1566,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var no_dce_i32_trunc_f32_s = retasmFunc.no_dce_i32_trunc_f32_s;
export var no_dce_i32_trunc_f32_u = retasmFunc.no_dce_i32_trunc_f32_u;
@@ -1616,27 +1577,27 @@ export var no_dce_i64_trunc_f32_u = retasmFunc.no_dce_i64_trunc_f32_u;
export var no_dce_i64_trunc_f64_s = retasmFunc.no_dce_i64_trunc_f64_s;
export var no_dce_i64_trunc_f64_u = retasmFunc.no_dce_i64_trunc_f64_u;
-function asmFunc(global, env, buffer) {
- 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;
+function asmFunc(env, buffer) {
+ 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;
function $0(i) {
i = i | 0;
HEAP32[i >> 2] | 0;
@@ -1723,17 +1684,17 @@ function asmFunc(global, env, buffer) {
var newPages = oldPages + pagesToAdd | 0;
if ((oldPages < newPages) && (newPages < 65536)) {
var newBuffer = new ArrayBuffer(Math_imul(newPages, 65536));
- var newHEAP8 = new global.Int8Array(newBuffer);
+ var newHEAP8 = new Int8Array(newBuffer);
newHEAP8.set(HEAP8);
HEAP8 = newHEAP8;
- HEAP8 = new global.Int8Array(newBuffer);
- HEAP16 = new global.Int16Array(newBuffer);
- HEAP32 = new global.Int32Array(newBuffer);
- HEAPU8 = new global.Uint8Array(newBuffer);
- HEAPU16 = new global.Uint16Array(newBuffer);
- HEAPU32 = new global.Uint32Array(newBuffer);
- HEAPF32 = new global.Float32Array(newBuffer);
- HEAPF64 = new global.Float64Array(newBuffer);
+ HEAP8 = new Int8Array(newBuffer);
+ HEAP16 = new Int16Array(newBuffer);
+ HEAP32 = new Int32Array(newBuffer);
+ HEAPU8 = new Uint8Array(newBuffer);
+ HEAPU16 = new Uint16Array(newBuffer);
+ HEAPU32 = new Uint32Array(newBuffer);
+ HEAPF32 = new Float32Array(newBuffer);
+ HEAPF64 = new Float64Array(newBuffer);
buffer = newBuffer;
}
return oldPages;
@@ -1759,20 +1720,7 @@ function asmFunc(global, env, buffer) {
var memasmFunc = new ArrayBuffer(65536);
var bufferView = new Uint8Array(memasmFunc);
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
},
memasmFunc
);
diff --git a/test/wasm2js/unaligned.2asm.js b/test/wasm2js/unaligned.2asm.js
index cb5c661be..9a9c6f7d8 100644
--- a/test/wasm2js/unaligned.2asm.js
+++ b/test/wasm2js/unaligned.2asm.js
@@ -30,27 +30,27 @@ import { setTempRet0 } from 'env';
f32ScratchView[2] = value;
}
-function asmFunc(global, env, buffer) {
- 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;
+function asmFunc(env, buffer) {
+ 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 setTempRet0 = env.setTempRet0;
var i64toi32_i32$HIGH_BITS = 0;
function $0() {
@@ -175,20 +175,7 @@ function asmFunc(global, env, buffer) {
var memasmFunc = new ArrayBuffer(65536);
var bufferView = new Uint8Array(memasmFunc);
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
setTempRet0
},
memasmFunc
diff --git a/test/wasm2js/unaligned.2asm.js.opt b/test/wasm2js/unaligned.2asm.js.opt
index 717bfc1a6..e493eec62 100644
--- a/test/wasm2js/unaligned.2asm.js.opt
+++ b/test/wasm2js/unaligned.2asm.js.opt
@@ -26,27 +26,27 @@ import { setTempRet0 } from 'env';
return f32ScratchView[2];
}
-function asmFunc(global, env, buffer) {
- 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;
+function asmFunc(env, buffer) {
+ 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 setTempRet0 = env.setTempRet0;
var i64toi32_i32$HIGH_BITS = 0;
function $0() {
@@ -128,20 +128,7 @@ function asmFunc(global, env, buffer) {
var memasmFunc = new ArrayBuffer(65536);
var bufferView = new Uint8Array(memasmFunc);
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); },
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
setTempRet0
},
memasmFunc
diff --git a/test/wasm2js/unary-ops.2asm.js b/test/wasm2js/unary-ops.2asm.js
index e7743700f..e2b2df413 100644
--- a/test/wasm2js/unary-ops.2asm.js
+++ b/test/wasm2js/unary-ops.2asm.js
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 i64toi32_i32$HIGH_BITS = 0;
function $1($0) {
$0 = $0 | 0;
@@ -516,20 +516,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var i32_popcnt = retasmFunc.i32_popcnt;
export var check_popcnt_i64 = retasmFunc.check_popcnt_i64;
diff --git a/test/wasm2js/unary-ops.2asm.js.opt b/test/wasm2js/unary-ops.2asm.js.opt
index d42ea3e97..b854489b6 100644
--- a/test/wasm2js/unary-ops.2asm.js.opt
+++ b/test/wasm2js/unary-ops.2asm.js.opt
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 i64toi32_i32$HIGH_BITS = 0;
function $1($0) {
$0 = $0 | 0;
@@ -132,20 +132,7 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var i32_popcnt = retasmFunc.i32_popcnt;
export var check_popcnt_i64 = retasmFunc.check_popcnt_i64;
diff --git a/test/wasm2js/unreachable-get-cycle.2asm.js b/test/wasm2js/unreachable-get-cycle.2asm.js
index 6444e8c31..f2a42641c 100644
--- a/test/wasm2js/unreachable-get-cycle.2asm.js
+++ b/test/wasm2js/unreachable-get-cycle.2asm.js
@@ -1,34 +1,21 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
return {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
diff --git a/test/wasm2js/unreachable-get-cycle.2asm.js.opt b/test/wasm2js/unreachable-get-cycle.2asm.js.opt
index 6444e8c31..f2a42641c 100644
--- a/test/wasm2js/unreachable-get-cycle.2asm.js.opt
+++ b/test/wasm2js/unreachable-get-cycle.2asm.js.opt
@@ -1,34 +1,21 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
return {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
diff --git a/test/wasm2js/unreachable-insts.2asm.js b/test/wasm2js/unreachable-insts.2asm.js
index 6444e8c31..f2a42641c 100644
--- a/test/wasm2js/unreachable-insts.2asm.js
+++ b/test/wasm2js/unreachable-insts.2asm.js
@@ -1,34 +1,21 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
return {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
diff --git a/test/wasm2js/unreachable-insts.2asm.js.opt b/test/wasm2js/unreachable-insts.2asm.js.opt
index 6444e8c31..f2a42641c 100644
--- a/test/wasm2js/unreachable-insts.2asm.js.opt
+++ b/test/wasm2js/unreachable-insts.2asm.js.opt
@@ -1,34 +1,21 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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;
return {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
diff --git a/test/wasm2js/unreachable-later.2asm.js b/test/wasm2js/unreachable-later.2asm.js
index 515304d32..91e5f5a2a 100644
--- a/test/wasm2js/unreachable-later.2asm.js
+++ b/test/wasm2js/unreachable-later.2asm.js
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 global$0 = 10;
function $0($0_1) {
$0_1 = $0_1 | 0;
@@ -63,19 +63,6 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var func_50 = retasmFunc.func_50;
diff --git a/test/wasm2js/unreachable-later.2asm.js.opt b/test/wasm2js/unreachable-later.2asm.js.opt
index 443a64b1c..aee8c4ba7 100644
--- a/test/wasm2js/unreachable-later.2asm.js.opt
+++ b/test/wasm2js/unreachable-later.2asm.js.opt
@@ -1,17 +1,17 @@
-function asmFunc(global, env) {
- 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;
+function asmFunc(env) {
+ 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 global$0 = 10;
function $0($0_1) {
$0_1 = $0_1 | 0;
@@ -36,19 +36,6 @@ function asmFunc(global, env) {
};
}
-var retasmFunc = asmFunc({
- Math,
- Int8Array,
- Uint8Array,
- Int16Array,
- Uint16Array,
- Int32Array,
- Uint32Array,
- Float32Array,
- Float64Array,
- NaN,
- Infinity
- }, {
- abort: function() { throw new Error('abort'); }
+var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var func_50 = retasmFunc.func_50;