From 721f15831ca547de98992f9ce6158d822b94d167 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 22 Jun 2020 07:00:13 -0700 Subject: 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). --- src/emscripten-optimizer/parser.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/emscripten-optimizer/parser.cpp') 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 " -- cgit v1.2.3