Generate calls to refcount procs from Wasm backend

This commit is contained in:
Brian Carroll 2021-11-26 10:16:48 +00:00
parent 985fa9dade
commit 61575cea7e
5 changed files with 389 additions and 209 deletions

View file

@ -112,14 +112,17 @@ pub fn helper_wasm<'a, T: Wasm32TestResult>(
let exposed_to_host = exposed_to_host.keys().copied().collect::<MutSet<_>>();
let env = roc_gen_wasm::Env {
let refcount_home = interns.module_id(&"$RefCount".into());
let mut env = roc_gen_wasm::Env {
arena,
interns,
exposed_to_host,
};
let (mut wasm_module, main_fn_index) =
roc_gen_wasm::build_module_help(&env, procedures).unwrap();
roc_gen_wasm::build_module_help(&env, procedures, refcount_home).unwrap();
T::insert_test_wrapper(arena, &mut wasm_module, TEST_WRAPPER_NAME, main_fn_index);