diff options
author | Alon Zakai <azakai@google.com> | 2021-10-13 12:14:49 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-13 19:14:49 +0000 |
commit | 7126a43e9e1cea50d3534b50d4554f4a18cd6e14 (patch) | |
tree | 8267b7f52cc914463bafc892b7c3f97554f10fc8 /test/example | |
parent | 31af332f2a1627ae2bd9232baf5837366a481cfe (diff) | |
download | binaryen-7126a43e9e1cea50d3534b50d4554f4a18cd6e14.tar.gz binaryen-7126a43e9e1cea50d3534b50d4554f4a18cd6e14.tar.bz2 binaryen-7126a43e9e1cea50d3534b50d4554f4a18cd6e14.zip |
[Wasm GC] Take advantage of immutable struct fields in effects.h (#4240)
This is the easy part of using immutability more: Just note immutable
fields as such when we read from them, and then a write to a struct
does not interfere with such reads. That is, only a read from a mutable
field can notice the effect of a write.
Diffstat (limited to 'test/example')
-rw-r--r-- | test/example/cpp-unit.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/example/cpp-unit.cpp b/test/example/cpp-unit.cpp index 961013bc3..7c32478c6 100644 --- a/test/example/cpp-unit.cpp +++ b/test/example/cpp-unit.cpp @@ -611,7 +611,8 @@ void test_effects() { assert_equal(effects.trap, true); assert_equal(effects.readsArray, true); assert_equal(effects.writesArray, true); - assert_equal(effects.readsStruct, false); + assert_equal(effects.readsMutableStruct, false); + assert_equal(effects.readsImmutableStruct, false); assert_equal(effects.writesStruct, false); } } |