summaryrefslogtreecommitdiff
path: root/test/wasm2js/nested-selects.2asm.js
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2020-09-24 14:34:05 -0700
committerGitHub <noreply@github.com>2020-09-24 14:34:05 -0700
commitf61ec303bca392fcec18a3c6116f9fa5fca17a1a (patch)
tree7d8e0b43d491c72ac7f266ddf576768d37f896fd /test/wasm2js/nested-selects.2asm.js
parent7886f784967b60f656fcbcd831fbafb1777e8bcd (diff)
downloadbinaryen-f61ec303bca392fcec18a3c6116f9fa5fca17a1a.tar.gz
binaryen-f61ec303bca392fcec18a3c6116f9fa5fca17a1a.tar.bz2
binaryen-f61ec303bca392fcec18a3c6116f9fa5fca17a1a.zip
wasm2js: Skip heap creation in the absence of wasm memory. NFC (#3167)
Also, format the asmFunc call to make it more readable in the ES6 modules case.
Diffstat (limited to 'test/wasm2js/nested-selects.2asm.js')
-rw-r--r--test/wasm2js/nested-selects.2asm.js27
1 files changed, 16 insertions, 11 deletions
diff --git a/test/wasm2js/nested-selects.2asm.js b/test/wasm2js/nested-selects.2asm.js
index 48090a1e4..bcd76170b 100644
--- a/test/wasm2js/nested-selects.2asm.js
+++ b/test/wasm2js/nested-selects.2asm.js
@@ -1,13 +1,5 @@
-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);
+function asmFunc(global, env) {
var Math_imul = global.Math.imul;
var Math_fround = global.Math.fround;
var Math_abs = global.Math.abs;
@@ -30,6 +22,19 @@ function asmFunc(global, env, buffer) {
};
}
-var memasmFunc = new ArrayBuffer(65536);
-var retasmFunc = asmFunc({Math,Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,NaN,Infinity}, {abort:function() { throw new Error('abort'); }},memasmFunc);
+var retasmFunc = asmFunc({
+ Math,
+ Int8Array,
+ Uint8Array,
+ Int16Array,
+ Uint16Array,
+ Int32Array,
+ Uint32Array,
+ Float32Array,
+ Float64Array,
+ NaN,
+ Infinity
+ }, {
+ abort: function() { throw new Error('abort'); }
+ });
export var sign = retasmFunc.sign;