mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-09 13:30:32 +00:00
minor tweaks
This commit is contained in:
parent
24cef94fb5
commit
ba99870de0
2 changed files with 3 additions and 4 deletions
|
@ -242,7 +242,6 @@ pub struct WasmDebugSettings {
|
|||
instructions: bool,
|
||||
storage_map: bool,
|
||||
pub keep_test_binary: bool,
|
||||
pub skip_dead_code_elim: bool,
|
||||
}
|
||||
|
||||
pub const DEBUG_SETTINGS: WasmDebugSettings = WasmDebugSettings {
|
||||
|
@ -253,7 +252,6 @@ pub const DEBUG_SETTINGS: WasmDebugSettings = WasmDebugSettings {
|
|||
instructions: false && cfg!(debug_assertions),
|
||||
storage_map: false && cfg!(debug_assertions),
|
||||
keep_test_binary: false && cfg!(debug_assertions),
|
||||
skip_dead_code_elim: false && cfg!(debug_assertions),
|
||||
};
|
||||
|
||||
#[cfg(test)]
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue