diff options
author | Alon Zakai <alonzakai@gmail.com> | 2015-11-02 13:00:23 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2015-11-02 13:07:09 -0800 |
commit | 25a335b740da7e7f199edcad617251d19aa6b18b (patch) | |
tree | bf259819171a38a1eb57a170483a93fb6e501572 /src/asm2wasm.h | |
parent | 1a9469b0ed84be32dc264effbe7736a03cb7b608 (diff) | |
download | binaryen-25a335b740da7e7f199edcad617251d19aa6b18b.tar.gz binaryen-25a335b740da7e7f199edcad617251d19aa6b18b.tar.bz2 binaryen-25a335b740da7e7f199edcad617251d19aa6b18b.zip |
abort on switches, for now
Diffstat (limited to 'src/asm2wasm.h')
-rw-r--r-- | src/asm2wasm.h | 6 |
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); |