mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 11:52:19 +00:00
Collect references to functions passed to HOLLs in borrow inference
During borrow inference, SCCs of references between procs are first constructed. Previously we didn't collect any references for HOLL calls, but since such calls pass a Roc-function, we need to include a reference to the Roc function.
This commit is contained in:
parent
3bc78c2251
commit
a31b617ac8
1 changed files with 9 additions and 2 deletions
|
@ -1,7 +1,9 @@
|
|||
use std::collections::HashMap;
|
||||
use std::hash::Hash;
|
||||
|
||||
use crate::ir::{Expr, HigherOrderLowLevel, JoinPointId, Param, Proc, ProcLayout, Stmt};
|
||||
use crate::ir::{
|
||||
Expr, HigherOrderLowLevel, JoinPointId, Param, PassedFunction, Proc, ProcLayout, Stmt,
|
||||
};
|
||||
use crate::layout::Layout;
|
||||
use bumpalo::collections::Vec;
|
||||
use bumpalo::Bump;
|
||||
|
@ -977,7 +979,12 @@ fn call_info_call<'a>(call: &crate::ir::Call<'a>, info: &mut CallInfo<'a>) {
|
|||
}
|
||||
Foreign { .. } => {}
|
||||
LowLevel { .. } => {}
|
||||
HigherOrder(_) => {}
|
||||
HigherOrder(HigherOrderLowLevel {
|
||||
passed_function: PassedFunction { name, .. },
|
||||
..
|
||||
}) => {
|
||||
info.keys.push(name.name());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue