diff options
Diffstat (limited to 'src/wasm/wasm-binary.cpp')
-rw-r--r-- | src/wasm/wasm-binary.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/wasm/wasm-binary.cpp b/src/wasm/wasm-binary.cpp index a4df4ed16..7625d1f2a 100644 --- a/src/wasm/wasm-binary.cpp +++ b/src/wasm/wasm-binary.cpp @@ -6419,12 +6419,16 @@ bool WasmBinaryBuilder::maybeVisitRttCanon(Expression*& out, uint32_t code) { } bool WasmBinaryBuilder::maybeVisitRttSub(Expression*& out, uint32_t code) { - if (code != BinaryConsts::RttSub) { + if (code != BinaryConsts::RttSub && code != BinaryConsts::RttFreshSub) { return false; } auto targetHeapType = getIndexedHeapType(); auto* parent = popNonVoidExpression(); - out = Builder(wasm).makeRttSub(targetHeapType, parent); + if (code == BinaryConsts::RttSub) { + out = Builder(wasm).makeRttSub(targetHeapType, parent); + } else { + out = Builder(wasm).makeRttFreshSub(targetHeapType, parent); + } return true; } |