summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2015-11-01 11:51:30 -0800
committerAlon Zakai <alonzakai@gmail.com>2015-11-01 11:51:30 -0800
commit34b3a09aae11f04deb08c14954707f99b0d49b83 (patch)
tree1d2c170aa772acf2af099014c18bfe0e944fabd0 /src
parent904aba781d4cdd7074d2f8d4faa833207a31e83e (diff)
downloadbinaryen-34b3a09aae11f04deb08c14954707f99b0d49b83.tar.gz
binaryen-34b3a09aae11f04deb08c14954707f99b0d49b83.tar.bz2
binaryen-34b3a09aae11f04deb08c14954707f99b0d49b83.zip
enable imports in emcc builds
Diffstat (limited to 'src')
-rw-r--r--src/asm2wasm.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/asm2wasm.h b/src/asm2wasm.h
index e2b853a07..c8dd3f9dd 100644
--- a/src/asm2wasm.h
+++ b/src/asm2wasm.h
@@ -787,13 +787,14 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) {
}
Call* ret;
if (wasm.imports.find(name) != wasm.imports.end()) {
+#ifndef __EMSCRIPTEN__
// no imports yet in reference interpreter, fake it
AsmType asmType = detectAsmType(astStackHelper.getParent(), &asmData);
if (asmType == ASM_NONE) return allocator.alloc<Nop>();
if (asmType == ASM_INT) return allocator.alloc<Const>()->set(Literal((int32_t)0));
if (asmType == ASM_DOUBLE) return allocator.alloc<Const>()->set(Literal((double)0.0));
abort();
-#if 0
+#else
ret = allocator.alloc<CallImport>();
noteImportedFunctionCall(ast, astStackHelper.getParent(), &asmData);
#endif