summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/wasm2js.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/wasm2js.h b/src/wasm2js.h
index c06d90180..ab093dd03 100644
--- a/src/wasm2js.h
+++ b/src/wasm2js.h
@@ -424,13 +424,14 @@ Ref Wasm2JSBuilder::processWasm(Module* wasm, Name funcName) {
});
if (generateFetchHighBits) {
Builder builder(allocator);
- asmFunc[3]->push_back(processFunction(
- wasm,
- builder.makeFunction(WASM_FETCH_HIGH_BITS,
- Signature(Type::none, Type::i32),
- {},
- builder.makeReturn(builder.makeGlobalGet(
- INT64_TO_32_HIGH_BITS, Type::i32)))));
+ asmFunc[3]->push_back(
+ processFunction(wasm,
+ wasm->addFunction(builder.makeFunction(
+ WASM_FETCH_HIGH_BITS,
+ Signature(Type::none, Type::i32),
+ {},
+ builder.makeReturn(builder.makeGlobalGet(
+ INT64_TO_32_HIGH_BITS, Type::i32))))));
auto e = new Export();
e->name = WASM_FETCH_HIGH_BITS;
e->value = WASM_FETCH_HIGH_BITS;