summaryrefslogtreecommitdiff
path: root/src/wasm/wasm-stack.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm/wasm-stack.cpp')
-rw-r--r--src/wasm/wasm-stack.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/wasm/wasm-stack.cpp b/src/wasm/wasm-stack.cpp
index 60c352c5d..741aef5ce 100644
--- a/src/wasm/wasm-stack.cpp
+++ b/src/wasm/wasm-stack.cpp
@@ -1882,12 +1882,14 @@ void BinaryInstWriter::visitCallRef(CallRef* curr) {
void BinaryInstWriter::visitRefTest(RefTest* curr) {
o << int8_t(BinaryConsts::GCPrefix) << U32LEB(BinaryConsts::RefTest);
- WASM_UNREACHABLE("TODO (gc): ref.test");
+ parent.writeHeapType(curr->ref->type.getHeapType());
+ parent.writeHeapType(curr->rtt->type.getHeapType());
}
void BinaryInstWriter::visitRefCast(RefCast* curr) {
o << int8_t(BinaryConsts::GCPrefix) << U32LEB(BinaryConsts::RefCast);
- WASM_UNREACHABLE("TODO (gc): ref.cast");
+ parent.writeHeapType(curr->ref->type.getHeapType());
+ parent.writeHeapType(curr->rtt->type.getHeapType());
}
void BinaryInstWriter::visitBrOnCast(BrOnCast* curr) {