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/parser/parsers.h | |
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/parser/parsers.h')
-rw-r--r-- | src/parser/parsers.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/parser/parsers.h b/src/parser/parsers.h index db450e3c6..2c3916fa3 100644 --- a/src/parser/parsers.h +++ b/src/parser/parsers.h @@ -221,7 +221,8 @@ template<typename Ctx> Result<> makeCallRef(Ctx&, Index, const std::vector<Annotation>&, bool isReturn); template<typename Ctx> -Result<> makeRefI31(Ctx&, Index, const std::vector<Annotation>&); +Result<> +makeRefI31(Ctx&, Index, const std::vector<Annotation>&, Shareability share); template<typename Ctx> Result<> makeI31Get(Ctx&, Index, const std::vector<Annotation>&, bool signed_); template<typename Ctx> @@ -2127,9 +2128,11 @@ Result<> makeCallRef(Ctx& ctx, } template<typename Ctx> -Result<> -makeRefI31(Ctx& ctx, Index pos, const std::vector<Annotation>& annotations) { - return ctx.makeRefI31(pos, annotations); +Result<> makeRefI31(Ctx& ctx, + Index pos, + const std::vector<Annotation>& annotations, + Shareability share) { + return ctx.makeRefI31(pos, annotations, share); } template<typename Ctx> |