diff options
author | Alon Zakai <alonzakai@gmail.com> | 2015-11-18 16:37:43 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2015-11-18 16:37:43 -0800 |
commit | 8936d78d84473b258aa1b0245d2f0f22c79643f4 (patch) | |
tree | 46cc970bbecdd15b614db049f6b20c9ee592ed7c | |
parent | 0b02cbdc0af0a42032b35344bc2f8d3f768766db (diff) | |
download | binaryen-8936d78d84473b258aa1b0245d2f0f22c79643f4.tar.gz binaryen-8936d78d84473b258aa1b0245d2f0f22c79643f4.tar.bz2 binaryen-8936d78d84473b258aa1b0245d2f0f22c79643f4.zip |
stop working around import issues in spec interpreter
-rw-r--r-- | src/asm2wasm.h | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/asm2wasm.h b/src/asm2wasm.h index a8cb8fc15..4eb119ae0 100644 --- a/src/asm2wasm.h +++ b/src/asm2wasm.h @@ -975,19 +975,11 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { if (wasm.importsMap.find(name) != wasm.importsMap.end()) { Ref parent = astStackHelper.getParent(); WasmType type = !!parent ? detectWasmType(parent, &asmData) : none; -#ifndef __EMSCRIPTEN__ - // no imports yet in reference interpreter, fake it - if (type == none) return allocator.alloc<Nop>(); - if (type == i32) return allocator.alloc<Const>()->set(Literal((int32_t)0)); - if (type == f64) return allocator.alloc<Const>()->set(Literal((double)0.0)); - abort(); -#else ret = allocator.alloc<CallImport>(); noteImportedFunctionCall(ast, type, &asmData); Import* import = wasm.importsMap[name]; auto builtin = getBuiltinFunctionType(import->module, import->base); if (builtin) ret->type = builtin->result; -#endif } else { ret = allocator.alloc<Call>(); } |