mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
Generate calls to refcount procs from Wasm backend
This commit is contained in:
parent
985fa9dade
commit
61575cea7e
5 changed files with 389 additions and 209 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue