summaryrefslogtreecommitdiff
path: root/src/wast-parser.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/wast-parser.cc')
-rw-r--r--src/wast-parser.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/wast-parser.cc b/src/wast-parser.cc
index 9fb09c5a..5954f651 100644
--- a/src/wast-parser.cc
+++ b/src/wast-parser.cc
@@ -120,6 +120,7 @@ bool IsPlainInstr(TokenType token_type) {
case TokenType::ReturnCallIndirect:
case TokenType::Call:
case TokenType::CallIndirect:
+ case TokenType::CallRef:
case TokenType::LocalGet:
case TokenType::LocalSet:
case TokenType::LocalTee:
@@ -1863,6 +1864,12 @@ Result WastParser::ParsePlainInstr(std::unique_ptr<Expr>* out_expr) {
break;
}
+ case TokenType::CallRef: {
+ ErrorUnlessOpcodeEnabled(Consume());
+ out_expr->reset(new CallRefExpr(loc));
+ break;
+ }
+
case TokenType::ReturnCall:
ErrorUnlessOpcodeEnabled(Consume());
CHECK_RESULT(ParsePlainInstrVar<ReturnCallExpr>(loc, out_expr));