From 25a335b740da7e7f199edcad617251d19aa6b18b Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 2 Nov 2015 13:00:23 -0800 Subject: abort on switches, for now --- src/asm2wasm.h | 6 +++++- src/wasm.h | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src') 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(); +#ifndef __EMSCRIPTEN__ + return allocator.alloc(); // ignore in reference interpreter +#else + return allocator.alloc(); // XXX abort in wasm.js +#endif #if 0 IString name = getNextId("switch"); breakStack.push_back(name); diff --git a/src/wasm.h b/src/wasm.h index 95b44c344..e1ffe76a1 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -759,7 +759,7 @@ public: ExpressionList operands; std::ostream& doPrint(std::ostream &o, unsigned indent) { - abort(); + return printOpening(o, "host") << ')'; } }; -- cgit v1.2.3