diff --git a/compiler/load/src/file.rs b/compiler/load/src/file.rs index 778ffa9b1f..df7030b85b 100644 --- a/compiler/load/src/file.rs +++ b/compiler/load/src/file.rs @@ -1464,7 +1464,7 @@ where all_pending_specializations: MutMap::default(), specializations_in_flight: 0, layout_caches: std::vec::Vec::with_capacity(num_cpus::get()), - procs: Procs::default(), + procs: Procs::new_in(arena), }; // We've now distributed one worker queue to each thread. @@ -3836,7 +3836,7 @@ fn build_pending_specializations<'a>( exposed_to_host: MutMap, ) -> Msg<'a> { let find_specializations_start = SystemTime::now(); - let mut procs = Procs::default(); + let mut procs = Procs::new_in(arena); debug_assert!(procs.imported_module_thunks.is_empty()); procs.imported_module_thunks = imported_module_thunks; diff --git a/compiler/mono/src/ir.rs b/compiler/mono/src/ir.rs index ffd6f231ea..ddbe7206f7 100644 --- a/compiler/mono/src/ir.rs +++ b/compiler/mono/src/ir.rs @@ -288,8 +288,8 @@ pub struct Procs<'a> { pub externals_we_need: MutMap, } -impl<'a> Default for Procs<'a> { - fn default() -> Self { +impl<'a> Procs<'a> { + pub fn new_in(arena: &'a Bump) -> Self { Self { partial_procs: MutMap::default(), imported_module_thunks: MutSet::default(),