summaryrefslogtreecommitdiff
path: root/src/binary-reader-ir.cc
diff options
context:
space:
mode:
authorDmitry Bezhetskov <Dima00782@gmail.com>2021-07-26 00:41:32 +0700
committerGitHub <noreply@github.com>2021-07-25 10:41:32 -0700
commit9aac0a28896a714b698ab489a473b9bc05deb7c3 (patch)
tree7e3e40abd22146f2d76981c30dfa693290956448 /src/binary-reader-ir.cc
parent7eadc12f71483b1d9d8cf16877efa33361d1e493 (diff)
downloadwabt-9aac0a28896a714b698ab489a473b9bc05deb7c3.tar.gz
wabt-9aac0a28896a714b698ab489a473b9bc05deb7c3.tar.bz2
wabt-9aac0a28896a714b698ab489a473b9bc05deb7c3.zip
Begin support for typed function references proposal: added the flag and supported call_ref (#1691)
Diffstat (limited to 'src/binary-reader-ir.cc')
-rw-r--r--src/binary-reader-ir.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/binary-reader-ir.cc b/src/binary-reader-ir.cc
index 06f4fa00..05b2d988 100644
--- a/src/binary-reader-ir.cc
+++ b/src/binary-reader-ir.cc
@@ -147,6 +147,7 @@ class BinaryReaderIR : public BinaryReaderNop {
Result OnCatchExpr(Index tag_index) override;
Result OnCatchAllExpr() override;
Result OnCallIndirectExpr(Index sig_index, Index table_index) override;
+ Result OnCallRefExpr() override;
Result OnReturnCallExpr(Index func_index) override;
Result OnReturnCallIndirectExpr(Index sig_index, Index table_index) override;
Result OnCompareExpr(Opcode opcode) override;
@@ -748,6 +749,10 @@ Result BinaryReaderIR::OnCallIndirectExpr(Index sig_index, Index table_index) {
return AppendExpr(std::move(expr));
}
+Result BinaryReaderIR::OnCallRefExpr() {
+ return AppendExpr(MakeUnique<CallRefExpr>());
+}
+
Result BinaryReaderIR::OnReturnCallExpr(Index func_index) {
return AppendExpr(MakeUnique<ReturnCallExpr>(Var(func_index)));
}