mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 15:51:12 +00:00
Add layout to CallByName
This commit is contained in:
parent
510ab36f51
commit
c49abfe2de
6 changed files with 156 additions and 111 deletions
|
@ -451,12 +451,13 @@ fn gen(
|
|||
env.interns.all_ident_ids.insert(home, ident_ids);
|
||||
|
||||
let mut headers = Vec::with_capacity(procs.len());
|
||||
let (mut proc_map, runtime_errors) = procs.into_map();
|
||||
|
||||
// Add all the Proc headers to the module.
|
||||
// We have to do this in a separate pass first,
|
||||
// because their bodies may reference each other.
|
||||
for (symbol, opt_proc) in procs.as_map().into_iter() {
|
||||
if let Some(proc) = opt_proc {
|
||||
for (symbol, mut procs_by_layout) in proc_map.drain() {
|
||||
for (_, proc) in procs_by_layout.drain() {
|
||||
let (fn_val, arg_basic_types) = build_proc_header(&env, symbol, &proc);
|
||||
|
||||
headers.push((proc, fn_val, arg_basic_types));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue