summaryrefslogtreecommitdiff
path: root/test/wasm2js/dot_import.2asm.js
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/dot_import.2asm.js
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/dot_import.2asm.js')
-rw-r--r--test/wasm2js/dot_import.2asm.js39
1 files changed, 13 insertions, 26 deletions
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;