mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 07:14:46 +00:00
more vecs, less sets
This commit is contained in:
parent
14b53c0ccf
commit
725eb217d8
2 changed files with 30 additions and 18 deletions
|
@ -1113,10 +1113,10 @@ fn canonicalize_when_branch<'a>(
|
|||
)
|
||||
}
|
||||
|
||||
pub fn local_successors<'a>(
|
||||
pub fn local_successors_with_duplicates<'a>(
|
||||
references: &'a References,
|
||||
closures: &'a MutMap<Symbol, References>,
|
||||
) -> ImSet<Symbol> {
|
||||
) -> Vec<Symbol> {
|
||||
let mut answer: Vec<_> = references.value_lookups.iter().copied().collect();
|
||||
|
||||
let mut stack: Vec<_> = references.calls.iter().copied().collect();
|
||||
|
@ -1135,7 +1135,10 @@ pub fn local_successors<'a>(
|
|||
}
|
||||
}
|
||||
|
||||
answer.into_iter().collect()
|
||||
answer.sort();
|
||||
answer.dedup();
|
||||
|
||||
answer
|
||||
}
|
||||
|
||||
enum CanonicalizeRecordProblem {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue