refactor insert_named

This commit is contained in:
Folkert 2021-10-22 17:22:15 +02:00
parent 9d343ab206
commit 0529d6dbc6
2 changed files with 65 additions and 67 deletions

View file

@ -4139,10 +4139,9 @@ fn add_def_to_module<'a>(
);
}
procs.insert_named(
let partial_proc = PartialProc::from_named_function(
mono_env,
layout_cache,
symbol,
annotation,
loc_args,
*loc_body,
@ -4150,6 +4149,8 @@ fn add_def_to_module<'a>(
is_recursive,
ret_var,
);
procs.partial_procs.insert(symbol, partial_proc);
}
body => {
// mark this symbols as a top-level thunk before any other work on the procs