summaryrefslogtreecommitdiff
path: root/src/asm2wasm.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/asm2wasm.h')
-rw-r--r--src/asm2wasm.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/asm2wasm.h b/src/asm2wasm.h
index e5ba3a499..7d8d4d47a 100644
--- a/src/asm2wasm.h
+++ b/src/asm2wasm.h
@@ -962,7 +962,11 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) {
return ret;
} else if (what == SWITCH) {
// XXX switch is still in flux in the spec repo, just emit a placeholder
- return allocator.alloc<Nop>();
+#ifndef __EMSCRIPTEN__
+ return allocator.alloc<Nop>(); // ignore in reference interpreter
+#else
+ return allocator.alloc<Host>(); // XXX abort in wasm.js
+#endif
#if 0
IString name = getNextId("switch");
breakStack.push_back(name);