diff options
Diffstat (limited to 'src/wasm/wasm-stack.cpp')
-rw-r--r-- | src/wasm/wasm-stack.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/wasm/wasm-stack.cpp b/src/wasm/wasm-stack.cpp index 64622e814..edfdf31d1 100644 --- a/src/wasm/wasm-stack.cpp +++ b/src/wasm/wasm-stack.cpp @@ -1671,17 +1671,13 @@ void BinaryInstWriter::visitReturn(Return* curr) { o << int8_t(BinaryConsts::Return); } -void BinaryInstWriter::visitHost(Host* curr) { - switch (curr->op) { - case MemorySize: { - o << int8_t(BinaryConsts::MemorySize); - break; - } - case MemoryGrow: { - o << int8_t(BinaryConsts::MemoryGrow); - break; - } - } +void BinaryInstWriter::visitMemorySize(MemorySize* curr) { + o << int8_t(BinaryConsts::MemorySize); + o << U32LEB(0); // Reserved flags field +} + +void BinaryInstWriter::visitMemoryGrow(MemoryGrow* curr) { + o << int8_t(BinaryConsts::MemoryGrow); o << U32LEB(0); // Reserved flags field } |