make List.map borrow based on passed function

This commit is contained in:
Folkert 2021-05-16 14:09:39 +02:00
parent 3a4a78fdbb
commit 3ca6ffade9
8 changed files with 106 additions and 35 deletions

View file

@ -2048,6 +2048,13 @@ fn update<'a>(
&& state.dependencies.solved_all()
&& state.goal_phase == Phase::MakeSpecializations
{
Proc::insert_refcount_operations(arena, &mut state.procedures);
Proc::optimize_refcount_operations(
arena,
module_id,
&mut ident_ids,
&mut state.procedures,
);
// display the mono IR of the module, for debug purposes
if roc_mono::ir::PRETTY_PRINT_IR_SYMBOLS {
let procs_string = state
@ -2060,14 +2067,6 @@ fn update<'a>(
println!("{}", result);
}
Proc::insert_refcount_operations(arena, &mut state.procedures);
Proc::optimize_refcount_operations(
arena,
module_id,
&mut ident_ids,
&mut state.procedures,
);
state.constrained_ident_ids.insert(module_id, ident_ids);