diff options
author | Thomas Lively <tlively@google.com> | 2024-07-12 16:48:06 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-12 13:48:06 -0700 |
commit | eda6530a187add28f06d9ab84d78b21b5001a6df (patch) | |
tree | b731f8dc5a32a1b8e969f47f82f497909a236c71 /src/wasm/wasm-ir-builder.cpp | |
parent | 0e0e08db6280dec4f4fcce2dff3ba07445c45b8a (diff) | |
download | binaryen-eda6530a187add28f06d9ab84d78b21b5001a6df.tar.gz binaryen-eda6530a187add28f06d9ab84d78b21b5001a6df.tar.bz2 binaryen-eda6530a187add28f06d9ab84d78b21b5001a6df.zip |
[threads] ref.i31_shared (#6735)
Implement `ref.i31_shared` the new instruction for creating references
to shared i31s. Implement binary and text parsing and emitting as well
as interpretation. Copy the upstream spec test for i31 and modify it so
that all the heap types are shared. Comment out some parts that we do
not yet support.
Diffstat (limited to 'src/wasm/wasm-ir-builder.cpp')
-rw-r--r-- | src/wasm/wasm-ir-builder.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wasm/wasm-ir-builder.cpp b/src/wasm/wasm-ir-builder.cpp index 63f5df4c0..3db6238c4 100644 --- a/src/wasm/wasm-ir-builder.cpp +++ b/src/wasm/wasm-ir-builder.cpp @@ -1605,10 +1605,10 @@ Result<> IRBuilder::makeTupleDrop(uint32_t arity) { return Ok{}; } -Result<> IRBuilder::makeRefI31() { +Result<> IRBuilder::makeRefI31(Shareability share) { RefI31 curr; CHECK_ERR(visitRefI31(&curr)); - push(builder.makeRefI31(curr.value)); + push(builder.makeRefI31(curr.value, share)); return Ok{}; } |