summaryrefslogtreecommitdiff
path: root/test/wasm2js/grow-memory-tricky.2asm.js.opt
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2020-11-11 15:50:33 -0800
committerGitHub <noreply@github.com>2020-11-11 15:50:33 -0800
commitf0d6b089960e089bcc5c1794003585ebbd91d33a (patch)
tree25e44d01fb2343f3152abeceed593986d1a0998b /test/wasm2js/grow-memory-tricky.2asm.js.opt
parentd0d96a815fb2e6c397dce76fb1b74b803fd431f4 (diff)
downloadbinaryen-f0d6b089960e089bcc5c1794003585ebbd91d33a.tar.gz
binaryen-f0d6b089960e089bcc5c1794003585ebbd91d33a.tar.bz2
binaryen-f0d6b089960e089bcc5c1794003585ebbd91d33a.zip
wasm2js: Declare data segments before calling asmFunc (#3337)
This is because we maybe need to reference the segments during the start function. For example in the case of pthreads we conditionally load passive segments during start. Tested in emscripten with: tests/runner.py wasm2js1
Diffstat (limited to 'test/wasm2js/grow-memory-tricky.2asm.js.opt')
-rw-r--r--test/wasm2js/grow-memory-tricky.2asm.js.opt3
1 files changed, 0 insertions, 3 deletions
diff --git a/test/wasm2js/grow-memory-tricky.2asm.js.opt b/test/wasm2js/grow-memory-tricky.2asm.js.opt
index e1e2d8476..793feef27 100644
--- a/test/wasm2js/grow-memory-tricky.2asm.js.opt
+++ b/test/wasm2js/grow-memory-tricky.2asm.js.opt
@@ -9,7 +9,6 @@ function asmFunc(env) {
var HEAPU32 = new Uint32Array(buffer);
var HEAPF32 = new Float32Array(buffer);
var HEAPF64 = new Float64Array(buffer);
- bufferView = HEAPU8;
var Math_imul = Math.imul;
var Math_fround = Math.fround;
var Math_abs = Math.abs;
@@ -50,7 +49,6 @@ function asmFunc(env) {
HEAPF32 = new Float32Array(newBuffer);
HEAPF64 = new Float64Array(newBuffer);
buffer = newBuffer;
- bufferView = HEAPU8;
}
return oldPages;
}
@@ -72,7 +70,6 @@ function asmFunc(env) {
};
}
-var bufferView;
var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); }
});
export var memory = retasmFunc.memory;