summaryrefslogtreecommitdiff
path: root/src/asm2wasm.h
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-08-18 11:15:39 -0700
committerAlon Zakai <alonzakai@gmail.com>2016-09-07 09:55:01 -0700
commit2e2e0241a10c0eccb89365c1b50217d6d0d3a386 (patch)
tree4f19b9cc857065ffd30e956f787af546c73cccec /src/asm2wasm.h
parente0809680bb82ecfc950aef97537827442b559fcf (diff)
downloadbinaryen-2e2e0241a10c0eccb89365c1b50217d6d0d3a386.tar.gz
binaryen-2e2e0241a10c0eccb89365c1b50217d6d0d3a386.tar.bz2
binaryen-2e2e0241a10c0eccb89365c1b50217d6d0d3a386.zip
export kinds
Diffstat (limited to 'src/asm2wasm.h')
-rw-r--r--src/asm2wasm.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/asm2wasm.h b/src/asm2wasm.h
index 4d2ddb0cd..c88563109 100644
--- a/src/asm2wasm.h
+++ b/src/asm2wasm.h
@@ -710,6 +710,7 @@ void Asm2WasmBuilder::processAsm(Ref ast) {
auto* export_ = new Export;
export_->name = key;
export_->value = value;
+ export_->kind = Export::Function;
wasm.addExport(export_);
exported[key] = export_;
}
@@ -813,10 +814,15 @@ void Asm2WasmBuilder::processAsm(Ref ast) {
));
auto export_ = new Export;
export_->name = export_->value = GROW_WASM_MEMORY;
+ export_->kind = Export::Function;
wasm.addExport(export_);
}
- wasm.memory.exportName = MEMORY;
+ auto memoryExport = make_unique<Export>();
+ memoryExport->name = MEMORY;
+ memoryExport->value = Name::fromInt(0);
+ memoryExport->kind = Export::Memory;
+ wasm.addExport(memoryExport.release());
#if 0 // enable asm2wasm i64 optimizations when browsers have consistent i64 support in wasm
if (udivmoddi4.is() && getTempRet0.is()) {