summaryrefslogtreecommitdiff
path: root/src/wasm2asm.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm2asm.h')
-rw-r--r--src/wasm2asm.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/wasm2asm.h b/src/wasm2asm.h
index 86c1f465c..581dc4b62 100644
--- a/src/wasm2asm.h
+++ b/src/wasm2asm.h
@@ -13,6 +13,7 @@ namespace wasm {
using namespace cashew;
IString ASM_FUNC("asmFunc"),
+ ABORT_FUNC("abort"),
NO_RESULT("wasm2asm$noresult"), // no result at all
EXPRESSION_RESULT("wasm2asm$expresult"); // result in an expression, no temp var
@@ -712,10 +713,13 @@ Ref Wasm2AsmBuilder::processFunctionBody(Expression* curr, IString result) {
);
}
void visitHost(Host *curr) override {
+ abort();
}
void visitNop(Nop *curr) override {
+ return ValueBuilder::makeTopLevel()
}
void visitUnreachable(Unreachable *curr) override {
+ return ValueBuilder::makeCall(ABORT_FUNC);
}
};
return ExpressionProcessor(this).visit(curr, result);