From 8936d78d84473b258aa1b0245d2f0f22c79643f4 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Wed, 18 Nov 2015 16:37:43 -0800 Subject: stop working around import issues in spec interpreter --- src/asm2wasm.h | 8 -------- 1 file changed, 8 deletions(-) (limited to 'src') 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(); - if (type == i32) return allocator.alloc()->set(Literal((int32_t)0)); - if (type == f64) return allocator.alloc()->set(Literal((double)0.0)); - abort(); -#else ret = allocator.alloc(); 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(); } -- cgit v1.2.3