summaryrefslogtreecommitdiff
path: root/src/asm2wasm.h
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-08-28 10:33:09 -0700
committerAlon Zakai <alonzakai@gmail.com>2016-09-07 09:55:56 -0700
commit28767f631cfdae86ff16ca112bc5b1855b1368c4 (patch)
treee7b1e1605c62fc8d588dd2735ac8610eb1b793df /src/asm2wasm.h
parent42ad2cdbe5baa32dd1b0aea143a4e45f81e8b9b5 (diff)
downloadbinaryen-28767f631cfdae86ff16ca112bc5b1855b1368c4.tar.gz
binaryen-28767f631cfdae86ff16ca112bc5b1855b1368c4.tar.bz2
binaryen-28767f631cfdae86ff16ca112bc5b1855b1368c4.zip
import table
Diffstat (limited to 'src/asm2wasm.h')
-rw-r--r--src/asm2wasm.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/asm2wasm.h b/src/asm2wasm.h
index 306a953a7..e27c5d9e2 100644
--- a/src/asm2wasm.h
+++ b/src/asm2wasm.h
@@ -832,6 +832,14 @@ void Asm2WasmBuilder::processAsm(Ref ast) {
memoryImport->base = MEMORY;
memoryImport->kind = Import::Memory;
wasm.addImport(memoryImport.release());
+
+ // import table
+ auto tableImport = make_unique<Import>();
+ tableImport->name = TABLE;
+ tableImport->module = ENV;
+ tableImport->base = TABLE;
+ tableImport->kind = Import::Table;
+ wasm.addImport(tableImport.release());
#endif
#if 0 // enable asm2wasm i64 optimizations when browsers have consistent i64 support in wasm