summaryrefslogtreecommitdiff
path: root/src/wasm2asm.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm2asm.h')
-rw-r--r--src/wasm2asm.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/wasm2asm.h b/src/wasm2asm.h
index 0d8422ab1..2c330e273 100644
--- a/src/wasm2asm.h
+++ b/src/wasm2asm.h
@@ -392,7 +392,7 @@ Ref Wasm2AsmBuilder::processFunction(Function* func) {
}
void Wasm2AsmBuilder::scanFunctionBody(Expression* curr) {
- struct ExpressionScanner : public WasmWalker<ExpressionScanner> {
+ struct ExpressionScanner : public PostWalker<ExpressionScanner> {
Wasm2AsmBuilder* parent;
ExpressionScanner(Wasm2AsmBuilder* parent) : parent(parent) {}
@@ -467,6 +467,9 @@ void Wasm2AsmBuilder::scanFunctionBody(Expression* curr) {
parent->setStatement(curr);
}
}
+ void visitReturn(Return *curr) {
+ abort();
+ }
void visitHost(Host *curr) {
for (auto item : curr->operands) {
if (parent->isStatement(item)) {
@@ -480,7 +483,7 @@ void Wasm2AsmBuilder::scanFunctionBody(Expression* curr) {
}
Ref Wasm2AsmBuilder::processFunctionBody(Expression* curr, IString result) {
- struct ExpressionProcessor : public WasmVisitor<ExpressionProcessor, Ref> {
+ struct ExpressionProcessor : public Visitor<ExpressionProcessor, Ref> {
Wasm2AsmBuilder* parent;
IString result;
ExpressionProcessor(Wasm2AsmBuilder* parent) : parent(parent) {}
@@ -521,7 +524,7 @@ Ref Wasm2AsmBuilder::processFunctionBody(Expression* curr, IString result) {
Ref visit(Expression* curr, IString nextResult) {
IString old = result;
result = nextResult;
- Ref ret = WasmVisitor::visit(curr);
+ Ref ret = Visitor::visit(curr);
result = old; // keep it consistent for the rest of this frame, which may call visit on multiple children
return ret;
}
@@ -1083,6 +1086,9 @@ Ref Wasm2AsmBuilder::processFunctionBody(Expression* curr, IString result) {
)
);
}
+ Ref visitReturn(Return *curr) {
+ abort();
+ }
Ref visitHost(Host *curr) {
abort();
}