minor tweaks

This commit is contained in:
Brian Carroll 2022-11-16 21:25:16 +00:00
parent 24cef94fb5
commit ba99870de0
No known key found for this signature in database
GPG key ID: 5C7B2EC4101703C0
2 changed files with 3 additions and 4 deletions

View file

@ -138,10 +138,11 @@ fn compile_roc_to_wasm_bytes<'a, T: Wasm32Result>(
)
});
let (mut module, called_preload_fns, main_fn_index) =
let (mut module, mut called_fns, main_fn_index) =
roc_gen_wasm::build_app_module(&env, &mut interns, host_module, procedures);
T::insert_wrapper(arena, &mut module, TEST_WRAPPER_NAME, main_fn_index);
called_fns.push(true);
// Export the initialiser function for refcount tests
let init_refcount_idx = module
@ -158,7 +159,7 @@ fn compile_roc_to_wasm_bytes<'a, T: Wasm32Result>(
index: init_refcount_idx,
});
module.eliminate_dead_code(env.arena, called_preload_fns);
module.eliminate_dead_code(env.arena, called_fns);
let mut app_module_bytes = std::vec::Vec::with_capacity(module.size());
module.serialize(&mut app_module_bytes);