diff options
author | Alon Zakai <azakai@google.com> | 2020-06-22 07:00:13 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-22 07:00:13 -0700 |
commit | 721f15831ca547de98992f9ce6158d822b94d167 (patch) | |
tree | 6e898353d04323ff07a687dc3e4456507796feea /test/wasm2js/grow_memory.2asm.js | |
parent | 711f8cb0ccc0de434a86c6c704acd5a13848f4db (diff) | |
download | binaryen-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/grow_memory.2asm.js')
-rw-r--r-- | test/wasm2js/grow_memory.2asm.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/wasm2js/grow_memory.2asm.js b/test/wasm2js/grow_memory.2asm.js index 675ee76e2..3b156ec85 100644 --- a/test/wasm2js/grow_memory.2asm.js +++ b/test/wasm2js/grow_memory.2asm.js @@ -74,6 +74,7 @@ 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 memory = retasmFunc.memory; export var grow = retasmFunc.grow; |