summaryrefslogtreecommitdiff
path: root/test/wasm2js/deterministic.2asm.js
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2020-06-22 07:00:13 -0700
committerGitHub <noreply@github.com>2020-06-22 07:00:13 -0700
commit721f15831ca547de98992f9ce6158d822b94d167 (patch)
tree6e898353d04323ff07a687dc3e4456507796feea /test/wasm2js/deterministic.2asm.js
parent711f8cb0ccc0de434a86c6c704acd5a13848f4db (diff)
downloadbinaryen-721f15831ca547de98992f9ce6158d822b94d167.tar.gz
binaryen-721f15831ca547de98992f9ce6158d822b94d167.tar.bz2
binaryen-721f15831ca547de98992f9ce6158d822b94d167.zip
wasm2js: Bulk memory support (#2923)
Adds a special helper functions for data.drop etc., as unlike most wasm instructions these are too big to emit inline. Track passive segments at runtime in var memorySegments whose indexes are the segment indexes. Emit var bufferView even if the memory exists even without memory segments, as we do still need the view in order to operate on it. Also adds a few constants for atomics that will be useful in future PRs (as this PR updates the constant lists anyhow).
Diffstat (limited to 'test/wasm2js/deterministic.2asm.js')
-rw-r--r--test/wasm2js/deterministic.2asm.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/wasm2js/deterministic.2asm.js b/test/wasm2js/deterministic.2asm.js
index 8954443cf..675f9003c 100644
--- a/test/wasm2js/deterministic.2asm.js
+++ b/test/wasm2js/deterministic.2asm.js
@@ -40,5 +40,6 @@ 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'); }},memasmFunc);
export var foo = retasmFunc.foo;