perf: during specialization, don't abstract all local fun decls under binders (#9596)
The `isUnderBinder` check is intended to avoid inlining repeated computations into specializations, but this doesn’t apply to local function decls whose bodies are already delayed.
This commit is contained in:
parent
0fe7cc8794
commit
475bd65c90
1 changed files with 1 additions and 1 deletions
|
|
@ -136,7 +136,7 @@ mutual
|
|||
if ctx.inScope fvarId then
|
||||
/- We only collect the variables in the scope of the function application being specialized. -/
|
||||
if let some funDecl ← findFunDecl? fvarId then
|
||||
if ctx.isUnderBinder || ctx.abstract funDecl.fvarId then
|
||||
if ctx.abstract funDecl.fvarId then
|
||||
modify fun s => { s with params := s.params.push <| { funDecl with borrow := false } }
|
||||
else
|
||||
collectFunDecl funDecl
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue