summaryrefslogtreecommitdiff
path: root/src/wasm/wasm-binary.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm/wasm-binary.cpp')
-rw-r--r--src/wasm/wasm-binary.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/wasm/wasm-binary.cpp b/src/wasm/wasm-binary.cpp
index bb6f082f8..e5e05bacc 100644
--- a/src/wasm/wasm-binary.cpp
+++ b/src/wasm/wasm-binary.cpp
@@ -3987,7 +3987,7 @@ BinaryConsts::ASTNodes WasmBinaryBuilder::readExpression(Expression*& curr) {
if (maybeVisitArrayNewSeg(curr, opcode)) {
break;
}
- if (maybeVisitArrayInit(curr, opcode)) {
+ if (maybeVisitArrayNewFixed(curr, opcode)) {
break;
}
if (maybeVisitArrayGet(curr, opcode)) {
@@ -7109,15 +7109,16 @@ bool WasmBinaryBuilder::maybeVisitArrayNewSeg(Expression*& out, uint32_t code) {
return false;
}
-bool WasmBinaryBuilder::maybeVisitArrayInit(Expression*& out, uint32_t code) {
- if (code == BinaryConsts::ArrayInitStatic) {
+bool WasmBinaryBuilder::maybeVisitArrayNewFixed(Expression*& out,
+ uint32_t code) {
+ if (code == BinaryConsts::ArrayNewFixedStatic) {
auto heapType = getIndexedHeapType();
auto size = getU32LEB();
std::vector<Expression*> values(size);
for (size_t i = 0; i < size; i++) {
values[size - i - 1] = popNonVoidExpression();
}
- out = Builder(wasm).makeArrayInit(heapType, values);
+ out = Builder(wasm).makeArrayNewFixed(heapType, values);
return true;
}
return false;