From eda6530a187add28f06d9ab84d78b21b5001a6df Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Fri, 12 Jul 2024 16:48:06 -0400 Subject: [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. --- src/parser/parsers.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/parser/parsers.h') 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 Result<> makeCallRef(Ctx&, Index, const std::vector&, bool isReturn); template -Result<> makeRefI31(Ctx&, Index, const std::vector&); +Result<> +makeRefI31(Ctx&, Index, const std::vector&, Shareability share); template Result<> makeI31Get(Ctx&, Index, const std::vector&, bool signed_); template @@ -2127,9 +2128,11 @@ Result<> makeCallRef(Ctx& ctx, } template -Result<> -makeRefI31(Ctx& ctx, Index pos, const std::vector& annotations) { - return ctx.makeRefI31(pos, annotations); +Result<> makeRefI31(Ctx& ctx, + Index pos, + const std::vector& annotations, + Shareability share) { + return ctx.makeRefI31(pos, annotations, share); } template -- cgit v1.2.3