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 /src/emscripten-optimizer | |
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 'src/emscripten-optimizer')
-rw-r--r-- | src/emscripten-optimizer/parser.cpp | 4 | ||||
-rw-r--r-- | src/emscripten-optimizer/parser.h | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/emscripten-optimizer/parser.cpp b/src/emscripten-optimizer/parser.cpp index 72740908e..de749817f 100644 --- a/src/emscripten-optimizer/parser.cpp +++ b/src/emscripten-optimizer/parser.cpp @@ -103,6 +103,10 @@ IString ARRAY("array"); IString OBJECT("object"); IString THROW("throw"); IString SET("="); +IString ATOMICS("Atomics"); +IString COMPARE_EXCHANGE("compareExchange"); +IString LOAD("load"); +IString STORE("store"); IStringSet keywords("var const function if else do while for break continue return " diff --git a/src/emscripten-optimizer/parser.h b/src/emscripten-optimizer/parser.h index 1d4cda79b..3e1623c19 100644 --- a/src/emscripten-optimizer/parser.h +++ b/src/emscripten-optimizer/parser.h @@ -120,6 +120,10 @@ extern IString ARRAY; extern IString OBJECT; extern IString THROW; extern IString SET; +extern IString ATOMICS; +extern IString COMPARE_EXCHANGE; +extern IString LOAD; +extern IString STORE; extern IStringSet keywords; |