summaryrefslogtreecommitdiff
path: root/src/parser
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser')
-rw-r--r--src/parser/contexts.h5
-rw-r--r--src/parser/parsers.h2
2 files changed, 6 insertions, 1 deletions
diff --git a/src/parser/contexts.h b/src/parser/contexts.h
index 8f74502ad..fb9218cbc 100644
--- a/src/parser/contexts.h
+++ b/src/parser/contexts.h
@@ -453,6 +453,7 @@ struct NullInstrParserCtx {
Result<> makeTableCopy(Index, TableIdxT*, TableIdxT*) { return Ok{}; }
Result<> makeThrow(Index, TagIdxT) { return Ok{}; }
Result<> makeRethrow(Index, LabelIdxT) { return Ok{}; }
+ Result<> makeThrowRef(Index) { return Ok{}; }
Result<> makeTupleMake(Index, uint32_t) { return Ok{}; }
Result<> makeTupleExtract(Index, uint32_t, uint32_t) { return Ok{}; }
Result<> makeTupleDrop(Index, uint32_t) { return Ok{}; }
@@ -1721,6 +1722,10 @@ struct ParseDefsCtx : TypeParserCtx<ParseDefsCtx> {
return withLoc(pos, irBuilder.makeRethrow(label));
}
+ Result<> makeThrowRef(Index pos) {
+ return withLoc(pos, irBuilder.makeThrowRef());
+ }
+
Result<> makeTupleMake(Index pos, uint32_t arity) {
return withLoc(pos, irBuilder.makeTupleMake(arity));
}
diff --git a/src/parser/parsers.h b/src/parser/parsers.h
index 73a7d0035..0c7c5550f 100644
--- a/src/parser/parsers.h
+++ b/src/parser/parsers.h
@@ -1646,7 +1646,7 @@ template<typename Ctx> Result<> makeRethrow(Ctx& ctx, Index pos) {
}
template<typename Ctx> Result<> makeThrowRef(Ctx& ctx, Index pos) {
- return ctx.in.err("unimplemented instruction");
+ return ctx.makeThrowRef(pos);
}
template<typename Ctx> Result<> makeTupleMake(Ctx& ctx, Index pos) {