diff options
author | Thomas Lively <tlively@google.com> | 2023-03-29 17:10:08 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-29 17:10:08 -0700 |
commit | dba0a08963d0452a773b9abbdd789503945c5f43 (patch) | |
tree | 79b819b0ac00e0cbf248cd2100a2763dd7f72acb /src/wasm | |
parent | 122f7b578c6c3887924d820b714bbd2d2c921390 (diff) | |
download | binaryen-dba0a08963d0452a773b9abbdd789503945c5f43.tar.gz binaryen-dba0a08963d0452a773b9abbdd789503945c5f43.tar.bz2 binaryen-dba0a08963d0452a773b9abbdd789503945c5f43.zip |
Do not treat `atomic.fence` as using a memory (#5603)
* Do not treat `atomic.fence` as using a memory
Update RemoveUnusedModuleElements so that it no longer keeps the memory alive
due to an `atomic.fence` instruction and update validation to allow modules to
use `atomic.fence` without a memory.
* update wasm2js tests
Diffstat (limited to 'src/wasm')
-rw-r--r-- | src/wasm/wasm-validator.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/wasm/wasm-validator.cpp b/src/wasm/wasm-validator.cpp index 123a15c1e..8abcd92fe 100644 --- a/src/wasm/wasm-validator.cpp +++ b/src/wasm/wasm-validator.cpp @@ -1172,8 +1172,6 @@ void FunctionValidator::visitAtomicNotify(AtomicNotify* curr) { } void FunctionValidator::visitAtomicFence(AtomicFence* curr) { - shouldBeFalse( - getModule()->memories.empty(), curr, "Memory operations require a memory"); shouldBeTrue(getModule()->features.hasAtomics(), curr, "Atomic operations require threads [--enable-threads]"); |