diff options
Diffstat (limited to 'src/wasm')
-rw-r--r-- | src/wasm/wasm-binary.cpp | 4 | ||||
-rw-r--r-- | src/wasm/wasm-s-parser.cpp | 4 | ||||
-rw-r--r-- | src/wasm/wasm.cpp | 6 |
3 files changed, 5 insertions, 9 deletions
diff --git a/src/wasm/wasm-binary.cpp b/src/wasm/wasm-binary.cpp index d72626b90..c8ced1327 100644 --- a/src/wasm/wasm-binary.cpp +++ b/src/wasm/wasm-binary.cpp @@ -6882,7 +6882,7 @@ void WasmBinaryReader::visitMemorySize(MemorySize* curr) { BYN_TRACE("zz node: MemorySize\n"); Index index = getU32LEB(); if (getMemory(index)->is64()) { - curr->make64(); + curr->type = Type::i64; } curr->finalize(); memoryRefs[index].push_back(&curr->memory); @@ -6893,7 +6893,7 @@ void WasmBinaryReader::visitMemoryGrow(MemoryGrow* curr) { curr->delta = popNonVoidExpression(); Index index = getU32LEB(); if (getMemory(index)->is64()) { - curr->make64(); + curr->type = Type::i64; } memoryRefs[index].push_back(&curr->memory); } diff --git a/src/wasm/wasm-s-parser.cpp b/src/wasm/wasm-s-parser.cpp index be6fc5100..aa386f841 100644 --- a/src/wasm/wasm-s-parser.cpp +++ b/src/wasm/wasm-s-parser.cpp @@ -1537,7 +1537,7 @@ Expression* SExpressionWasmBuilder::makeMemorySize(Element& s) { } ret->memory = memory; if (isMemory64(memory)) { - ret->make64(); + ret->type = Type::i64; } ret->finalize(); return ret; @@ -1554,7 +1554,7 @@ Expression* SExpressionWasmBuilder::makeMemoryGrow(Element& s) { } ret->memory = memory; if (isMemory64(memory)) { - ret->make64(); + ret->type = Type::i64; } ret->delta = parseExpression(s[i]); ret->finalize(); diff --git a/src/wasm/wasm.cpp b/src/wasm/wasm.cpp index 9bc0f6e0b..82ddd553f 100644 --- a/src/wasm/wasm.cpp +++ b/src/wasm/wasm.cpp @@ -789,15 +789,11 @@ void Drop::finalize() { } } -void MemorySize::make64() { type = ptrType = Type::i64; } -void MemorySize::finalize() { type = ptrType; } +void MemorySize::finalize() {} -void MemoryGrow::make64() { type = ptrType = Type::i64; } void MemoryGrow::finalize() { if (delta->type == Type::unreachable) { type = Type::unreachable; - } else { - type = ptrType; } } |