mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 07:41:12 +00:00
stop using env.closures
This commit is contained in:
parent
c28a0af932
commit
6783b66db7
1 changed files with 1 additions and 9 deletions
|
@ -1181,17 +1181,9 @@ fn canonicalize_pending_value_def<'a>(
|
|||
// reset the tailcallable_symbol
|
||||
env.tailcallable_symbol = outer_identifier;
|
||||
|
||||
let closure_references = can_output.references.clone();
|
||||
output.references.union_mut(&can_output.references);
|
||||
|
||||
// Since everywhere in the code it'll be referred to by its defined name,
|
||||
// remove its generated name from the closure map. (We'll re-insert it later.)
|
||||
let closure_references = env.closures.remove(&closure_data.name).unwrap_or_else(|| {
|
||||
panic!(
|
||||
"Tried to remove symbol {:?} from procedures, but it was not found: {:?}",
|
||||
closure_data.name, env.closures
|
||||
)
|
||||
});
|
||||
|
||||
// The closure is self tail recursive iff it tail calls itself (by defined name).
|
||||
let is_recursive = match can_output.tail_call {
|
||||
Some(tail_symbol) if tail_symbol == *symbol => Recursive::TailRecursive,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue