mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 07:41:12 +00:00
bump-allocate procs
This commit is contained in:
parent
ef60ee02ec
commit
58ba5c09fd
2 changed files with 4 additions and 4 deletions
|
@ -1464,7 +1464,7 @@ where
|
||||||
all_pending_specializations: MutMap::default(),
|
all_pending_specializations: MutMap::default(),
|
||||||
specializations_in_flight: 0,
|
specializations_in_flight: 0,
|
||||||
layout_caches: std::vec::Vec::with_capacity(num_cpus::get()),
|
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.
|
// We've now distributed one worker queue to each thread.
|
||||||
|
@ -3836,7 +3836,7 @@ fn build_pending_specializations<'a>(
|
||||||
exposed_to_host: MutMap<Symbol, Variable>,
|
exposed_to_host: MutMap<Symbol, Variable>,
|
||||||
) -> Msg<'a> {
|
) -> Msg<'a> {
|
||||||
let find_specializations_start = SystemTime::now();
|
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());
|
debug_assert!(procs.imported_module_thunks.is_empty());
|
||||||
procs.imported_module_thunks = imported_module_thunks;
|
procs.imported_module_thunks = imported_module_thunks;
|
||||||
|
|
|
@ -288,8 +288,8 @@ pub struct Procs<'a> {
|
||||||
pub externals_we_need: MutMap<ModuleId, ExternalSpecializations>,
|
pub externals_we_need: MutMap<ModuleId, ExternalSpecializations>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for Procs<'a> {
|
impl<'a> Procs<'a> {
|
||||||
fn default() -> Self {
|
pub fn new_in(arena: &'a Bump) -> Self {
|
||||||
Self {
|
Self {
|
||||||
partial_procs: MutMap::default(),
|
partial_procs: MutMap::default(),
|
||||||
imported_module_thunks: MutSet::default(),
|
imported_module_thunks: MutSet::default(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue