summaryrefslogtreecommitdiff
path: root/test/wasm2js/deterministic.2asm.js.opt
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2020-11-10 18:06:14 -0800
committerGitHub <noreply@github.com>2020-11-10 18:06:14 -0800
commit32171f1d6ff57fdb31f55d8aa554eac15cb5d8f5 (patch)
tree24cdd04d3e616aa25354372a9cab2f72f95094af /test/wasm2js/deterministic.2asm.js.opt
parentbb124f995527f650d98bdac30b00b125b76fab9c (diff)
downloadbinaryen-32171f1d6ff57fdb31f55d8aa554eac15cb5d8f5.tar.gz
binaryen-32171f1d6ff57fdb31f55d8aa554eac15cb5d8f5.tar.bz2
binaryen-32171f1d6ff57fdb31f55d8aa554eac15cb5d8f5.zip
wasm2js: Support for exported memory (#3323)
The asmFunc now sets the outer scope's `bufferView` variable as well as its own internal views.
Diffstat (limited to 'test/wasm2js/deterministic.2asm.js.opt')
-rw-r--r--test/wasm2js/deterministic.2asm.js.opt3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/wasm2js/deterministic.2asm.js.opt b/test/wasm2js/deterministic.2asm.js.opt
index d95a0e367..4f222ed42 100644
--- a/test/wasm2js/deterministic.2asm.js.opt
+++ b/test/wasm2js/deterministic.2asm.js.opt
@@ -10,6 +10,7 @@ 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;
@@ -39,8 +40,8 @@ function asmFunc(env) {
};
}
+var bufferView;
var memasmFunc = new ArrayBuffer(65536);
-var bufferView = new Uint8Array(memasmFunc);
var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); },
memory: { buffer : memasmFunc }
});