diff options
author | Alon Zakai <azakai@google.com> | 2021-03-30 12:31:03 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-30 12:31:03 -0700 |
commit | 2b62a65d7dcf91e1971048012a842f83e54761af (patch) | |
tree | e4ac1b000f7d681e0e5e062206791a4c0fc2ed61 /src | |
parent | cdac6b123b1231859dc0dfbcb88dfabe005855e3 (diff) | |
download | binaryen-2b62a65d7dcf91e1971048012a842f83e54761af.tar.gz binaryen-2b62a65d7dcf91e1971048012a842f83e54761af.tar.bz2 binaryen-2b62a65d7dcf91e1971048012a842f83e54761af.zip |
[Wasm GC] Heap reads/writes are reads/writes of global state (#3755)
We missed that in effects.h, with the result that sets could look like
they had no side effects.
Fixes #3754
Diffstat (limited to 'src')
-rw-r--r-- | src/ir/effects.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ir/effects.h b/src/ir/effects.h index 268a7b4e0..444099fe9 100644 --- a/src/ir/effects.h +++ b/src/ir/effects.h @@ -123,10 +123,11 @@ public: // Changes something in globally-stored state. bool writesGlobalState() const { - return globalsWritten.size() || writesMemory || isAtomic || calls; + return globalsWritten.size() || writesMemory || writesHeap || isAtomic || + calls; } bool readsGlobalState() const { - return globalsRead.size() || readsMemory || isAtomic || calls; + return globalsRead.size() || readsMemory || readsHeap || isAtomic || calls; } bool hasSideEffects() const { |