@[reducible, inline]
Equations
Instances For
Equations
Instances For
- baseName : Name
- sccDecls : Array (Decl Purity.pure)
Instances For
- decls : Array (Decl Purity.pure)
- fvarDecisionCache : Std.HashMap FVarId Bool
Cache for
shouldExtractFVarin order to avoid superlinear behavior.
Instances For
@[reducible, inline]
Equations
Instances For
partial def
Lean.Compiler.LCNF.ExtractClosed.shouldExtractLetValue
(isRoot : Bool)
(v : LetValue Purity.pure)
:
def
Lean.Compiler.LCNF.ExtractClosed.searchArrayLiteral
(decl : LetDecl Purity.pure)
(k : Code Purity.pure)
:
Check if let decl; k forms an Array, ByteArray, or FloatArray literal. They consist of some
initial allocation (Array.mkEmpty or Array.emptyWithCapacity) followed by a sequence of
Array.push and for the scalar variants finally ByteArray.mk or FloatArray.mk.
We identify these literals by matching this pattern and ensuring that only the last push/mk from
the sequence is used in the final continuation. If that is the case, we can pull out the entire
literal as one closed declaration. This avoids the quadratic overhead of repeated Array.push calls
on persistent Array objects during initialization.
Equations
- One or more equations did not get rendered due to their size.
Instances For
partial def
Lean.Compiler.LCNF.ExtractClosed.visitCode
(code : Code Purity.pure)
:
M (Code Purity.pure)
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.Compiler.LCNF.Decl.extractClosed
(decl : Decl Purity.pure)
(sccDecls : Array (Decl Purity.pure))
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.