@[inline]
@[inline]
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.IR.ExpandResetReuse.mkProjMap d = match d with | Lean.IR.Decl.fdecl f xs type b info => Lean.IR.ExpandResetReuse.CollectProjMap.collectFnBody b ∅ | x => ∅
@[inline]
Equations
partial def
Lean.IR.ExpandResetReuse.eraseProjIncForAux
(y : Lean.IR.VarId)
(bs : Array Lean.IR.FnBody)
(mask : Lean.IR.ExpandResetReuse.Mask)
(keep : Array Lean.IR.FnBody)
:
def
Lean.IR.ExpandResetReuse.eraseProjIncFor
(n : Nat)
(y : Lean.IR.VarId)
(bs : Array Lean.IR.FnBody)
:
Equations
- Lean.IR.ExpandResetReuse.eraseProjIncFor n y bs = Lean.IR.ExpandResetReuse.eraseProjIncForAux y bs (mkArray n none) #[]
def
Lean.IR.ExpandResetReuse.mkSlowPath
(x : Lean.IR.VarId)
(y : Lean.IR.VarId)
(mask : Lean.IR.ExpandResetReuse.Mask)
(b : Lean.IR.FnBody)
:
Equations
- One or more equations did not get rendered due to their size.
@[inline]
Equations
- Lean.IR.ExpandResetReuse.mkFresh = modifyGet fun n => ({ idx := n }, n + 1)
def
Lean.IR.ExpandResetReuse.releaseUnreadFields
(y : Lean.IR.VarId)
(mask : Lean.IR.ExpandResetReuse.Mask)
(b : Lean.IR.FnBody)
:
Equations
- One or more equations did not get rendered due to their size.
def
Lean.IR.ExpandResetReuse.setFields
(y : Lean.IR.VarId)
(zs : Array Lean.IR.Arg)
(b : Lean.IR.FnBody)
:
Equations
- Lean.IR.ExpandResetReuse.setFields y zs b = Nat.fold (fun i b => Lean.IR.FnBody.set y i (Array.get! zs i) b) (Array.size zs) b
def
Lean.IR.ExpandResetReuse.isSelfSet
(ctx : Lean.IR.ExpandResetReuse.Context)
(x : Lean.IR.VarId)
(i : Nat)
(y : Lean.IR.Arg)
:
Equations
- One or more equations did not get rendered due to their size.
def
Lean.IR.ExpandResetReuse.isSelfUSet
(ctx : Lean.IR.ExpandResetReuse.Context)
(x : Lean.IR.VarId)
(i : Nat)
(y : Lean.IR.VarId)
:
Equations
- Lean.IR.ExpandResetReuse.isSelfUSet ctx x i y = match Std.HashMap.find? ctx.projMap y with | some (Lean.IR.Expr.uproj j w) => j == i && w == x | x => false
def
Lean.IR.ExpandResetReuse.isSelfSSet
(ctx : Lean.IR.ExpandResetReuse.Context)
(x : Lean.IR.VarId)
(n : Nat)
(i : Nat)
(y : Lean.IR.VarId)
:
Equations
- Lean.IR.ExpandResetReuse.isSelfSSet ctx x n i y = match Std.HashMap.find? ctx.projMap y with | some (Lean.IR.Expr.sproj m j w) => n == m && j == i && w == x | x => false
partial def
Lean.IR.ExpandResetReuse.reuseToSet
(ctx : Lean.IR.ExpandResetReuse.Context)
(x : Lean.IR.VarId)
(y : Lean.IR.VarId)
:
def
Lean.IR.ExpandResetReuse.mkFastPath
(x : Lean.IR.VarId)
(y : Lean.IR.VarId)
(mask : Lean.IR.ExpandResetReuse.Mask)
(b : Lean.IR.FnBody)
:
Equations
- Lean.IR.ExpandResetReuse.mkFastPath x y mask b = do let ctx ← read let b : Lean.IR.FnBody := Lean.IR.ExpandResetReuse.reuseToSet ctx x y b Lean.IR.ExpandResetReuse.releaseUnreadFields y mask b
def
Lean.IR.ExpandResetReuse.expand
(mainFn : Lean.IR.FnBody → Array Lean.IR.FnBody → Lean.IR.ExpandResetReuse.M Lean.IR.FnBody)
(bs : Array Lean.IR.FnBody)
(x : Lean.IR.VarId)
(n : Nat)
(y : Lean.IR.VarId)
(b : Lean.IR.FnBody)
:
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
(Try to) expand reset
and reuse
instructions.