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/passes/I64ToI32Lowering.cpp | |
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/passes/I64ToI32Lowering.cpp')
-rw-r--r-- | src/passes/I64ToI32Lowering.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/passes/I64ToI32Lowering.cpp b/src/passes/I64ToI32Lowering.cpp index 2072f6614..711900e1d 100644 --- a/src/passes/I64ToI32Lowering.cpp +++ b/src/passes/I64ToI32Lowering.cpp @@ -521,7 +521,7 @@ struct I64ToI32Lowering : public WalkerPass<PostWalker<I64ToI32Lowering>> { setOutParam(result, std::move(highBits)); replaceCurrent(result); MemoryUtils::ensureExists(getModule()->memory); - ABI::wasm2js::ensureScratchMemoryHelpers(getModule()); + ABI::wasm2js::ensureHelpers(getModule()); } void lowerReinterpretInt64(Unary* curr) { @@ -539,7 +539,7 @@ struct I64ToI32Lowering : public WalkerPass<PostWalker<I64ToI32Lowering>> { builder->makeCall(ABI::wasm2js::SCRATCH_LOAD_F64, {}, Type::f64)); replaceCurrent(result); MemoryUtils::ensureExists(getModule()->memory); - ABI::wasm2js::ensureScratchMemoryHelpers(getModule()); + ABI::wasm2js::ensureHelpers(getModule()); } void lowerTruncFloatToInt(Unary* curr) { |