diff options
author | Thomas Lively <tlively@google.com> | 2023-11-15 01:43:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-15 01:43:27 +0100 |
commit | 325d588b0bf1497322d75c35ef8e017f9a8a5d7c (patch) | |
tree | c7bca1234294a5c92304c1191efa4ca1448f3919 /src/parser/parsers.h | |
parent | 8eb4899d8dafe02c0440c5e33aaf37529e8fc941 (diff) | |
download | binaryen-325d588b0bf1497322d75c35ef8e017f9a8a5d7c.tar.gz binaryen-325d588b0bf1497322d75c35ef8e017f9a8a5d7c.tar.bz2 binaryen-325d588b0bf1497322d75c35ef8e017f9a8a5d7c.zip |
[Parser] Parse ref.test and ref.cast (#6099)
Diffstat (limited to 'src/parser/parsers.h')
-rw-r--r-- | src/parser/parsers.h | 8 |
1 files changed, 6 insertions, 2 deletions
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<typename Ctx> Result<> makeI31Get(Ctx& ctx, Index pos, bool signed_) { } template<typename Ctx> 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<typename Ctx> 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<typename Ctx> Result<> makeBrOnNull(Ctx& ctx, Index pos, bool onFail) { |