- var (id : VarId) : FVarClassification
- joinPoint (id : JoinPointId) : FVarClassification
- erased : FVarClassification
Instances For
- fvars : Std.HashMap FVarId FVarClassification
- nextId : Nat
Instances For
@[reducible, inline]
Instances For
Equations
- x.run = StateRefT'.run' x { }
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.IR.ToIR.bindVarToVarId fvarId varId = modify fun (s : Lean.IR.ToIR.BuilderState) => { fvars := s.fvars.insertIfNew fvarId (Lean.IR.ToIR.FVarClassification.var varId), nextId := s.nextId }
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.IR.ToIR.bindErased fvarId = modify fun (s : Lean.IR.ToIR.BuilderState) => { fvars := s.fvars.insertIfNew fvarId Lean.IR.ToIR.FVarClassification.erased, nextId := s.nextId }
Instances For
Equations
- Lean.IR.ToIR.findDecl n = do let __do_lift ← Lean.getEnv pure (Lean.IR.findEnvDecl __do_lift n)
Instances For
Equations
- Lean.IR.ToIR.addDecl d = Lean.modifyEnv fun (env : Lean.Environment) => Lean.PersistentEnvExtension.addEntry Lean.IR.declMapExt (env.addExtraName d.name) d
Instances For
Equations
- Lean.IR.ToIR.lowerLitValue (Lean.Compiler.LCNF.LitValue.nat n) = Lean.IR.LitVal.num n
- Lean.IR.ToIR.lowerLitValue (Lean.Compiler.LCNF.LitValue.str s) = Lean.IR.LitVal.str s
- Lean.IR.ToIR.lowerLitValue (Lean.Compiler.LCNF.LitValue.uint8 v_2) = Lean.IR.LitVal.num v_2.toNat
- Lean.IR.ToIR.lowerLitValue (Lean.Compiler.LCNF.LitValue.uint16 v_2) = Lean.IR.LitVal.num v_2.toNat
- Lean.IR.ToIR.lowerLitValue (Lean.Compiler.LCNF.LitValue.uint32 v_2) = Lean.IR.LitVal.num v_2.toNat
- Lean.IR.ToIR.lowerLitValue (Lean.Compiler.LCNF.LitValue.uint64 v_2) = Lean.IR.LitVal.num v_2.toNat
- Lean.IR.ToIR.lowerLitValue (Lean.Compiler.LCNF.LitValue.usize v_2) = Lean.IR.LitVal.num v_2.toNat
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.IR.ToIR.lowerType (Lean.Expr.const `UInt8 us) = pure Lean.IR.IRType.uint8
- Lean.IR.ToIR.lowerType (Lean.Expr.const `Bool us) = pure Lean.IR.IRType.uint8
- Lean.IR.ToIR.lowerType (Lean.Expr.const `UInt16 us) = pure Lean.IR.IRType.uint16
- Lean.IR.ToIR.lowerType (Lean.Expr.const `UInt32 us) = pure Lean.IR.IRType.uint32
- Lean.IR.ToIR.lowerType (Lean.Expr.const `UInt64 us) = pure Lean.IR.IRType.uint64
- Lean.IR.ToIR.lowerType (Lean.Expr.const `USize us) = pure Lean.IR.IRType.usize
- Lean.IR.ToIR.lowerType (Lean.Expr.const `Float us) = pure Lean.IR.IRType.float
- Lean.IR.ToIR.lowerType (Lean.Expr.const `Float32 us) = pure Lean.IR.IRType.float32
- Lean.IR.ToIR.lowerType (Lean.Expr.const `lcErased us) = pure Lean.IR.IRType.irrelevant
- Lean.IR.ToIR.lowerType (Lean.Expr.forallE binderName binderType body binderInfo) = pure Lean.IR.IRType.object
- Lean.IR.ToIR.lowerType e = panicWithPosWithDecl "Lean.Compiler.IR.ToIR" "Lean.IR.ToIR.lowerType" 121 9 "invalid type"
Instances For
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.
- Lean.IR.ToIR.lowerArg Lean.Compiler.LCNF.Arg.erased = pure Lean.IR.Arg.irrelevant
- Lean.IR.ToIR.lowerArg (Lean.Compiler.LCNF.Arg.type expr) = pure Lean.IR.Arg.irrelevant
Instances For
- expr (e : Expr) : TranslatedProj
- erased : TranslatedProj
Instances For
Equations
- Lean.IR.ToIR.lowerProj base ctorInfo (Lean.IR.CtorFieldInfo.object i) = (Lean.IR.ToIR.TranslatedProj.expr (Lean.IR.Expr.proj i base), Lean.IR.IRType.object)
- Lean.IR.ToIR.lowerProj base ctorInfo (Lean.IR.CtorFieldInfo.usize i) = (Lean.IR.ToIR.TranslatedProj.expr (Lean.IR.Expr.uproj i base), Lean.IR.IRType.usize)
- Lean.IR.ToIR.lowerProj base ctorInfo (Lean.IR.CtorFieldInfo.scalar sz offset irType) = (Lean.IR.ToIR.TranslatedProj.expr (Lean.IR.Expr.sproj (ctorInfo.size + ctorInfo.usize) offset base), irType)
- Lean.IR.ToIR.lowerProj base ctorInfo Lean.IR.CtorFieldInfo.irrelevant = (Lean.IR.ToIR.TranslatedProj.erased, Lean.IR.IRType.irrelevant)
Instances For
Equations
- Lean.IR.ToIR.lowerParam p = do let x ← Lean.IR.ToIR.bindVar p.fvarId let ty ← Lean.IR.ToIR.lowerType p.type pure { x := x, borrow := p.borrow, ty := ty }
Instances For
partial def
Lean.IR.ToIR.lowerLet.mkVar
(decl : Compiler.LCNF.LetDecl)
(k : Compiler.LCNF.Code)
(v : VarId)
:
partial def
Lean.IR.ToIR.lowerLet.mkExpr
(decl : Compiler.LCNF.LetDecl)
(k : Compiler.LCNF.Code)
(e : Expr)
:
partial def
Lean.IR.ToIR.lowerLet.mkErased
(decl : Compiler.LCNF.LetDecl)
(k : Compiler.LCNF.Code)
:
partial def
Lean.IR.ToIR.lowerLet.mkPartialApp
(decl : Compiler.LCNF.LetDecl)
(k : Compiler.LCNF.Code)
(e : Expr)
(restArgs : Array Arg)
:
partial def
Lean.IR.ToIR.lowerLet.tryIrDecl?
(decl : Compiler.LCNF.LetDecl)
(k : Compiler.LCNF.Code)
(name : Name)
(args : Array Arg)
:
partial def
Lean.IR.ToIR.lowerLet.lowerNonObjectFields
(k : Compiler.LCNF.Code)
(ctorInfo : CtorInfo)
(fields : Array CtorFieldInfo)
(args : Array Compiler.LCNF.Arg)
(objVar : VarId)
:
partial def
Lean.IR.ToIR.lowerLet.lowerNonObjectFields.loop
(k : Compiler.LCNF.Code)
(ctorInfo : CtorInfo)
(fields : Array CtorFieldInfo)
(args : Array Compiler.LCNF.Arg)
(objVar : VarId)
(usizeCount i : Nat)
:
partial def
Lean.IR.ToIR.lowerAlt.loop
(discr : VarId)
(code : Compiler.LCNF.Code)
(ctorInfo : CtorInfo)
(params : Array Compiler.LCNF.Param)
(fields : Array CtorFieldInfo)
(i : Nat)
:
Equations
- Lean.IR.ToIR.lowerResultType type arity = Lean.IR.ToIR.lowerType (Lean.IR.ToIR.lowerResultType.resultTypeForArity type arity)
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.IR.ToIR.lowerResultType.resultTypeForArity (Lean.Expr.const `lcErased us) arity = if (arity == 0) = true then Lean.Expr.const `lcErased us else Lean.mkConst `lcErased
Instances For
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.