chore: update stage0
This commit is contained in:
parent
bb1e94de82
commit
ded7216a12
22 changed files with 15920 additions and 10891 deletions
2
stage0/src/Init/Core.lean
generated
2
stage0/src/Init/Core.lean
generated
|
|
@ -13,7 +13,7 @@ set_option linter.missingDocs true -- keep it documented
|
|||
universe u v w
|
||||
|
||||
/--
|
||||
`inline f x` is an indication to the compiler to inline the definition of `f`
|
||||
`inline (f x)` is an indication to the compiler to inline the definition of `f`
|
||||
at the application site itself (by comparison to the `@[inline]` attribute,
|
||||
which applies to all applications of the function).
|
||||
-/
|
||||
|
|
|
|||
8
stage0/src/Lean/Compiler/LCNF/Check.lean
generated
8
stage0/src/Lean/Compiler/LCNF/Check.lean
generated
|
|
@ -51,7 +51,7 @@ def checkAppArgs (f : Expr) (args : Array Expr) : CheckM Unit := do
|
|||
throwError "function expected at{indentExpr (mkAppN f args)}\narrow type expected{indentExpr fType}"
|
||||
let argType ← inferType arg
|
||||
let expectedType := d.instantiateRevRange j i args
|
||||
unless compatibleTypes argType expectedType do
|
||||
unless (← InferType.compatibleTypes argType expectedType) do
|
||||
throwError "type mismatch at LCNF application{indentExpr (mkAppN f args)}\nargument {arg} has type{indentExpr argType}\nbut is expected to have type{indentExpr expectedType}"
|
||||
unless (← pure (maybeTypeFormerType expectedType) <||> isErasedCompatible expectedType) do
|
||||
unless arg.isFVar do
|
||||
|
|
@ -100,7 +100,7 @@ def checkParams (params : Array Param) : CheckM Unit :=
|
|||
def checkLetDecl (letDecl : LetDecl) : CheckM Unit := do
|
||||
checkExpr letDecl.value
|
||||
let valueType ← inferType letDecl.value
|
||||
unless compatibleTypes letDecl.type valueType do
|
||||
unless (← InferType.compatibleTypes letDecl.type valueType) do
|
||||
throwError "type mismatch at `{letDecl.binderName}`, value has type{indentExpr valueType}\nbut is expected to have type{indentExpr letDecl.type}"
|
||||
unless letDecl == (← getLetDecl letDecl.fvarId) do
|
||||
throwError "LCNF let declaration mismatch at `{letDecl.binderName}`, does not match value in local context"
|
||||
|
|
@ -129,7 +129,7 @@ partial def checkFunDeclCore (declName : Name) (type : Expr) (params : Array Par
|
|||
checkParams params
|
||||
let valueType ← withParams params do
|
||||
mkForallParams params (← check value)
|
||||
unless compatibleTypes type valueType do
|
||||
unless (← InferType.compatibleTypes type valueType) do
|
||||
throwError "type mismatch at `{declName}`, value has type{indentExpr valueType}\nbut is expected to have type{indentExpr type}"
|
||||
|
||||
partial def checkFunDecl (funDecl : FunDecl) : CheckM Unit := do
|
||||
|
|
@ -167,7 +167,7 @@ partial def checkCases (c : Cases) : CheckM Expr := do
|
|||
throwError "invalid LCNF `cases`, `{ctorName}` has # {val.numFields} fields, but alternative has # {params.size} alternatives"
|
||||
-- TODO: check whether the ctor field types as parameter types match.
|
||||
withParams params do check k
|
||||
unless compatibleTypes type c.resultType do
|
||||
unless (← InferType.compatibleTypes type c.resultType) do
|
||||
throwError "type mismatch at LCNF `cases` alternative\nhas type{indentExpr type}\nbut is expected to have type{indentExpr c.resultType}"
|
||||
return c.resultType
|
||||
|
||||
|
|
|
|||
3
stage0/src/Lean/Compiler/LCNF/CompilerM.lean
generated
3
stage0/src/Lean/Compiler/LCNF/CompilerM.lean
generated
|
|
@ -284,9 +284,10 @@ private def mkNewFVarId (fvarId : FVarId) : InternalizeM FVarId := do
|
|||
return fvarId'
|
||||
|
||||
def internalizeParam (p : Param) : InternalizeM Param := do
|
||||
let binderName ← refreshBinderName p.binderName
|
||||
let type ← normExpr p.type
|
||||
let fvarId ← mkNewFVarId p.fvarId
|
||||
let p := { p with fvarId, type }
|
||||
let p := { p with binderName, fvarId, type }
|
||||
modifyLCtx fun lctx => lctx.addParam p
|
||||
return p
|
||||
|
||||
|
|
|
|||
222
stage0/src/Lean/Compiler/LCNF/InferType.lean
generated
222
stage0/src/Lean/Compiler/LCNF/InferType.lean
generated
|
|
@ -49,85 +49,6 @@ but the expected type is `S Nat Type (fun x => Nat)`. `fun x => Nat` is not eras
|
|||
here because it is a type former.
|
||||
-/
|
||||
|
||||
/--
|
||||
Return `true` if `type` should be erased. See item 1 in the note above where `x ◾ ◾` is
|
||||
a proposition and should be erased when the universe level parameter is set to 0.
|
||||
|
||||
Remark: `predVars` is a bitmask that indicates whether de-bruijn variables are predicates or not.
|
||||
That is, `#i` is a predicate if `predVars[predVars.size - i - 1] = true`
|
||||
-/
|
||||
partial def isErasedCompatible (type : Expr) (predVars : Array Bool := #[]): CompilerM Bool :=
|
||||
go type predVars
|
||||
where
|
||||
go (type : Expr) (predVars : Array Bool) : CompilerM Bool := do
|
||||
let type := type.headBeta
|
||||
match type with
|
||||
| .const .. => return type.isErased
|
||||
| .sort .. => return false
|
||||
| .mdata _ e => go e predVars
|
||||
| .forallE _ t b _
|
||||
| .lam _ t b _ => go b (predVars.push <| isPredicateType t)
|
||||
| .app f _ => go f predVars
|
||||
| .bvar idx => return predVars[predVars.size - idx - 1]!
|
||||
| .fvar fvarId => return isPredicateType (← getType fvarId)
|
||||
| .proj .. | .mvar .. | .letE .. | .lit .. => unreachable!
|
||||
|
||||
/--
|
||||
Return true if the LCNF types `a` and `b` are compatible.
|
||||
|
||||
Remark: `a` and `b` can be type formers (e.g., `List`, or `fun (α : Type) => Nat → Nat × α`)
|
||||
|
||||
Remark: LCNFs types are eagerly eta reduced.
|
||||
|
||||
Remark: see comment at `isErasedCompatible`.
|
||||
|
||||
Remark: because of "erasure confusion" see note above, we assume `◾` (aka `lcErasure`) is compatible with everything.
|
||||
This is a simplification. We used to use `isErasedCompatible`, but this only address item 1.
|
||||
For item 2, we would have to modify the `toLCNFType` function and make sure a type former is erased if the expected
|
||||
type is not always a type former (see `S.mk` type and example in the note above).
|
||||
|
||||
The below checks do not appear exhaustive, but are
|
||||
in fact exhaustive due to LCNF constraints:
|
||||
- bvar: handled by ==.
|
||||
- fvar: handled by ==.
|
||||
- mvar: should be resolved by the time we get to LCNF.
|
||||
- sort: matched.
|
||||
- const: matched.
|
||||
- app: handled by β reduction + match.
|
||||
- lam: matched.
|
||||
- forallE: matched.
|
||||
- letE: LCNF does not contain let at the type level.
|
||||
- lit: We don't have data in LCNF, so we don't need to handle it.
|
||||
Erased is handled by `const`.
|
||||
- mdata: matched.
|
||||
- proj: Becomes Any/Erased depending on what it should become.
|
||||
type inside structure becomes Any, value inside structure becomes Erased.
|
||||
-/
|
||||
partial def compatibleTypes (a b : Expr) : Bool :=
|
||||
if a.isAnyType || b.isAnyType then
|
||||
true
|
||||
else if a.isErased || b.isErased then
|
||||
true
|
||||
else
|
||||
let a' := a.headBeta
|
||||
let b' := b.headBeta
|
||||
if a != a' || b != b' then
|
||||
compatibleTypes a' b'
|
||||
else if a == b then
|
||||
true
|
||||
else
|
||||
match a, b with
|
||||
| .mdata _ a, b => compatibleTypes a b
|
||||
| a, .mdata _ b => compatibleTypes a b
|
||||
-- Note that even after reducing to head-beta, we can still have `.app` terms. For example,
|
||||
-- an inductive constructor application such as `List Int`
|
||||
| .app f a, .app g b => compatibleTypes f g && compatibleTypes a b
|
||||
| .forallE _ d₁ b₁ _, .forallE _ d₂ b₂ _ => compatibleTypes d₁ d₂ && compatibleTypes b₁ b₂
|
||||
| .lam _ d₁ b₁ _, .lam _ d₂ b₂ _ => compatibleTypes d₁ d₂ && compatibleTypes b₁ b₂
|
||||
| .sort u, .sort v => Level.isEquiv u v
|
||||
| .const n us, .const m vs => n == m && List.isEqv us vs Level.isEquiv
|
||||
| _, _ => false
|
||||
|
||||
namespace InferType
|
||||
|
||||
/-
|
||||
|
|
@ -363,4 +284,147 @@ def mkCasesResultType (alts : Array Alt) : CompilerM Expr := do
|
|||
resultType := joinTypes resultType (← alt.inferType)
|
||||
return resultType
|
||||
|
||||
/--
|
||||
Return `true` if `type` should be erased. See item 1 in the note above where `x ◾ ◾` is
|
||||
a proposition and should be erased when the universe level parameter is set to 0.
|
||||
|
||||
Remark: `predVars` is a bitmask that indicates whether de-bruijn variables are predicates or not.
|
||||
That is, `#i` is a predicate if `predVars[predVars.size - i - 1] = true`
|
||||
-/
|
||||
partial def isErasedCompatible (type : Expr) (predVars : Array Bool := #[]): CompilerM Bool :=
|
||||
go type predVars
|
||||
where
|
||||
go (type : Expr) (predVars : Array Bool) : CompilerM Bool := do
|
||||
let type := type.headBeta
|
||||
match type with
|
||||
| .const .. => return type.isErased
|
||||
| .sort .. => return false
|
||||
| .mdata _ e => go e predVars
|
||||
| .forallE _ t b _
|
||||
| .lam _ t b _ => go b (predVars.push <| isPredicateType t)
|
||||
| .app f _ => go f predVars
|
||||
| .bvar idx => return predVars[predVars.size - idx - 1]!
|
||||
| .fvar fvarId => return isPredicateType (← getType fvarId)
|
||||
| .proj .. | .mvar .. | .letE .. | .lit .. => unreachable!
|
||||
|
||||
/--
|
||||
Quick check for `compatibleTypes`. It is not monadic, but it is incomplete
|
||||
because it does not eta-expand type formers. See comment at `compatibleTypes`.
|
||||
|
||||
Remark: if the result is `true`, then `a` and `b` are indeed compatible.
|
||||
If it is `false`, we must use the full-check.
|
||||
-/
|
||||
partial def compatibleTypesQuick (a b : Expr) : Bool :=
|
||||
if a.isAnyType || b.isAnyType then
|
||||
true
|
||||
else if a.isErased || b.isErased then
|
||||
true
|
||||
else
|
||||
let a' := a.headBeta
|
||||
let b' := b.headBeta
|
||||
if a != a' || b != b' then
|
||||
compatibleTypesQuick a' b'
|
||||
else if a == b then
|
||||
true
|
||||
else
|
||||
match a, b with
|
||||
| .mdata _ a, b => compatibleTypesQuick a b
|
||||
| a, .mdata _ b => compatibleTypesQuick a b
|
||||
-- Note that even after reducing to head-beta, we can still have `.app` terms. For example,
|
||||
-- an inductive constructor application such as `List Int`
|
||||
| .app f a, .app g b => compatibleTypesQuick f g && compatibleTypesQuick a b
|
||||
| .forallE _ d₁ b₁ _, .forallE _ d₂ b₂ _ => compatibleTypesQuick d₁ d₂ && compatibleTypesQuick b₁ b₂
|
||||
| .lam _ d₁ b₁ _, .lam _ d₂ b₂ _ => compatibleTypesQuick d₁ d₂ && compatibleTypesQuick b₁ b₂
|
||||
| .sort u, .sort v => Level.isEquiv u v
|
||||
| .const n us, .const m vs => n == m && List.isEqv us vs Level.isEquiv
|
||||
| _, _ => false
|
||||
|
||||
/--
|
||||
Complete check for `compatibleTypes`. It eta-expands type formers. See comment at `compatibleTypes`.
|
||||
-/
|
||||
partial def InferType.compatibleTypesFull (a b : Expr) : InferTypeM Bool := do
|
||||
if a.isAnyType || b.isAnyType then
|
||||
return true
|
||||
else if a.isErased || b.isErased then
|
||||
return true
|
||||
else
|
||||
let a' := a.headBeta
|
||||
let b' := b.headBeta
|
||||
if a != a' || b != b' then
|
||||
compatibleTypesFull a' b'
|
||||
else if a == b then
|
||||
return true
|
||||
else
|
||||
match a, b with
|
||||
| .mdata _ a, b => compatibleTypesFull a b
|
||||
| a, .mdata _ b => compatibleTypesFull a b
|
||||
-- Note that even after reducing to head-beta, we can still have `.app` terms. For example,
|
||||
-- an inductive constructor application such as `List Int`
|
||||
| .app f a, .app g b => compatibleTypesFull f g <&&> compatibleTypesFull a b
|
||||
| .forallE n d₁ b₁ bi, .forallE _ d₂ b₂ _ =>
|
||||
unless (← compatibleTypesFull d₁ d₂) do return false
|
||||
withLocalDecl n d₁ bi fun x =>
|
||||
compatibleTypesFull (b₁.instantiate1 x) (b₂.instantiate1 x)
|
||||
| .lam n d₁ b₁ bi, .lam _ d₂ b₂ _ =>
|
||||
unless (← compatibleTypesFull d₁ d₂) do return false
|
||||
withLocalDecl n d₁ bi fun x =>
|
||||
compatibleTypesFull (b₁.instantiate1 x) (b₂.instantiate1 x)
|
||||
| .sort u, .sort v => return Level.isEquiv u v
|
||||
| .const n us, .const m vs => return n == m && List.isEqv us vs Level.isEquiv
|
||||
| _, _ =>
|
||||
if a.isLambda then
|
||||
let some b ← etaExpand? b | return false
|
||||
compatibleTypesFull a b
|
||||
else if b.isLambda then
|
||||
let some a ← etaExpand? a | return false
|
||||
compatibleTypesFull a b
|
||||
else
|
||||
return false
|
||||
where
|
||||
etaExpand? (e : Expr) : InferTypeM (Option Expr) := do
|
||||
match (← inferType e).headBeta with
|
||||
| .forallE n d _ bi =>
|
||||
/-
|
||||
In principle, `.app e (.bvar 0)` may not be a valid LCNF type sub-expression
|
||||
because `d` may not be a type former type, See remark `compatibleTypes` for
|
||||
a justification why this is ok.
|
||||
-/
|
||||
return some (.lam n d (.app e (.bvar 0)) bi)
|
||||
| _ => return none
|
||||
|
||||
/--
|
||||
Return true if the LCNF types `a` and `b` are compatible.
|
||||
|
||||
Remark: `a` and `b` can be type formers (e.g., `List`, or `fun (α : Type) => Nat → Nat × α`)
|
||||
|
||||
Remark: We may need to eta-expand type formers to establish whether they are compatible or not.
|
||||
For example, suppose we have
|
||||
```
|
||||
fun (x : B) => Id B ◾ ◾
|
||||
Id B ◾
|
||||
```
|
||||
We must eta-expand `Id B ◾` to `fun (x : B) => Id B ◾ x`. Note that, we use `x` instead of `◾` to
|
||||
make the implementation simpler and skip the check whether `B` is a type former type. However,
|
||||
this simplification should not affect correctness since `◾` is compatible with everything.
|
||||
|
||||
Remark: see comment at `isErasedCompatible`.
|
||||
|
||||
Remark: because of "erasure confusion" see note above, we assume `◾` (aka `lcErasure`) is compatible with everything.
|
||||
This is a simplification. We used to use `isErasedCompatible`, but this only address item 1.
|
||||
For item 2, we would have to modify the `toLCNFType` function and make sure a type former is erased if the expected
|
||||
type is not always a type former (see `S.mk` type and example in the note above).
|
||||
-/
|
||||
def InferType.compatibleTypes (a b : Expr) : InferTypeM Bool := do
|
||||
if compatibleTypesQuick a b then
|
||||
return true
|
||||
else
|
||||
compatibleTypesFull a b
|
||||
|
||||
@[inheritDoc InferType.compatibleTypes]
|
||||
def compatibleTypes (a b : Expr) : CompilerM Bool :=
|
||||
if compatibleTypesQuick a b then
|
||||
return true
|
||||
else
|
||||
InferType.compatibleTypesFull a b |>.run {}
|
||||
|
||||
end Lean.Compiler.LCNF
|
||||
|
|
|
|||
4
stage0/src/Lean/Compiler/LCNF/Main.lean
generated
4
stage0/src/Lean/Compiler/LCNF/Main.lean
generated
|
|
@ -76,7 +76,9 @@ def run (declNames : Array Name) : CompilerM (Array Decl) := withAtLeastMaxRecDe
|
|||
withPhase pass.phase <| checkpoint pass.name decls
|
||||
if (← Lean.isTracingEnabledFor `Compiler.result) then
|
||||
for decl in decls do
|
||||
Lean.addTrace `Compiler.result m!"size: {decl.size}\n{← ppDecl decl}"
|
||||
-- We display the declaration saved in the environment because the names have been normalized
|
||||
let some decl' ← getDeclAt? decl.name .base | unreachable!
|
||||
Lean.addTrace `Compiler.result m!"size: {decl.size}\n{← ppDecl' decl'}"
|
||||
return decls
|
||||
|
||||
end PassManager
|
||||
|
|
|
|||
10
stage0/src/Lean/Compiler/LCNF/PhaseExt.lean
generated
10
stage0/src/Lean/Compiler/LCNF/PhaseExt.lean
generated
|
|
@ -54,8 +54,16 @@ def getDeclAt? (declName : Name) (phase : Phase) : CoreM (Option Decl) :=
|
|||
def getDecl? (declName : Name) : CompilerM (Option Decl) := do
|
||||
getDeclAt? declName (← getPhase)
|
||||
|
||||
def normalizeFVarIds (decl : Decl) : CoreM Decl := do
|
||||
let ngenSaved ← getNGen
|
||||
setNGen {}
|
||||
try
|
||||
CompilerM.run <| decl.internalize
|
||||
finally
|
||||
setNGen ngenSaved
|
||||
|
||||
def saveBase : Pass :=
|
||||
.mkPerDeclaration `saveBase (fun decl => do decl.saveBase; return decl) .base
|
||||
.mkPerDeclaration `saveBase (fun decl => do (← normalizeFVarIds decl).saveBase; return decl) .base
|
||||
|
||||
def forEachDecl (f : Decl → CoreM Unit) : CoreM Unit := do
|
||||
let env ← getEnv
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ def simpAppApp? (e : Expr) : OptionT SimpM Expr := do
|
|||
|
||||
def simpCtorDiscr? (e : Expr) : OptionT SimpM Expr := do
|
||||
let some discr := (← read).ctorDiscrMap.find? e | failure
|
||||
guard <| compatibleTypes (← getType discr) (← inferType e)
|
||||
guard <| (← compatibleTypes (← getType discr) (← inferType e))
|
||||
return .fvar discr
|
||||
|
||||
def applyImplementedBy? (e : Expr) : OptionT SimpM Expr := do
|
||||
|
|
|
|||
4
stage0/src/Lean/Compiler/LCNF/ToLCNF.lean
generated
4
stage0/src/Lean/Compiler/LCNF/ToLCNF.lean
generated
|
|
@ -531,7 +531,7 @@ where
|
|||
let .inductInfo indVal ← getConstInfo typeName | unreachable!
|
||||
for i in casesInfo.altsRange, numParams in casesInfo.altNumParams, ctorName in indVal.ctors do
|
||||
let (altType, alt) ← visitAlt ctorName numParams args[i]!
|
||||
unless compatibleTypes altType resultType do
|
||||
unless (← compatibleTypes altType resultType) do
|
||||
resultType := anyTypeExpr
|
||||
alts := alts.push alt
|
||||
let cases : Cases := { typeName, discr := discr.fvarId!, resultType, alts }
|
||||
|
|
@ -569,7 +569,7 @@ where
|
|||
let minor := if e.isAppOf ``Eq.rec || e.isAppOf ``Eq.ndrec then args[3]! else args[5]!
|
||||
let minor ← visit minor
|
||||
let minorType ← inferType minor
|
||||
let cast ← if compatibleTypes minorType recType then
|
||||
let cast ← if (← compatibleTypes minorType recType) then
|
||||
-- Recall that many types become compatible after LCNF conversion
|
||||
-- Example: `Fin 10` and `Fin n`
|
||||
pure minor
|
||||
|
|
|
|||
8
stage0/src/Lean/Elab/InfoTree/Main.lean
generated
8
stage0/src/Lean/Elab/InfoTree/Main.lean
generated
|
|
@ -190,17 +190,17 @@ def Info.updateContext? : Option ContextInfo → Info → Option ContextInfo
|
|||
|
||||
partial def InfoTree.format (tree : InfoTree) (ctx? : Option ContextInfo := none) : IO Format := do
|
||||
match tree with
|
||||
| hole id => return toString id.name
|
||||
| hole id => return .nestD f!"• ?{toString id.name}"
|
||||
| context i t => format t i
|
||||
| node i cs => match ctx? with
|
||||
| none => return "<context-not-available>"
|
||||
| none => return "• <context-not-available>"
|
||||
| some ctx =>
|
||||
let fmt ← i.format ctx
|
||||
if cs.size == 0 then
|
||||
return fmt
|
||||
return .nestD f!"• {fmt}"
|
||||
else
|
||||
let ctx? := i.updateContext? ctx?
|
||||
return f!"{fmt}{Std.Format.nestD <| Std.Format.prefixJoin (Std.format "\n") (← cs.toList.mapM fun c => format c ctx?)}"
|
||||
return .nestD f!"• {fmt}{Std.Format.prefixJoin .line (← cs.toList.mapM fun c => format c ctx?)}"
|
||||
|
||||
section
|
||||
variable [Monad m] [MonadInfoTree m]
|
||||
|
|
|
|||
85
stage0/src/Lean/Elab/Tactic/Induction.lean
generated
85
stage0/src/Lean/Elab/Tactic/Induction.lean
generated
|
|
@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
|
|||
Authors: Leonardo de Moura, Sebastian Ullrich
|
||||
-/
|
||||
import Lean.Util.CollectFVars
|
||||
import Lean.AuxRecursor
|
||||
import Lean.Parser.Term
|
||||
import Lean.Meta.RecursorInfo
|
||||
import Lean.Meta.CollectMVars
|
||||
|
|
@ -31,6 +32,10 @@ private def getFirstAltLhs (alt : Syntax) : Syntax :=
|
|||
private def getAltName (alt : Syntax) : Name :=
|
||||
let lhs := getFirstAltLhs alt
|
||||
if !lhs[1].isOfKind ``Parser.Term.hole then lhs[1][1].getId.eraseMacroScopes else `_
|
||||
/-- Returns the `inductionAlt` `ident <|> hole` -/
|
||||
private def getAltNameStx (alt : Syntax) : Syntax :=
|
||||
let lhs := getFirstAltLhs alt
|
||||
if lhs[1].isOfKind ``Parser.Term.hole then lhs[1] else lhs[1][1]
|
||||
/-- Return `true` if the first LHS of the given alternative contains `@`. -/
|
||||
private def altHasExplicitModifier (alt : Syntax) : Bool :=
|
||||
let lhs := getFirstAltLhs alt
|
||||
|
|
@ -39,9 +44,6 @@ private def altHasExplicitModifier (alt : Syntax) : Bool :=
|
|||
private def getAltVars (alt : Syntax) : Array Syntax :=
|
||||
let lhs := getFirstAltLhs alt
|
||||
lhs[2].getArgs
|
||||
/-- Return the variable names in the first LHS of the given alternative. -/
|
||||
private def getAltVarNames (alt : Syntax) : Array Name :=
|
||||
getAltVars alt |>.map getNameOfIdent'
|
||||
private def getAltRHS (alt : Syntax) : Syntax :=
|
||||
alt[2]
|
||||
private def getAltDArrow (alt : Syntax) : Syntax :=
|
||||
|
|
@ -51,10 +53,11 @@ private def getAltDArrow (alt : Syntax) : Syntax :=
|
|||
def isHoleRHS (rhs : Syntax) : Bool :=
|
||||
rhs.isOfKind ``Parser.Term.syntheticHole || rhs.isOfKind ``Parser.Term.hole
|
||||
|
||||
def evalAlt (mvarId : MVarId) (alt : Syntax) (remainingGoals : Array MVarId) : TacticM (Array MVarId) :=
|
||||
def evalAlt (mvarId : MVarId) (alt : Syntax) (addInfo : TermElabM Unit) (remainingGoals : Array MVarId) : TacticM (Array MVarId) :=
|
||||
let rhs := getAltRHS alt
|
||||
withCaseRef (getAltDArrow alt) rhs do
|
||||
if isHoleRHS rhs then
|
||||
addInfo
|
||||
let gs' ← mvarId.withContext <| withRef rhs do
|
||||
let mvarDecl ← mvarId.getDecl
|
||||
let val ← elabTermEnsuringType rhs mvarDecl.type
|
||||
|
|
@ -65,7 +68,7 @@ def evalAlt (mvarId : MVarId) (alt : Syntax) (remainingGoals : Array MVarId) : T
|
|||
return remainingGoals ++ gs'
|
||||
else
|
||||
setGoals [mvarId]
|
||||
closeUsingOrAdmit (withTacticInfoContext alt (evalTactic rhs))
|
||||
closeUsingOrAdmit (withTacticInfoContext alt (addInfo *> evalTactic rhs))
|
||||
return remainingGoals
|
||||
|
||||
/-!
|
||||
|
|
@ -73,6 +76,18 @@ def evalAlt (mvarId : MVarId) (alt : Syntax) (remainingGoals : Array MVarId) : T
|
|||
-/
|
||||
namespace ElimApp
|
||||
|
||||
structure Alt where
|
||||
/-- The short name of the alternative, used in `| foo =>` cases -/
|
||||
name : Name
|
||||
/-- A declaration corresponding to the inductive constructor.
|
||||
(For custom recursors, the alternatives correspond to parameter names in the
|
||||
recursor, so we may not have a declaration to point to.)
|
||||
This is used for go-to-definition on the alternative name. -/
|
||||
declName? : Option Name
|
||||
/-- The subgoal metavariable for the alternative. -/
|
||||
mvarId : MVarId
|
||||
deriving Inhabited
|
||||
|
||||
structure Context where
|
||||
elimInfo : ElimInfo
|
||||
targets : Array Expr -- targets provided by the user
|
||||
|
|
@ -82,7 +97,7 @@ structure State where
|
|||
targetPos : Nat := 0 -- current target at targetsStx
|
||||
f : Expr
|
||||
fType : Expr
|
||||
alts : Array (Name × MVarId) := #[]
|
||||
alts : Array Alt := #[]
|
||||
insts : Array MVarId := #[]
|
||||
|
||||
abbrev M := ReaderT Context $ StateRefT State TermElabM
|
||||
|
|
@ -102,7 +117,7 @@ private def getFType : M Expr := do
|
|||
|
||||
structure Result where
|
||||
elimApp : Expr
|
||||
alts : Array (Name × MVarId) := #[]
|
||||
alts : Array Alt := #[]
|
||||
others : Array MVarId := #[]
|
||||
|
||||
/--
|
||||
|
|
@ -144,7 +159,9 @@ partial def mkElimApp (elimInfo : ElimInfo) (targets : Array Expr) (tag : Name)
|
|||
| _ =>
|
||||
let arg ← mkFreshExprSyntheticOpaqueMVar (← getArgExpectedType) (tag := appendTag tag binderName)
|
||||
let x ← getBindingName
|
||||
modify fun s => { s with alts := s.alts.push (x, arg.mvarId!) }
|
||||
modify fun s =>
|
||||
let declName? := elimInfo.altsInfo[s.alts.size]!.declName?
|
||||
{ s with alts := s.alts.push ⟨x, declName?, arg.mvarId!⟩ }
|
||||
addNewArg arg
|
||||
loop
|
||||
| _ =>
|
||||
|
|
@ -161,7 +178,7 @@ partial def mkElimApp (elimInfo : ElimInfo) (targets : Array Expr) (tag : Name)
|
|||
catch _ =>
|
||||
mvarId.setKind .syntheticOpaque
|
||||
others := others.push mvarId
|
||||
let alts ← s.alts.filterM fun alt => return !(← alt.2.isAssigned)
|
||||
let alts ← s.alts.filterM fun alt => return !(← alt.mvarId.isAssigned)
|
||||
return { elimApp := (← instantiateMVars s.f), alts, others := others }
|
||||
|
||||
/-- Given a goal `... targets ... |- C[targets]` associated with `mvarId`, assign
|
||||
|
|
@ -181,14 +198,14 @@ private def getAltNumFields (elimInfo : ElimInfo) (altName : Name) : TermElabM N
|
|||
return altInfo.numFields
|
||||
throwError "unknown alternative name '{altName}'"
|
||||
|
||||
private def checkAltNames (alts : Array (Name × MVarId)) (altsSyntax : Array Syntax) : TacticM Unit :=
|
||||
private def checkAltNames (alts : Array Alt) (altsSyntax : Array Syntax) : TacticM Unit :=
|
||||
for i in [:altsSyntax.size] do
|
||||
let altStx := altsSyntax[i]!
|
||||
if getAltName altStx == `_ && i != altsSyntax.size - 1 then
|
||||
withRef altStx <| throwError "invalid occurrence of wildcard alternative, it must be the last alternative"
|
||||
let altName := getAltName altStx
|
||||
if altName != `_ then
|
||||
unless alts.any fun (n, _) => n == altName do
|
||||
unless alts.any (·.name == altName) do
|
||||
throwErrorAt altStx "invalid alternative name '{altName}'"
|
||||
|
||||
/-- Given the goal `altMVarId` for a given alternative that introduces `numFields` new variables,
|
||||
|
|
@ -200,7 +217,7 @@ private def getNumExplicitFields (altMVarId : MVarId) (numFields : Nat) : MetaM
|
|||
let (_, bis, _) ← forallMetaBoundedTelescope target numFields
|
||||
return bis.foldl (init := 0) fun r bi => if bi.isExplicit then r + 1 else r
|
||||
|
||||
private def saveAltVarsInfo (altMVarId : MVarId) (altStx : Syntax) (fvarIds : Array FVarId) : TacticM Unit :=
|
||||
private def saveAltVarsInfo (altMVarId : MVarId) (altStx : Syntax) (fvarIds : Array FVarId) : TermElabM Unit :=
|
||||
withSaveInfoContext <| altMVarId.withContext do
|
||||
let useNamesForExplicitOnly := !altHasExplicitModifier altStx
|
||||
let mut i := 0
|
||||
|
|
@ -231,7 +248,7 @@ private def saveAltVarsInfo (altMVarId : MVarId) (altStx : Syntax) (fvarIds : Ar
|
|||
|
||||
2- The errors are produced in the same order the appear in the code above. This is not super important when using IDEs.
|
||||
-/
|
||||
def reorderAlts (alts : Array (Name × MVarId)) (altsSyntax : Array Syntax) : Array (Name × MVarId) := Id.run do
|
||||
def reorderAlts (alts : Array Alt) (altsSyntax : Array Syntax) : Array Alt := Id.run do
|
||||
if altsSyntax.isEmpty then
|
||||
return alts
|
||||
else
|
||||
|
|
@ -244,14 +261,18 @@ def reorderAlts (alts : Array (Name × MVarId)) (altsSyntax : Array Syntax) : Ar
|
|||
alts := alts.eraseIdx i
|
||||
return result ++ alts
|
||||
|
||||
def evalAlts (elimInfo : ElimInfo) (alts : Array (Name × MVarId)) (optPreTac : Syntax) (altsSyntax : Array Syntax)
|
||||
def evalAlts (elimInfo : ElimInfo) (alts : Array Alt) (optPreTac : Syntax) (altsSyntax : Array Syntax)
|
||||
(initialInfo : Info)
|
||||
(numEqs : Nat := 0) (numGeneralized : Nat := 0) (toClear : Array FVarId := #[]) : TacticM Unit := do
|
||||
checkAltNames alts altsSyntax
|
||||
let hasAlts := altsSyntax.size > 0
|
||||
if hasAlts then
|
||||
-- default to initial state outside of alts
|
||||
withInfoContext go (pure initialInfo)
|
||||
-- HACK: because this node has the same span as the original tactic,
|
||||
-- we need to take all the info trees we have produced so far and re-nest them
|
||||
-- inside this node as well
|
||||
let treesSaved ← getResetInfoTrees
|
||||
withInfoContext ((modifyInfoState fun s => { s with trees := treesSaved }) *> go) (pure initialInfo)
|
||||
else go
|
||||
where
|
||||
go := do
|
||||
|
|
@ -260,7 +281,7 @@ where
|
|||
let mut usedWildcard := false
|
||||
let mut subgoals := #[] -- when alternatives are not provided, we accumulate subgoals here
|
||||
let mut altsSyntax := altsSyntax
|
||||
for (altName, altMVarId) in alts do
|
||||
for { name := altName, declName?, mvarId := altMVarId } in alts do
|
||||
let numFields ← getAltNumFields elimInfo altName
|
||||
let mut isWildcard := false
|
||||
let altStx? ←
|
||||
|
|
@ -295,17 +316,24 @@ where
|
|||
altMVarIds.forM fun mvarId => admitGoal mvarId
|
||||
| some altStx =>
|
||||
(subgoals, usedWildcard) ← withRef altStx do
|
||||
let unusedAlt :=
|
||||
let altVars := getAltVars altStx
|
||||
let numFieldsToName ← if altHasExplicitModifier altStx then pure numFields else getNumExplicitFields altMVarId numFields
|
||||
if altVars.size > numFieldsToName then
|
||||
logError m!"too many variable names provided at alternative '{altName}', #{altVars.size} provided, but #{numFieldsToName} expected"
|
||||
let mut (fvarIds, altMVarId) ← altMVarId.introN numFields (altVars.toList.map getNameOfIdent') (useNamesForExplicitOnly := !altHasExplicitModifier altStx)
|
||||
-- Delay adding the infos for the pattern LHS because we want them to nest
|
||||
-- inside tacticInfo for the current alternative (in `evalAlt`)
|
||||
let addInfo := do
|
||||
if (← getInfoState).enabled then
|
||||
if let some declName := declName? then
|
||||
addConstInfo (getAltNameStx altStx) declName
|
||||
saveAltVarsInfo altMVarId altStx fvarIds
|
||||
let unusedAlt := do
|
||||
addInfo
|
||||
if isWildcard then
|
||||
pure (#[], usedWildcard)
|
||||
else
|
||||
throwError "alternative '{altName}' is not needed"
|
||||
let altVarNames := getAltVarNames altStx
|
||||
let numFieldsToName ← if altHasExplicitModifier altStx then pure numFields else getNumExplicitFields altMVarId numFields
|
||||
if altVarNames.size > numFieldsToName then
|
||||
logError m!"too many variable names provided at alternative '{altName}', #{altVarNames.size} provided, but #{numFieldsToName} expected"
|
||||
let mut (fvarIds, altMVarId) ← altMVarId.introN numFields altVarNames.toList (useNamesForExplicitOnly := !altHasExplicitModifier altStx)
|
||||
saveAltVarsInfo altMVarId altStx fvarIds
|
||||
match (← Cases.unifyEqs? numEqs altMVarId {}) with
|
||||
| none => unusedAlt
|
||||
| some (altMVarId', _) =>
|
||||
|
|
@ -318,7 +346,7 @@ where
|
|||
else
|
||||
let mut subgoals := subgoals
|
||||
for altMVarId' in altMVarIds do
|
||||
subgoals ← evalAlt altMVarId' altStx subgoals
|
||||
subgoals ← evalAlt altMVarId' altStx addInfo subgoals
|
||||
pure (subgoals, usedWildcard || isWildcard)
|
||||
if usedWildcard then
|
||||
altsSyntax := altsSyntax.filter fun alt => getAltName alt != `_
|
||||
|
|
@ -450,7 +478,7 @@ private def checkAltsOfOptInductionAlts (optInductionAlts : Syntax) : TacticM Un
|
|||
for alt in getAltsOfInductionAlts optInductionAlts[0] do
|
||||
let n := getAltName alt
|
||||
if n == `_ then
|
||||
unless (getAltVarNames alt).isEmpty do
|
||||
unless (getAltVars alt).isEmpty do
|
||||
throwErrorAt alt "wildcard alternative must not specify variable names"
|
||||
if found then
|
||||
throwErrorAt alt "more than one wildcard alternative '| _ => ...' used"
|
||||
|
|
@ -477,11 +505,14 @@ private def getElimNameInfo (optElimId : Syntax) (targets : Array Expr) (inducti
|
|||
if induction && indVal.isNested then
|
||||
throwError "'induction' tactic does not support nested inductive types, the eliminator '{mkRecName indVal.name}' has multiple motives"
|
||||
let elimName := if induction then mkRecName indVal.name else mkCasesOnName indVal.name
|
||||
getElimInfo elimName
|
||||
getElimInfo elimName indVal.name
|
||||
else
|
||||
let elimId := optElimId[1]
|
||||
let elimName ← withRef elimId do resolveGlobalConstNoOverloadWithInfo elimId
|
||||
withRef elimId <| getElimInfo elimName
|
||||
-- not a precise check, but covers the common cases of T.recOn / T.casesOn
|
||||
-- as well as user defined T.myInductionOn to locate the constructors of T
|
||||
let baseName? := if ← isInductive elimName.getPrefix then some elimName.getPrefix else none
|
||||
withRef elimId <| getElimInfo elimName baseName?
|
||||
|
||||
private def shouldGeneralizeTarget (e : Expr) : MetaM Bool := do
|
||||
if let .fvar fvarId .. := e then
|
||||
|
|
|
|||
13
stage0/src/Lean/Meta/Tactic/ElimInfo.lean
generated
13
stage0/src/Lean/Meta/Tactic/ElimInfo.lean
generated
|
|
@ -11,6 +11,7 @@ namespace Lean.Meta
|
|||
|
||||
structure ElimAltInfo where
|
||||
name : Name
|
||||
declName? : Option Name
|
||||
numFields : Nat
|
||||
deriving Repr, Inhabited
|
||||
|
||||
|
|
@ -21,7 +22,7 @@ structure ElimInfo where
|
|||
altsInfo : Array ElimAltInfo := #[]
|
||||
deriving Repr, Inhabited
|
||||
|
||||
def getElimInfo (declName : Name) : MetaM ElimInfo := do
|
||||
def getElimInfo (declName : Name) (baseDeclName? : Option Name := none) : MetaM ElimInfo := do
|
||||
let declInfo ← getConstInfo declName
|
||||
forallTelescopeReducing declInfo.type fun xs type => do
|
||||
let motive := type.getAppFn
|
||||
|
|
@ -41,14 +42,20 @@ def getElimInfo (declName : Name) : MetaM ElimInfo := do
|
|||
| none => throwError "unexpected eliminator type{indentExpr declInfo.type}"
|
||||
| some targetPos => pure targetPos.val
|
||||
let mut altsInfo := #[]
|
||||
let env ← getEnv
|
||||
for i in [:xs.size] do
|
||||
let x := xs[i]!
|
||||
if x != motive && !targets.contains x then
|
||||
let xDecl ← x.fvarId!.getDecl
|
||||
if xDecl.binderInfo.isExplicit then
|
||||
let numFields ← forallTelescopeReducing xDecl.type fun args _ => pure args.size
|
||||
altsInfo := altsInfo.push { name := xDecl.userName, numFields := numFields : ElimAltInfo }
|
||||
pure { name := declName, motivePos := motivePos, targetsPos := targetsPos, altsInfo := altsInfo }
|
||||
let name := xDecl.userName
|
||||
let declName? := do
|
||||
let base ← baseDeclName?
|
||||
let altDeclName := base ++ name
|
||||
if env.contains altDeclName then some altDeclName else none
|
||||
altsInfo := altsInfo.push { name, declName?, numFields }
|
||||
pure { name := declName, motivePos, targetsPos, altsInfo }
|
||||
|
||||
/--
|
||||
Eliminators/recursors may have implicit targets. For builtin recursors, all indices are implicit targets.
|
||||
|
|
|
|||
1354
stage0/stdlib/Lean/Compiler/LCNF/Check.c
generated
1354
stage0/stdlib/Lean/Compiler/LCNF/Check.c
generated
File diff suppressed because it is too large
Load diff
284
stage0/stdlib/Lean/Compiler/LCNF/CompilerM.c
generated
284
stage0/stdlib/Lean/Compiler/LCNF/CompilerM.c
generated
|
|
@ -4803,171 +4803,185 @@ uint8_t x_8;
|
|||
x_8 = !lean_is_exclusive(x_1);
|
||||
if (x_8 == 0)
|
||||
{
|
||||
lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; uint8_t x_22;
|
||||
lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; uint8_t x_26;
|
||||
x_9 = lean_ctor_get(x_1, 0);
|
||||
x_10 = lean_ctor_get(x_1, 2);
|
||||
x_11 = lean_st_ref_get(x_2, x_7);
|
||||
x_12 = lean_ctor_get(x_11, 0);
|
||||
lean_inc(x_12);
|
||||
x_13 = lean_ctor_get(x_11, 1);
|
||||
x_10 = lean_ctor_get(x_1, 1);
|
||||
x_11 = lean_ctor_get(x_1, 2);
|
||||
x_12 = l___private_Lean_Compiler_LCNF_CompilerM_0__Lean_Compiler_LCNF_refreshBinderName(x_10, x_3, x_4, x_5, x_6, x_7);
|
||||
x_13 = lean_ctor_get(x_12, 0);
|
||||
lean_inc(x_13);
|
||||
lean_dec(x_11);
|
||||
x_14 = 1;
|
||||
x_15 = l___private_Lean_Compiler_LCNF_CompilerM_0__Lean_Compiler_LCNF_normExprImp_go(x_12, x_14, x_10);
|
||||
x_16 = l___private_Lean_Compiler_LCNF_CompilerM_0__Lean_Compiler_LCNF_Internalize_mkNewFVarId(x_9, x_2, x_3, x_4, x_5, x_6, x_13);
|
||||
x_17 = lean_ctor_get(x_16, 0);
|
||||
x_14 = lean_ctor_get(x_12, 1);
|
||||
lean_inc(x_14);
|
||||
lean_dec(x_12);
|
||||
x_15 = lean_st_ref_get(x_2, x_14);
|
||||
x_16 = lean_ctor_get(x_15, 0);
|
||||
lean_inc(x_16);
|
||||
x_17 = lean_ctor_get(x_15, 1);
|
||||
lean_inc(x_17);
|
||||
x_18 = lean_ctor_get(x_16, 1);
|
||||
lean_inc(x_18);
|
||||
lean_dec(x_16);
|
||||
lean_ctor_set(x_1, 2, x_15);
|
||||
lean_ctor_set(x_1, 0, x_17);
|
||||
x_19 = lean_st_ref_take(x_4, x_18);
|
||||
x_20 = lean_ctor_get(x_19, 0);
|
||||
lean_inc(x_20);
|
||||
x_21 = lean_ctor_get(x_19, 1);
|
||||
lean_dec(x_15);
|
||||
x_18 = 1;
|
||||
x_19 = l___private_Lean_Compiler_LCNF_CompilerM_0__Lean_Compiler_LCNF_normExprImp_go(x_16, x_18, x_11);
|
||||
x_20 = l___private_Lean_Compiler_LCNF_CompilerM_0__Lean_Compiler_LCNF_Internalize_mkNewFVarId(x_9, x_2, x_3, x_4, x_5, x_6, x_17);
|
||||
x_21 = lean_ctor_get(x_20, 0);
|
||||
lean_inc(x_21);
|
||||
lean_dec(x_19);
|
||||
x_22 = !lean_is_exclusive(x_20);
|
||||
if (x_22 == 0)
|
||||
{
|
||||
lean_object* x_23; lean_object* x_24; lean_object* x_25; uint8_t x_26;
|
||||
x_23 = lean_ctor_get(x_20, 0);
|
||||
lean_inc(x_1);
|
||||
x_24 = l_Lean_Compiler_LCNF_LCtx_addParam(x_23, x_1);
|
||||
lean_ctor_set(x_20, 0, x_24);
|
||||
x_25 = lean_st_ref_set(x_4, x_20, x_21);
|
||||
x_26 = !lean_is_exclusive(x_25);
|
||||
x_22 = lean_ctor_get(x_20, 1);
|
||||
lean_inc(x_22);
|
||||
lean_dec(x_20);
|
||||
lean_ctor_set(x_1, 2, x_19);
|
||||
lean_ctor_set(x_1, 1, x_13);
|
||||
lean_ctor_set(x_1, 0, x_21);
|
||||
x_23 = lean_st_ref_take(x_4, x_22);
|
||||
x_24 = lean_ctor_get(x_23, 0);
|
||||
lean_inc(x_24);
|
||||
x_25 = lean_ctor_get(x_23, 1);
|
||||
lean_inc(x_25);
|
||||
lean_dec(x_23);
|
||||
x_26 = !lean_is_exclusive(x_24);
|
||||
if (x_26 == 0)
|
||||
{
|
||||
lean_object* x_27;
|
||||
x_27 = lean_ctor_get(x_25, 0);
|
||||
lean_dec(x_27);
|
||||
lean_ctor_set(x_25, 0, x_1);
|
||||
return x_25;
|
||||
}
|
||||
else
|
||||
lean_object* x_27; lean_object* x_28; lean_object* x_29; uint8_t x_30;
|
||||
x_27 = lean_ctor_get(x_24, 0);
|
||||
lean_inc(x_1);
|
||||
x_28 = l_Lean_Compiler_LCNF_LCtx_addParam(x_27, x_1);
|
||||
lean_ctor_set(x_24, 0, x_28);
|
||||
x_29 = lean_st_ref_set(x_4, x_24, x_25);
|
||||
x_30 = !lean_is_exclusive(x_29);
|
||||
if (x_30 == 0)
|
||||
{
|
||||
lean_object* x_28; lean_object* x_29;
|
||||
x_28 = lean_ctor_get(x_25, 1);
|
||||
lean_inc(x_28);
|
||||
lean_dec(x_25);
|
||||
x_29 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_object* x_31;
|
||||
x_31 = lean_ctor_get(x_29, 0);
|
||||
lean_dec(x_31);
|
||||
lean_ctor_set(x_29, 0, x_1);
|
||||
lean_ctor_set(x_29, 1, x_28);
|
||||
return x_29;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37;
|
||||
x_30 = lean_ctor_get(x_20, 0);
|
||||
x_31 = lean_ctor_get(x_20, 1);
|
||||
lean_inc(x_31);
|
||||
lean_inc(x_30);
|
||||
lean_dec(x_20);
|
||||
lean_inc(x_1);
|
||||
x_32 = l_Lean_Compiler_LCNF_LCtx_addParam(x_30, x_1);
|
||||
lean_object* x_32; lean_object* x_33;
|
||||
x_32 = lean_ctor_get(x_29, 1);
|
||||
lean_inc(x_32);
|
||||
lean_dec(x_29);
|
||||
x_33 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_33, 0, x_32);
|
||||
lean_ctor_set(x_33, 1, x_31);
|
||||
x_34 = lean_st_ref_set(x_4, x_33, x_21);
|
||||
x_35 = lean_ctor_get(x_34, 1);
|
||||
lean_inc(x_35);
|
||||
if (lean_is_exclusive(x_34)) {
|
||||
lean_ctor_release(x_34, 0);
|
||||
lean_ctor_release(x_34, 1);
|
||||
x_36 = x_34;
|
||||
} else {
|
||||
lean_dec_ref(x_34);
|
||||
x_36 = lean_box(0);
|
||||
}
|
||||
if (lean_is_scalar(x_36)) {
|
||||
x_37 = lean_alloc_ctor(0, 2, 0);
|
||||
} else {
|
||||
x_37 = x_36;
|
||||
}
|
||||
lean_ctor_set(x_37, 0, x_1);
|
||||
lean_ctor_set(x_37, 1, x_35);
|
||||
return x_37;
|
||||
lean_ctor_set(x_33, 0, x_1);
|
||||
lean_ctor_set(x_33, 1, x_32);
|
||||
return x_33;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_38; lean_object* x_39; lean_object* x_40; uint8_t x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; uint8_t x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62;
|
||||
x_38 = lean_ctor_get(x_1, 0);
|
||||
x_39 = lean_ctor_get(x_1, 1);
|
||||
x_40 = lean_ctor_get(x_1, 2);
|
||||
x_41 = lean_ctor_get_uint8(x_1, sizeof(void*)*3);
|
||||
lean_inc(x_40);
|
||||
lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41;
|
||||
x_34 = lean_ctor_get(x_24, 0);
|
||||
x_35 = lean_ctor_get(x_24, 1);
|
||||
lean_inc(x_35);
|
||||
lean_inc(x_34);
|
||||
lean_dec(x_24);
|
||||
lean_inc(x_1);
|
||||
x_36 = l_Lean_Compiler_LCNF_LCtx_addParam(x_34, x_1);
|
||||
x_37 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_37, 0, x_36);
|
||||
lean_ctor_set(x_37, 1, x_35);
|
||||
x_38 = lean_st_ref_set(x_4, x_37, x_25);
|
||||
x_39 = lean_ctor_get(x_38, 1);
|
||||
lean_inc(x_39);
|
||||
lean_inc(x_38);
|
||||
lean_dec(x_1);
|
||||
x_42 = lean_st_ref_get(x_2, x_7);
|
||||
x_43 = lean_ctor_get(x_42, 0);
|
||||
lean_inc(x_43);
|
||||
x_44 = lean_ctor_get(x_42, 1);
|
||||
if (lean_is_exclusive(x_38)) {
|
||||
lean_ctor_release(x_38, 0);
|
||||
lean_ctor_release(x_38, 1);
|
||||
x_40 = x_38;
|
||||
} else {
|
||||
lean_dec_ref(x_38);
|
||||
x_40 = lean_box(0);
|
||||
}
|
||||
if (lean_is_scalar(x_40)) {
|
||||
x_41 = lean_alloc_ctor(0, 2, 0);
|
||||
} else {
|
||||
x_41 = x_40;
|
||||
}
|
||||
lean_ctor_set(x_41, 0, x_1);
|
||||
lean_ctor_set(x_41, 1, x_39);
|
||||
return x_41;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_42; lean_object* x_43; lean_object* x_44; uint8_t x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; uint8_t x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69;
|
||||
x_42 = lean_ctor_get(x_1, 0);
|
||||
x_43 = lean_ctor_get(x_1, 1);
|
||||
x_44 = lean_ctor_get(x_1, 2);
|
||||
x_45 = lean_ctor_get_uint8(x_1, sizeof(void*)*3);
|
||||
lean_inc(x_44);
|
||||
lean_dec(x_42);
|
||||
x_45 = 1;
|
||||
x_46 = l___private_Lean_Compiler_LCNF_CompilerM_0__Lean_Compiler_LCNF_normExprImp_go(x_43, x_45, x_40);
|
||||
x_47 = l___private_Lean_Compiler_LCNF_CompilerM_0__Lean_Compiler_LCNF_Internalize_mkNewFVarId(x_38, x_2, x_3, x_4, x_5, x_6, x_44);
|
||||
x_48 = lean_ctor_get(x_47, 0);
|
||||
lean_inc(x_43);
|
||||
lean_inc(x_42);
|
||||
lean_dec(x_1);
|
||||
x_46 = l___private_Lean_Compiler_LCNF_CompilerM_0__Lean_Compiler_LCNF_refreshBinderName(x_43, x_3, x_4, x_5, x_6, x_7);
|
||||
x_47 = lean_ctor_get(x_46, 0);
|
||||
lean_inc(x_47);
|
||||
x_48 = lean_ctor_get(x_46, 1);
|
||||
lean_inc(x_48);
|
||||
x_49 = lean_ctor_get(x_47, 1);
|
||||
lean_inc(x_49);
|
||||
lean_dec(x_47);
|
||||
x_50 = lean_alloc_ctor(0, 3, 1);
|
||||
lean_ctor_set(x_50, 0, x_48);
|
||||
lean_ctor_set(x_50, 1, x_39);
|
||||
lean_ctor_set(x_50, 2, x_46);
|
||||
lean_ctor_set_uint8(x_50, sizeof(void*)*3, x_41);
|
||||
x_51 = lean_st_ref_take(x_4, x_49);
|
||||
x_52 = lean_ctor_get(x_51, 0);
|
||||
lean_inc(x_52);
|
||||
x_53 = lean_ctor_get(x_51, 1);
|
||||
lean_inc(x_53);
|
||||
lean_dec(x_51);
|
||||
x_54 = lean_ctor_get(x_52, 0);
|
||||
lean_inc(x_54);
|
||||
x_55 = lean_ctor_get(x_52, 1);
|
||||
lean_inc(x_55);
|
||||
if (lean_is_exclusive(x_52)) {
|
||||
lean_ctor_release(x_52, 0);
|
||||
lean_ctor_release(x_52, 1);
|
||||
x_56 = x_52;
|
||||
} else {
|
||||
lean_dec_ref(x_52);
|
||||
x_56 = lean_box(0);
|
||||
}
|
||||
lean_dec(x_46);
|
||||
x_49 = lean_st_ref_get(x_2, x_48);
|
||||
x_50 = lean_ctor_get(x_49, 0);
|
||||
lean_inc(x_50);
|
||||
x_57 = l_Lean_Compiler_LCNF_LCtx_addParam(x_54, x_50);
|
||||
if (lean_is_scalar(x_56)) {
|
||||
x_58 = lean_alloc_ctor(0, 2, 0);
|
||||
} else {
|
||||
x_58 = x_56;
|
||||
}
|
||||
lean_ctor_set(x_58, 0, x_57);
|
||||
lean_ctor_set(x_58, 1, x_55);
|
||||
x_59 = lean_st_ref_set(x_4, x_58, x_53);
|
||||
x_60 = lean_ctor_get(x_59, 1);
|
||||
x_51 = lean_ctor_get(x_49, 1);
|
||||
lean_inc(x_51);
|
||||
lean_dec(x_49);
|
||||
x_52 = 1;
|
||||
x_53 = l___private_Lean_Compiler_LCNF_CompilerM_0__Lean_Compiler_LCNF_normExprImp_go(x_50, x_52, x_44);
|
||||
x_54 = l___private_Lean_Compiler_LCNF_CompilerM_0__Lean_Compiler_LCNF_Internalize_mkNewFVarId(x_42, x_2, x_3, x_4, x_5, x_6, x_51);
|
||||
x_55 = lean_ctor_get(x_54, 0);
|
||||
lean_inc(x_55);
|
||||
x_56 = lean_ctor_get(x_54, 1);
|
||||
lean_inc(x_56);
|
||||
lean_dec(x_54);
|
||||
x_57 = lean_alloc_ctor(0, 3, 1);
|
||||
lean_ctor_set(x_57, 0, x_55);
|
||||
lean_ctor_set(x_57, 1, x_47);
|
||||
lean_ctor_set(x_57, 2, x_53);
|
||||
lean_ctor_set_uint8(x_57, sizeof(void*)*3, x_45);
|
||||
x_58 = lean_st_ref_take(x_4, x_56);
|
||||
x_59 = lean_ctor_get(x_58, 0);
|
||||
lean_inc(x_59);
|
||||
x_60 = lean_ctor_get(x_58, 1);
|
||||
lean_inc(x_60);
|
||||
lean_dec(x_58);
|
||||
x_61 = lean_ctor_get(x_59, 0);
|
||||
lean_inc(x_61);
|
||||
x_62 = lean_ctor_get(x_59, 1);
|
||||
lean_inc(x_62);
|
||||
if (lean_is_exclusive(x_59)) {
|
||||
lean_ctor_release(x_59, 0);
|
||||
lean_ctor_release(x_59, 1);
|
||||
x_61 = x_59;
|
||||
x_63 = x_59;
|
||||
} else {
|
||||
lean_dec_ref(x_59);
|
||||
x_61 = lean_box(0);
|
||||
x_63 = lean_box(0);
|
||||
}
|
||||
if (lean_is_scalar(x_61)) {
|
||||
x_62 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_inc(x_57);
|
||||
x_64 = l_Lean_Compiler_LCNF_LCtx_addParam(x_61, x_57);
|
||||
if (lean_is_scalar(x_63)) {
|
||||
x_65 = lean_alloc_ctor(0, 2, 0);
|
||||
} else {
|
||||
x_62 = x_61;
|
||||
x_65 = x_63;
|
||||
}
|
||||
lean_ctor_set(x_62, 0, x_50);
|
||||
lean_ctor_set(x_62, 1, x_60);
|
||||
return x_62;
|
||||
lean_ctor_set(x_65, 0, x_64);
|
||||
lean_ctor_set(x_65, 1, x_62);
|
||||
x_66 = lean_st_ref_set(x_4, x_65, x_60);
|
||||
x_67 = lean_ctor_get(x_66, 1);
|
||||
lean_inc(x_67);
|
||||
if (lean_is_exclusive(x_66)) {
|
||||
lean_ctor_release(x_66, 0);
|
||||
lean_ctor_release(x_66, 1);
|
||||
x_68 = x_66;
|
||||
} else {
|
||||
lean_dec_ref(x_66);
|
||||
x_68 = lean_box(0);
|
||||
}
|
||||
if (lean_is_scalar(x_68)) {
|
||||
x_69 = lean_alloc_ctor(0, 2, 0);
|
||||
} else {
|
||||
x_69 = x_68;
|
||||
}
|
||||
lean_ctor_set(x_69, 0, x_57);
|
||||
lean_ctor_set(x_69, 1, x_67);
|
||||
return x_69;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
3754
stage0/stdlib/Lean/Compiler/LCNF/InferType.c
generated
3754
stage0/stdlib/Lean/Compiler/LCNF/InferType.c
generated
File diff suppressed because it is too large
Load diff
310
stage0/stdlib/Lean/Compiler/LCNF/Main.c
generated
310
stage0/stdlib/Lean/Compiler/LCNF/Main.c
generated
|
|
@ -28,12 +28,14 @@ LEAN_EXPORT lean_object* l_Lean_Meta_isMatcher___at_Lean_Compiler_LCNF_shouldGen
|
|||
lean_object* lean_mk_empty_array_with_capacity(lean_object*);
|
||||
lean_object* l_Lean_Name_str___override(lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Meta_isMatcher___at_Lean_Compiler_LCNF_shouldGenerateCode___spec__1(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_panic___at_Lean_Compiler_LCNF_saveSpecParamInfo___spec__7(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t lean_usize_dec_eq(size_t, size_t);
|
||||
lean_object* lean_array_uget(lean_object*, size_t);
|
||||
LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_PassManager_run___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_checkpoint___spec__1___lambda__2___closed__6;
|
||||
lean_object* l_Lean_Compiler_LCNF_getPassManager___rarg(lean_object*, lean_object*);
|
||||
lean_object* lean_array_uset(lean_object*, size_t, lean_object*);
|
||||
static lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_run___spec__4___closed__3;
|
||||
static lean_object* l_Lean_Compiler_LCNF_shouldGenerateCode___closed__17;
|
||||
LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_checkpoint___spec__1___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_checkpoint___spec__1___lambda__1___closed__1;
|
||||
|
|
@ -59,6 +61,7 @@ uint8_t lean_usize_dec_lt(size_t, size_t);
|
|||
static lean_object* l_Lean_Compiler_LCNF_shouldGenerateCode___closed__19;
|
||||
static lean_object* l_Lean_Compiler_LCNF_shouldGenerateCode___lambda__2___closed__1;
|
||||
LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_shouldGenerateCode___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1339____closed__6;
|
||||
LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_run___spec__2___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l___private_Lean_Compiler_InlineAttrs_0__Lean_Compiler_hasInlineAttrCore(lean_object*, uint8_t, lean_object*);
|
||||
uint8_t l_Lean_Option_get___at_Lean_getSanitizeNames___spec__1(lean_object*, lean_object*);
|
||||
|
|
@ -85,20 +88,28 @@ uint8_t lean_is_matcher(lean_object*, lean_object*);
|
|||
extern lean_object* l_Lean_Expr_instHashableExpr;
|
||||
uint8_t l_Lean_ConstantInfo_hasValue(lean_object*);
|
||||
lean_object* l_Lean_Meta_InfoCacheKey_instHashableInfoCacheKey___boxed(lean_object*);
|
||||
static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1339____closed__4;
|
||||
static lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_run___spec__4___closed__4;
|
||||
static lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_run___spec__4___closed__1;
|
||||
LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_run___spec__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l___private_Init_Util_0__mkPanicMessageWithDecl(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_isTracingEnabledFor___at_Lean_Compiler_LCNF_saveSpecParamInfo___spec__9(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l_Array_isEmpty___rarg(lean_object*);
|
||||
static lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_run___spec__4___closed__2;
|
||||
lean_object* l_Lean_Compiler_LCNF_ppDecl_x27(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_shouldGenerateCode___lambda__4(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_isTypeFormerType(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
size_t lean_usize_of_nat(lean_object*);
|
||||
static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1339____closed__1;
|
||||
lean_object* l_Lean_ConstantInfo_type(lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_main___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_instBEqProd___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Compiler_LCNF_checkDeadLocalDecls(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1339____closed__3;
|
||||
LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_shouldGenerateCode(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_checkpoint___spec__1___closed__3;
|
||||
lean_object* l_Lean_PersistentHashMap_mkEmptyEntriesArray(lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1339____closed__2;
|
||||
lean_object* l_Lean_PersistentArray_push___rarg(lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Compiler_LCNF_compile___closed__3;
|
||||
static lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_checkpoint___spec__1___lambda__2___closed__12;
|
||||
|
|
@ -108,6 +119,7 @@ extern lean_object* l_Lean_Compiler_compiler_check;
|
|||
lean_object* l_List_redLength___rarg(lean_object*);
|
||||
static lean_object* l_Lean_Compiler_LCNF_shouldGenerateCode___closed__16;
|
||||
LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_PassManager_run___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1339____closed__5;
|
||||
LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Compiler_LCNF_PassManager_run___spec__1(size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t lean_nat_dec_le(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Name_append(lean_object*, lean_object*);
|
||||
|
|
@ -116,7 +128,6 @@ LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_compile(lean_object*, lean_object*
|
|||
lean_object* l_Lean_Compiler_LCNF_LCtx_toLocalContext(lean_object*);
|
||||
static lean_object* l_Lean_Compiler_LCNF_shouldGenerateCode___closed__20;
|
||||
static lean_object* l_Lean_Compiler_LCNF_compile___closed__1;
|
||||
static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1280____closed__6;
|
||||
lean_object* l_Lean_Compiler_LCNF_CompilerM_run___rarg(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_shouldGenerateCode___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_checkpoint___spec__1___closed__6;
|
||||
|
|
@ -125,7 +136,7 @@ static lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_checkpoint_
|
|||
static lean_object* l_Lean_Compiler_LCNF_shouldGenerateCode___closed__7;
|
||||
LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_run___spec__2___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Compiler_LCNF_compile___closed__2;
|
||||
LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1280_(lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1339_(lean_object*);
|
||||
lean_object* lean_st_ref_set(lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Compiler_LCNF_shouldGenerateCode___closed__3;
|
||||
LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_checkpoint___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -135,13 +146,11 @@ lean_object* l_List_toArrayAux___rarg(lean_object*, lean_object*);
|
|||
LEAN_EXPORT lean_object* l_Lean_addTrace___at_Lean_Compiler_LCNF_PassManager_run___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_instHashableProd___rarg___boxed(lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_checkpoint___spec__1___closed__4;
|
||||
static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1280____closed__4;
|
||||
static lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_checkpoint___spec__1___lambda__2___closed__3;
|
||||
static lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_checkpoint___spec__1___lambda__2___closed__4;
|
||||
lean_object* l_Lean_Compiler_LCNF_getDeclAt_x3f(lean_object*, uint8_t, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_Expr_instBEqExpr;
|
||||
lean_object* l_Lean_Compiler_LCNF_getDeclInfo_x3f(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1280____closed__5;
|
||||
LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_run___spec__4(lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_checkpoint___spec__1___closed__2;
|
||||
LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_checkpoint___spec__1___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -150,13 +159,10 @@ LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_shouldGenerateCode_isCompIrrelevan
|
|||
static lean_object* l_Lean_Compiler_LCNF_shouldGenerateCode___closed__5;
|
||||
LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_showDecl(uint8_t, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_checkpoint___spec__1___closed__1;
|
||||
static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1280____closed__2;
|
||||
static lean_object* l_Lean_Compiler_LCNF_shouldGenerateCode___closed__14;
|
||||
static lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_checkpoint___spec__1___lambda__2___closed__9;
|
||||
static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1280____closed__1;
|
||||
static lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_checkpoint___spec__1___lambda__2___closed__2;
|
||||
LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Compiler_LCNF_PassManager_run___spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1280____closed__3;
|
||||
LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_checkpoint___spec__1___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_checkpoint___spec__1___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_isProp(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -2798,6 +2804,43 @@ return x_56;
|
|||
}
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_run___spec__4___closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string_from_bytes("Lean.Compiler.LCNF.Main", 23);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_run___spec__4___closed__2() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string_from_bytes("Lean.Compiler.LCNF.PassManager.run", 34);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_run___spec__4___closed__3() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string_from_bytes("unreachable code has been reached", 33);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_run___spec__4___closed__4() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6;
|
||||
x_1 = l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_run___spec__4___closed__1;
|
||||
x_2 = l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_run___spec__4___closed__2;
|
||||
x_3 = lean_unsigned_to_nat(80u);
|
||||
x_4 = lean_unsigned_to_nat(52u);
|
||||
x_5 = l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_run___spec__4___closed__3;
|
||||
x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5);
|
||||
return x_6;
|
||||
}
|
||||
}
|
||||
LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_run___spec__4(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10) {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -2818,88 +2861,163 @@ return x_12;
|
|||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_13; lean_object* x_14;
|
||||
lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_21; uint8_t x_22; lean_object* x_23; lean_object* x_24;
|
||||
lean_dec(x_5);
|
||||
x_13 = lean_array_uget(x_2, x_4);
|
||||
x_21 = lean_ctor_get(x_13, 0);
|
||||
lean_inc(x_21);
|
||||
x_22 = 0;
|
||||
x_23 = l_Lean_Compiler_LCNF_getDeclAt_x3f(x_21, x_22, x_8, x_9, x_10);
|
||||
x_24 = lean_ctor_get(x_23, 0);
|
||||
lean_inc(x_24);
|
||||
if (lean_obj_tag(x_24) == 0)
|
||||
{
|
||||
lean_object* x_25; lean_object* x_26; lean_object* x_27;
|
||||
lean_dec(x_13);
|
||||
x_25 = lean_ctor_get(x_23, 1);
|
||||
lean_inc(x_25);
|
||||
lean_dec(x_23);
|
||||
x_26 = l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_run___spec__4___closed__4;
|
||||
lean_inc(x_9);
|
||||
lean_inc(x_8);
|
||||
lean_inc(x_7);
|
||||
lean_inc(x_6);
|
||||
lean_inc(x_13);
|
||||
x_14 = l_Lean_Compiler_LCNF_ppDecl(x_13, x_6, x_7, x_8, x_9, x_10);
|
||||
if (lean_obj_tag(x_14) == 0)
|
||||
x_27 = l_panic___at_Lean_Compiler_LCNF_saveSpecParamInfo___spec__7(x_26, x_6, x_7, x_8, x_9, x_25);
|
||||
if (lean_obj_tag(x_27) == 0)
|
||||
{
|
||||
lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; size_t x_31; size_t x_32; lean_object* x_33;
|
||||
x_15 = lean_ctor_get(x_14, 0);
|
||||
lean_inc(x_15);
|
||||
x_16 = lean_ctor_get(x_14, 1);
|
||||
lean_inc(x_16);
|
||||
lean_dec(x_14);
|
||||
x_17 = l_Lean_Compiler_LCNF_Decl_size(x_13);
|
||||
x_18 = l_Nat_repr(x_17);
|
||||
x_19 = lean_alloc_ctor(2, 1, 0);
|
||||
lean_ctor_set(x_19, 0, x_18);
|
||||
x_20 = lean_alloc_ctor(0, 1, 0);
|
||||
lean_ctor_set(x_20, 0, x_19);
|
||||
x_21 = l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_checkpoint___spec__1___lambda__2___closed__9;
|
||||
x_22 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_22, 0, x_21);
|
||||
lean_ctor_set(x_22, 1, x_20);
|
||||
x_23 = l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_checkpoint___spec__1___lambda__2___closed__11;
|
||||
x_24 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_24, 0, x_22);
|
||||
lean_ctor_set(x_24, 1, x_23);
|
||||
x_25 = lean_alloc_ctor(0, 1, 0);
|
||||
lean_ctor_set(x_25, 0, x_15);
|
||||
x_26 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_26, 0, x_24);
|
||||
lean_ctor_set(x_26, 1, x_25);
|
||||
x_27 = l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_checkpoint___spec__1___lambda__2___closed__13;
|
||||
x_28 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_28, 0, x_26);
|
||||
lean_ctor_set(x_28, 1, x_27);
|
||||
lean_inc(x_1);
|
||||
x_29 = l_Lean_addTrace___at_Lean_Compiler_LCNF_PassManager_run___spec__3(x_1, x_28, x_6, x_7, x_8, x_9, x_16);
|
||||
x_30 = lean_ctor_get(x_29, 1);
|
||||
lean_inc(x_30);
|
||||
lean_dec(x_29);
|
||||
x_31 = 1;
|
||||
x_32 = lean_usize_add(x_4, x_31);
|
||||
x_33 = lean_box(0);
|
||||
x_4 = x_32;
|
||||
x_5 = x_33;
|
||||
x_10 = x_30;
|
||||
goto _start;
|
||||
lean_object* x_28; lean_object* x_29;
|
||||
x_28 = lean_ctor_get(x_27, 1);
|
||||
lean_inc(x_28);
|
||||
lean_dec(x_27);
|
||||
x_29 = l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_checkpoint___spec__1___lambda__2___closed__7;
|
||||
x_14 = x_29;
|
||||
x_15 = x_28;
|
||||
goto block_20;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_35;
|
||||
uint8_t x_30;
|
||||
lean_dec(x_9);
|
||||
lean_dec(x_8);
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_1);
|
||||
x_30 = !lean_is_exclusive(x_27);
|
||||
if (x_30 == 0)
|
||||
{
|
||||
return x_27;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_31; lean_object* x_32; lean_object* x_33;
|
||||
x_31 = lean_ctor_get(x_27, 0);
|
||||
x_32 = lean_ctor_get(x_27, 1);
|
||||
lean_inc(x_32);
|
||||
lean_inc(x_31);
|
||||
lean_dec(x_27);
|
||||
x_33 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_33, 0, x_31);
|
||||
lean_ctor_set(x_33, 1, x_32);
|
||||
return x_33;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_34; lean_object* x_35; lean_object* x_36;
|
||||
x_34 = lean_ctor_get(x_23, 1);
|
||||
lean_inc(x_34);
|
||||
lean_dec(x_23);
|
||||
x_35 = lean_ctor_get(x_24, 0);
|
||||
lean_inc(x_35);
|
||||
lean_dec(x_24);
|
||||
lean_inc(x_9);
|
||||
lean_inc(x_8);
|
||||
x_36 = l_Lean_Compiler_LCNF_ppDecl_x27(x_35, x_8, x_9, x_34);
|
||||
if (lean_obj_tag(x_36) == 0)
|
||||
{
|
||||
lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53;
|
||||
x_37 = lean_ctor_get(x_36, 0);
|
||||
lean_inc(x_37);
|
||||
x_38 = lean_ctor_get(x_36, 1);
|
||||
lean_inc(x_38);
|
||||
lean_dec(x_36);
|
||||
x_39 = l_Lean_Compiler_LCNF_Decl_size(x_13);
|
||||
x_40 = l_Nat_repr(x_39);
|
||||
x_41 = lean_alloc_ctor(2, 1, 0);
|
||||
lean_ctor_set(x_41, 0, x_40);
|
||||
x_42 = lean_alloc_ctor(0, 1, 0);
|
||||
lean_ctor_set(x_42, 0, x_41);
|
||||
x_43 = l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_checkpoint___spec__1___lambda__2___closed__9;
|
||||
x_44 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_44, 0, x_43);
|
||||
lean_ctor_set(x_44, 1, x_42);
|
||||
x_45 = l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_checkpoint___spec__1___lambda__2___closed__11;
|
||||
x_46 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_46, 0, x_44);
|
||||
lean_ctor_set(x_46, 1, x_45);
|
||||
x_47 = lean_alloc_ctor(0, 1, 0);
|
||||
lean_ctor_set(x_47, 0, x_37);
|
||||
x_48 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_48, 0, x_46);
|
||||
lean_ctor_set(x_48, 1, x_47);
|
||||
x_49 = l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_checkpoint___spec__1___lambda__2___closed__13;
|
||||
x_50 = lean_alloc_ctor(10, 2, 0);
|
||||
lean_ctor_set(x_50, 0, x_48);
|
||||
lean_ctor_set(x_50, 1, x_49);
|
||||
lean_inc(x_1);
|
||||
x_51 = l_Lean_addTrace___at_Lean_Compiler_LCNF_PassManager_run___spec__3(x_1, x_50, x_6, x_7, x_8, x_9, x_38);
|
||||
x_52 = lean_ctor_get(x_51, 1);
|
||||
lean_inc(x_52);
|
||||
lean_dec(x_51);
|
||||
x_53 = l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_checkpoint___spec__1___lambda__2___closed__7;
|
||||
x_14 = x_53;
|
||||
x_15 = x_52;
|
||||
goto block_20;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_54;
|
||||
lean_dec(x_13);
|
||||
lean_dec(x_9);
|
||||
lean_dec(x_8);
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_1);
|
||||
x_35 = !lean_is_exclusive(x_14);
|
||||
if (x_35 == 0)
|
||||
x_54 = !lean_is_exclusive(x_36);
|
||||
if (x_54 == 0)
|
||||
{
|
||||
return x_14;
|
||||
return x_36;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_36; lean_object* x_37; lean_object* x_38;
|
||||
x_36 = lean_ctor_get(x_14, 0);
|
||||
x_37 = lean_ctor_get(x_14, 1);
|
||||
lean_inc(x_37);
|
||||
lean_inc(x_36);
|
||||
lean_dec(x_14);
|
||||
x_38 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_38, 0, x_36);
|
||||
lean_ctor_set(x_38, 1, x_37);
|
||||
return x_38;
|
||||
lean_object* x_55; lean_object* x_56; lean_object* x_57;
|
||||
x_55 = lean_ctor_get(x_36, 0);
|
||||
x_56 = lean_ctor_get(x_36, 1);
|
||||
lean_inc(x_56);
|
||||
lean_inc(x_55);
|
||||
lean_dec(x_36);
|
||||
x_57 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_57, 0, x_55);
|
||||
lean_ctor_set(x_57, 1, x_56);
|
||||
return x_57;
|
||||
}
|
||||
}
|
||||
}
|
||||
block_20:
|
||||
{
|
||||
lean_object* x_16; size_t x_17; size_t x_18;
|
||||
x_16 = lean_ctor_get(x_14, 0);
|
||||
lean_inc(x_16);
|
||||
lean_dec(x_14);
|
||||
x_17 = 1;
|
||||
x_18 = lean_usize_add(x_4, x_17);
|
||||
x_4 = x_18;
|
||||
x_5 = x_16;
|
||||
x_10 = x_15;
|
||||
goto _start;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Compiler_LCNF_PassManager_run___spec__5(lean_object* x_1, size_t x_2, size_t x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) {
|
||||
|
|
@ -3765,7 +3883,7 @@ x_11 = l_Lean_Compiler_LCNF_CompilerM_run___rarg(x_8, x_9, x_10, x_2, x_3, x_4);
|
|||
return x_11;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1280____closed__1() {
|
||||
static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1339____closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
|
|
@ -3773,17 +3891,17 @@ x_1 = lean_mk_string_from_bytes("init", 4);
|
|||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1280____closed__2() {
|
||||
static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1339____closed__2() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_checkpoint___spec__1___closed__2;
|
||||
x_2 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1280____closed__1;
|
||||
x_2 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1339____closed__1;
|
||||
x_3 = l_Lean_Name_str___override(x_1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1280____closed__3() {
|
||||
static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1339____closed__3() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
|
|
@ -3791,17 +3909,17 @@ x_1 = lean_mk_string_from_bytes("test", 4);
|
|||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1280____closed__4() {
|
||||
static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1339____closed__4() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_checkpoint___spec__1___closed__2;
|
||||
x_2 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1280____closed__3;
|
||||
x_2 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1339____closed__3;
|
||||
x_3 = l_Lean_Name_str___override(x_1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1280____closed__5() {
|
||||
static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1339____closed__5() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
|
|
@ -3809,21 +3927,21 @@ x_1 = lean_mk_string_from_bytes("jp", 2);
|
|||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1280____closed__6() {
|
||||
static lean_object* _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1339____closed__6() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_checkpoint___spec__1___closed__2;
|
||||
x_2 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1280____closed__5;
|
||||
x_2 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1339____closed__5;
|
||||
x_3 = l_Lean_Name_str___override(x_1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1280_(lean_object* x_1) {
|
||||
LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1339_(lean_object* x_1) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_2; uint8_t x_3; lean_object* x_4;
|
||||
x_2 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1280____closed__2;
|
||||
x_2 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1339____closed__2;
|
||||
x_3 = 1;
|
||||
x_4 = l_Lean_registerTraceClass(x_2, x_3, x_1);
|
||||
if (lean_obj_tag(x_4) == 0)
|
||||
|
|
@ -3832,7 +3950,7 @@ lean_object* x_5; lean_object* x_6; lean_object* x_7;
|
|||
x_5 = lean_ctor_get(x_4, 1);
|
||||
lean_inc(x_5);
|
||||
lean_dec(x_4);
|
||||
x_6 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1280____closed__4;
|
||||
x_6 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1339____closed__4;
|
||||
x_7 = l_Lean_registerTraceClass(x_6, x_3, x_5);
|
||||
if (lean_obj_tag(x_7) == 0)
|
||||
{
|
||||
|
|
@ -3848,7 +3966,7 @@ lean_object* x_11; lean_object* x_12; uint8_t x_13; lean_object* x_14;
|
|||
x_11 = lean_ctor_get(x_10, 1);
|
||||
lean_inc(x_11);
|
||||
lean_dec(x_10);
|
||||
x_12 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1280____closed__6;
|
||||
x_12 = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1339____closed__6;
|
||||
x_13 = 0;
|
||||
x_14 = l_Lean_registerTraceClass(x_12, x_13, x_11);
|
||||
return x_14;
|
||||
|
|
@ -4058,6 +4176,14 @@ l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_checkpoint___spec__1___closed__
|
|||
lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_checkpoint___spec__1___closed__6);
|
||||
l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_run___spec__2___closed__1 = _init_l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_run___spec__2___closed__1();
|
||||
lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_run___spec__2___closed__1);
|
||||
l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_run___spec__4___closed__1 = _init_l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_run___spec__4___closed__1();
|
||||
lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_run___spec__4___closed__1);
|
||||
l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_run___spec__4___closed__2 = _init_l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_run___spec__4___closed__2();
|
||||
lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_run___spec__4___closed__2);
|
||||
l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_run___spec__4___closed__3 = _init_l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_run___spec__4___closed__3();
|
||||
lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_run___spec__4___closed__3);
|
||||
l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_run___spec__4___closed__4 = _init_l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_run___spec__4___closed__4();
|
||||
lean_mark_persistent(l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_PassManager_run___spec__4___closed__4);
|
||||
l_Lean_Compiler_LCNF_PassManager_run___lambda__2___closed__1 = _init_l_Lean_Compiler_LCNF_PassManager_run___lambda__2___closed__1();
|
||||
lean_mark_persistent(l_Lean_Compiler_LCNF_PassManager_run___lambda__2___closed__1);
|
||||
l_Lean_Compiler_LCNF_PassManager_run___lambda__2___closed__2 = _init_l_Lean_Compiler_LCNF_PassManager_run___lambda__2___closed__2();
|
||||
|
|
@ -4072,19 +4198,19 @@ l_Lean_Compiler_LCNF_showDecl___closed__1 = _init_l_Lean_Compiler_LCNF_showDecl_
|
|||
lean_mark_persistent(l_Lean_Compiler_LCNF_showDecl___closed__1);
|
||||
l_Lean_Compiler_LCNF_showDecl___closed__2 = _init_l_Lean_Compiler_LCNF_showDecl___closed__2();
|
||||
lean_mark_persistent(l_Lean_Compiler_LCNF_showDecl___closed__2);
|
||||
l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1280____closed__1 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1280____closed__1();
|
||||
lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1280____closed__1);
|
||||
l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1280____closed__2 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1280____closed__2();
|
||||
lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1280____closed__2);
|
||||
l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1280____closed__3 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1280____closed__3();
|
||||
lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1280____closed__3);
|
||||
l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1280____closed__4 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1280____closed__4();
|
||||
lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1280____closed__4);
|
||||
l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1280____closed__5 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1280____closed__5();
|
||||
lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1280____closed__5);
|
||||
l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1280____closed__6 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1280____closed__6();
|
||||
lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1280____closed__6);
|
||||
res = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1280_(lean_io_mk_world());
|
||||
l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1339____closed__1 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1339____closed__1();
|
||||
lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1339____closed__1);
|
||||
l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1339____closed__2 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1339____closed__2();
|
||||
lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1339____closed__2);
|
||||
l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1339____closed__3 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1339____closed__3();
|
||||
lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1339____closed__3);
|
||||
l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1339____closed__4 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1339____closed__4();
|
||||
lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1339____closed__4);
|
||||
l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1339____closed__5 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1339____closed__5();
|
||||
lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1339____closed__5);
|
||||
l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1339____closed__6 = _init_l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1339____closed__6();
|
||||
lean_mark_persistent(l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1339____closed__6);
|
||||
res = l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_Main___hyg_1339_(lean_io_mk_world());
|
||||
if (lean_io_result_is_error(res)) return res;
|
||||
lean_dec_ref(res);
|
||||
return lean_io_result_mk_ok(lean_box(0));
|
||||
|
|
|
|||
563
stage0/stdlib/Lean/Compiler/LCNF/PhaseExt.c
generated
563
stage0/stdlib/Lean/Compiler/LCNF/PhaseExt.c
generated
|
|
@ -26,8 +26,10 @@ uint8_t lean_usize_dec_eq(size_t, size_t);
|
|||
lean_object* lean_array_uget(lean_object*, size_t);
|
||||
static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_PhaseExt___hyg_49____closed__5;
|
||||
uint8_t l_Lean_Name_quickLt(lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Compiler_LCNF_normalizeFVarIds___closed__1;
|
||||
LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_getBaseDeclCore_x3f(lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_getBaseDecl_x3f___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Compiler_LCNF_normalizeFVarIds___closed__2;
|
||||
LEAN_EXPORT lean_object* l_Std_Range_forIn_loop___at_Lean_Compiler_LCNF_forEachDecl___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
size_t lean_usize_sub(size_t, size_t);
|
||||
LEAN_EXPORT lean_object* l_Array_qsort_sort___at___private_Lean_Compiler_LCNF_PhaseExt_0__Lean_Compiler_LCNF_sortDecls___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -41,6 +43,7 @@ LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_foldlMAux___at_Lean_Compiler_L
|
|||
extern lean_object* l_Lean_instHashableName;
|
||||
uint8_t lean_name_eq(lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_forM___at_Lean_Compiler_LCNF_forEachDecl___spec__3___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Compiler_LCNF_normalizeFVarIds___closed__4;
|
||||
LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_getDeclAt_x3f___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_PhaseExt___hyg_49____closed__3;
|
||||
static lean_object* l_Array_qsort_sort___at___private_Lean_Compiler_LCNF_PhaseExt_0__Lean_Compiler_LCNF_sortDecls___spec__1___closed__1;
|
||||
|
|
@ -63,10 +66,12 @@ static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_PhaseE
|
|||
size_t lean_uint64_to_usize(uint64_t);
|
||||
static lean_object* l_Lean_Compiler_LCNF_Decl_saveBase___closed__1;
|
||||
LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lean_Compiler_LCNF_forEachDecl___spec__6(lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Compiler_LCNF_normalizeFVarIds___closed__3;
|
||||
lean_object* l_Lean_PersistentHashMap_getCollisionNodeSize___rarg(lean_object*);
|
||||
uint64_t l_Lean_Name_hash___override(lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_PhaseExt___hyg_49____lambda__3(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_array_fget(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_mkHashMapImp___rarg(lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insert___at_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_PhaseExt___hyg_49____spec__1(lean_object*, lean_object*, lean_object*);
|
||||
uint8_t lean_nat_dec_eq(lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lean_Compiler_LCNF_forEachDecl___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -105,6 +110,7 @@ LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_P
|
|||
lean_object* l_Lean_PersistentEnvExtension_addEntry___rarg(lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_getDecl_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
size_t lean_usize_land(size_t, size_t);
|
||||
LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_normalizeFVarIds(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_PhaseExt___hyg_49____lambda__1(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_PersistentHashMap_mkEmptyEntriesArray(lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_PhaseExt___hyg_49____closed__2;
|
||||
|
|
@ -123,6 +129,7 @@ LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_foldlMAux_traverse___at_Lean_C
|
|||
lean_object* l_Lean_Environment_addExtraName(lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Array_binSearchAux___at___private_Lean_Compiler_LCNF_PhaseExt_0__Lean_Compiler_LCNF_findAtSorted_x3f___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_PhaseExt___hyg_49____closed__9;
|
||||
lean_object* l_Lean_Compiler_LCNF_CompilerM_run___rarg(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Compiler_LCNF_saveBase___closed__1;
|
||||
lean_object* lean_st_ref_set(lean_object*, lean_object*, lean_object*);
|
||||
uint8_t lean_nat_dec_eq(lean_object*, lean_object*);
|
||||
|
|
@ -140,12 +147,15 @@ lean_object* l_Lean_PersistentEnvExtension_getState___rarg(lean_object*, lean_ob
|
|||
LEAN_EXPORT lean_object* l___private_Lean_Compiler_LCNF_PhaseExt_0__Lean_Compiler_LCNF_findAtSorted_x3f(lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_findAtAux___at_Lean_Compiler_LCNF_getBaseDeclCore_x3f___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insertAux_traverse___at_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_PhaseExt___hyg_49____spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Compiler_LCNF_normalizeFVarIds___closed__5;
|
||||
static lean_object* l_Lean_Compiler_LCNF_normalizeFVarIds___closed__6;
|
||||
static lean_object* l_Lean_Compiler_LCNF_initFn____x40_Lean_Compiler_LCNF_PhaseExt___hyg_49____closed__6;
|
||||
static lean_object* l___private_Lean_Compiler_LCNF_PhaseExt_0__Lean_Compiler_LCNF_findAtSorted_x3f___closed__3;
|
||||
LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_getBaseDecl_x3f(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* lean_usize_to_nat(size_t);
|
||||
lean_object* l_Lean_Compiler_LCNF_getPhase(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_EStateM_pure___rarg(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Compiler_LCNF_Decl_internalize___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_PersistentHashMap_mkCollisionNode___rarg(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Compiler_LCNF_saveBase___closed__4;
|
||||
lean_object* l_Lean_PersistentHashMap_instInhabitedPersistentHashMap___rarg(lean_object*, lean_object*);
|
||||
|
|
@ -1819,31 +1829,540 @@ lean_dec(x_2);
|
|||
return x_7;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Compiler_LCNF_normalizeFVarIds___closed__1() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string_from_bytes("_uniq", 5);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Compiler_LCNF_normalizeFVarIds___closed__2() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = lean_box(0);
|
||||
x_2 = l_Lean_Compiler_LCNF_normalizeFVarIds___closed__1;
|
||||
x_3 = l_Lean_Name_str___override(x_1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Compiler_LCNF_normalizeFVarIds___closed__3() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Compiler_LCNF_normalizeFVarIds___closed__2;
|
||||
x_2 = lean_unsigned_to_nat(1u);
|
||||
x_3 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_3, 0, x_1);
|
||||
lean_ctor_set(x_3, 1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Compiler_LCNF_normalizeFVarIds___closed__4() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = lean_unsigned_to_nat(0u);
|
||||
x_2 = l_Lean_mkHashMapImp___rarg(x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Compiler_LCNF_normalizeFVarIds___closed__5() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_Lean_Compiler_LCNF_normalizeFVarIds___closed__4;
|
||||
x_2 = lean_alloc_ctor(0, 3, 0);
|
||||
lean_ctor_set(x_2, 0, x_1);
|
||||
lean_ctor_set(x_2, 1, x_1);
|
||||
lean_ctor_set(x_2, 2, x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Compiler_LCNF_normalizeFVarIds___closed__6() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2; lean_object* x_3;
|
||||
x_1 = l_Lean_Compiler_LCNF_normalizeFVarIds___closed__5;
|
||||
x_2 = lean_unsigned_to_nat(1u);
|
||||
x_3 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_3, 0, x_1);
|
||||
lean_ctor_set(x_3, 1, x_2);
|
||||
return x_3;
|
||||
}
|
||||
}
|
||||
LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_normalizeFVarIds(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; uint8_t x_12;
|
||||
x_5 = lean_st_ref_get(x_3, x_4);
|
||||
x_6 = lean_ctor_get(x_5, 0);
|
||||
lean_inc(x_6);
|
||||
x_7 = lean_ctor_get(x_5, 1);
|
||||
lean_inc(x_7);
|
||||
lean_dec(x_5);
|
||||
x_8 = lean_ctor_get(x_6, 2);
|
||||
lean_inc(x_8);
|
||||
lean_dec(x_6);
|
||||
x_9 = lean_st_ref_take(x_3, x_7);
|
||||
x_10 = lean_ctor_get(x_9, 0);
|
||||
lean_inc(x_10);
|
||||
x_11 = lean_ctor_get(x_9, 1);
|
||||
lean_inc(x_11);
|
||||
lean_dec(x_9);
|
||||
x_12 = !lean_is_exclusive(x_10);
|
||||
if (x_12 == 0)
|
||||
{
|
||||
lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; uint8_t x_20; lean_object* x_21;
|
||||
x_13 = lean_ctor_get(x_10, 2);
|
||||
lean_dec(x_13);
|
||||
x_14 = l_Lean_Compiler_LCNF_normalizeFVarIds___closed__3;
|
||||
lean_ctor_set(x_10, 2, x_14);
|
||||
x_15 = lean_st_ref_set(x_3, x_10, x_11);
|
||||
x_16 = lean_ctor_get(x_15, 1);
|
||||
lean_inc(x_16);
|
||||
lean_dec(x_15);
|
||||
x_17 = l_Lean_Compiler_LCNF_normalizeFVarIds___closed__4;
|
||||
x_18 = lean_alloc_closure((void*)(l_Lean_Compiler_LCNF_Decl_internalize___boxed), 7, 2);
|
||||
lean_closure_set(x_18, 0, x_1);
|
||||
lean_closure_set(x_18, 1, x_17);
|
||||
x_19 = l_Lean_Compiler_LCNF_normalizeFVarIds___closed__6;
|
||||
x_20 = 0;
|
||||
lean_inc(x_3);
|
||||
x_21 = l_Lean_Compiler_LCNF_CompilerM_run___rarg(x_18, x_19, x_20, x_2, x_3, x_16);
|
||||
if (lean_obj_tag(x_21) == 0)
|
||||
{
|
||||
lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; uint8_t x_27;
|
||||
x_22 = lean_ctor_get(x_21, 0);
|
||||
lean_inc(x_22);
|
||||
x_23 = lean_ctor_get(x_21, 1);
|
||||
lean_inc(x_23);
|
||||
lean_dec(x_21);
|
||||
x_24 = lean_st_ref_take(x_3, x_23);
|
||||
x_25 = lean_ctor_get(x_24, 0);
|
||||
lean_inc(x_25);
|
||||
x_26 = lean_ctor_get(x_24, 1);
|
||||
lean_inc(x_26);
|
||||
lean_dec(x_24);
|
||||
x_27 = !lean_is_exclusive(x_25);
|
||||
if (x_27 == 0)
|
||||
{
|
||||
lean_object* x_28; lean_object* x_29; uint8_t x_30;
|
||||
x_28 = lean_ctor_get(x_25, 2);
|
||||
lean_dec(x_28);
|
||||
lean_ctor_set(x_25, 2, x_8);
|
||||
x_29 = lean_st_ref_set(x_3, x_25, x_26);
|
||||
lean_dec(x_3);
|
||||
x_30 = !lean_is_exclusive(x_29);
|
||||
if (x_30 == 0)
|
||||
{
|
||||
lean_object* x_31;
|
||||
x_31 = lean_ctor_get(x_29, 0);
|
||||
lean_dec(x_31);
|
||||
lean_ctor_set(x_29, 0, x_22);
|
||||
return x_29;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_32; lean_object* x_33;
|
||||
x_32 = lean_ctor_get(x_29, 1);
|
||||
lean_inc(x_32);
|
||||
lean_dec(x_29);
|
||||
x_33 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_33, 0, x_22);
|
||||
lean_ctor_set(x_33, 1, x_32);
|
||||
return x_33;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44;
|
||||
x_34 = lean_ctor_get(x_25, 0);
|
||||
x_35 = lean_ctor_get(x_25, 1);
|
||||
x_36 = lean_ctor_get(x_25, 3);
|
||||
x_37 = lean_ctor_get(x_25, 4);
|
||||
x_38 = lean_ctor_get(x_25, 5);
|
||||
x_39 = lean_ctor_get(x_25, 6);
|
||||
lean_inc(x_39);
|
||||
lean_inc(x_38);
|
||||
lean_inc(x_37);
|
||||
lean_inc(x_36);
|
||||
lean_inc(x_35);
|
||||
lean_inc(x_34);
|
||||
lean_dec(x_25);
|
||||
x_40 = lean_alloc_ctor(0, 7, 0);
|
||||
lean_ctor_set(x_40, 0, x_34);
|
||||
lean_ctor_set(x_40, 1, x_35);
|
||||
lean_ctor_set(x_40, 2, x_8);
|
||||
lean_ctor_set(x_40, 3, x_36);
|
||||
lean_ctor_set(x_40, 4, x_37);
|
||||
lean_ctor_set(x_40, 5, x_38);
|
||||
lean_ctor_set(x_40, 6, x_39);
|
||||
x_41 = lean_st_ref_set(x_3, x_40, x_26);
|
||||
lean_dec(x_3);
|
||||
x_42 = lean_ctor_get(x_41, 1);
|
||||
lean_inc(x_42);
|
||||
if (lean_is_exclusive(x_41)) {
|
||||
lean_ctor_release(x_41, 0);
|
||||
lean_ctor_release(x_41, 1);
|
||||
x_43 = x_41;
|
||||
} else {
|
||||
lean_dec_ref(x_41);
|
||||
x_43 = lean_box(0);
|
||||
}
|
||||
if (lean_is_scalar(x_43)) {
|
||||
x_44 = lean_alloc_ctor(0, 2, 0);
|
||||
} else {
|
||||
x_44 = x_43;
|
||||
}
|
||||
lean_ctor_set(x_44, 0, x_22);
|
||||
lean_ctor_set(x_44, 1, x_42);
|
||||
return x_44;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; uint8_t x_50;
|
||||
x_45 = lean_ctor_get(x_21, 0);
|
||||
lean_inc(x_45);
|
||||
x_46 = lean_ctor_get(x_21, 1);
|
||||
lean_inc(x_46);
|
||||
lean_dec(x_21);
|
||||
x_47 = lean_st_ref_take(x_3, x_46);
|
||||
x_48 = lean_ctor_get(x_47, 0);
|
||||
lean_inc(x_48);
|
||||
x_49 = lean_ctor_get(x_47, 1);
|
||||
lean_inc(x_49);
|
||||
lean_dec(x_47);
|
||||
x_50 = !lean_is_exclusive(x_48);
|
||||
if (x_50 == 0)
|
||||
{
|
||||
lean_object* x_51; lean_object* x_52; uint8_t x_53;
|
||||
x_51 = lean_ctor_get(x_48, 2);
|
||||
lean_dec(x_51);
|
||||
lean_ctor_set(x_48, 2, x_8);
|
||||
x_52 = lean_st_ref_set(x_3, x_48, x_49);
|
||||
lean_dec(x_3);
|
||||
x_53 = !lean_is_exclusive(x_52);
|
||||
if (x_53 == 0)
|
||||
{
|
||||
lean_object* x_54;
|
||||
x_54 = lean_ctor_get(x_52, 0);
|
||||
lean_dec(x_54);
|
||||
lean_ctor_set_tag(x_52, 1);
|
||||
lean_ctor_set(x_52, 0, x_45);
|
||||
return x_52;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_55; lean_object* x_56;
|
||||
x_55 = lean_ctor_get(x_52, 1);
|
||||
lean_inc(x_55);
|
||||
lean_dec(x_52);
|
||||
x_56 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_56, 0, x_45);
|
||||
lean_ctor_set(x_56, 1, x_55);
|
||||
return x_56;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67;
|
||||
x_57 = lean_ctor_get(x_48, 0);
|
||||
x_58 = lean_ctor_get(x_48, 1);
|
||||
x_59 = lean_ctor_get(x_48, 3);
|
||||
x_60 = lean_ctor_get(x_48, 4);
|
||||
x_61 = lean_ctor_get(x_48, 5);
|
||||
x_62 = lean_ctor_get(x_48, 6);
|
||||
lean_inc(x_62);
|
||||
lean_inc(x_61);
|
||||
lean_inc(x_60);
|
||||
lean_inc(x_59);
|
||||
lean_inc(x_58);
|
||||
lean_inc(x_57);
|
||||
lean_dec(x_48);
|
||||
x_63 = lean_alloc_ctor(0, 7, 0);
|
||||
lean_ctor_set(x_63, 0, x_57);
|
||||
lean_ctor_set(x_63, 1, x_58);
|
||||
lean_ctor_set(x_63, 2, x_8);
|
||||
lean_ctor_set(x_63, 3, x_59);
|
||||
lean_ctor_set(x_63, 4, x_60);
|
||||
lean_ctor_set(x_63, 5, x_61);
|
||||
lean_ctor_set(x_63, 6, x_62);
|
||||
x_64 = lean_st_ref_set(x_3, x_63, x_49);
|
||||
lean_dec(x_3);
|
||||
x_65 = lean_ctor_get(x_64, 1);
|
||||
lean_inc(x_65);
|
||||
if (lean_is_exclusive(x_64)) {
|
||||
lean_ctor_release(x_64, 0);
|
||||
lean_ctor_release(x_64, 1);
|
||||
x_66 = x_64;
|
||||
} else {
|
||||
lean_dec_ref(x_64);
|
||||
x_66 = lean_box(0);
|
||||
}
|
||||
if (lean_is_scalar(x_66)) {
|
||||
x_67 = lean_alloc_ctor(1, 2, 0);
|
||||
} else {
|
||||
x_67 = x_66;
|
||||
lean_ctor_set_tag(x_67, 1);
|
||||
}
|
||||
lean_ctor_set(x_67, 0, x_45);
|
||||
lean_ctor_set(x_67, 1, x_65);
|
||||
return x_67;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; uint8_t x_81; lean_object* x_82;
|
||||
x_68 = lean_ctor_get(x_10, 0);
|
||||
x_69 = lean_ctor_get(x_10, 1);
|
||||
x_70 = lean_ctor_get(x_10, 3);
|
||||
x_71 = lean_ctor_get(x_10, 4);
|
||||
x_72 = lean_ctor_get(x_10, 5);
|
||||
x_73 = lean_ctor_get(x_10, 6);
|
||||
lean_inc(x_73);
|
||||
lean_inc(x_72);
|
||||
lean_inc(x_71);
|
||||
lean_inc(x_70);
|
||||
lean_inc(x_69);
|
||||
lean_inc(x_68);
|
||||
lean_dec(x_10);
|
||||
x_74 = l_Lean_Compiler_LCNF_normalizeFVarIds___closed__3;
|
||||
x_75 = lean_alloc_ctor(0, 7, 0);
|
||||
lean_ctor_set(x_75, 0, x_68);
|
||||
lean_ctor_set(x_75, 1, x_69);
|
||||
lean_ctor_set(x_75, 2, x_74);
|
||||
lean_ctor_set(x_75, 3, x_70);
|
||||
lean_ctor_set(x_75, 4, x_71);
|
||||
lean_ctor_set(x_75, 5, x_72);
|
||||
lean_ctor_set(x_75, 6, x_73);
|
||||
x_76 = lean_st_ref_set(x_3, x_75, x_11);
|
||||
x_77 = lean_ctor_get(x_76, 1);
|
||||
lean_inc(x_77);
|
||||
lean_dec(x_76);
|
||||
x_78 = l_Lean_Compiler_LCNF_normalizeFVarIds___closed__4;
|
||||
x_79 = lean_alloc_closure((void*)(l_Lean_Compiler_LCNF_Decl_internalize___boxed), 7, 2);
|
||||
lean_closure_set(x_79, 0, x_1);
|
||||
lean_closure_set(x_79, 1, x_78);
|
||||
x_80 = l_Lean_Compiler_LCNF_normalizeFVarIds___closed__6;
|
||||
x_81 = 0;
|
||||
lean_inc(x_3);
|
||||
x_82 = l_Lean_Compiler_LCNF_CompilerM_run___rarg(x_79, x_80, x_81, x_2, x_3, x_77);
|
||||
if (lean_obj_tag(x_82) == 0)
|
||||
{
|
||||
lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; lean_object* x_92; lean_object* x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99;
|
||||
x_83 = lean_ctor_get(x_82, 0);
|
||||
lean_inc(x_83);
|
||||
x_84 = lean_ctor_get(x_82, 1);
|
||||
lean_inc(x_84);
|
||||
lean_dec(x_82);
|
||||
x_85 = lean_st_ref_take(x_3, x_84);
|
||||
x_86 = lean_ctor_get(x_85, 0);
|
||||
lean_inc(x_86);
|
||||
x_87 = lean_ctor_get(x_85, 1);
|
||||
lean_inc(x_87);
|
||||
lean_dec(x_85);
|
||||
x_88 = lean_ctor_get(x_86, 0);
|
||||
lean_inc(x_88);
|
||||
x_89 = lean_ctor_get(x_86, 1);
|
||||
lean_inc(x_89);
|
||||
x_90 = lean_ctor_get(x_86, 3);
|
||||
lean_inc(x_90);
|
||||
x_91 = lean_ctor_get(x_86, 4);
|
||||
lean_inc(x_91);
|
||||
x_92 = lean_ctor_get(x_86, 5);
|
||||
lean_inc(x_92);
|
||||
x_93 = lean_ctor_get(x_86, 6);
|
||||
lean_inc(x_93);
|
||||
if (lean_is_exclusive(x_86)) {
|
||||
lean_ctor_release(x_86, 0);
|
||||
lean_ctor_release(x_86, 1);
|
||||
lean_ctor_release(x_86, 2);
|
||||
lean_ctor_release(x_86, 3);
|
||||
lean_ctor_release(x_86, 4);
|
||||
lean_ctor_release(x_86, 5);
|
||||
lean_ctor_release(x_86, 6);
|
||||
x_94 = x_86;
|
||||
} else {
|
||||
lean_dec_ref(x_86);
|
||||
x_94 = lean_box(0);
|
||||
}
|
||||
if (lean_is_scalar(x_94)) {
|
||||
x_95 = lean_alloc_ctor(0, 7, 0);
|
||||
} else {
|
||||
x_95 = x_94;
|
||||
}
|
||||
lean_ctor_set(x_95, 0, x_88);
|
||||
lean_ctor_set(x_95, 1, x_89);
|
||||
lean_ctor_set(x_95, 2, x_8);
|
||||
lean_ctor_set(x_95, 3, x_90);
|
||||
lean_ctor_set(x_95, 4, x_91);
|
||||
lean_ctor_set(x_95, 5, x_92);
|
||||
lean_ctor_set(x_95, 6, x_93);
|
||||
x_96 = lean_st_ref_set(x_3, x_95, x_87);
|
||||
lean_dec(x_3);
|
||||
x_97 = lean_ctor_get(x_96, 1);
|
||||
lean_inc(x_97);
|
||||
if (lean_is_exclusive(x_96)) {
|
||||
lean_ctor_release(x_96, 0);
|
||||
lean_ctor_release(x_96, 1);
|
||||
x_98 = x_96;
|
||||
} else {
|
||||
lean_dec_ref(x_96);
|
||||
x_98 = lean_box(0);
|
||||
}
|
||||
if (lean_is_scalar(x_98)) {
|
||||
x_99 = lean_alloc_ctor(0, 2, 0);
|
||||
} else {
|
||||
x_99 = x_98;
|
||||
}
|
||||
lean_ctor_set(x_99, 0, x_83);
|
||||
lean_ctor_set(x_99, 1, x_97);
|
||||
return x_99;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_100; lean_object* x_101; lean_object* x_102; lean_object* x_103; lean_object* x_104; lean_object* x_105; lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116;
|
||||
x_100 = lean_ctor_get(x_82, 0);
|
||||
lean_inc(x_100);
|
||||
x_101 = lean_ctor_get(x_82, 1);
|
||||
lean_inc(x_101);
|
||||
lean_dec(x_82);
|
||||
x_102 = lean_st_ref_take(x_3, x_101);
|
||||
x_103 = lean_ctor_get(x_102, 0);
|
||||
lean_inc(x_103);
|
||||
x_104 = lean_ctor_get(x_102, 1);
|
||||
lean_inc(x_104);
|
||||
lean_dec(x_102);
|
||||
x_105 = lean_ctor_get(x_103, 0);
|
||||
lean_inc(x_105);
|
||||
x_106 = lean_ctor_get(x_103, 1);
|
||||
lean_inc(x_106);
|
||||
x_107 = lean_ctor_get(x_103, 3);
|
||||
lean_inc(x_107);
|
||||
x_108 = lean_ctor_get(x_103, 4);
|
||||
lean_inc(x_108);
|
||||
x_109 = lean_ctor_get(x_103, 5);
|
||||
lean_inc(x_109);
|
||||
x_110 = lean_ctor_get(x_103, 6);
|
||||
lean_inc(x_110);
|
||||
if (lean_is_exclusive(x_103)) {
|
||||
lean_ctor_release(x_103, 0);
|
||||
lean_ctor_release(x_103, 1);
|
||||
lean_ctor_release(x_103, 2);
|
||||
lean_ctor_release(x_103, 3);
|
||||
lean_ctor_release(x_103, 4);
|
||||
lean_ctor_release(x_103, 5);
|
||||
lean_ctor_release(x_103, 6);
|
||||
x_111 = x_103;
|
||||
} else {
|
||||
lean_dec_ref(x_103);
|
||||
x_111 = lean_box(0);
|
||||
}
|
||||
if (lean_is_scalar(x_111)) {
|
||||
x_112 = lean_alloc_ctor(0, 7, 0);
|
||||
} else {
|
||||
x_112 = x_111;
|
||||
}
|
||||
lean_ctor_set(x_112, 0, x_105);
|
||||
lean_ctor_set(x_112, 1, x_106);
|
||||
lean_ctor_set(x_112, 2, x_8);
|
||||
lean_ctor_set(x_112, 3, x_107);
|
||||
lean_ctor_set(x_112, 4, x_108);
|
||||
lean_ctor_set(x_112, 5, x_109);
|
||||
lean_ctor_set(x_112, 6, x_110);
|
||||
x_113 = lean_st_ref_set(x_3, x_112, x_104);
|
||||
lean_dec(x_3);
|
||||
x_114 = lean_ctor_get(x_113, 1);
|
||||
lean_inc(x_114);
|
||||
if (lean_is_exclusive(x_113)) {
|
||||
lean_ctor_release(x_113, 0);
|
||||
lean_ctor_release(x_113, 1);
|
||||
x_115 = x_113;
|
||||
} else {
|
||||
lean_dec_ref(x_113);
|
||||
x_115 = lean_box(0);
|
||||
}
|
||||
if (lean_is_scalar(x_115)) {
|
||||
x_116 = lean_alloc_ctor(1, 2, 0);
|
||||
} else {
|
||||
x_116 = x_115;
|
||||
lean_ctor_set_tag(x_116, 1);
|
||||
}
|
||||
lean_ctor_set(x_116, 0, x_100);
|
||||
lean_ctor_set(x_116, 1, x_114);
|
||||
return x_116;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_saveBase___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_7; uint8_t x_8;
|
||||
lean_object* x_7;
|
||||
lean_inc(x_5);
|
||||
lean_inc(x_4);
|
||||
lean_inc(x_1);
|
||||
x_7 = l_Lean_Compiler_LCNF_Decl_saveBase(x_1, x_4, x_5, x_6);
|
||||
x_8 = !lean_is_exclusive(x_7);
|
||||
if (x_8 == 0)
|
||||
x_7 = l_Lean_Compiler_LCNF_normalizeFVarIds(x_1, x_4, x_5, x_6);
|
||||
if (lean_obj_tag(x_7) == 0)
|
||||
{
|
||||
lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11;
|
||||
x_8 = lean_ctor_get(x_7, 0);
|
||||
lean_inc(x_8);
|
||||
x_9 = lean_ctor_get(x_7, 1);
|
||||
lean_inc(x_9);
|
||||
lean_dec(x_7);
|
||||
x_10 = l_Lean_Compiler_LCNF_Decl_saveBase(x_8, x_4, x_5, x_9);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
x_11 = !lean_is_exclusive(x_10);
|
||||
if (x_11 == 0)
|
||||
{
|
||||
lean_object* x_12;
|
||||
x_12 = lean_ctor_get(x_10, 0);
|
||||
lean_dec(x_12);
|
||||
lean_ctor_set(x_10, 0, x_1);
|
||||
return x_10;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_13; lean_object* x_14;
|
||||
x_13 = lean_ctor_get(x_10, 1);
|
||||
lean_inc(x_13);
|
||||
lean_dec(x_10);
|
||||
x_14 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_14, 0, x_1);
|
||||
lean_ctor_set(x_14, 1, x_13);
|
||||
return x_14;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_15;
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_1);
|
||||
x_15 = !lean_is_exclusive(x_7);
|
||||
if (x_15 == 0)
|
||||
{
|
||||
lean_object* x_9;
|
||||
x_9 = lean_ctor_get(x_7, 0);
|
||||
lean_dec(x_9);
|
||||
lean_ctor_set(x_7, 0, x_1);
|
||||
return x_7;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_10; lean_object* x_11;
|
||||
x_10 = lean_ctor_get(x_7, 1);
|
||||
lean_inc(x_10);
|
||||
lean_object* x_16; lean_object* x_17; lean_object* x_18;
|
||||
x_16 = lean_ctor_get(x_7, 0);
|
||||
x_17 = lean_ctor_get(x_7, 1);
|
||||
lean_inc(x_17);
|
||||
lean_inc(x_16);
|
||||
lean_dec(x_7);
|
||||
x_11 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_11, 0, x_1);
|
||||
lean_ctor_set(x_11, 1, x_10);
|
||||
return x_11;
|
||||
x_18 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_18, 0, x_16);
|
||||
lean_ctor_set(x_18, 1, x_17);
|
||||
return x_18;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1898,8 +2417,6 @@ _start:
|
|||
{
|
||||
lean_object* x_7;
|
||||
x_7 = l_Lean_Compiler_LCNF_saveBase___lambda__1(x_1, x_2, x_3, x_4, x_5, x_6);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
return x_7;
|
||||
|
|
@ -2605,6 +3122,18 @@ l_Lean_Compiler_LCNF_getBaseDeclCore_x3f___closed__2 = _init_l_Lean_Compiler_LCN
|
|||
lean_mark_persistent(l_Lean_Compiler_LCNF_getBaseDeclCore_x3f___closed__2);
|
||||
l_Lean_Compiler_LCNF_Decl_saveBase___closed__1 = _init_l_Lean_Compiler_LCNF_Decl_saveBase___closed__1();
|
||||
lean_mark_persistent(l_Lean_Compiler_LCNF_Decl_saveBase___closed__1);
|
||||
l_Lean_Compiler_LCNF_normalizeFVarIds___closed__1 = _init_l_Lean_Compiler_LCNF_normalizeFVarIds___closed__1();
|
||||
lean_mark_persistent(l_Lean_Compiler_LCNF_normalizeFVarIds___closed__1);
|
||||
l_Lean_Compiler_LCNF_normalizeFVarIds___closed__2 = _init_l_Lean_Compiler_LCNF_normalizeFVarIds___closed__2();
|
||||
lean_mark_persistent(l_Lean_Compiler_LCNF_normalizeFVarIds___closed__2);
|
||||
l_Lean_Compiler_LCNF_normalizeFVarIds___closed__3 = _init_l_Lean_Compiler_LCNF_normalizeFVarIds___closed__3();
|
||||
lean_mark_persistent(l_Lean_Compiler_LCNF_normalizeFVarIds___closed__3);
|
||||
l_Lean_Compiler_LCNF_normalizeFVarIds___closed__4 = _init_l_Lean_Compiler_LCNF_normalizeFVarIds___closed__4();
|
||||
lean_mark_persistent(l_Lean_Compiler_LCNF_normalizeFVarIds___closed__4);
|
||||
l_Lean_Compiler_LCNF_normalizeFVarIds___closed__5 = _init_l_Lean_Compiler_LCNF_normalizeFVarIds___closed__5();
|
||||
lean_mark_persistent(l_Lean_Compiler_LCNF_normalizeFVarIds___closed__5);
|
||||
l_Lean_Compiler_LCNF_normalizeFVarIds___closed__6 = _init_l_Lean_Compiler_LCNF_normalizeFVarIds___closed__6();
|
||||
lean_mark_persistent(l_Lean_Compiler_LCNF_normalizeFVarIds___closed__6);
|
||||
l_Lean_Compiler_LCNF_saveBase___closed__1 = _init_l_Lean_Compiler_LCNF_saveBase___closed__1();
|
||||
lean_mark_persistent(l_Lean_Compiler_LCNF_saveBase___closed__1);
|
||||
l_Lean_Compiler_LCNF_saveBase___closed__2 = _init_l_Lean_Compiler_LCNF_saveBase___closed__2();
|
||||
|
|
|
|||
433
stage0/stdlib/Lean/Compiler/LCNF/Simp/SimpValue.c
generated
433
stage0/stdlib/Lean/Compiler/LCNF/Simp/SimpValue.c
generated
|
|
@ -59,7 +59,7 @@ LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Simp_simpValue_x3f___boxed(lean_ob
|
|||
uint8_t lean_expr_eqv(lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Compiler_LCNF_Simp_simpAppApp_x3f___closed__1;
|
||||
LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Simp_simpCtorDiscr_x3f___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l_Lean_Compiler_LCNF_compatibleTypes(lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Compiler_LCNF_compatibleTypes(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Compiler_LCNF_Simp_applyImplementedBy_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_findAux___at_Lean_Compiler_LCNF_Simp_simpCtorDiscr_x3f___spec__2(lean_object*, size_t, lean_object*);
|
||||
static lean_object* l_Lean_Compiler_LCNF_Simp_simpAppApp_x3f___closed__2;
|
||||
|
|
@ -1083,95 +1083,142 @@ lean_inc(x_16);
|
|||
x_17 = lean_ctor_get(x_15, 1);
|
||||
lean_inc(x_17);
|
||||
lean_dec(x_15);
|
||||
lean_inc(x_7);
|
||||
lean_inc(x_6);
|
||||
lean_inc(x_5);
|
||||
lean_inc(x_4);
|
||||
x_18 = l_Lean_Compiler_LCNF_inferType(x_1, x_4, x_5, x_6, x_7, x_17);
|
||||
if (lean_obj_tag(x_18) == 0)
|
||||
{
|
||||
uint8_t x_19;
|
||||
x_19 = !lean_is_exclusive(x_18);
|
||||
if (x_19 == 0)
|
||||
{
|
||||
lean_object* x_20; uint8_t x_21;
|
||||
x_20 = lean_ctor_get(x_18, 0);
|
||||
x_21 = l_Lean_Compiler_LCNF_compatibleTypes(x_16, x_20);
|
||||
if (x_21 == 0)
|
||||
{
|
||||
lean_object* x_22;
|
||||
lean_free_object(x_10);
|
||||
lean_dec(x_14);
|
||||
x_22 = lean_box(0);
|
||||
lean_ctor_set(x_18, 0, x_22);
|
||||
return x_18;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_23;
|
||||
x_23 = l_Lean_Expr_fvar___override(x_14);
|
||||
lean_ctor_set(x_10, 0, x_23);
|
||||
lean_ctor_set(x_18, 0, x_10);
|
||||
return x_18;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_24; lean_object* x_25; uint8_t x_26;
|
||||
x_24 = lean_ctor_get(x_18, 0);
|
||||
x_25 = lean_ctor_get(x_18, 1);
|
||||
lean_inc(x_25);
|
||||
lean_inc(x_24);
|
||||
lean_object* x_19; lean_object* x_20; lean_object* x_21;
|
||||
x_19 = lean_ctor_get(x_18, 0);
|
||||
lean_inc(x_19);
|
||||
x_20 = lean_ctor_get(x_18, 1);
|
||||
lean_inc(x_20);
|
||||
lean_dec(x_18);
|
||||
x_26 = l_Lean_Compiler_LCNF_compatibleTypes(x_16, x_24);
|
||||
if (x_26 == 0)
|
||||
x_21 = l_Lean_Compiler_LCNF_compatibleTypes(x_16, x_19, x_4, x_5, x_6, x_7, x_20);
|
||||
if (lean_obj_tag(x_21) == 0)
|
||||
{
|
||||
lean_object* x_27; lean_object* x_28;
|
||||
lean_object* x_22; uint8_t x_23;
|
||||
x_22 = lean_ctor_get(x_21, 0);
|
||||
lean_inc(x_22);
|
||||
x_23 = lean_unbox(x_22);
|
||||
lean_dec(x_22);
|
||||
if (x_23 == 0)
|
||||
{
|
||||
uint8_t x_24;
|
||||
lean_free_object(x_10);
|
||||
lean_dec(x_14);
|
||||
x_27 = lean_box(0);
|
||||
x_28 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_28, 0, x_27);
|
||||
lean_ctor_set(x_28, 1, x_25);
|
||||
return x_28;
|
||||
x_24 = !lean_is_exclusive(x_21);
|
||||
if (x_24 == 0)
|
||||
{
|
||||
lean_object* x_25; lean_object* x_26;
|
||||
x_25 = lean_ctor_get(x_21, 0);
|
||||
lean_dec(x_25);
|
||||
x_26 = lean_box(0);
|
||||
lean_ctor_set(x_21, 0, x_26);
|
||||
return x_21;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_29; lean_object* x_30;
|
||||
x_29 = l_Lean_Expr_fvar___override(x_14);
|
||||
lean_ctor_set(x_10, 0, x_29);
|
||||
x_30 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_30, 0, x_10);
|
||||
lean_ctor_set(x_30, 1, x_25);
|
||||
return x_30;
|
||||
lean_object* x_27; lean_object* x_28; lean_object* x_29;
|
||||
x_27 = lean_ctor_get(x_21, 1);
|
||||
lean_inc(x_27);
|
||||
lean_dec(x_21);
|
||||
x_28 = lean_box(0);
|
||||
x_29 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_29, 0, x_28);
|
||||
lean_ctor_set(x_29, 1, x_27);
|
||||
return x_29;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_30;
|
||||
x_30 = !lean_is_exclusive(x_21);
|
||||
if (x_30 == 0)
|
||||
{
|
||||
lean_object* x_31; lean_object* x_32;
|
||||
x_31 = lean_ctor_get(x_21, 0);
|
||||
lean_dec(x_31);
|
||||
x_32 = l_Lean_Expr_fvar___override(x_14);
|
||||
lean_ctor_set(x_10, 0, x_32);
|
||||
lean_ctor_set(x_21, 0, x_10);
|
||||
return x_21;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_33; lean_object* x_34; lean_object* x_35;
|
||||
x_33 = lean_ctor_get(x_21, 1);
|
||||
lean_inc(x_33);
|
||||
lean_dec(x_21);
|
||||
x_34 = l_Lean_Expr_fvar___override(x_14);
|
||||
lean_ctor_set(x_10, 0, x_34);
|
||||
x_35 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_35, 0, x_10);
|
||||
lean_ctor_set(x_35, 1, x_33);
|
||||
return x_35;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_31;
|
||||
uint8_t x_36;
|
||||
lean_free_object(x_10);
|
||||
lean_dec(x_14);
|
||||
x_36 = !lean_is_exclusive(x_21);
|
||||
if (x_36 == 0)
|
||||
{
|
||||
return x_21;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_37; lean_object* x_38; lean_object* x_39;
|
||||
x_37 = lean_ctor_get(x_21, 0);
|
||||
x_38 = lean_ctor_get(x_21, 1);
|
||||
lean_inc(x_38);
|
||||
lean_inc(x_37);
|
||||
lean_dec(x_21);
|
||||
x_39 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_39, 0, x_37);
|
||||
lean_ctor_set(x_39, 1, x_38);
|
||||
return x_39;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_40;
|
||||
lean_dec(x_16);
|
||||
lean_free_object(x_10);
|
||||
lean_dec(x_14);
|
||||
x_31 = !lean_is_exclusive(x_18);
|
||||
if (x_31 == 0)
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
x_40 = !lean_is_exclusive(x_18);
|
||||
if (x_40 == 0)
|
||||
{
|
||||
return x_18;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_32; lean_object* x_33; lean_object* x_34;
|
||||
x_32 = lean_ctor_get(x_18, 0);
|
||||
x_33 = lean_ctor_get(x_18, 1);
|
||||
lean_inc(x_33);
|
||||
lean_inc(x_32);
|
||||
lean_object* x_41; lean_object* x_42; lean_object* x_43;
|
||||
x_41 = lean_ctor_get(x_18, 0);
|
||||
x_42 = lean_ctor_get(x_18, 1);
|
||||
lean_inc(x_42);
|
||||
lean_inc(x_41);
|
||||
lean_dec(x_18);
|
||||
x_34 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_34, 0, x_32);
|
||||
lean_ctor_set(x_34, 1, x_33);
|
||||
return x_34;
|
||||
x_43 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_43, 0, x_41);
|
||||
lean_ctor_set(x_43, 1, x_42);
|
||||
return x_43;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_35;
|
||||
uint8_t x_44;
|
||||
lean_free_object(x_10);
|
||||
lean_dec(x_14);
|
||||
lean_dec(x_7);
|
||||
|
|
@ -1179,145 +1226,199 @@ lean_dec(x_6);
|
|||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_1);
|
||||
x_35 = !lean_is_exclusive(x_15);
|
||||
if (x_35 == 0)
|
||||
x_44 = !lean_is_exclusive(x_15);
|
||||
if (x_44 == 0)
|
||||
{
|
||||
return x_15;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_36; lean_object* x_37; lean_object* x_38;
|
||||
x_36 = lean_ctor_get(x_15, 0);
|
||||
x_37 = lean_ctor_get(x_15, 1);
|
||||
lean_inc(x_37);
|
||||
lean_inc(x_36);
|
||||
lean_object* x_45; lean_object* x_46; lean_object* x_47;
|
||||
x_45 = lean_ctor_get(x_15, 0);
|
||||
x_46 = lean_ctor_get(x_15, 1);
|
||||
lean_inc(x_46);
|
||||
lean_inc(x_45);
|
||||
lean_dec(x_15);
|
||||
x_38 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_38, 0, x_36);
|
||||
lean_ctor_set(x_38, 1, x_37);
|
||||
return x_38;
|
||||
x_47 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_47, 0, x_45);
|
||||
lean_ctor_set(x_47, 1, x_46);
|
||||
return x_47;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_39; lean_object* x_40;
|
||||
x_39 = lean_ctor_get(x_10, 0);
|
||||
lean_inc(x_39);
|
||||
lean_dec(x_10);
|
||||
lean_inc(x_39);
|
||||
x_40 = l_Lean_Compiler_LCNF_getType(x_39, x_4, x_5, x_6, x_7, x_8);
|
||||
if (lean_obj_tag(x_40) == 0)
|
||||
{
|
||||
lean_object* x_41; lean_object* x_42; lean_object* x_43;
|
||||
x_41 = lean_ctor_get(x_40, 0);
|
||||
lean_inc(x_41);
|
||||
x_42 = lean_ctor_get(x_40, 1);
|
||||
lean_inc(x_42);
|
||||
lean_dec(x_40);
|
||||
x_43 = l_Lean_Compiler_LCNF_inferType(x_1, x_4, x_5, x_6, x_7, x_42);
|
||||
if (lean_obj_tag(x_43) == 0)
|
||||
{
|
||||
lean_object* x_44; lean_object* x_45; lean_object* x_46; uint8_t x_47;
|
||||
x_44 = lean_ctor_get(x_43, 0);
|
||||
lean_inc(x_44);
|
||||
x_45 = lean_ctor_get(x_43, 1);
|
||||
lean_inc(x_45);
|
||||
if (lean_is_exclusive(x_43)) {
|
||||
lean_ctor_release(x_43, 0);
|
||||
lean_ctor_release(x_43, 1);
|
||||
x_46 = x_43;
|
||||
} else {
|
||||
lean_dec_ref(x_43);
|
||||
x_46 = lean_box(0);
|
||||
}
|
||||
x_47 = l_Lean_Compiler_LCNF_compatibleTypes(x_41, x_44);
|
||||
if (x_47 == 0)
|
||||
{
|
||||
lean_object* x_48; lean_object* x_49;
|
||||
lean_dec(x_39);
|
||||
x_48 = lean_box(0);
|
||||
if (lean_is_scalar(x_46)) {
|
||||
x_49 = lean_alloc_ctor(0, 2, 0);
|
||||
} else {
|
||||
x_49 = x_46;
|
||||
}
|
||||
lean_ctor_set(x_49, 0, x_48);
|
||||
lean_ctor_set(x_49, 1, x_45);
|
||||
return x_49;
|
||||
}
|
||||
else
|
||||
x_48 = lean_ctor_get(x_10, 0);
|
||||
lean_inc(x_48);
|
||||
lean_dec(x_10);
|
||||
lean_inc(x_48);
|
||||
x_49 = l_Lean_Compiler_LCNF_getType(x_48, x_4, x_5, x_6, x_7, x_8);
|
||||
if (lean_obj_tag(x_49) == 0)
|
||||
{
|
||||
lean_object* x_50; lean_object* x_51; lean_object* x_52;
|
||||
x_50 = l_Lean_Expr_fvar___override(x_39);
|
||||
x_51 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_51, 0, x_50);
|
||||
if (lean_is_scalar(x_46)) {
|
||||
x_52 = lean_alloc_ctor(0, 2, 0);
|
||||
} else {
|
||||
x_52 = x_46;
|
||||
}
|
||||
lean_ctor_set(x_52, 0, x_51);
|
||||
lean_ctor_set(x_52, 1, x_45);
|
||||
return x_52;
|
||||
}
|
||||
}
|
||||
else
|
||||
x_50 = lean_ctor_get(x_49, 0);
|
||||
lean_inc(x_50);
|
||||
x_51 = lean_ctor_get(x_49, 1);
|
||||
lean_inc(x_51);
|
||||
lean_dec(x_49);
|
||||
lean_inc(x_7);
|
||||
lean_inc(x_6);
|
||||
lean_inc(x_5);
|
||||
lean_inc(x_4);
|
||||
x_52 = l_Lean_Compiler_LCNF_inferType(x_1, x_4, x_5, x_6, x_7, x_51);
|
||||
if (lean_obj_tag(x_52) == 0)
|
||||
{
|
||||
lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56;
|
||||
lean_dec(x_41);
|
||||
lean_dec(x_39);
|
||||
x_53 = lean_ctor_get(x_43, 0);
|
||||
lean_object* x_53; lean_object* x_54; lean_object* x_55;
|
||||
x_53 = lean_ctor_get(x_52, 0);
|
||||
lean_inc(x_53);
|
||||
x_54 = lean_ctor_get(x_43, 1);
|
||||
x_54 = lean_ctor_get(x_52, 1);
|
||||
lean_inc(x_54);
|
||||
if (lean_is_exclusive(x_43)) {
|
||||
lean_ctor_release(x_43, 0);
|
||||
lean_ctor_release(x_43, 1);
|
||||
x_55 = x_43;
|
||||
lean_dec(x_52);
|
||||
x_55 = l_Lean_Compiler_LCNF_compatibleTypes(x_50, x_53, x_4, x_5, x_6, x_7, x_54);
|
||||
if (lean_obj_tag(x_55) == 0)
|
||||
{
|
||||
lean_object* x_56; uint8_t x_57;
|
||||
x_56 = lean_ctor_get(x_55, 0);
|
||||
lean_inc(x_56);
|
||||
x_57 = lean_unbox(x_56);
|
||||
lean_dec(x_56);
|
||||
if (x_57 == 0)
|
||||
{
|
||||
lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61;
|
||||
lean_dec(x_48);
|
||||
x_58 = lean_ctor_get(x_55, 1);
|
||||
lean_inc(x_58);
|
||||
if (lean_is_exclusive(x_55)) {
|
||||
lean_ctor_release(x_55, 0);
|
||||
lean_ctor_release(x_55, 1);
|
||||
x_59 = x_55;
|
||||
} else {
|
||||
lean_dec_ref(x_43);
|
||||
x_55 = lean_box(0);
|
||||
lean_dec_ref(x_55);
|
||||
x_59 = lean_box(0);
|
||||
}
|
||||
if (lean_is_scalar(x_55)) {
|
||||
x_56 = lean_alloc_ctor(1, 2, 0);
|
||||
x_60 = lean_box(0);
|
||||
if (lean_is_scalar(x_59)) {
|
||||
x_61 = lean_alloc_ctor(0, 2, 0);
|
||||
} else {
|
||||
x_56 = x_55;
|
||||
x_61 = x_59;
|
||||
}
|
||||
lean_ctor_set(x_56, 0, x_53);
|
||||
lean_ctor_set(x_56, 1, x_54);
|
||||
return x_56;
|
||||
lean_ctor_set(x_61, 0, x_60);
|
||||
lean_ctor_set(x_61, 1, x_58);
|
||||
return x_61;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66;
|
||||
x_62 = lean_ctor_get(x_55, 1);
|
||||
lean_inc(x_62);
|
||||
if (lean_is_exclusive(x_55)) {
|
||||
lean_ctor_release(x_55, 0);
|
||||
lean_ctor_release(x_55, 1);
|
||||
x_63 = x_55;
|
||||
} else {
|
||||
lean_dec_ref(x_55);
|
||||
x_63 = lean_box(0);
|
||||
}
|
||||
x_64 = l_Lean_Expr_fvar___override(x_48);
|
||||
x_65 = lean_alloc_ctor(1, 1, 0);
|
||||
lean_ctor_set(x_65, 0, x_64);
|
||||
if (lean_is_scalar(x_63)) {
|
||||
x_66 = lean_alloc_ctor(0, 2, 0);
|
||||
} else {
|
||||
x_66 = x_63;
|
||||
}
|
||||
lean_ctor_set(x_66, 0, x_65);
|
||||
lean_ctor_set(x_66, 1, x_62);
|
||||
return x_66;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60;
|
||||
lean_dec(x_39);
|
||||
lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70;
|
||||
lean_dec(x_48);
|
||||
x_67 = lean_ctor_get(x_55, 0);
|
||||
lean_inc(x_67);
|
||||
x_68 = lean_ctor_get(x_55, 1);
|
||||
lean_inc(x_68);
|
||||
if (lean_is_exclusive(x_55)) {
|
||||
lean_ctor_release(x_55, 0);
|
||||
lean_ctor_release(x_55, 1);
|
||||
x_69 = x_55;
|
||||
} else {
|
||||
lean_dec_ref(x_55);
|
||||
x_69 = lean_box(0);
|
||||
}
|
||||
if (lean_is_scalar(x_69)) {
|
||||
x_70 = lean_alloc_ctor(1, 2, 0);
|
||||
} else {
|
||||
x_70 = x_69;
|
||||
}
|
||||
lean_ctor_set(x_70, 0, x_67);
|
||||
lean_ctor_set(x_70, 1, x_68);
|
||||
return x_70;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74;
|
||||
lean_dec(x_50);
|
||||
lean_dec(x_48);
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
x_71 = lean_ctor_get(x_52, 0);
|
||||
lean_inc(x_71);
|
||||
x_72 = lean_ctor_get(x_52, 1);
|
||||
lean_inc(x_72);
|
||||
if (lean_is_exclusive(x_52)) {
|
||||
lean_ctor_release(x_52, 0);
|
||||
lean_ctor_release(x_52, 1);
|
||||
x_73 = x_52;
|
||||
} else {
|
||||
lean_dec_ref(x_52);
|
||||
x_73 = lean_box(0);
|
||||
}
|
||||
if (lean_is_scalar(x_73)) {
|
||||
x_74 = lean_alloc_ctor(1, 2, 0);
|
||||
} else {
|
||||
x_74 = x_73;
|
||||
}
|
||||
lean_ctor_set(x_74, 0, x_71);
|
||||
lean_ctor_set(x_74, 1, x_72);
|
||||
return x_74;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78;
|
||||
lean_dec(x_48);
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_4);
|
||||
lean_dec(x_1);
|
||||
x_57 = lean_ctor_get(x_40, 0);
|
||||
lean_inc(x_57);
|
||||
x_58 = lean_ctor_get(x_40, 1);
|
||||
lean_inc(x_58);
|
||||
if (lean_is_exclusive(x_40)) {
|
||||
lean_ctor_release(x_40, 0);
|
||||
lean_ctor_release(x_40, 1);
|
||||
x_59 = x_40;
|
||||
x_75 = lean_ctor_get(x_49, 0);
|
||||
lean_inc(x_75);
|
||||
x_76 = lean_ctor_get(x_49, 1);
|
||||
lean_inc(x_76);
|
||||
if (lean_is_exclusive(x_49)) {
|
||||
lean_ctor_release(x_49, 0);
|
||||
lean_ctor_release(x_49, 1);
|
||||
x_77 = x_49;
|
||||
} else {
|
||||
lean_dec_ref(x_40);
|
||||
x_59 = lean_box(0);
|
||||
lean_dec_ref(x_49);
|
||||
x_77 = lean_box(0);
|
||||
}
|
||||
if (lean_is_scalar(x_59)) {
|
||||
x_60 = lean_alloc_ctor(1, 2, 0);
|
||||
if (lean_is_scalar(x_77)) {
|
||||
x_78 = lean_alloc_ctor(1, 2, 0);
|
||||
} else {
|
||||
x_60 = x_59;
|
||||
x_78 = x_77;
|
||||
}
|
||||
lean_ctor_set(x_60, 0, x_57);
|
||||
lean_ctor_set(x_60, 1, x_58);
|
||||
return x_60;
|
||||
lean_ctor_set(x_78, 0, x_75);
|
||||
lean_ctor_set(x_78, 1, x_76);
|
||||
return x_78;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
6170
stage0/stdlib/Lean/Compiler/LCNF/ToLCNF.c
generated
6170
stage0/stdlib/Lean/Compiler/LCNF/ToLCNF.c
generated
File diff suppressed because it is too large
Load diff
519
stage0/stdlib/Lean/Elab/App.c
generated
519
stage0/stdlib/Lean/Elab/App.c
generated
|
|
@ -144,7 +144,7 @@ static lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_App___hyg_6571____l
|
|||
LEAN_EXPORT lean_object* l___private_Lean_MetavarContext_0__Lean_DependsOn_dep_visitMain___at___private_Lean_Elab_App_0__Lean_Elab_Term_ElabAppArgs_anyNamedArgDependsOnCurrent___spec__12___boxed(lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_throwError___at___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppFn___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_resolveDotName___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_getElimInfo(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_Meta_getElimInfo(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l___private_Lean_MetavarContext_0__Lean_DependsOn_dep_visitApp___at___private_Lean_Elab_App_0__Lean_Elab_Term_ElabAppArgs_anyNamedArgDependsOnCurrent___spec__45___boxed(lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_maxRecDepthErrorMessage;
|
||||
lean_object* lean_array_uset(lean_object*, size_t, lean_object*);
|
||||
|
|
@ -1036,7 +1036,7 @@ lean_object* l_Lean_Elab_Term_registerSyntheticMVarWithCurrRef(lean_object*, lea
|
|||
LEAN_EXPORT lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_ElabAppArgs_finalize___lambda__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppAux___spec__5___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l_Lean_Syntax_isOfKind(lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabAppArgs_elabAsElim_x3f___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabAppArgs_elabAsElim_x3f___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l___private_Lean_Elab_App_0__Lean_Elab_Term_elabAppFn(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, uint8_t, uint8_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
uint8_t l_Lean_Expr_isOptParam(lean_object*);
|
||||
static lean_object* l_Std_Range_forIn_loop___at___private_Lean_Elab_App_0__Lean_Elab_Term_ElabAppArgs_anyNamedArgDependsOnCurrent___spec__51___closed__1;
|
||||
|
|
@ -1070,7 +1070,7 @@ LEAN_EXPORT lean_object* l_Lean_throwError___at_Lean_Elab_Term_throwInvalidNamed
|
|||
LEAN_EXPORT lean_object* l_Lean_addTrace___at___private_Lean_Elab_App_0__Lean_Elab_Term_ElabAppArgs_propagateExpectedType___spec__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Meta_transform_visit_visitForall___at_Lean_Elab_Term_ElabElim_revertArgs___spec__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabAppArgs___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabAppArgs_elabAsElim_x3f___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabAppArgs_elabAsElim_x3f___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
extern lean_object* l_Lean_Elab_unsupportedSyntaxExceptionId;
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_Term_ElabAppArgs_main(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_findField_x3f(lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -18490,203 +18490,204 @@ return x_2;
|
|||
LEAN_EXPORT lean_object* l_Lean_Elab_Term_initFn____x40_Lean_Elab_App___hyg_6571____lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_21; lean_object* x_22;
|
||||
x_5 = lean_st_ref_get(x_3, x_4);
|
||||
x_6 = lean_ctor_get(x_5, 1);
|
||||
lean_inc(x_6);
|
||||
lean_dec(x_5);
|
||||
x_7 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_App___hyg_6571____lambda__1___closed__22;
|
||||
x_8 = lean_st_mk_ref(x_7, x_6);
|
||||
x_9 = lean_ctor_get(x_8, 0);
|
||||
lean_inc(x_9);
|
||||
x_10 = lean_ctor_get(x_8, 1);
|
||||
lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_22; lean_object* x_23;
|
||||
x_5 = lean_box(0);
|
||||
x_6 = lean_st_ref_get(x_3, x_4);
|
||||
x_7 = lean_ctor_get(x_6, 1);
|
||||
lean_inc(x_7);
|
||||
lean_dec(x_6);
|
||||
x_8 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_App___hyg_6571____lambda__1___closed__22;
|
||||
x_9 = lean_st_mk_ref(x_8, x_7);
|
||||
x_10 = lean_ctor_get(x_9, 0);
|
||||
lean_inc(x_10);
|
||||
lean_dec(x_8);
|
||||
x_21 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_App___hyg_6571____lambda__1___closed__9;
|
||||
x_11 = lean_ctor_get(x_9, 1);
|
||||
lean_inc(x_11);
|
||||
lean_dec(x_9);
|
||||
x_22 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_App___hyg_6571____lambda__1___closed__9;
|
||||
lean_inc(x_3);
|
||||
lean_inc(x_2);
|
||||
lean_inc(x_9);
|
||||
lean_inc(x_10);
|
||||
lean_inc(x_1);
|
||||
x_22 = l_Lean_Meta_getElimInfo(x_1, x_21, x_9, x_2, x_3, x_10);
|
||||
if (lean_obj_tag(x_22) == 0)
|
||||
x_23 = l_Lean_Meta_getElimInfo(x_1, x_5, x_22, x_10, x_2, x_3, x_11);
|
||||
if (lean_obj_tag(x_23) == 0)
|
||||
{
|
||||
lean_object* x_23; lean_object* x_24;
|
||||
x_23 = lean_ctor_get(x_22, 1);
|
||||
lean_inc(x_23);
|
||||
lean_dec(x_22);
|
||||
x_24 = l_Lean_getConstInfo___at_Lean_Meta_mkConstWithFreshMVarLevels___spec__1(x_1, x_21, x_9, x_2, x_3, x_23);
|
||||
if (lean_obj_tag(x_24) == 0)
|
||||
lean_object* x_24; lean_object* x_25;
|
||||
x_24 = lean_ctor_get(x_23, 1);
|
||||
lean_inc(x_24);
|
||||
lean_dec(x_23);
|
||||
x_25 = l_Lean_getConstInfo___at_Lean_Meta_mkConstWithFreshMVarLevels___spec__1(x_1, x_22, x_10, x_2, x_3, x_24);
|
||||
if (lean_obj_tag(x_25) == 0)
|
||||
{
|
||||
lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29;
|
||||
x_25 = lean_ctor_get(x_24, 0);
|
||||
lean_inc(x_25);
|
||||
x_26 = lean_ctor_get(x_24, 1);
|
||||
lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30;
|
||||
x_26 = lean_ctor_get(x_25, 0);
|
||||
lean_inc(x_26);
|
||||
lean_dec(x_24);
|
||||
x_27 = l_Lean_ConstantInfo_type(x_25);
|
||||
x_27 = lean_ctor_get(x_25, 1);
|
||||
lean_inc(x_27);
|
||||
lean_dec(x_25);
|
||||
x_28 = l___private_Lean_Elab_App_0__Lean_Elab_Term_hasOptAutoParams___closed__1;
|
||||
x_28 = l_Lean_ConstantInfo_type(x_26);
|
||||
lean_dec(x_26);
|
||||
x_29 = l___private_Lean_Elab_App_0__Lean_Elab_Term_hasOptAutoParams___closed__1;
|
||||
lean_inc(x_3);
|
||||
lean_inc(x_2);
|
||||
lean_inc(x_9);
|
||||
x_29 = l_Lean_Meta_forallTelescopeReducing___at_Lean_Meta_getParamNames___spec__2___rarg(x_27, x_28, x_21, x_9, x_2, x_3, x_26);
|
||||
if (lean_obj_tag(x_29) == 0)
|
||||
lean_inc(x_10);
|
||||
x_30 = l_Lean_Meta_forallTelescopeReducing___at_Lean_Meta_getParamNames___spec__2___rarg(x_28, x_29, x_22, x_10, x_2, x_3, x_27);
|
||||
if (lean_obj_tag(x_30) == 0)
|
||||
{
|
||||
lean_object* x_30; uint8_t x_31;
|
||||
x_30 = lean_ctor_get(x_29, 0);
|
||||
lean_inc(x_30);
|
||||
x_31 = lean_unbox(x_30);
|
||||
lean_object* x_31; uint8_t x_32;
|
||||
x_31 = lean_ctor_get(x_30, 0);
|
||||
lean_inc(x_31);
|
||||
x_32 = lean_unbox(x_31);
|
||||
lean_dec(x_31);
|
||||
if (x_32 == 0)
|
||||
{
|
||||
lean_object* x_33; lean_object* x_34;
|
||||
lean_dec(x_2);
|
||||
x_33 = lean_ctor_get(x_30, 1);
|
||||
lean_inc(x_33);
|
||||
lean_dec(x_30);
|
||||
if (x_31 == 0)
|
||||
{
|
||||
lean_object* x_32; lean_object* x_33;
|
||||
lean_dec(x_2);
|
||||
x_32 = lean_ctor_get(x_29, 1);
|
||||
lean_inc(x_32);
|
||||
lean_dec(x_29);
|
||||
x_33 = lean_box(0);
|
||||
x_11 = x_33;
|
||||
x_12 = x_32;
|
||||
goto block_20;
|
||||
x_34 = lean_box(0);
|
||||
x_12 = x_34;
|
||||
x_13 = x_33;
|
||||
goto block_21;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_34; lean_object* x_35; lean_object* x_36; uint8_t x_37;
|
||||
x_34 = lean_ctor_get(x_29, 1);
|
||||
lean_inc(x_34);
|
||||
lean_dec(x_29);
|
||||
x_35 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_App___hyg_6571____lambda__1___closed__24;
|
||||
x_36 = l_Lean_throwError___at_Lean_Meta_setInlineAttribute___spec__1(x_35, x_21, x_9, x_2, x_3, x_34);
|
||||
lean_object* x_35; lean_object* x_36; lean_object* x_37; uint8_t x_38;
|
||||
x_35 = lean_ctor_get(x_30, 1);
|
||||
lean_inc(x_35);
|
||||
lean_dec(x_30);
|
||||
x_36 = l_Lean_Elab_Term_initFn____x40_Lean_Elab_App___hyg_6571____lambda__1___closed__24;
|
||||
x_37 = l_Lean_throwError___at_Lean_Meta_setInlineAttribute___spec__1(x_36, x_22, x_10, x_2, x_3, x_35);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_9);
|
||||
x_37 = !lean_is_exclusive(x_36);
|
||||
if (x_37 == 0)
|
||||
lean_dec(x_10);
|
||||
x_38 = !lean_is_exclusive(x_37);
|
||||
if (x_38 == 0)
|
||||
{
|
||||
return x_36;
|
||||
return x_37;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_38; lean_object* x_39; lean_object* x_40;
|
||||
x_38 = lean_ctor_get(x_36, 0);
|
||||
x_39 = lean_ctor_get(x_36, 1);
|
||||
lean_object* x_39; lean_object* x_40; lean_object* x_41;
|
||||
x_39 = lean_ctor_get(x_37, 0);
|
||||
x_40 = lean_ctor_get(x_37, 1);
|
||||
lean_inc(x_40);
|
||||
lean_inc(x_39);
|
||||
lean_inc(x_38);
|
||||
lean_dec(x_36);
|
||||
x_40 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_40, 0, x_38);
|
||||
lean_ctor_set(x_40, 1, x_39);
|
||||
return x_40;
|
||||
lean_dec(x_37);
|
||||
x_41 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_41, 0, x_39);
|
||||
lean_ctor_set(x_41, 1, x_40);
|
||||
return x_41;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_41;
|
||||
lean_dec(x_9);
|
||||
uint8_t x_42;
|
||||
lean_dec(x_10);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
x_41 = !lean_is_exclusive(x_29);
|
||||
if (x_41 == 0)
|
||||
x_42 = !lean_is_exclusive(x_30);
|
||||
if (x_42 == 0)
|
||||
{
|
||||
return x_29;
|
||||
return x_30;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_42; lean_object* x_43; lean_object* x_44;
|
||||
x_42 = lean_ctor_get(x_29, 0);
|
||||
x_43 = lean_ctor_get(x_29, 1);
|
||||
lean_object* x_43; lean_object* x_44; lean_object* x_45;
|
||||
x_43 = lean_ctor_get(x_30, 0);
|
||||
x_44 = lean_ctor_get(x_30, 1);
|
||||
lean_inc(x_44);
|
||||
lean_inc(x_43);
|
||||
lean_inc(x_42);
|
||||
lean_dec(x_29);
|
||||
x_44 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_44, 0, x_42);
|
||||
lean_ctor_set(x_44, 1, x_43);
|
||||
return x_44;
|
||||
lean_dec(x_30);
|
||||
x_45 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_45, 0, x_43);
|
||||
lean_ctor_set(x_45, 1, x_44);
|
||||
return x_45;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_45;
|
||||
lean_dec(x_9);
|
||||
uint8_t x_46;
|
||||
lean_dec(x_10);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
x_45 = !lean_is_exclusive(x_24);
|
||||
if (x_45 == 0)
|
||||
x_46 = !lean_is_exclusive(x_25);
|
||||
if (x_46 == 0)
|
||||
{
|
||||
return x_24;
|
||||
return x_25;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_46; lean_object* x_47; lean_object* x_48;
|
||||
x_46 = lean_ctor_get(x_24, 0);
|
||||
x_47 = lean_ctor_get(x_24, 1);
|
||||
lean_object* x_47; lean_object* x_48; lean_object* x_49;
|
||||
x_47 = lean_ctor_get(x_25, 0);
|
||||
x_48 = lean_ctor_get(x_25, 1);
|
||||
lean_inc(x_48);
|
||||
lean_inc(x_47);
|
||||
lean_inc(x_46);
|
||||
lean_dec(x_24);
|
||||
x_48 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_48, 0, x_46);
|
||||
lean_ctor_set(x_48, 1, x_47);
|
||||
return x_48;
|
||||
lean_dec(x_25);
|
||||
x_49 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_49, 0, x_47);
|
||||
lean_ctor_set(x_49, 1, x_48);
|
||||
return x_49;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_49;
|
||||
lean_dec(x_9);
|
||||
uint8_t x_50;
|
||||
lean_dec(x_10);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_49 = !lean_is_exclusive(x_22);
|
||||
if (x_49 == 0)
|
||||
x_50 = !lean_is_exclusive(x_23);
|
||||
if (x_50 == 0)
|
||||
{
|
||||
return x_22;
|
||||
return x_23;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_50; lean_object* x_51; lean_object* x_52;
|
||||
x_50 = lean_ctor_get(x_22, 0);
|
||||
x_51 = lean_ctor_get(x_22, 1);
|
||||
lean_object* x_51; lean_object* x_52; lean_object* x_53;
|
||||
x_51 = lean_ctor_get(x_23, 0);
|
||||
x_52 = lean_ctor_get(x_23, 1);
|
||||
lean_inc(x_52);
|
||||
lean_inc(x_51);
|
||||
lean_inc(x_50);
|
||||
lean_dec(x_22);
|
||||
x_52 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_52, 0, x_50);
|
||||
lean_ctor_set(x_52, 1, x_51);
|
||||
return x_52;
|
||||
lean_dec(x_23);
|
||||
x_53 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_53, 0, x_51);
|
||||
lean_ctor_set(x_53, 1, x_52);
|
||||
return x_53;
|
||||
}
|
||||
}
|
||||
block_20:
|
||||
block_21:
|
||||
{
|
||||
lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16;
|
||||
x_13 = lean_st_ref_get(x_3, x_12);
|
||||
lean_object* x_14; lean_object* x_15; lean_object* x_16; uint8_t x_17;
|
||||
x_14 = lean_st_ref_get(x_3, x_13);
|
||||
lean_dec(x_3);
|
||||
x_14 = lean_ctor_get(x_13, 1);
|
||||
lean_inc(x_14);
|
||||
lean_dec(x_13);
|
||||
x_15 = lean_st_ref_get(x_9, x_14);
|
||||
lean_dec(x_9);
|
||||
x_16 = !lean_is_exclusive(x_15);
|
||||
if (x_16 == 0)
|
||||
x_15 = lean_ctor_get(x_14, 1);
|
||||
lean_inc(x_15);
|
||||
lean_dec(x_14);
|
||||
x_16 = lean_st_ref_get(x_10, x_15);
|
||||
lean_dec(x_10);
|
||||
x_17 = !lean_is_exclusive(x_16);
|
||||
if (x_17 == 0)
|
||||
{
|
||||
lean_object* x_17;
|
||||
x_17 = lean_ctor_get(x_15, 0);
|
||||
lean_dec(x_17);
|
||||
lean_ctor_set(x_15, 0, x_11);
|
||||
return x_15;
|
||||
lean_object* x_18;
|
||||
x_18 = lean_ctor_get(x_16, 0);
|
||||
lean_dec(x_18);
|
||||
lean_ctor_set(x_16, 0, x_12);
|
||||
return x_16;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_18; lean_object* x_19;
|
||||
x_18 = lean_ctor_get(x_15, 1);
|
||||
lean_inc(x_18);
|
||||
lean_dec(x_15);
|
||||
x_19 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_19, 0, x_11);
|
||||
lean_ctor_set(x_19, 1, x_18);
|
||||
return x_19;
|
||||
lean_object* x_19; lean_object* x_20;
|
||||
x_19 = lean_ctor_get(x_16, 1);
|
||||
lean_inc(x_19);
|
||||
lean_dec(x_16);
|
||||
x_20 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_20, 0, x_12);
|
||||
lean_ctor_set(x_20, 1, x_19);
|
||||
return x_20;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -26423,40 +26424,38 @@ lean_ctor_set(x_11, 1, x_9);
|
|||
return x_11;
|
||||
}
|
||||
}
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabAppArgs_elabAsElim_x3f___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) {
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabAppArgs_elabAsElim_x3f___lambda__2(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_12; lean_object* x_13; uint8_t x_14;
|
||||
x_12 = lean_ctor_get(x_1, 1);
|
||||
lean_inc(x_12);
|
||||
x_13 = lean_array_get_size(x_3);
|
||||
x_14 = lean_nat_dec_lt(x_12, x_13);
|
||||
lean_dec(x_13);
|
||||
if (x_14 == 0)
|
||||
{
|
||||
lean_object* x_15; lean_object* x_16;
|
||||
lean_dec(x_12);
|
||||
lean_dec(x_9);
|
||||
lean_dec(x_7);
|
||||
lean_object* x_13; lean_object* x_14; uint8_t x_15;
|
||||
lean_dec(x_5);
|
||||
x_13 = lean_ctor_get(x_1, 1);
|
||||
lean_inc(x_13);
|
||||
x_14 = lean_array_get_size(x_4);
|
||||
x_15 = lean_nat_dec_lt(x_13, x_14);
|
||||
lean_dec(x_14);
|
||||
if (x_15 == 0)
|
||||
{
|
||||
lean_object* x_16;
|
||||
lean_dec(x_13);
|
||||
lean_dec(x_9);
|
||||
lean_dec(x_8);
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_15 = lean_box(0);
|
||||
x_16 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_16, 0, x_15);
|
||||
lean_ctor_set(x_16, 1, x_11);
|
||||
lean_ctor_set(x_16, 0, x_2);
|
||||
lean_ctor_set(x_16, 1, x_12);
|
||||
return x_16;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_17; lean_object* x_18; lean_object* x_19;
|
||||
x_17 = lean_array_fget(x_3, x_12);
|
||||
lean_dec(x_12);
|
||||
lean_dec(x_3);
|
||||
x_17 = lean_array_fget(x_4, x_13);
|
||||
lean_dec(x_13);
|
||||
x_18 = l_Lean_Expr_fvarId_x21(x_17);
|
||||
lean_inc(x_7);
|
||||
x_19 = l_Lean_FVarId_getDecl(x_18, x_7, x_8, x_9, x_10, x_11);
|
||||
lean_inc(x_8);
|
||||
x_19 = l_Lean_FVarId_getDecl(x_18, x_8, x_9, x_10, x_11, x_12);
|
||||
if (lean_obj_tag(x_19) == 0)
|
||||
{
|
||||
uint8_t x_20;
|
||||
|
|
@ -26466,7 +26465,7 @@ if (x_20 == 0)
|
|||
lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25;
|
||||
x_21 = lean_ctor_get(x_19, 0);
|
||||
x_22 = lean_ctor_get(x_19, 1);
|
||||
x_23 = lean_array_to_list(lean_box(0), x_2);
|
||||
x_23 = lean_array_to_list(lean_box(0), x_3);
|
||||
x_24 = l_Lean_LocalDecl_userName(x_21);
|
||||
lean_dec(x_21);
|
||||
x_25 = l___private_Lean_Elab_App_0__Lean_Elab_Term_findBinderName_x3f(x_23, x_24);
|
||||
|
|
@ -26474,89 +26473,89 @@ if (lean_obj_tag(x_25) == 0)
|
|||
{
|
||||
lean_object* x_26; lean_object* x_27;
|
||||
lean_free_object(x_19);
|
||||
lean_dec(x_2);
|
||||
x_26 = lean_box(0);
|
||||
x_27 = l_Lean_Elab_Term_elabAppArgs_elabAsElim_x3f___lambda__1(x_1, x_26, x_5, x_6, x_7, x_8, x_9, x_10, x_22);
|
||||
x_27 = l_Lean_Elab_Term_elabAppArgs_elabAsElim_x3f___lambda__1(x_1, x_26, x_6, x_7, x_8, x_9, x_10, x_11, x_22);
|
||||
lean_dec(x_9);
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_8);
|
||||
lean_dec(x_6);
|
||||
return x_27;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_28;
|
||||
lean_dec(x_25);
|
||||
lean_dec(x_9);
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_8);
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_1);
|
||||
x_28 = lean_box(0);
|
||||
lean_ctor_set(x_19, 0, x_28);
|
||||
lean_ctor_set(x_19, 0, x_2);
|
||||
return x_19;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33;
|
||||
x_29 = lean_ctor_get(x_19, 0);
|
||||
x_30 = lean_ctor_get(x_19, 1);
|
||||
lean_inc(x_30);
|
||||
lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32;
|
||||
x_28 = lean_ctor_get(x_19, 0);
|
||||
x_29 = lean_ctor_get(x_19, 1);
|
||||
lean_inc(x_29);
|
||||
lean_inc(x_28);
|
||||
lean_dec(x_19);
|
||||
x_31 = lean_array_to_list(lean_box(0), x_2);
|
||||
x_32 = l_Lean_LocalDecl_userName(x_29);
|
||||
lean_dec(x_29);
|
||||
x_33 = l___private_Lean_Elab_App_0__Lean_Elab_Term_findBinderName_x3f(x_31, x_32);
|
||||
if (lean_obj_tag(x_33) == 0)
|
||||
x_30 = lean_array_to_list(lean_box(0), x_3);
|
||||
x_31 = l_Lean_LocalDecl_userName(x_28);
|
||||
lean_dec(x_28);
|
||||
x_32 = l___private_Lean_Elab_App_0__Lean_Elab_Term_findBinderName_x3f(x_30, x_31);
|
||||
if (lean_obj_tag(x_32) == 0)
|
||||
{
|
||||
lean_object* x_34; lean_object* x_35;
|
||||
x_34 = lean_box(0);
|
||||
x_35 = l_Lean_Elab_Term_elabAppArgs_elabAsElim_x3f___lambda__1(x_1, x_34, x_5, x_6, x_7, x_8, x_9, x_10, x_30);
|
||||
lean_object* x_33; lean_object* x_34;
|
||||
lean_dec(x_2);
|
||||
x_33 = lean_box(0);
|
||||
x_34 = l_Lean_Elab_Term_elabAppArgs_elabAsElim_x3f___lambda__1(x_1, x_33, x_6, x_7, x_8, x_9, x_10, x_11, x_29);
|
||||
lean_dec(x_9);
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_8);
|
||||
lean_dec(x_6);
|
||||
return x_34;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_35;
|
||||
lean_dec(x_32);
|
||||
lean_dec(x_9);
|
||||
lean_dec(x_8);
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_1);
|
||||
x_35 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_35, 0, x_2);
|
||||
lean_ctor_set(x_35, 1, x_29);
|
||||
return x_35;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_36; lean_object* x_37;
|
||||
lean_dec(x_33);
|
||||
lean_dec(x_9);
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_1);
|
||||
x_36 = lean_box(0);
|
||||
x_37 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_37, 0, x_36);
|
||||
lean_ctor_set(x_37, 1, x_30);
|
||||
return x_37;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_38;
|
||||
uint8_t x_36;
|
||||
lean_dec(x_9);
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_8);
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
lean_dec(x_1);
|
||||
x_38 = !lean_is_exclusive(x_19);
|
||||
if (x_38 == 0)
|
||||
x_36 = !lean_is_exclusive(x_19);
|
||||
if (x_36 == 0)
|
||||
{
|
||||
return x_19;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_39; lean_object* x_40; lean_object* x_41;
|
||||
x_39 = lean_ctor_get(x_19, 0);
|
||||
x_40 = lean_ctor_get(x_19, 1);
|
||||
lean_inc(x_40);
|
||||
lean_inc(x_39);
|
||||
lean_object* x_37; lean_object* x_38; lean_object* x_39;
|
||||
x_37 = lean_ctor_get(x_19, 0);
|
||||
x_38 = lean_ctor_get(x_19, 1);
|
||||
lean_inc(x_38);
|
||||
lean_inc(x_37);
|
||||
lean_dec(x_19);
|
||||
x_41 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_41, 0, x_39);
|
||||
lean_ctor_set(x_41, 1, x_40);
|
||||
return x_41;
|
||||
x_39 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_39, 0, x_37);
|
||||
lean_ctor_set(x_39, 1, x_38);
|
||||
return x_39;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -26565,44 +26564,46 @@ return x_41;
|
|||
LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabAppArgs_elabAsElim_x3f___lambda__3(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_12;
|
||||
lean_object* x_12; lean_object* x_13;
|
||||
lean_dec(x_4);
|
||||
x_12 = lean_box(0);
|
||||
lean_inc(x_10);
|
||||
lean_inc(x_9);
|
||||
lean_inc(x_8);
|
||||
lean_inc(x_7);
|
||||
x_12 = l_Lean_Meta_getElimInfo(x_1, x_7, x_8, x_9, x_10, x_11);
|
||||
if (lean_obj_tag(x_12) == 0)
|
||||
x_13 = l_Lean_Meta_getElimInfo(x_1, x_12, x_7, x_8, x_9, x_10, x_11);
|
||||
if (lean_obj_tag(x_13) == 0)
|
||||
{
|
||||
lean_object* x_13; lean_object* x_14; lean_object* x_15;
|
||||
x_13 = lean_ctor_get(x_12, 0);
|
||||
lean_inc(x_13);
|
||||
x_14 = lean_ctor_get(x_12, 1);
|
||||
lean_object* x_14; lean_object* x_15; lean_object* x_16;
|
||||
x_14 = lean_ctor_get(x_13, 0);
|
||||
lean_inc(x_14);
|
||||
lean_dec(x_12);
|
||||
x_15 = lean_ctor_get(x_13, 1);
|
||||
lean_inc(x_15);
|
||||
lean_dec(x_13);
|
||||
lean_inc(x_10);
|
||||
lean_inc(x_9);
|
||||
lean_inc(x_8);
|
||||
lean_inc(x_7);
|
||||
x_15 = lean_infer_type(x_2, x_7, x_8, x_9, x_10, x_14);
|
||||
if (lean_obj_tag(x_15) == 0)
|
||||
x_16 = lean_infer_type(x_2, x_7, x_8, x_9, x_10, x_15);
|
||||
if (lean_obj_tag(x_16) == 0)
|
||||
{
|
||||
lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19;
|
||||
x_16 = lean_ctor_get(x_15, 0);
|
||||
lean_inc(x_16);
|
||||
x_17 = lean_ctor_get(x_15, 1);
|
||||
lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20;
|
||||
x_17 = lean_ctor_get(x_16, 0);
|
||||
lean_inc(x_17);
|
||||
lean_dec(x_15);
|
||||
x_18 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabAppArgs_elabAsElim_x3f___lambda__2___boxed), 11, 2);
|
||||
lean_closure_set(x_18, 0, x_13);
|
||||
lean_closure_set(x_18, 1, x_3);
|
||||
x_19 = l_Lean_Meta_forallTelescopeReducing___at_Lean_Elab_Term_elabAppArgs_elabAsElim_x3f___spec__1___rarg(x_16, x_18, x_5, x_6, x_7, x_8, x_9, x_10, x_17);
|
||||
return x_19;
|
||||
x_18 = lean_ctor_get(x_16, 1);
|
||||
lean_inc(x_18);
|
||||
lean_dec(x_16);
|
||||
x_19 = lean_alloc_closure((void*)(l_Lean_Elab_Term_elabAppArgs_elabAsElim_x3f___lambda__2___boxed), 12, 3);
|
||||
lean_closure_set(x_19, 0, x_14);
|
||||
lean_closure_set(x_19, 1, x_12);
|
||||
lean_closure_set(x_19, 2, x_3);
|
||||
x_20 = l_Lean_Meta_forallTelescopeReducing___at_Lean_Elab_Term_elabAppArgs_elabAsElim_x3f___spec__1___rarg(x_17, x_19, x_5, x_6, x_7, x_8, x_9, x_10, x_18);
|
||||
return x_20;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_20;
|
||||
lean_dec(x_13);
|
||||
uint8_t x_21;
|
||||
lean_dec(x_14);
|
||||
lean_dec(x_10);
|
||||
lean_dec(x_9);
|
||||
lean_dec(x_8);
|
||||
|
|
@ -26610,29 +26611,29 @@ lean_dec(x_7);
|
|||
lean_dec(x_6);
|
||||
lean_dec(x_5);
|
||||
lean_dec(x_3);
|
||||
x_20 = !lean_is_exclusive(x_15);
|
||||
if (x_20 == 0)
|
||||
x_21 = !lean_is_exclusive(x_16);
|
||||
if (x_21 == 0)
|
||||
{
|
||||
return x_15;
|
||||
return x_16;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_21; lean_object* x_22; lean_object* x_23;
|
||||
x_21 = lean_ctor_get(x_15, 0);
|
||||
x_22 = lean_ctor_get(x_15, 1);
|
||||
lean_object* x_22; lean_object* x_23; lean_object* x_24;
|
||||
x_22 = lean_ctor_get(x_16, 0);
|
||||
x_23 = lean_ctor_get(x_16, 1);
|
||||
lean_inc(x_23);
|
||||
lean_inc(x_22);
|
||||
lean_inc(x_21);
|
||||
lean_dec(x_15);
|
||||
x_23 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_23, 0, x_21);
|
||||
lean_ctor_set(x_23, 1, x_22);
|
||||
return x_23;
|
||||
lean_dec(x_16);
|
||||
x_24 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_24, 0, x_22);
|
||||
lean_ctor_set(x_24, 1, x_23);
|
||||
return x_24;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_24;
|
||||
uint8_t x_25;
|
||||
lean_dec(x_10);
|
||||
lean_dec(x_9);
|
||||
lean_dec(x_8);
|
||||
|
|
@ -26641,23 +26642,23 @@ lean_dec(x_6);
|
|||
lean_dec(x_5);
|
||||
lean_dec(x_3);
|
||||
lean_dec(x_2);
|
||||
x_24 = !lean_is_exclusive(x_12);
|
||||
if (x_24 == 0)
|
||||
x_25 = !lean_is_exclusive(x_13);
|
||||
if (x_25 == 0)
|
||||
{
|
||||
return x_12;
|
||||
return x_13;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_25; lean_object* x_26; lean_object* x_27;
|
||||
x_25 = lean_ctor_get(x_12, 0);
|
||||
x_26 = lean_ctor_get(x_12, 1);
|
||||
lean_object* x_26; lean_object* x_27; lean_object* x_28;
|
||||
x_26 = lean_ctor_get(x_13, 0);
|
||||
x_27 = lean_ctor_get(x_13, 1);
|
||||
lean_inc(x_27);
|
||||
lean_inc(x_26);
|
||||
lean_inc(x_25);
|
||||
lean_dec(x_12);
|
||||
x_27 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_27, 0, x_25);
|
||||
lean_ctor_set(x_27, 1, x_26);
|
||||
return x_27;
|
||||
lean_dec(x_13);
|
||||
x_28 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_28, 0, x_26);
|
||||
lean_ctor_set(x_28, 1, x_27);
|
||||
return x_28;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -26808,16 +26809,16 @@ lean_dec(x_2);
|
|||
return x_10;
|
||||
}
|
||||
}
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabAppArgs_elabAsElim_x3f___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) {
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabAppArgs_elabAsElim_x3f___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11, lean_object* x_12) {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_12;
|
||||
x_12 = l_Lean_Elab_Term_elabAppArgs_elabAsElim_x3f___lambda__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11);
|
||||
lean_object* x_13;
|
||||
x_13 = l_Lean_Elab_Term_elabAppArgs_elabAsElim_x3f___lambda__2(x_1, x_2, x_3, x_4, x_5, x_6, x_7, x_8, x_9, x_10, x_11, x_12);
|
||||
lean_dec(x_11);
|
||||
lean_dec(x_10);
|
||||
lean_dec(x_8);
|
||||
lean_dec(x_6);
|
||||
lean_dec(x_7);
|
||||
lean_dec(x_4);
|
||||
return x_12;
|
||||
return x_13;
|
||||
}
|
||||
}
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_Term_elabAppArgs_elabAsElim_x3f___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9, lean_object* x_10, lean_object* x_11) {
|
||||
|
|
|
|||
394
stage0/stdlib/Lean/Elab/InfoTree/Main.c
generated
394
stage0/stdlib/Lean/Elab/InfoTree/Main.c
generated
|
|
@ -202,6 +202,7 @@ lean_object* lean_st_mk_ref(lean_object*, lean_object*);
|
|||
lean_object* l_Lean_Core_getMaxHeartbeats(lean_object*);
|
||||
LEAN_EXPORT lean_object* l___private_Lean_Elab_InfoTree_Main_0__Lean_Elab_formatStxRange_fmtPos(lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_ContextInfo_runMetaM___rarg___closed__4;
|
||||
static lean_object* l_Lean_Elab_InfoTree_format___closed__3;
|
||||
extern lean_object* l_Lean_Expr_instHashableExpr;
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_Info_toElabInfo_x3f___boxed(lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_ContextInfo_toPPContext(lean_object*, lean_object*);
|
||||
|
|
@ -217,6 +218,7 @@ lean_object* l_Lean_Meta_InfoCacheKey_instHashableInfoCacheKey___boxed(lean_obje
|
|||
LEAN_EXPORT lean_object* l_Lean_Elab_TermInfo_format(lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_withInfoContext_x27___rarg___lambda__5(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_withInfoContext_x27___rarg___lambda__3(lean_object*, lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_InfoTree_format___closed__5;
|
||||
lean_object* lean_expr_dbg_to_string(lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insertAux___at_Lean_Elab_assignInfoHoleId___spec__2(lean_object*, size_t, size_t, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_PersistentArray_findSomeMAux___at_Lean_Elab_InfoTree_findInfo_x3f___spec__2___lambda__1___boxed(lean_object*);
|
||||
|
|
@ -234,6 +236,7 @@ LEAN_EXPORT lean_object* l_Lean_Elab_ContextInfo_ppGoals___boxed(lean_object*, l
|
|||
LEAN_EXPORT lean_object* l_Lean_Elab_Info_toElabInfo_x3f(lean_object*);
|
||||
size_t lean_usize_mul(size_t, size_t);
|
||||
static lean_object* l_Lean_Elab_ContextInfo_ppGoals___closed__2;
|
||||
static lean_object* l_Lean_Elab_InfoTree_format___closed__6;
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_getInfoTrees(lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_PersistentHashMap_insertAtCollisionNodeAux___at_Lean_Elab_assignInfoHoleId___spec__4(lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_getInfoHoleIdAssignment_x3f___rarg(lean_object*, lean_object*, lean_object*);
|
||||
|
|
@ -384,6 +387,7 @@ LEAN_EXPORT lean_object* l_Lean_Elab_withInfoContext___rarg___lambda__1(lean_obj
|
|||
LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lean_Elab_withSaveInfoContext___spec__3___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_assignInfoHoleId___rarg___lambda__1(lean_object*, lean_object*, lean_object*);
|
||||
lean_object* l_Lean_PersistentArray_append___rarg(lean_object*, lean_object*);
|
||||
static lean_object* l_Lean_Elab_InfoTree_format___closed__4;
|
||||
LEAN_EXPORT lean_object* l_Std_Format_prefixJoin___at_Lean_Elab_ContextInfo_ppGoals___spec__2___boxed(lean_object*, lean_object*);
|
||||
LEAN_EXPORT lean_object* l___private_Lean_Elab_InfoTree_Main_0__Lean_Elab_modifyInfoTrees(lean_object*);
|
||||
LEAN_EXPORT lean_object* l_Lean_PersistentArray_mapM___at_Lean_Elab_withSaveInfoContext___spec__1(lean_object*);
|
||||
|
|
@ -5123,7 +5127,7 @@ static lean_object* _init_l_Lean_Elab_InfoTree_format___closed__1() {
|
|||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string_from_bytes("<context-not-available>", 23);
|
||||
x_1 = lean_mk_string_from_bytes("• <context-not-available>", 27);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
|
|
@ -5137,6 +5141,42 @@ lean_ctor_set(x_2, 0, x_1);
|
|||
return x_2;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_InfoTree_format___closed__3() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string_from_bytes("• ", 4);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_InfoTree_format___closed__4() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_Lean_Elab_InfoTree_format___closed__3;
|
||||
x_2 = lean_alloc_ctor(2, 1, 0);
|
||||
lean_ctor_set(x_2, 0, x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_InfoTree_format___closed__5() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1;
|
||||
x_1 = lean_mk_string_from_bytes("• ?", 5);
|
||||
return x_1;
|
||||
}
|
||||
}
|
||||
static lean_object* _init_l_Lean_Elab_InfoTree_format___closed__6() {
|
||||
_start:
|
||||
{
|
||||
lean_object* x_1; lean_object* x_2;
|
||||
x_1 = l_Lean_Elab_InfoTree_format___closed__5;
|
||||
x_2 = lean_alloc_ctor(2, 1, 0);
|
||||
lean_ctor_set(x_2, 0, x_1);
|
||||
return x_2;
|
||||
}
|
||||
}
|
||||
LEAN_EXPORT lean_object* l_Lean_Elab_InfoTree_format(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
|
||||
_start:
|
||||
{
|
||||
|
|
@ -5209,234 +5249,266 @@ uint8_t x_24;
|
|||
x_24 = !lean_is_exclusive(x_23);
|
||||
if (x_24 == 0)
|
||||
{
|
||||
lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33;
|
||||
lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34;
|
||||
x_25 = lean_ctor_get(x_23, 0);
|
||||
x_26 = l___private_Lean_Elab_InfoTree_Main_0__Lean_Elab_formatStxRange_fmtPos___closed__7;
|
||||
x_26 = l_Lean_Elab_InfoTree_format___closed__4;
|
||||
x_27 = lean_alloc_ctor(4, 2, 0);
|
||||
lean_ctor_set(x_27, 0, x_26);
|
||||
lean_ctor_set(x_27, 1, x_15);
|
||||
x_28 = lean_alloc_ctor(4, 2, 0);
|
||||
lean_ctor_set(x_28, 0, x_27);
|
||||
lean_ctor_set(x_28, 1, x_26);
|
||||
x_29 = l_Lean_Elab_ContextInfo_ppGoals___lambda__1___closed__2;
|
||||
x_30 = l_Std_Format_prefixJoin___at_Lean_Elab_ContextInfo_ppGoals___spec__2(x_29, x_25);
|
||||
x_28 = l___private_Lean_Elab_InfoTree_Main_0__Lean_Elab_formatStxRange_fmtPos___closed__7;
|
||||
x_29 = lean_alloc_ctor(4, 2, 0);
|
||||
lean_ctor_set(x_29, 0, x_27);
|
||||
lean_ctor_set(x_29, 1, x_28);
|
||||
x_30 = lean_box(1);
|
||||
x_31 = l_Std_Format_prefixJoin___at_Lean_Elab_ContextInfo_ppGoals___spec__2(x_30, x_25);
|
||||
lean_dec(x_25);
|
||||
x_31 = l_Std_Format_nestD(x_30);
|
||||
x_32 = lean_alloc_ctor(4, 2, 0);
|
||||
lean_ctor_set(x_32, 0, x_28);
|
||||
lean_ctor_set(x_32, 0, x_29);
|
||||
lean_ctor_set(x_32, 1, x_31);
|
||||
x_33 = lean_alloc_ctor(4, 2, 0);
|
||||
lean_ctor_set(x_33, 0, x_32);
|
||||
lean_ctor_set(x_33, 1, x_26);
|
||||
lean_ctor_set(x_23, 0, x_33);
|
||||
lean_ctor_set(x_33, 1, x_28);
|
||||
x_34 = l_Std_Format_nestD(x_33);
|
||||
lean_ctor_set(x_23, 0, x_34);
|
||||
return x_23;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44;
|
||||
x_34 = lean_ctor_get(x_23, 0);
|
||||
x_35 = lean_ctor_get(x_23, 1);
|
||||
lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46;
|
||||
x_35 = lean_ctor_get(x_23, 0);
|
||||
x_36 = lean_ctor_get(x_23, 1);
|
||||
lean_inc(x_36);
|
||||
lean_inc(x_35);
|
||||
lean_inc(x_34);
|
||||
lean_dec(x_23);
|
||||
x_36 = l___private_Lean_Elab_InfoTree_Main_0__Lean_Elab_formatStxRange_fmtPos___closed__7;
|
||||
x_37 = lean_alloc_ctor(4, 2, 0);
|
||||
lean_ctor_set(x_37, 0, x_36);
|
||||
lean_ctor_set(x_37, 1, x_15);
|
||||
x_37 = l_Lean_Elab_InfoTree_format___closed__4;
|
||||
x_38 = lean_alloc_ctor(4, 2, 0);
|
||||
lean_ctor_set(x_38, 0, x_37);
|
||||
lean_ctor_set(x_38, 1, x_36);
|
||||
x_39 = l_Lean_Elab_ContextInfo_ppGoals___lambda__1___closed__2;
|
||||
x_40 = l_Std_Format_prefixJoin___at_Lean_Elab_ContextInfo_ppGoals___spec__2(x_39, x_34);
|
||||
lean_dec(x_34);
|
||||
x_41 = l_Std_Format_nestD(x_40);
|
||||
x_42 = lean_alloc_ctor(4, 2, 0);
|
||||
lean_ctor_set(x_42, 0, x_38);
|
||||
lean_ctor_set(x_42, 1, x_41);
|
||||
lean_ctor_set(x_38, 1, x_15);
|
||||
x_39 = l___private_Lean_Elab_InfoTree_Main_0__Lean_Elab_formatStxRange_fmtPos___closed__7;
|
||||
x_40 = lean_alloc_ctor(4, 2, 0);
|
||||
lean_ctor_set(x_40, 0, x_38);
|
||||
lean_ctor_set(x_40, 1, x_39);
|
||||
x_41 = lean_box(1);
|
||||
x_42 = l_Std_Format_prefixJoin___at_Lean_Elab_ContextInfo_ppGoals___spec__2(x_41, x_35);
|
||||
lean_dec(x_35);
|
||||
x_43 = lean_alloc_ctor(4, 2, 0);
|
||||
lean_ctor_set(x_43, 0, x_42);
|
||||
lean_ctor_set(x_43, 1, x_36);
|
||||
x_44 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_43, 0, x_40);
|
||||
lean_ctor_set(x_43, 1, x_42);
|
||||
x_44 = lean_alloc_ctor(4, 2, 0);
|
||||
lean_ctor_set(x_44, 0, x_43);
|
||||
lean_ctor_set(x_44, 1, x_35);
|
||||
return x_44;
|
||||
lean_ctor_set(x_44, 1, x_39);
|
||||
x_45 = l_Std_Format_nestD(x_44);
|
||||
x_46 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_46, 0, x_45);
|
||||
lean_ctor_set(x_46, 1, x_36);
|
||||
return x_46;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_45;
|
||||
uint8_t x_47;
|
||||
lean_dec(x_15);
|
||||
x_45 = !lean_is_exclusive(x_23);
|
||||
if (x_45 == 0)
|
||||
x_47 = !lean_is_exclusive(x_23);
|
||||
if (x_47 == 0)
|
||||
{
|
||||
return x_23;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_46; lean_object* x_47; lean_object* x_48;
|
||||
x_46 = lean_ctor_get(x_23, 0);
|
||||
x_47 = lean_ctor_get(x_23, 1);
|
||||
lean_inc(x_47);
|
||||
lean_inc(x_46);
|
||||
lean_dec(x_23);
|
||||
x_48 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_48, 0, x_46);
|
||||
lean_ctor_set(x_48, 1, x_47);
|
||||
return x_48;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_dec(x_11);
|
||||
lean_dec(x_10);
|
||||
lean_dec(x_2);
|
||||
return x_13;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; uint8_t x_53;
|
||||
x_49 = lean_ctor_get(x_13, 0);
|
||||
x_50 = lean_ctor_get(x_13, 1);
|
||||
lean_inc(x_50);
|
||||
lean_object* x_48; lean_object* x_49; lean_object* x_50;
|
||||
x_48 = lean_ctor_get(x_23, 0);
|
||||
x_49 = lean_ctor_get(x_23, 1);
|
||||
lean_inc(x_49);
|
||||
lean_inc(x_48);
|
||||
lean_dec(x_23);
|
||||
x_50 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_50, 0, x_48);
|
||||
lean_ctor_set(x_50, 1, x_49);
|
||||
return x_50;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55;
|
||||
lean_dec(x_11);
|
||||
lean_dec(x_10);
|
||||
lean_dec(x_2);
|
||||
x_51 = l_Lean_Elab_InfoTree_format___closed__4;
|
||||
x_52 = lean_alloc_ctor(4, 2, 0);
|
||||
lean_ctor_set(x_52, 0, x_51);
|
||||
lean_ctor_set(x_52, 1, x_15);
|
||||
x_53 = l___private_Lean_Elab_InfoTree_Main_0__Lean_Elab_formatStxRange_fmtPos___closed__7;
|
||||
x_54 = lean_alloc_ctor(4, 2, 0);
|
||||
lean_ctor_set(x_54, 0, x_52);
|
||||
lean_ctor_set(x_54, 1, x_53);
|
||||
x_55 = l_Std_Format_nestD(x_54);
|
||||
lean_ctor_set(x_13, 0, x_55);
|
||||
return x_13;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; uint8_t x_60;
|
||||
x_56 = lean_ctor_get(x_13, 0);
|
||||
x_57 = lean_ctor_get(x_13, 1);
|
||||
lean_inc(x_57);
|
||||
lean_inc(x_56);
|
||||
lean_dec(x_13);
|
||||
x_51 = lean_ctor_get(x_11, 2);
|
||||
lean_inc(x_51);
|
||||
x_52 = lean_unsigned_to_nat(0u);
|
||||
x_53 = lean_nat_dec_eq(x_51, x_52);
|
||||
lean_dec(x_51);
|
||||
if (x_53 == 0)
|
||||
{
|
||||
lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57;
|
||||
x_54 = l_Lean_Elab_Info_updateContext_x3f(x_2, x_10);
|
||||
lean_dec(x_10);
|
||||
x_55 = l_Lean_PersistentArray_toList___rarg(x_11);
|
||||
x_56 = lean_box(0);
|
||||
x_57 = l_List_mapM_loop___at_Lean_Elab_InfoTree_format___spec__1(x_54, x_55, x_56, x_50);
|
||||
if (lean_obj_tag(x_57) == 0)
|
||||
{
|
||||
lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69;
|
||||
x_58 = lean_ctor_get(x_57, 0);
|
||||
x_58 = lean_ctor_get(x_11, 2);
|
||||
lean_inc(x_58);
|
||||
x_59 = lean_ctor_get(x_57, 1);
|
||||
lean_inc(x_59);
|
||||
if (lean_is_exclusive(x_57)) {
|
||||
lean_ctor_release(x_57, 0);
|
||||
lean_ctor_release(x_57, 1);
|
||||
x_60 = x_57;
|
||||
} else {
|
||||
lean_dec_ref(x_57);
|
||||
x_60 = lean_box(0);
|
||||
}
|
||||
x_61 = l___private_Lean_Elab_InfoTree_Main_0__Lean_Elab_formatStxRange_fmtPos___closed__7;
|
||||
x_62 = lean_alloc_ctor(4, 2, 0);
|
||||
lean_ctor_set(x_62, 0, x_61);
|
||||
lean_ctor_set(x_62, 1, x_49);
|
||||
x_63 = lean_alloc_ctor(4, 2, 0);
|
||||
lean_ctor_set(x_63, 0, x_62);
|
||||
lean_ctor_set(x_63, 1, x_61);
|
||||
x_64 = l_Lean_Elab_ContextInfo_ppGoals___lambda__1___closed__2;
|
||||
x_65 = l_Std_Format_prefixJoin___at_Lean_Elab_ContextInfo_ppGoals___spec__2(x_64, x_58);
|
||||
x_59 = lean_unsigned_to_nat(0u);
|
||||
x_60 = lean_nat_dec_eq(x_58, x_59);
|
||||
lean_dec(x_58);
|
||||
x_66 = l_Std_Format_nestD(x_65);
|
||||
x_67 = lean_alloc_ctor(4, 2, 0);
|
||||
lean_ctor_set(x_67, 0, x_63);
|
||||
lean_ctor_set(x_67, 1, x_66);
|
||||
x_68 = lean_alloc_ctor(4, 2, 0);
|
||||
lean_ctor_set(x_68, 0, x_67);
|
||||
lean_ctor_set(x_68, 1, x_61);
|
||||
if (lean_is_scalar(x_60)) {
|
||||
x_69 = lean_alloc_ctor(0, 2, 0);
|
||||
if (x_60 == 0)
|
||||
{
|
||||
lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64;
|
||||
x_61 = l_Lean_Elab_Info_updateContext_x3f(x_2, x_10);
|
||||
lean_dec(x_10);
|
||||
x_62 = l_Lean_PersistentArray_toList___rarg(x_11);
|
||||
x_63 = lean_box(0);
|
||||
x_64 = l_List_mapM_loop___at_Lean_Elab_InfoTree_format___spec__1(x_61, x_62, x_63, x_57);
|
||||
if (lean_obj_tag(x_64) == 0)
|
||||
{
|
||||
lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77;
|
||||
x_65 = lean_ctor_get(x_64, 0);
|
||||
lean_inc(x_65);
|
||||
x_66 = lean_ctor_get(x_64, 1);
|
||||
lean_inc(x_66);
|
||||
if (lean_is_exclusive(x_64)) {
|
||||
lean_ctor_release(x_64, 0);
|
||||
lean_ctor_release(x_64, 1);
|
||||
x_67 = x_64;
|
||||
} else {
|
||||
x_69 = x_60;
|
||||
lean_dec_ref(x_64);
|
||||
x_67 = lean_box(0);
|
||||
}
|
||||
x_68 = l_Lean_Elab_InfoTree_format___closed__4;
|
||||
x_69 = lean_alloc_ctor(4, 2, 0);
|
||||
lean_ctor_set(x_69, 0, x_68);
|
||||
lean_ctor_set(x_69, 1, x_59);
|
||||
return x_69;
|
||||
lean_ctor_set(x_69, 1, x_56);
|
||||
x_70 = l___private_Lean_Elab_InfoTree_Main_0__Lean_Elab_formatStxRange_fmtPos___closed__7;
|
||||
x_71 = lean_alloc_ctor(4, 2, 0);
|
||||
lean_ctor_set(x_71, 0, x_69);
|
||||
lean_ctor_set(x_71, 1, x_70);
|
||||
x_72 = lean_box(1);
|
||||
x_73 = l_Std_Format_prefixJoin___at_Lean_Elab_ContextInfo_ppGoals___spec__2(x_72, x_65);
|
||||
lean_dec(x_65);
|
||||
x_74 = lean_alloc_ctor(4, 2, 0);
|
||||
lean_ctor_set(x_74, 0, x_71);
|
||||
lean_ctor_set(x_74, 1, x_73);
|
||||
x_75 = lean_alloc_ctor(4, 2, 0);
|
||||
lean_ctor_set(x_75, 0, x_74);
|
||||
lean_ctor_set(x_75, 1, x_70);
|
||||
x_76 = l_Std_Format_nestD(x_75);
|
||||
if (lean_is_scalar(x_67)) {
|
||||
x_77 = lean_alloc_ctor(0, 2, 0);
|
||||
} else {
|
||||
x_77 = x_67;
|
||||
}
|
||||
lean_ctor_set(x_77, 0, x_76);
|
||||
lean_ctor_set(x_77, 1, x_66);
|
||||
return x_77;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73;
|
||||
lean_dec(x_49);
|
||||
x_70 = lean_ctor_get(x_57, 0);
|
||||
lean_inc(x_70);
|
||||
x_71 = lean_ctor_get(x_57, 1);
|
||||
lean_inc(x_71);
|
||||
if (lean_is_exclusive(x_57)) {
|
||||
lean_ctor_release(x_57, 0);
|
||||
lean_ctor_release(x_57, 1);
|
||||
x_72 = x_57;
|
||||
lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81;
|
||||
lean_dec(x_56);
|
||||
x_78 = lean_ctor_get(x_64, 0);
|
||||
lean_inc(x_78);
|
||||
x_79 = lean_ctor_get(x_64, 1);
|
||||
lean_inc(x_79);
|
||||
if (lean_is_exclusive(x_64)) {
|
||||
lean_ctor_release(x_64, 0);
|
||||
lean_ctor_release(x_64, 1);
|
||||
x_80 = x_64;
|
||||
} else {
|
||||
lean_dec_ref(x_57);
|
||||
x_72 = lean_box(0);
|
||||
lean_dec_ref(x_64);
|
||||
x_80 = lean_box(0);
|
||||
}
|
||||
if (lean_is_scalar(x_72)) {
|
||||
x_73 = lean_alloc_ctor(1, 2, 0);
|
||||
if (lean_is_scalar(x_80)) {
|
||||
x_81 = lean_alloc_ctor(1, 2, 0);
|
||||
} else {
|
||||
x_73 = x_72;
|
||||
x_81 = x_80;
|
||||
}
|
||||
lean_ctor_set(x_73, 0, x_70);
|
||||
lean_ctor_set(x_73, 1, x_71);
|
||||
return x_73;
|
||||
lean_ctor_set(x_81, 0, x_78);
|
||||
lean_ctor_set(x_81, 1, x_79);
|
||||
return x_81;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_74;
|
||||
lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87;
|
||||
lean_dec(x_11);
|
||||
lean_dec(x_10);
|
||||
lean_dec(x_2);
|
||||
x_74 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_74, 0, x_49);
|
||||
lean_ctor_set(x_74, 1, x_50);
|
||||
return x_74;
|
||||
x_82 = l_Lean_Elab_InfoTree_format___closed__4;
|
||||
x_83 = lean_alloc_ctor(4, 2, 0);
|
||||
lean_ctor_set(x_83, 0, x_82);
|
||||
lean_ctor_set(x_83, 1, x_56);
|
||||
x_84 = l___private_Lean_Elab_InfoTree_Main_0__Lean_Elab_formatStxRange_fmtPos___closed__7;
|
||||
x_85 = lean_alloc_ctor(4, 2, 0);
|
||||
lean_ctor_set(x_85, 0, x_83);
|
||||
lean_ctor_set(x_85, 1, x_84);
|
||||
x_86 = l_Std_Format_nestD(x_85);
|
||||
x_87 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_87, 0, x_86);
|
||||
lean_ctor_set(x_87, 1, x_57);
|
||||
return x_87;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t x_75;
|
||||
uint8_t x_88;
|
||||
lean_dec(x_11);
|
||||
lean_dec(x_10);
|
||||
lean_dec(x_2);
|
||||
x_75 = !lean_is_exclusive(x_13);
|
||||
if (x_75 == 0)
|
||||
x_88 = !lean_is_exclusive(x_13);
|
||||
if (x_88 == 0)
|
||||
{
|
||||
return x_13;
|
||||
}
|
||||
else
|
||||
{
|
||||
lean_object* x_76; lean_object* x_77; lean_object* x_78;
|
||||
x_76 = lean_ctor_get(x_13, 0);
|
||||
x_77 = lean_ctor_get(x_13, 1);
|
||||
lean_inc(x_77);
|
||||
lean_inc(x_76);
|
||||
lean_object* x_89; lean_object* x_90; lean_object* x_91;
|
||||
x_89 = lean_ctor_get(x_13, 0);
|
||||
x_90 = lean_ctor_get(x_13, 1);
|
||||
lean_inc(x_90);
|
||||
lean_inc(x_89);
|
||||
lean_dec(x_13);
|
||||
x_78 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_78, 0, x_76);
|
||||
lean_ctor_set(x_78, 1, x_77);
|
||||
return x_78;
|
||||
x_91 = lean_alloc_ctor(1, 2, 0);
|
||||
lean_ctor_set(x_91, 0, x_89);
|
||||
lean_ctor_set(x_91, 1, x_90);
|
||||
return x_91;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
default:
|
||||
{
|
||||
lean_object* x_79; uint8_t x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83;
|
||||
lean_object* x_92; uint8_t x_93; lean_object* x_94; lean_object* x_95; lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; lean_object* x_100; lean_object* x_101;
|
||||
lean_dec(x_2);
|
||||
x_79 = lean_ctor_get(x_1, 0);
|
||||
lean_inc(x_79);
|
||||
x_92 = lean_ctor_get(x_1, 0);
|
||||
lean_inc(x_92);
|
||||
lean_dec(x_1);
|
||||
x_80 = 1;
|
||||
x_81 = l_Lean_Name_toString(x_79, x_80);
|
||||
x_82 = lean_alloc_ctor(2, 1, 0);
|
||||
lean_ctor_set(x_82, 0, x_81);
|
||||
x_83 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_83, 0, x_82);
|
||||
lean_ctor_set(x_83, 1, x_3);
|
||||
return x_83;
|
||||
x_93 = 1;
|
||||
x_94 = l_Lean_Name_toString(x_92, x_93);
|
||||
x_95 = lean_alloc_ctor(2, 1, 0);
|
||||
lean_ctor_set(x_95, 0, x_94);
|
||||
x_96 = l_Lean_Elab_InfoTree_format___closed__6;
|
||||
x_97 = lean_alloc_ctor(4, 2, 0);
|
||||
lean_ctor_set(x_97, 0, x_96);
|
||||
lean_ctor_set(x_97, 1, x_95);
|
||||
x_98 = l___private_Lean_Elab_InfoTree_Main_0__Lean_Elab_formatStxRange_fmtPos___closed__7;
|
||||
x_99 = lean_alloc_ctor(4, 2, 0);
|
||||
lean_ctor_set(x_99, 0, x_97);
|
||||
lean_ctor_set(x_99, 1, x_98);
|
||||
x_100 = l_Std_Format_nestD(x_99);
|
||||
x_101 = lean_alloc_ctor(0, 2, 0);
|
||||
lean_ctor_set(x_101, 0, x_100);
|
||||
lean_ctor_set(x_101, 1, x_3);
|
||||
return x_101;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -9057,6 +9129,14 @@ l_Lean_Elab_InfoTree_format___closed__1 = _init_l_Lean_Elab_InfoTree_format___cl
|
|||
lean_mark_persistent(l_Lean_Elab_InfoTree_format___closed__1);
|
||||
l_Lean_Elab_InfoTree_format___closed__2 = _init_l_Lean_Elab_InfoTree_format___closed__2();
|
||||
lean_mark_persistent(l_Lean_Elab_InfoTree_format___closed__2);
|
||||
l_Lean_Elab_InfoTree_format___closed__3 = _init_l_Lean_Elab_InfoTree_format___closed__3();
|
||||
lean_mark_persistent(l_Lean_Elab_InfoTree_format___closed__3);
|
||||
l_Lean_Elab_InfoTree_format___closed__4 = _init_l_Lean_Elab_InfoTree_format___closed__4();
|
||||
lean_mark_persistent(l_Lean_Elab_InfoTree_format___closed__4);
|
||||
l_Lean_Elab_InfoTree_format___closed__5 = _init_l_Lean_Elab_InfoTree_format___closed__5();
|
||||
lean_mark_persistent(l_Lean_Elab_InfoTree_format___closed__5);
|
||||
l_Lean_Elab_InfoTree_format___closed__6 = _init_l_Lean_Elab_InfoTree_format___closed__6();
|
||||
lean_mark_persistent(l_Lean_Elab_InfoTree_format___closed__6);
|
||||
l_Lean_Elab_getResetInfoTrees___rarg___lambda__3___closed__1 = _init_l_Lean_Elab_getResetInfoTrees___rarg___lambda__3___closed__1();
|
||||
lean_mark_persistent(l_Lean_Elab_getResetInfoTrees___rarg___lambda__3___closed__1);
|
||||
l_List_forIn_loop___at_Lean_Elab_resolveGlobalConstWithInfos___spec__1___rarg___lambda__1___closed__1 = _init_l_List_forIn_loop___at_Lean_Elab_resolveGlobalConstWithInfos___spec__1___rarg___lambda__1___closed__1();
|
||||
|
|
|
|||
9746
stage0/stdlib/Lean/Elab/Tactic/Induction.c
generated
9746
stage0/stdlib/Lean/Elab/Tactic/Induction.c
generated
File diff suppressed because it is too large
Load diff
2923
stage0/stdlib/Lean/Meta/Tactic/ElimInfo.c
generated
2923
stage0/stdlib/Lean/Meta/Tactic/ElimInfo.c
generated
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue