diff options
Diffstat (limited to 'src/binary-writer.cc')
-rw-r--r-- | src/binary-writer.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/binary-writer.cc b/src/binary-writer.cc index 3610f2ee..8d63e28b 100644 --- a/src/binary-writer.cc +++ b/src/binary-writer.cc @@ -642,6 +642,12 @@ void BinaryWriter::WriteExpr(const Func* func, const Expr* expr) { WriteU32Leb128(stream_, index, "table.size table index"); break; } + case ExprType::RefFunc: { + WriteOpcode(stream_, Opcode::RefFunc); + Index index = module_->GetFuncIndex(cast<RefFuncExpr>(expr)->var); + WriteU32Leb128WithReloc(index, "function index", RelocType::FuncIndexLEB); + break; + } case ExprType::RefNull: { WriteOpcode(stream_, Opcode::RefNull); break; |