diff options
Diffstat (limited to 'src/wasm/wasm-stack.cpp')
-rw-r--r-- | src/wasm/wasm-stack.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/wasm/wasm-stack.cpp b/src/wasm/wasm-stack.cpp index 7b682a264..e5460cf6f 100644 --- a/src/wasm/wasm-stack.cpp +++ b/src/wasm/wasm-stack.cpp @@ -2040,6 +2040,12 @@ void BinaryInstWriter::visitArrayNew(ArrayNew* curr) { parent.writeIndexedHeapType(curr->rtt->type.getHeapType()); } +void BinaryInstWriter::visitArrayInit(ArrayInit* curr) { + o << int8_t(BinaryConsts::GCPrefix) << U32LEB(BinaryConsts::ArrayInit); + parent.writeIndexedHeapType(curr->rtt->type.getHeapType()); + o << U32LEB(curr->values.size()); +} + void BinaryInstWriter::visitArrayGet(ArrayGet* curr) { auto heapType = curr->ref->type.getHeapType(); const auto& field = heapType.getArray().element; |