Fix wasm module

This commit is contained in:
Ayaz Hafiz 2022-12-29 08:18:06 -06:00
parent 650d3e6321
commit f2a42affd1
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
2 changed files with 18 additions and 10 deletions

View file

@ -111,7 +111,7 @@ fn compile_roc_to_wasm_bytes<'a, T: Wasm32Result>(
procedures,
mut interns,
exposed_to_host,
layout_interner,
mut layout_interner,
..
} = loaded;
@ -125,7 +125,6 @@ fn compile_roc_to_wasm_bytes<'a, T: Wasm32Result>(
let env = roc_gen_wasm::Env {
arena,
layout_interner: &layout_interner,
module_id,
exposed_to_host,
stack_bytes: roc_gen_wasm::Env::DEFAULT_STACK_BYTES,
@ -140,8 +139,13 @@ fn compile_roc_to_wasm_bytes<'a, T: Wasm32Result>(
)
});
let (mut module, mut called_fns, main_fn_index) =
roc_gen_wasm::build_app_module(&env, &mut interns, host_module, procedures);
let (mut module, mut called_fns, main_fn_index) = roc_gen_wasm::build_app_module(
&env,
&mut layout_interner,
&mut interns,
host_module,
procedures,
);
T::insert_wrapper(arena, &mut module, TEST_WRAPPER_NAME, main_fn_index);
called_fns.push(true);