perf: allow boxed scalars passed to scalar params to be borrowed (#9360)
This commit is contained in:
parent
cfb13b1689
commit
c0079fd9dd
1 changed files with 1 additions and 1 deletions
|
|
@ -196,7 +196,7 @@ def ownArgsUsingParams (xs : Array Arg) (ps : Array Param) : M Unit :=
|
|||
xs.size.forM fun i _ => do
|
||||
let x := xs[i]
|
||||
let p := ps[i]!
|
||||
unless p.borrow do ownArg x
|
||||
unless p.borrow || p.ty.isScalar do ownArg x
|
||||
|
||||
/-- For each xs[i], if xs[i] is owned, then mark ps[i] as owned.
|
||||
We use this action to preserve tail calls. That is, if we have
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue