wasm: use linking data to implement call graph tracing for DCE

This commit is contained in:
Brian Carroll 2022-06-12 15:17:58 +01:00
parent 9b15a9b99b
commit 6d39f50bcc
No known key found for this signature in database
GPG key ID: 5C7B2EC4101703C0
9 changed files with 177 additions and 340 deletions

View file

@ -151,7 +151,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_preload_fns);
let mut app_module_bytes = std::vec::Vec::with_capacity(module.size());
module.serialize(&mut app_module_bytes);