diff options
author | Thomas Lively <tlively@google.com> | 2024-12-20 17:45:47 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-21 01:45:47 +0000 |
commit | 6ddacde514af7cc546caa07fede4baa3e429c33c (patch) | |
tree | 3436a22906ae3b94d3308e738a31d3db559bf246 /src/wasm/wasm-binary.cpp | |
parent | 4d8a933e1136159160f2b45ad3a9a1c82021a75b (diff) | |
download | binaryen-6ddacde514af7cc546caa07fede4baa3e429c33c.tar.gz binaryen-6ddacde514af7cc546caa07fede4baa3e429c33c.tar.bz2 binaryen-6ddacde514af7cc546caa07fede4baa3e429c33c.zip |
[NFC] Make MemoryOrder parameters non-optional (#7171)
Update Builder and IRBuilder makeStructGet and makeStructSet functions
to require the memory order to be explicitly supplied. This is slightly
more verbose, but will reduce the chances that we forget to properly
consider synchronization when implementing new features in the future.
Diffstat (limited to 'src/wasm/wasm-binary.cpp')
-rw-r--r-- | src/wasm/wasm-binary.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/wasm/wasm-binary.cpp b/src/wasm/wasm-binary.cpp index b0c5a54ac..2bcf3d446 100644 --- a/src/wasm/wasm-binary.cpp +++ b/src/wasm/wasm-binary.cpp @@ -4172,13 +4172,15 @@ Result<> WasmBinaryReader::readInst() { case BinaryConsts::StructGetU: { auto type = getIndexedHeapType(); auto field = getU32LEB(); - return builder.makeStructGet( - type, field, op == BinaryConsts::StructGetS); + return builder.makeStructGet(type, + field, + op == BinaryConsts::StructGetS, + MemoryOrder::Unordered); } case BinaryConsts::StructSet: { auto type = getIndexedHeapType(); auto field = getU32LEB(); - return builder.makeStructSet(type, field); + return builder.makeStructSet(type, field, MemoryOrder::Unordered); } case BinaryConsts::ArrayNew: return builder.makeArrayNew(getIndexedHeapType()); |