From 325d588b0bf1497322d75c35ef8e017f9a8a5d7c Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Wed, 15 Nov 2023 01:43:27 +0100 Subject: [Parser] Parse ref.test and ref.cast (#6099) --- src/parser/parsers.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/parser/parsers.h') diff --git a/src/parser/parsers.h b/src/parser/parsers.h index 0641e941c..6b6bb0aa5 100644 --- a/src/parser/parsers.h +++ b/src/parser/parsers.h @@ -1303,11 +1303,15 @@ template Result<> makeI31Get(Ctx& ctx, Index pos, bool signed_) { } template Result<> makeRefTest(Ctx& ctx, Index pos) { - return ctx.in.err("unimplemented instruction"); + auto type = reftype(ctx); + CHECK_ERR(type); + return ctx.makeRefTest(pos, *type); } template Result<> makeRefCast(Ctx& ctx, Index pos) { - return ctx.in.err("unimplemented instruction"); + auto type = reftype(ctx); + CHECK_ERR(type); + return ctx.makeRefCast(pos, *type); } template Result<> makeBrOnNull(Ctx& ctx, Index pos, bool onFail) { -- cgit v1.2.3