diff --git a/stage0/src/Lean/Compiler/IR/Checker.lean b/stage0/src/Lean/Compiler/IR/Checker.lean index 833ece4334..fa71b5502d 100644 --- a/stage0/src/Lean/Compiler/IR/Checker.lean +++ b/stage0/src/Lean/Compiler/IR/Checker.lean @@ -8,6 +8,18 @@ import Lean.Compiler.IR.Format namespace Lean.IR.Checker +@[extern c inline "lean_box(LEAN_MAX_CTOR_FIELDS)"] +constant getMaxCtorFields : Unit → Nat +def maxCtorFields := getMaxCtorFields () + +@[extern c inline "lean_box(LEAN_MAX_CTOR_SCALARS_SIZE)"] +constant getMaxCtorScalarsSize : Unit → Nat +def maxCtorScalarsSize := getMaxCtorScalarsSize () + +@[extern c inline "lean_box(sizeof(size_t))"] +constant getUSizeSize : Unit → Nat +def usizeSize := getUSizeSize () + structure CheckerContext where env : Environment localCtx : LocalContext := {} @@ -97,7 +109,12 @@ def checkExpr (ty : IRType) : Expr → M Unit | Expr.pap f ys => checkPartialApp f ys *> checkObjType ty -- partial applications should always produce a closure object | Expr.ap x ys => checkObjVar x *> checkArgs ys | Expr.fap f ys => checkFullApp f ys - | Expr.ctor c ys => when (!ty.isStruct && !ty.isUnion && c.isRef) (checkObjType ty) *> checkArgs ys + | Expr.ctor c ys => do + if c.size > maxCtorFields then + throw s!"constructor '{c.name}' has too many fields" + if c.ssize + c.usize * usizeSize > maxCtorScalarsSize then + throw s!"constructor '{c.name}' has too many scalar fields" + when (!ty.isStruct && !ty.isUnion && c.isRef) (checkObjType ty) *> checkArgs ys | Expr.reset _ x => checkObjVar x *> checkObjType ty | Expr.reuse x i u ys => checkObjVar x *> checkArgs ys *> checkObjType ty | Expr.box xty x => checkObjType ty *> checkScalarVar x *> checkVarType x (fun t => t == xty) diff --git a/stage0/src/Lean/Compiler/IR/EmitC.lean b/stage0/src/Lean/Compiler/IR/EmitC.lean index 64a36eca1d..97571fb925 100644 --- a/stage0/src/Lean/Compiler/IR/EmitC.lean +++ b/stage0/src/Lean/Compiler/IR/EmitC.lean @@ -16,6 +16,18 @@ import Lean.Compiler.IR.Boxing namespace Lean.IR.EmitC open ExplicitBoxing (requiresBoxedVersion mkBoxedName isBoxedName) +@[extern c inline "lean_box(LEAN_MAX_SMALL_OBJECT_SIZE)"] +constant getMaxSmallObjectSize : Unit → Nat +def maxSmallObjectSize := getMaxSmallObjectSize () + +@[extern c inline "lean_box(sizeof(lean_ctor_object))"] +constant getCtorHeaderSize : Unit → Nat +def ctorHeaderSize := getCtorHeaderSize () + +@[extern c inline "lean_box(sizeof(size_t))"] +constant getUSizeSize : Unit → Nat +def usizeSize := getUSizeSize () + def leanMainFn := "_lean_main" structure Context where @@ -321,13 +333,18 @@ def emitArgs (ys : Array Arg) : M Unit := if i > 0 then emit ", " emitArg ys[i] +private def isSmallCtor (c : CtorInfo) : Bool := + let total := ctorHeaderSize + c.size * usizeSize + c.usize * usizeSize + c.ssize + total <= maxSmallObjectSize + def emitCtorScalarSize (usize : Nat) (ssize : Nat) : M Unit := do if usize == 0 then emit ssize else if ssize == 0 then emit "sizeof(size_t)*"; emit usize else emit "sizeof(size_t)*"; emit usize; emit " + "; emit ssize def emitAllocCtor (c : CtorInfo) : M Unit := do - emit "lean_alloc_ctor("; emit c.cidx; emit ", "; emit c.size; emit ", "; + emit <| if isSmallCtor c then "lean_alloc_ctor" else "lean_alloc_ctor_big" + emit "("; emit c.cidx; emit ", "; emit c.size; emit ", " emitCtorScalarSize c.usize c.ssize; emitLn ");" def emitCtorSetArgs (z : VarId) (ys : Array Arg) : M Unit := diff --git a/stage0/src/include/lean/lean.h b/stage0/src/include/lean/lean.h index 732b543ea3..9bf5013c32 100644 --- a/stage0/src/include/lean/lean.h +++ b/stage0/src/include/lean/lean.h @@ -67,6 +67,9 @@ extern "C" { #define LeanExternal 254 #define LeanReserved 255 +#define LEAN_MAX_CTOR_FIELDS 256 +#define LEAN_MAX_CTOR_SCALARS_SIZE 1024 + static inline bool lean_is_big_object_tag(uint8_t tag) { return tag == LeanArray || tag == LeanStructArray || tag == LeanScalarArray || tag == LeanString; } @@ -689,12 +692,20 @@ static inline uint8_t * lean_ctor_scalar_cptr(lean_object * o) { } static inline lean_object * lean_alloc_ctor(unsigned tag, unsigned num_objs, unsigned scalar_sz) { - assert(tag <= LeanMaxCtorTag && num_objs < 256 && scalar_sz < 1024); + assert(tag <= LeanMaxCtorTag && num_objs < LEAN_MAX_CTOR_FIELDS && scalar_sz < LEAN_MAX_CTOR_SCALARS_SIZE); lean_object * o = lean_alloc_ctor_memory(sizeof(lean_ctor_object) + sizeof(void*)*num_objs + scalar_sz); lean_set_st_header(o, tag, num_objs); return o; } +/* Similar to lean_alloc_ctor_big, but does not assume ctor is a small object */ +static inline lean_object * lean_alloc_ctor_big(unsigned tag, unsigned num_objs, unsigned scalar_sz) { + assert(tag <= LeanMaxCtorTag && num_objs < LEAN_MAX_CTOR_FIELDS && scalar_sz < LEAN_MAX_CTOR_SCALARS_SIZE); + lean_object * o = lean_alloc_object(sizeof(lean_ctor_object) + sizeof(void*)*num_objs + scalar_sz); + lean_set_st_header(o, tag, num_objs); + return o; +} + static inline b_lean_obj_res lean_ctor_get(b_lean_obj_arg o, unsigned i) { assert(i < lean_ctor_num_objs(o)); return lean_ctor_obj_cptr(o)[i]; diff --git a/stage0/src/include/lean/object.h b/stage0/src/include/lean/object.h index 2d77a7b4cf..b634a401d9 100644 --- a/stage0/src/include/lean/object.h +++ b/stage0/src/include/lean/object.h @@ -79,6 +79,7 @@ inline unsigned cnstr_num_objs(object * o) { return lean_ctor_num_objs(o); } inline object ** cnstr_obj_cptr(object * o) { return lean_ctor_obj_cptr(o); } inline uint8 * cnstr_scalar_cptr(object * o) { return lean_ctor_scalar_cptr(o); } inline obj_res alloc_cnstr(unsigned tag, unsigned num_objs, unsigned scalar_sz) { return lean_alloc_ctor(tag, num_objs, scalar_sz); } +inline obj_res alloc_cnstr_big(unsigned tag, unsigned num_objs, unsigned scalar_sz) { return lean_alloc_ctor_big(tag, num_objs, scalar_sz); } inline unsigned cnstr_tag(b_obj_arg o) { lean_assert(is_cnstr(o)); return lean_ptr_tag(o); } inline void cnstr_set_tag(b_obj_arg o, unsigned tag) { lean_ctor_set_tag(o, tag); } inline b_obj_res cnstr_get(b_obj_arg o, unsigned i) { return lean_ctor_get(o, i); } diff --git a/stage0/src/library/compiler/ir_interpreter.cpp b/stage0/src/library/compiler/ir_interpreter.cpp index a6e907aba1..8068771aae 100644 --- a/stage0/src/library/compiler/ir_interpreter.cpp +++ b/stage0/src/library/compiler/ir_interpreter.cpp @@ -385,7 +385,8 @@ private: // a constructor without data is optimized to a tagged pointer return box(tag); } else { - object *o = alloc_cnstr(tag, size, usize * sizeof(void *) + ssize); + // alloc_cnstr_big does not assume the constructors fits in a small object + object *o = alloc_cnstr_big(tag, size, usize * sizeof(void *) + ssize); for (size_t i = 0; i < args.size(); i++) { cnstr_set(o, i, eval_arg(args[i]).m_obj); } diff --git a/stage0/stdlib/Lean/Compiler/IR/Checker.c b/stage0/stdlib/Lean/Compiler/IR/Checker.c index b9535f199b..b54e861240 100644 --- a/stage0/stdlib/Lean/Compiler/IR/Checker.c +++ b/stage0/stdlib/Lean/Compiler/IR/Checker.c @@ -15,6 +15,7 @@ extern "C" { #endif extern lean_object* l_Lean_Name_toString___closed__1; size_t l_USize_add(size_t, size_t); +lean_object* l_Lean_IR_Checker_checkExpr___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_Checker_checkFullApp___closed__4; extern lean_object* l_Char_quote___closed__1; lean_object* l_Lean_IR_Checker_checkArg_match__1___rarg(lean_object*, lean_object*, lean_object*); @@ -24,6 +25,7 @@ extern lean_object* l_Lean_IR_instToStringJoinPointId___closed__1; extern lean_object* l_Std_Format_defWidth; lean_object* l_Array_foldlMUnsafe_fold___at_Lean_IR_Checker_checkFnBody___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_IR_LocalContext_isJP(lean_object*, lean_object*); +lean_object* l_Lean_IR_Checker_maxCtorScalarsSize; lean_object* l_Lean_IR_Checker_markVar(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_Checker_checkExpr(lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_Lean_IR_IRType_isStruct(lean_object*); @@ -31,7 +33,9 @@ extern lean_object* l_Lean_instInhabitedParserDescr___closed__1; lean_object* l_Lean_IR_Checker_getType(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_Checker_checkType(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_Checker_checkJP___closed__1; +lean_object* l_Lean_IR_Checker_getUSizeSize___boxed(lean_object*); lean_object* l_Lean_IR_Checker_checkFullApp___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_IR_Checker_usizeSize___closed__1; uint8_t l_Lean_IR_LocalContext_isParam(lean_object*, lean_object*); lean_object* l_Lean_IR_Checker_checkDecl_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* lean_array_get_size(lean_object*); @@ -40,8 +44,10 @@ lean_object* lean_string_append(lean_object*, lean_object*); lean_object* l_Lean_IR_getEnv___rarg(lean_object*); lean_object* l_Lean_IR_checkDecls___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_Checker_getDecl_match__1___rarg(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_IR_Checker_getMaxCtorScalarsSize(lean_object*); lean_object* l_Lean_IR_Checker_checkJP(lean_object*, lean_object*, lean_object*); uint8_t l_Lean_IR_IRType_isObj(lean_object*); +lean_object* lean_nat_add(lean_object*, lean_object*); lean_object* l_Lean_IR_Checker_checkExpr_match__1(lean_object*); lean_object* l_Lean_Name_toStringWithSep(lean_object*, lean_object*); lean_object* l_Lean_IR_Decl_name(lean_object*); @@ -55,12 +61,16 @@ lean_object* l_Lean_IR_AltCore_body(lean_object*); lean_object* l_Lean_IR_Checker_markIndex___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* lean_array_fget(lean_object*, lean_object*); uint8_t lean_nat_dec_eq(lean_object*, lean_object*); +lean_object* l_Lean_IR_Checker_maxCtorFields___closed__1; lean_object* l_Lean_IR_Checker_CheckerContext_localCtx___default; lean_object* l_Lean_IR_Checker_checkExpr___closed__3; +lean_object* l_Lean_IR_Checker_checkExpr___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_checkDecl_match__1(lean_object*); +lean_object* l_Lean_IR_Checker_maxCtorScalarsSize___closed__1; uint8_t l_Lean_IR_CtorInfo_isRef(lean_object*); lean_object* l_Array_foldlMUnsafe_fold___at_Lean_IR_Checker_checkFnBody___spec__1(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_LocalContext_addJP(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_IR_Checker_getMaxCtorFields___boxed(lean_object*); lean_object* l_Lean_IR_Checker_checkObjVar___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_Checker_checkObjType(lean_object*, lean_object*, lean_object*); lean_object* l_Std_RBNode_findCore___at_Lean_IR_Checker_markIndex___spec__1(lean_object*, lean_object*); @@ -79,7 +89,9 @@ lean_object* l_Lean_IR_Checker_markIndex(lean_object*, lean_object*, lean_object lean_object* l_Lean_IR_Checker_checkScalarType(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_Checker_checkEqTypes___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_Checker_checkObjType___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_IR_Checker_checkExpr___lambda__2___closed__1; lean_object* l_Lean_IR_Checker_checkEqTypes___closed__2; +lean_object* l_Lean_IR_Checker_checkExpr___lambda__2___closed__2; lean_object* l_Lean_IR_Checker_checkPartialApp___closed__3; lean_object* l_Lean_IR_checkDecls(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_checkDecl___closed__1; @@ -88,6 +100,7 @@ lean_object* l_Lean_IR_Checker_checkType___closed__1; lean_object* l_Lean_IR_Checker_checkFullApp(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_checkDecl___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_Checker_checkArg_match__1(lean_object*); +lean_object* l_Lean_IR_Checker_getMaxCtorScalarsSize___boxed(lean_object*); uint8_t l_Lean_IR_IRType_isUnion(lean_object*); size_t lean_usize_of_nat(lean_object*); lean_object* l_Lean_IR_Checker_checkScalarType___boxed(lean_object*, lean_object*, lean_object*); @@ -121,17 +134,23 @@ lean_object* l_Lean_IR_Checker_checkPartialApp___boxed(lean_object*, lean_object lean_object* l_Lean_IR_Checker_markVar___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_Checker_markJP___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_LocalContext_addLocal(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_nat_mul(lean_object*, lean_object*); +lean_object* l_Lean_IR_Checker_getUSizeSize(lean_object*); lean_object* l_Lean_IR_Checker_checkFullApp___closed__1; lean_object* l_Lean_IR_Checker_checkFnBody_match__1___rarg(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_object* l_Lean_IR_Checker_getDecl_match__1(lean_object*); +lean_object* l_Lean_IR_Checker_getMaxCtorFields(lean_object*); lean_object* l_Lean_IR_checkDecl_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Std_RBNode_findCore___at_Lean_IR_Checker_markIndex___spec__1___boxed(lean_object*, lean_object*); lean_object* l_Lean_IR_Checker_checkArgs(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_Checker_checkVar(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_Checker_checkFullApp___closed__2; +lean_object* l_Lean_IR_Checker_usizeSize; lean_object* l_Lean_IR_Checker_checkFnBody(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_Checker_checkFullApp___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_IR_Checker_checkExpr___lambda__2(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_Checker_checkJP___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_IR_Checker_checkExpr___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_Checker_withParams(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Array_foldlMUnsafe_fold___at_Lean_IR_Checker_withParams___spec__1(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_Checker_checkScalarVar___boxed(lean_object*, lean_object*, lean_object*); @@ -143,14 +162,91 @@ lean_object* l_Lean_IR_Checker_getType_match__1(lean_object*); lean_object* l_Lean_IR_Checker_checkType___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_Checker_checkDecl(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_Decl_params(lean_object*); +lean_object* l_Lean_IR_Checker_checkExpr___closed__4; lean_object* l_Lean_IR_Checker_checkEqTypes(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_Checker_checkArg___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Array_foldlMUnsafe_fold___at_Lean_IR_checkDecls___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_IR_Checker_maxCtorFields; lean_object* l_Lean_IR_Checker_checkFnBody_match__1(lean_object*); lean_object* l_Std_RBNode_insert___at_Lean_IR_mkIndexSet___spec__1(lean_object*, lean_object*, lean_object*); uint8_t lean_nat_dec_lt(lean_object*, lean_object*); uint8_t l_Lean_IR_IRType_isScalar(lean_object*); lean_object* l_Lean_IR_Checker_markIndex___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_IR_Checker_getMaxCtorFields___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_box(LEAN_MAX_CTOR_FIELDS); +return x_2; +} +} +static lean_object* _init_l_Lean_IR_Checker_maxCtorFields___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = lean_box(0); +x_2 = lean_box(LEAN_MAX_CTOR_FIELDS); +return x_2; +} +} +static lean_object* _init_l_Lean_IR_Checker_maxCtorFields() { +_start: +{ +lean_object* x_1; +x_1 = l_Lean_IR_Checker_maxCtorFields___closed__1; +return x_1; +} +} +lean_object* l_Lean_IR_Checker_getMaxCtorScalarsSize___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_box(LEAN_MAX_CTOR_SCALARS_SIZE); +return x_2; +} +} +static lean_object* _init_l_Lean_IR_Checker_maxCtorScalarsSize___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = lean_box(0); +x_2 = lean_box(LEAN_MAX_CTOR_SCALARS_SIZE); +return x_2; +} +} +static lean_object* _init_l_Lean_IR_Checker_maxCtorScalarsSize() { +_start: +{ +lean_object* x_1; +x_1 = l_Lean_IR_Checker_maxCtorScalarsSize___closed__1; +return x_1; +} +} +lean_object* l_Lean_IR_Checker_getUSizeSize___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_box(sizeof(size_t)); +return x_2; +} +} +static lean_object* _init_l_Lean_IR_Checker_usizeSize___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = lean_box(0); +x_2 = lean_box(sizeof(size_t)); +return x_2; +} +} +static lean_object* _init_l_Lean_IR_Checker_usizeSize() { +_start: +{ +lean_object* x_1; +x_1 = l_Lean_IR_Checker_usizeSize___closed__1; +return x_1; +} +} static lean_object* _init_l_Lean_IR_Checker_CheckerContext_localCtx___default() { _start: { @@ -2660,44 +2756,10 @@ x_2 = lean_alloc_closure((void*)(l_Lean_IR_Checker_checkExpr_match__2___rarg), 1 return x_2; } } -static lean_object* _init_l_Lean_IR_Checker_checkExpr___closed__1() { +lean_object* l_Lean_IR_Checker_checkExpr___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_1; -x_1 = lean_mk_string("unexpected IR type '"); -return x_1; -} -} -static lean_object* _init_l_Lean_IR_Checker_checkExpr___closed__2() { -_start: -{ -lean_object* x_1; -x_1 = lean_mk_string("invalid proj index"); -return x_1; -} -} -static lean_object* _init_l_Lean_IR_Checker_checkExpr___closed__3() { -_start: -{ -lean_object* x_1; lean_object* x_2; -x_1 = l_Lean_IR_Checker_checkExpr___closed__2; -x_2 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -lean_object* l_Lean_IR_Checker_checkExpr(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { -_start: -{ -switch (lean_obj_tag(x_2)) { -case 0: -{ -lean_object* x_5; lean_object* x_6; uint8_t x_7; -x_5 = lean_ctor_get(x_2, 0); -lean_inc(x_5); -x_6 = lean_ctor_get(x_2, 1); -lean_inc(x_6); -lean_dec(x_2); +uint8_t x_7; x_7 = l_Lean_IR_IRType_isStruct(x_1); if (x_7 == 0) { @@ -2706,26 +2768,23 @@ x_8 = l_Lean_IR_IRType_isUnion(x_1); if (x_8 == 0) { uint8_t x_9; -x_9 = l_Lean_IR_CtorInfo_isRef(x_5); -lean_dec(x_5); +x_9 = l_Lean_IR_CtorInfo_isRef(x_2); if (x_9 == 0) { lean_object* x_10; lean_dec(x_1); -x_10 = l_Lean_IR_Checker_checkArgs(x_6, x_3, x_4); -lean_dec(x_6); +x_10 = l_Lean_IR_Checker_checkArgs(x_3, x_5, x_6); return x_10; } else { lean_object* x_11; lean_object* x_12; -x_11 = l_Lean_IR_Checker_checkObjType(x_1, x_3, x_4); +x_11 = l_Lean_IR_Checker_checkObjType(x_1, x_5, x_6); x_12 = lean_ctor_get(x_11, 0); lean_inc(x_12); if (lean_obj_tag(x_12) == 0) { uint8_t x_13; -lean_dec(x_6); x_13 = !lean_is_exclusive(x_11); if (x_13 == 0) { @@ -2783,8 +2842,7 @@ lean_dec(x_12); x_23 = lean_ctor_get(x_11, 1); lean_inc(x_23); lean_dec(x_11); -x_24 = l_Lean_IR_Checker_checkArgs(x_6, x_3, x_23); -lean_dec(x_6); +x_24 = l_Lean_IR_Checker_checkArgs(x_3, x_5, x_23); return x_24; } } @@ -2792,798 +2850,941 @@ return x_24; else { lean_object* x_25; -lean_dec(x_5); lean_dec(x_1); -x_25 = l_Lean_IR_Checker_checkArgs(x_6, x_3, x_4); -lean_dec(x_6); +x_25 = l_Lean_IR_Checker_checkArgs(x_3, x_5, x_6); return x_25; } } else { lean_object* x_26; -lean_dec(x_5); lean_dec(x_1); -x_26 = l_Lean_IR_Checker_checkArgs(x_6, x_3, x_4); -lean_dec(x_6); +x_26 = l_Lean_IR_Checker_checkArgs(x_3, x_5, x_6); return x_26; } } +} +static lean_object* _init_l_Lean_IR_Checker_checkExpr___lambda__2___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("constructor '"); +return x_1; +} +} +static lean_object* _init_l_Lean_IR_Checker_checkExpr___lambda__2___closed__2() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("' has too many scalar fields"); +return x_1; +} +} +lean_object* l_Lean_IR_Checker_checkExpr___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) { +_start: +{ +lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; uint8_t x_13; +x_7 = lean_ctor_get(x_2, 4); +lean_inc(x_7); +x_8 = lean_ctor_get(x_2, 3); +lean_inc(x_8); +x_9 = l_Lean_IR_Checker_usizeSize; +x_10 = lean_nat_mul(x_8, x_9); +lean_dec(x_8); +x_11 = lean_nat_add(x_7, x_10); +lean_dec(x_10); +lean_dec(x_7); +x_12 = l_Lean_IR_Checker_maxCtorScalarsSize; +x_13 = lean_nat_dec_lt(x_12, x_11); +lean_dec(x_11); +if (x_13 == 0) +{ +lean_object* x_14; lean_object* x_15; +x_14 = lean_box(0); +x_15 = l_Lean_IR_Checker_checkExpr___lambda__1(x_1, x_2, x_3, x_14, x_5, x_6); +lean_dec(x_2); +return x_15; +} +else +{ +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_dec(x_1); +x_16 = lean_ctor_get(x_2, 0); +lean_inc(x_16); +lean_dec(x_2); +x_17 = l_Lean_Name_toString___closed__1; +x_18 = l_Lean_Name_toStringWithSep(x_17, x_16); +x_19 = l_Lean_IR_Checker_checkExpr___lambda__2___closed__1; +x_20 = lean_string_append(x_19, x_18); +lean_dec(x_18); +x_21 = l_Lean_IR_Checker_checkExpr___lambda__2___closed__2; +x_22 = lean_string_append(x_20, x_21); +x_23 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_23, 0, x_22); +x_24 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_24, 0, x_23); +lean_ctor_set(x_24, 1, x_6); +return x_24; +} +} +} +static lean_object* _init_l_Lean_IR_Checker_checkExpr___closed__1() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("' has too many fields"); +return x_1; +} +} +static lean_object* _init_l_Lean_IR_Checker_checkExpr___closed__2() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("unexpected IR type '"); +return x_1; +} +} +static lean_object* _init_l_Lean_IR_Checker_checkExpr___closed__3() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("invalid proj index"); +return x_1; +} +} +static lean_object* _init_l_Lean_IR_Checker_checkExpr___closed__4() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = l_Lean_IR_Checker_checkExpr___closed__3; +x_2 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_2, 0, x_1); +return x_2; +} +} +lean_object* l_Lean_IR_Checker_checkExpr(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { +_start: +{ +switch (lean_obj_tag(x_2)) { +case 0: +{ +lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; uint8_t x_9; +x_5 = lean_ctor_get(x_2, 0); +lean_inc(x_5); +x_6 = lean_ctor_get(x_2, 1); +lean_inc(x_6); +lean_dec(x_2); +x_7 = lean_ctor_get(x_5, 2); +lean_inc(x_7); +x_8 = l_Lean_IR_Checker_maxCtorFields; +x_9 = lean_nat_dec_lt(x_8, x_7); +lean_dec(x_7); +if (x_9 == 0) +{ +lean_object* x_10; lean_object* x_11; +x_10 = lean_box(0); +x_11 = l_Lean_IR_Checker_checkExpr___lambda__2(x_1, x_5, x_6, x_10, x_3, x_4); +lean_dec(x_6); +return x_11; +} +else +{ +lean_object* x_12; 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; lean_object* x_20; +lean_dec(x_6); +lean_dec(x_1); +x_12 = lean_ctor_get(x_5, 0); +lean_inc(x_12); +lean_dec(x_5); +x_13 = l_Lean_Name_toString___closed__1; +x_14 = l_Lean_Name_toStringWithSep(x_13, x_12); +x_15 = l_Lean_IR_Checker_checkExpr___lambda__2___closed__1; +x_16 = lean_string_append(x_15, x_14); +lean_dec(x_14); +x_17 = l_Lean_IR_Checker_checkExpr___closed__1; +x_18 = lean_string_append(x_16, x_17); +x_19 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_19, 0, x_18); +x_20 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_20, 0, x_19); +lean_ctor_set(x_20, 1, x_4); +return x_20; +} +} case 1: { -lean_object* x_27; lean_object* x_28; lean_object* x_29; -x_27 = lean_ctor_get(x_2, 1); -lean_inc(x_27); +lean_object* x_21; lean_object* x_22; lean_object* x_23; +x_21 = lean_ctor_get(x_2, 1); +lean_inc(x_21); lean_dec(x_2); -x_28 = l_Lean_IR_Checker_checkObjVar(x_27, x_3, x_4); -x_29 = lean_ctor_get(x_28, 0); -lean_inc(x_29); -if (lean_obj_tag(x_29) == 0) +x_22 = l_Lean_IR_Checker_checkObjVar(x_21, x_3, x_4); +x_23 = lean_ctor_get(x_22, 0); +lean_inc(x_23); +if (lean_obj_tag(x_23) == 0) { -uint8_t x_30; +uint8_t x_24; lean_dec(x_1); -x_30 = !lean_is_exclusive(x_28); -if (x_30 == 0) +x_24 = !lean_is_exclusive(x_22); +if (x_24 == 0) { -lean_object* x_31; uint8_t x_32; -x_31 = lean_ctor_get(x_28, 0); -lean_dec(x_31); -x_32 = !lean_is_exclusive(x_29); -if (x_32 == 0) +lean_object* x_25; uint8_t x_26; +x_25 = lean_ctor_get(x_22, 0); +lean_dec(x_25); +x_26 = !lean_is_exclusive(x_23); +if (x_26 == 0) { -return x_28; +return x_22; } else { -lean_object* x_33; lean_object* x_34; -x_33 = lean_ctor_get(x_29, 0); -lean_inc(x_33); -lean_dec(x_29); -x_34 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_34, 0, x_33); -lean_ctor_set(x_28, 0, x_34); -return x_28; +lean_object* x_27; lean_object* x_28; +x_27 = lean_ctor_get(x_23, 0); +lean_inc(x_27); +lean_dec(x_23); +x_28 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_28, 0, x_27); +lean_ctor_set(x_22, 0, x_28); +return x_22; } } else { -lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; -x_35 = lean_ctor_get(x_28, 1); -lean_inc(x_35); -lean_dec(x_28); -x_36 = lean_ctor_get(x_29, 0); -lean_inc(x_36); -if (lean_is_exclusive(x_29)) { - lean_ctor_release(x_29, 0); - x_37 = x_29; +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_22, 1); +lean_inc(x_29); +lean_dec(x_22); +x_30 = lean_ctor_get(x_23, 0); +lean_inc(x_30); +if (lean_is_exclusive(x_23)) { + lean_ctor_release(x_23, 0); + x_31 = x_23; } else { - lean_dec_ref(x_29); - x_37 = lean_box(0); + lean_dec_ref(x_23); + x_31 = lean_box(0); } -if (lean_is_scalar(x_37)) { - x_38 = lean_alloc_ctor(0, 1, 0); +if (lean_is_scalar(x_31)) { + x_32 = lean_alloc_ctor(0, 1, 0); } else { - x_38 = x_37; + x_32 = x_31; } -lean_ctor_set(x_38, 0, x_36); -x_39 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_39, 0, x_38); -lean_ctor_set(x_39, 1, x_35); -return x_39; +lean_ctor_set(x_32, 0, x_30); +x_33 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_33, 0, x_32); +lean_ctor_set(x_33, 1, x_29); +return x_33; } } else { -lean_object* x_40; lean_object* x_41; -lean_dec(x_29); -x_40 = lean_ctor_get(x_28, 1); -lean_inc(x_40); -lean_dec(x_28); -x_41 = l_Lean_IR_Checker_checkObjType(x_1, x_3, x_40); -return x_41; +lean_object* x_34; lean_object* x_35; +lean_dec(x_23); +x_34 = lean_ctor_get(x_22, 1); +lean_inc(x_34); +lean_dec(x_22); +x_35 = l_Lean_IR_Checker_checkObjType(x_1, x_3, x_34); +return x_35; } } case 2: { -lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; -x_42 = lean_ctor_get(x_2, 0); -lean_inc(x_42); -x_43 = lean_ctor_get(x_2, 2); -lean_inc(x_43); +lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; +x_36 = lean_ctor_get(x_2, 0); +lean_inc(x_36); +x_37 = lean_ctor_get(x_2, 2); +lean_inc(x_37); lean_dec(x_2); -x_44 = l_Lean_IR_Checker_checkObjVar(x_42, x_3, x_4); -x_45 = lean_ctor_get(x_44, 0); +x_38 = l_Lean_IR_Checker_checkObjVar(x_36, x_3, x_4); +x_39 = lean_ctor_get(x_38, 0); +lean_inc(x_39); +if (lean_obj_tag(x_39) == 0) +{ +uint8_t x_40; +lean_dec(x_37); +lean_dec(x_1); +x_40 = !lean_is_exclusive(x_38); +if (x_40 == 0) +{ +lean_object* x_41; uint8_t x_42; +x_41 = lean_ctor_get(x_38, 0); +lean_dec(x_41); +x_42 = !lean_is_exclusive(x_39); +if (x_42 == 0) +{ +return x_38; +} +else +{ +lean_object* x_43; lean_object* x_44; +x_43 = lean_ctor_get(x_39, 0); +lean_inc(x_43); +lean_dec(x_39); +x_44 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_44, 0, x_43); +lean_ctor_set(x_38, 0, x_44); +return x_38; +} +} +else +{ +lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; +x_45 = lean_ctor_get(x_38, 1); lean_inc(x_45); -if (lean_obj_tag(x_45) == 0) -{ -uint8_t x_46; -lean_dec(x_43); -lean_dec(x_1); -x_46 = !lean_is_exclusive(x_44); -if (x_46 == 0) -{ -lean_object* x_47; uint8_t x_48; -x_47 = lean_ctor_get(x_44, 0); -lean_dec(x_47); -x_48 = !lean_is_exclusive(x_45); -if (x_48 == 0) -{ -return x_44; +lean_dec(x_38); +x_46 = lean_ctor_get(x_39, 0); +lean_inc(x_46); +if (lean_is_exclusive(x_39)) { + lean_ctor_release(x_39, 0); + x_47 = x_39; +} else { + lean_dec_ref(x_39); + x_47 = lean_box(0); } -else -{ -lean_object* x_49; lean_object* x_50; -x_49 = lean_ctor_get(x_45, 0); -lean_inc(x_49); -lean_dec(x_45); -x_50 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_50, 0, x_49); -lean_ctor_set(x_44, 0, x_50); -return x_44; +if (lean_is_scalar(x_47)) { + x_48 = lean_alloc_ctor(0, 1, 0); +} else { + x_48 = x_47; +} +lean_ctor_set(x_48, 0, x_46); +x_49 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_49, 0, x_48); +lean_ctor_set(x_49, 1, x_45); +return x_49; } } else { -lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; -x_51 = lean_ctor_get(x_44, 1); -lean_inc(x_51); -lean_dec(x_44); -x_52 = lean_ctor_get(x_45, 0); +lean_object* x_50; lean_object* x_51; lean_object* x_52; +lean_dec(x_39); +x_50 = lean_ctor_get(x_38, 1); +lean_inc(x_50); +lean_dec(x_38); +x_51 = l_Lean_IR_Checker_checkArgs(x_37, x_3, x_50); +lean_dec(x_37); +x_52 = lean_ctor_get(x_51, 0); lean_inc(x_52); -if (lean_is_exclusive(x_45)) { - lean_ctor_release(x_45, 0); - x_53 = x_45; -} else { - lean_dec_ref(x_45); - x_53 = lean_box(0); -} -if (lean_is_scalar(x_53)) { - x_54 = lean_alloc_ctor(0, 1, 0); -} else { - x_54 = x_53; -} -lean_ctor_set(x_54, 0, x_52); -x_55 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_55, 0, x_54); -lean_ctor_set(x_55, 1, x_51); -return x_55; -} -} -else +if (lean_obj_tag(x_52) == 0) { -lean_object* x_56; lean_object* x_57; lean_object* x_58; -lean_dec(x_45); -x_56 = lean_ctor_get(x_44, 1); -lean_inc(x_56); -lean_dec(x_44); -x_57 = l_Lean_IR_Checker_checkArgs(x_43, x_3, x_56); -lean_dec(x_43); -x_58 = lean_ctor_get(x_57, 0); -lean_inc(x_58); -if (lean_obj_tag(x_58) == 0) -{ -uint8_t x_59; +uint8_t x_53; lean_dec(x_1); -x_59 = !lean_is_exclusive(x_57); -if (x_59 == 0) +x_53 = !lean_is_exclusive(x_51); +if (x_53 == 0) { -lean_object* x_60; uint8_t x_61; -x_60 = lean_ctor_get(x_57, 0); -lean_dec(x_60); -x_61 = !lean_is_exclusive(x_58); -if (x_61 == 0) +lean_object* x_54; uint8_t x_55; +x_54 = lean_ctor_get(x_51, 0); +lean_dec(x_54); +x_55 = !lean_is_exclusive(x_52); +if (x_55 == 0) { -return x_57; +return x_51; } else { -lean_object* x_62; lean_object* x_63; -x_62 = lean_ctor_get(x_58, 0); -lean_inc(x_62); -lean_dec(x_58); -x_63 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_63, 0, x_62); -lean_ctor_set(x_57, 0, x_63); -return x_57; +lean_object* x_56; lean_object* x_57; +x_56 = lean_ctor_get(x_52, 0); +lean_inc(x_56); +lean_dec(x_52); +x_57 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_57, 0, x_56); +lean_ctor_set(x_51, 0, x_57); +return x_51; } } else { -lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; -x_64 = lean_ctor_get(x_57, 1); -lean_inc(x_64); -lean_dec(x_57); -x_65 = lean_ctor_get(x_58, 0); -lean_inc(x_65); -if (lean_is_exclusive(x_58)) { - lean_ctor_release(x_58, 0); - x_66 = x_58; +lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; +x_58 = lean_ctor_get(x_51, 1); +lean_inc(x_58); +lean_dec(x_51); +x_59 = lean_ctor_get(x_52, 0); +lean_inc(x_59); +if (lean_is_exclusive(x_52)) { + lean_ctor_release(x_52, 0); + x_60 = x_52; } else { - lean_dec_ref(x_58); - x_66 = lean_box(0); + lean_dec_ref(x_52); + x_60 = lean_box(0); } -if (lean_is_scalar(x_66)) { - x_67 = lean_alloc_ctor(0, 1, 0); +if (lean_is_scalar(x_60)) { + x_61 = lean_alloc_ctor(0, 1, 0); } else { - x_67 = x_66; + x_61 = x_60; } -lean_ctor_set(x_67, 0, x_65); -x_68 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_68, 0, x_67); -lean_ctor_set(x_68, 1, x_64); -return x_68; +lean_ctor_set(x_61, 0, x_59); +x_62 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_62, 0, x_61); +lean_ctor_set(x_62, 1, x_58); +return x_62; } } else { -lean_object* x_69; lean_object* x_70; -lean_dec(x_58); -x_69 = lean_ctor_get(x_57, 1); -lean_inc(x_69); -lean_dec(x_57); -x_70 = l_Lean_IR_Checker_checkObjType(x_1, x_3, x_69); -return x_70; +lean_object* x_63; lean_object* x_64; +lean_dec(x_52); +x_63 = lean_ctor_get(x_51, 1); +lean_inc(x_63); +lean_dec(x_51); +x_64 = l_Lean_IR_Checker_checkObjType(x_1, x_3, x_63); +return x_64; } } } case 3: { -lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; -x_71 = lean_ctor_get(x_2, 0); -lean_inc(x_71); -x_72 = lean_ctor_get(x_2, 1); -lean_inc(x_72); +lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; +x_65 = lean_ctor_get(x_2, 0); +lean_inc(x_65); +x_66 = lean_ctor_get(x_2, 1); +lean_inc(x_66); lean_dec(x_2); -x_73 = l_Lean_IR_Checker_getType(x_72, x_3, x_4); -x_74 = lean_ctor_get(x_73, 0); -lean_inc(x_74); -if (lean_obj_tag(x_74) == 0) +x_67 = l_Lean_IR_Checker_getType(x_66, x_3, x_4); +x_68 = lean_ctor_get(x_67, 0); +lean_inc(x_68); +if (lean_obj_tag(x_68) == 0) { -uint8_t x_75; -lean_dec(x_71); +uint8_t x_69; +lean_dec(x_65); lean_dec(x_1); -x_75 = !lean_is_exclusive(x_73); -if (x_75 == 0) +x_69 = !lean_is_exclusive(x_67); +if (x_69 == 0) { -lean_object* x_76; uint8_t x_77; -x_76 = lean_ctor_get(x_73, 0); -lean_dec(x_76); -x_77 = !lean_is_exclusive(x_74); -if (x_77 == 0) +lean_object* x_70; uint8_t x_71; +x_70 = lean_ctor_get(x_67, 0); +lean_dec(x_70); +x_71 = !lean_is_exclusive(x_68); +if (x_71 == 0) { -return x_73; +return x_67; } else { -lean_object* x_78; lean_object* x_79; -x_78 = lean_ctor_get(x_74, 0); -lean_inc(x_78); -lean_dec(x_74); -x_79 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_79, 0, x_78); -lean_ctor_set(x_73, 0, x_79); -return x_73; +lean_object* x_72; lean_object* x_73; +x_72 = lean_ctor_get(x_68, 0); +lean_inc(x_72); +lean_dec(x_68); +x_73 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_73, 0, x_72); +lean_ctor_set(x_67, 0, x_73); +return x_67; } } else { -lean_object* x_80; lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; -x_80 = lean_ctor_get(x_73, 1); -lean_inc(x_80); -lean_dec(x_73); -x_81 = lean_ctor_get(x_74, 0); -lean_inc(x_81); -if (lean_is_exclusive(x_74)) { - lean_ctor_release(x_74, 0); - x_82 = x_74; +lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; +x_74 = lean_ctor_get(x_67, 1); +lean_inc(x_74); +lean_dec(x_67); +x_75 = lean_ctor_get(x_68, 0); +lean_inc(x_75); +if (lean_is_exclusive(x_68)) { + lean_ctor_release(x_68, 0); + x_76 = x_68; } else { - lean_dec_ref(x_74); - x_82 = lean_box(0); + lean_dec_ref(x_68); + x_76 = lean_box(0); } -if (lean_is_scalar(x_82)) { - x_83 = lean_alloc_ctor(0, 1, 0); +if (lean_is_scalar(x_76)) { + x_77 = lean_alloc_ctor(0, 1, 0); } else { - x_83 = x_82; + x_77 = x_76; } -lean_ctor_set(x_83, 0, x_81); -x_84 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_84, 0, x_83); -lean_ctor_set(x_84, 1, x_80); -return x_84; +lean_ctor_set(x_77, 0, x_75); +x_78 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_78, 0, x_77); +lean_ctor_set(x_78, 1, x_74); +return x_78; } } else { -uint8_t x_85; -x_85 = !lean_is_exclusive(x_74); -if (x_85 == 0) +uint8_t x_79; +x_79 = !lean_is_exclusive(x_68); +if (x_79 == 0) { -lean_object* x_86; -x_86 = lean_ctor_get(x_74, 0); -switch (lean_obj_tag(x_86)) { +lean_object* x_80; +x_80 = lean_ctor_get(x_68, 0); +switch (lean_obj_tag(x_80)) { case 7: { -lean_object* x_87; lean_object* x_88; -lean_free_object(x_74); -lean_dec(x_71); -x_87 = lean_ctor_get(x_73, 1); -lean_inc(x_87); -lean_dec(x_73); -x_88 = l_Lean_IR_Checker_checkObjType(x_1, x_3, x_87); -return x_88; +lean_object* x_81; lean_object* x_82; +lean_free_object(x_68); +lean_dec(x_65); +x_81 = lean_ctor_get(x_67, 1); +lean_inc(x_81); +lean_dec(x_67); +x_82 = l_Lean_IR_Checker_checkObjType(x_1, x_3, x_81); +return x_82; } case 8: { -lean_object* x_89; lean_object* x_90; -lean_free_object(x_74); -lean_dec(x_71); -x_89 = lean_ctor_get(x_73, 1); -lean_inc(x_89); -lean_dec(x_73); -x_90 = l_Lean_IR_Checker_checkObjType(x_1, x_3, x_89); -return x_90; +lean_object* x_83; lean_object* x_84; +lean_free_object(x_68); +lean_dec(x_65); +x_83 = lean_ctor_get(x_67, 1); +lean_inc(x_83); +lean_dec(x_67); +x_84 = l_Lean_IR_Checker_checkObjType(x_1, x_3, x_83); +return x_84; } case 9: { -uint8_t x_91; -lean_free_object(x_74); -x_91 = !lean_is_exclusive(x_73); -if (x_91 == 0) +uint8_t x_85; +lean_free_object(x_68); +x_85 = !lean_is_exclusive(x_67); +if (x_85 == 0) { -lean_object* x_92; lean_object* x_93; lean_object* x_94; uint8_t x_95; -x_92 = lean_ctor_get(x_73, 0); -lean_dec(x_92); -x_93 = lean_ctor_get(x_86, 1); -lean_inc(x_93); +lean_object* x_86; lean_object* x_87; lean_object* x_88; uint8_t x_89; +x_86 = lean_ctor_get(x_67, 0); lean_dec(x_86); -x_94 = lean_array_get_size(x_93); -x_95 = lean_nat_dec_lt(x_71, x_94); -lean_dec(x_94); -if (x_95 == 0) +x_87 = lean_ctor_get(x_80, 1); +lean_inc(x_87); +lean_dec(x_80); +x_88 = lean_array_get_size(x_87); +x_89 = lean_nat_dec_lt(x_65, x_88); +lean_dec(x_88); +if (x_89 == 0) { -lean_object* x_96; -lean_dec(x_93); -lean_dec(x_71); +lean_object* x_90; +lean_dec(x_87); +lean_dec(x_65); lean_dec(x_1); -x_96 = l_Lean_IR_Checker_checkExpr___closed__3; -lean_ctor_set(x_73, 0, x_96); -return x_73; +x_90 = l_Lean_IR_Checker_checkExpr___closed__4; +lean_ctor_set(x_67, 0, x_90); +return x_67; } else { -lean_object* x_97; uint8_t x_98; -x_97 = lean_array_fget(x_93, x_71); -lean_dec(x_71); -lean_dec(x_93); -x_98 = l_Lean_IR_IRType_beq(x_97, x_1); +lean_object* x_91; uint8_t x_92; +x_91 = lean_array_fget(x_87, x_65); +lean_dec(x_65); +lean_dec(x_87); +x_92 = l_Lean_IR_IRType_beq(x_91, x_1); lean_dec(x_1); +lean_dec(x_91); +if (x_92 == 0) +{ +lean_object* x_93; +x_93 = l_Lean_IR_Checker_checkEqTypes___closed__2; +lean_ctor_set(x_67, 0, x_93); +return x_67; +} +else +{ +lean_object* x_94; +x_94 = l_Lean_Compiler_checkIsDefinition___closed__3; +lean_ctor_set(x_67, 0, x_94); +return x_67; +} +} +} +else +{ +lean_object* x_95; lean_object* x_96; lean_object* x_97; uint8_t x_98; +x_95 = lean_ctor_get(x_67, 1); +lean_inc(x_95); +lean_dec(x_67); +x_96 = lean_ctor_get(x_80, 1); +lean_inc(x_96); +lean_dec(x_80); +x_97 = lean_array_get_size(x_96); +x_98 = lean_nat_dec_lt(x_65, x_97); lean_dec(x_97); if (x_98 == 0) { -lean_object* x_99; -x_99 = l_Lean_IR_Checker_checkEqTypes___closed__2; -lean_ctor_set(x_73, 0, x_99); -return x_73; +lean_object* x_99; lean_object* x_100; +lean_dec(x_96); +lean_dec(x_65); +lean_dec(x_1); +x_99 = l_Lean_IR_Checker_checkExpr___closed__4; +x_100 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_100, 0, x_99); +lean_ctor_set(x_100, 1, x_95); +return x_100; } else { -lean_object* x_100; -x_100 = l_Lean_Compiler_checkIsDefinition___closed__3; -lean_ctor_set(x_73, 0, x_100); -return x_73; -} -} +lean_object* x_101; uint8_t x_102; +x_101 = lean_array_fget(x_96, x_65); +lean_dec(x_65); +lean_dec(x_96); +x_102 = l_Lean_IR_IRType_beq(x_101, x_1); +lean_dec(x_1); +lean_dec(x_101); +if (x_102 == 0) +{ +lean_object* x_103; lean_object* x_104; +x_103 = l_Lean_IR_Checker_checkEqTypes___closed__2; +x_104 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_104, 0, x_103); +lean_ctor_set(x_104, 1, x_95); +return x_104; } else { -lean_object* x_101; lean_object* x_102; lean_object* x_103; uint8_t x_104; -x_101 = lean_ctor_get(x_73, 1); -lean_inc(x_101); -lean_dec(x_73); -x_102 = lean_ctor_get(x_86, 1); -lean_inc(x_102); -lean_dec(x_86); -x_103 = lean_array_get_size(x_102); -x_104 = lean_nat_dec_lt(x_71, x_103); -lean_dec(x_103); -if (x_104 == 0) -{ lean_object* x_105; lean_object* x_106; -lean_dec(x_102); -lean_dec(x_71); -lean_dec(x_1); -x_105 = l_Lean_IR_Checker_checkExpr___closed__3; +x_105 = l_Lean_Compiler_checkIsDefinition___closed__3; x_106 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_106, 0, x_105); -lean_ctor_set(x_106, 1, x_101); +lean_ctor_set(x_106, 1, x_95); return x_106; } -else -{ -lean_object* x_107; uint8_t x_108; -x_107 = lean_array_fget(x_102, x_71); -lean_dec(x_71); -lean_dec(x_102); -x_108 = l_Lean_IR_IRType_beq(x_107, x_1); -lean_dec(x_1); -lean_dec(x_107); -if (x_108 == 0) -{ -lean_object* x_109; lean_object* x_110; -x_109 = l_Lean_IR_Checker_checkEqTypes___closed__2; -x_110 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_110, 0, x_109); -lean_ctor_set(x_110, 1, x_101); -return x_110; -} -else -{ -lean_object* x_111; lean_object* x_112; -x_111 = l_Lean_Compiler_checkIsDefinition___closed__3; -x_112 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_112, 0, x_111); -lean_ctor_set(x_112, 1, x_101); -return x_112; -} } } } case 10: { -uint8_t x_113; -lean_free_object(x_74); -x_113 = !lean_is_exclusive(x_73); -if (x_113 == 0) +uint8_t x_107; +lean_free_object(x_68); +x_107 = !lean_is_exclusive(x_67); +if (x_107 == 0) { -lean_object* x_114; lean_object* x_115; lean_object* x_116; uint8_t x_117; -x_114 = lean_ctor_get(x_73, 0); -lean_dec(x_114); -x_115 = lean_ctor_get(x_86, 1); -lean_inc(x_115); -lean_dec(x_86); -x_116 = lean_array_get_size(x_115); -x_117 = lean_nat_dec_lt(x_71, x_116); -lean_dec(x_116); -if (x_117 == 0) +lean_object* x_108; lean_object* x_109; lean_object* x_110; uint8_t x_111; +x_108 = lean_ctor_get(x_67, 0); +lean_dec(x_108); +x_109 = lean_ctor_get(x_80, 1); +lean_inc(x_109); +lean_dec(x_80); +x_110 = lean_array_get_size(x_109); +x_111 = lean_nat_dec_lt(x_65, x_110); +lean_dec(x_110); +if (x_111 == 0) { -lean_object* x_118; -lean_dec(x_115); -lean_dec(x_71); +lean_object* x_112; +lean_dec(x_109); +lean_dec(x_65); lean_dec(x_1); -x_118 = l_Lean_IR_Checker_checkExpr___closed__3; -lean_ctor_set(x_73, 0, x_118); -return x_73; +x_112 = l_Lean_IR_Checker_checkExpr___closed__4; +lean_ctor_set(x_67, 0, x_112); +return x_67; } else { -lean_object* x_119; uint8_t x_120; -x_119 = lean_array_fget(x_115, x_71); -lean_dec(x_71); -lean_dec(x_115); -x_120 = l_Lean_IR_IRType_beq(x_119, x_1); +lean_object* x_113; uint8_t x_114; +x_113 = lean_array_fget(x_109, x_65); +lean_dec(x_65); +lean_dec(x_109); +x_114 = l_Lean_IR_IRType_beq(x_113, x_1); lean_dec(x_1); +lean_dec(x_113); +if (x_114 == 0) +{ +lean_object* x_115; +x_115 = l_Lean_IR_Checker_checkEqTypes___closed__2; +lean_ctor_set(x_67, 0, x_115); +return x_67; +} +else +{ +lean_object* x_116; +x_116 = l_Lean_Compiler_checkIsDefinition___closed__3; +lean_ctor_set(x_67, 0, x_116); +return x_67; +} +} +} +else +{ +lean_object* x_117; lean_object* x_118; lean_object* x_119; uint8_t x_120; +x_117 = lean_ctor_get(x_67, 1); +lean_inc(x_117); +lean_dec(x_67); +x_118 = lean_ctor_get(x_80, 1); +lean_inc(x_118); +lean_dec(x_80); +x_119 = lean_array_get_size(x_118); +x_120 = lean_nat_dec_lt(x_65, x_119); lean_dec(x_119); if (x_120 == 0) { -lean_object* x_121; -x_121 = l_Lean_IR_Checker_checkEqTypes___closed__2; -lean_ctor_set(x_73, 0, x_121); -return x_73; +lean_object* x_121; lean_object* x_122; +lean_dec(x_118); +lean_dec(x_65); +lean_dec(x_1); +x_121 = l_Lean_IR_Checker_checkExpr___closed__4; +x_122 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_122, 0, x_121); +lean_ctor_set(x_122, 1, x_117); +return x_122; } else { -lean_object* x_122; -x_122 = l_Lean_Compiler_checkIsDefinition___closed__3; -lean_ctor_set(x_73, 0, x_122); -return x_73; -} -} +lean_object* x_123; uint8_t x_124; +x_123 = lean_array_fget(x_118, x_65); +lean_dec(x_65); +lean_dec(x_118); +x_124 = l_Lean_IR_IRType_beq(x_123, x_1); +lean_dec(x_1); +lean_dec(x_123); +if (x_124 == 0) +{ +lean_object* x_125; lean_object* x_126; +x_125 = l_Lean_IR_Checker_checkEqTypes___closed__2; +x_126 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_126, 0, x_125); +lean_ctor_set(x_126, 1, x_117); +return x_126; } else { -lean_object* x_123; lean_object* x_124; lean_object* x_125; uint8_t x_126; -x_123 = lean_ctor_get(x_73, 1); -lean_inc(x_123); -lean_dec(x_73); -x_124 = lean_ctor_get(x_86, 1); -lean_inc(x_124); -lean_dec(x_86); -x_125 = lean_array_get_size(x_124); -x_126 = lean_nat_dec_lt(x_71, x_125); -lean_dec(x_125); -if (x_126 == 0) -{ lean_object* x_127; lean_object* x_128; -lean_dec(x_124); -lean_dec(x_71); -lean_dec(x_1); -x_127 = l_Lean_IR_Checker_checkExpr___closed__3; +x_127 = l_Lean_Compiler_checkIsDefinition___closed__3; x_128 = lean_alloc_ctor(0, 2, 0); lean_ctor_set(x_128, 0, x_127); -lean_ctor_set(x_128, 1, x_123); +lean_ctor_set(x_128, 1, x_117); return x_128; } -else -{ -lean_object* x_129; uint8_t x_130; -x_129 = lean_array_fget(x_124, x_71); -lean_dec(x_71); -lean_dec(x_124); -x_130 = l_Lean_IR_IRType_beq(x_129, x_1); -lean_dec(x_1); -lean_dec(x_129); -if (x_130 == 0) -{ -lean_object* x_131; lean_object* x_132; -x_131 = l_Lean_IR_Checker_checkEqTypes___closed__2; -x_132 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_132, 0, x_131); -lean_ctor_set(x_132, 1, x_123); -return x_132; -} -else -{ -lean_object* x_133; lean_object* x_134; -x_133 = l_Lean_Compiler_checkIsDefinition___closed__3; -x_134 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_134, 0, x_133); -lean_ctor_set(x_134, 1, x_123); -return x_134; -} } } } default: { -uint8_t x_135; -lean_dec(x_71); +uint8_t x_129; +lean_dec(x_65); lean_dec(x_1); -x_135 = !lean_is_exclusive(x_73); -if (x_135 == 0) +x_129 = !lean_is_exclusive(x_67); +if (x_129 == 0) { -lean_object* x_136; lean_object* x_137; lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; -x_136 = lean_ctor_get(x_73, 0); -lean_dec(x_136); -x_137 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_86); -x_138 = l_Std_Format_defWidth; -x_139 = lean_format_pretty(x_137, x_138); -x_140 = l_Lean_IR_Checker_checkExpr___closed__1; -x_141 = lean_string_append(x_140, x_139); -lean_dec(x_139); -x_142 = l_Char_quote___closed__1; -x_143 = lean_string_append(x_141, x_142); -lean_ctor_set_tag(x_74, 0); -lean_ctor_set(x_74, 0, x_143); -return x_73; +lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; +x_130 = lean_ctor_get(x_67, 0); +lean_dec(x_130); +x_131 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_80); +x_132 = l_Std_Format_defWidth; +x_133 = lean_format_pretty(x_131, x_132); +x_134 = l_Lean_IR_Checker_checkExpr___closed__2; +x_135 = lean_string_append(x_134, x_133); +lean_dec(x_133); +x_136 = l_Char_quote___closed__1; +x_137 = lean_string_append(x_135, x_136); +lean_ctor_set_tag(x_68, 0); +lean_ctor_set(x_68, 0, x_137); +return x_67; } else { -lean_object* x_144; lean_object* x_145; lean_object* x_146; lean_object* x_147; lean_object* x_148; lean_object* x_149; lean_object* x_150; lean_object* x_151; lean_object* x_152; -x_144 = lean_ctor_get(x_73, 1); -lean_inc(x_144); -lean_dec(x_73); -x_145 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_86); -x_146 = l_Std_Format_defWidth; -x_147 = lean_format_pretty(x_145, x_146); -x_148 = l_Lean_IR_Checker_checkExpr___closed__1; -x_149 = lean_string_append(x_148, x_147); -lean_dec(x_147); -x_150 = l_Char_quote___closed__1; -x_151 = lean_string_append(x_149, x_150); -lean_ctor_set_tag(x_74, 0); -lean_ctor_set(x_74, 0, x_151); -x_152 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_152, 0, x_74); -lean_ctor_set(x_152, 1, x_144); -return x_152; +lean_object* x_138; lean_object* x_139; lean_object* x_140; lean_object* x_141; lean_object* x_142; lean_object* x_143; lean_object* x_144; lean_object* x_145; lean_object* x_146; +x_138 = lean_ctor_get(x_67, 1); +lean_inc(x_138); +lean_dec(x_67); +x_139 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_80); +x_140 = l_Std_Format_defWidth; +x_141 = lean_format_pretty(x_139, x_140); +x_142 = l_Lean_IR_Checker_checkExpr___closed__2; +x_143 = lean_string_append(x_142, x_141); +lean_dec(x_141); +x_144 = l_Char_quote___closed__1; +x_145 = lean_string_append(x_143, x_144); +lean_ctor_set_tag(x_68, 0); +lean_ctor_set(x_68, 0, x_145); +x_146 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_146, 0, x_68); +lean_ctor_set(x_146, 1, x_138); +return x_146; } } } } else { -lean_object* x_153; -x_153 = lean_ctor_get(x_74, 0); -lean_inc(x_153); -lean_dec(x_74); -switch (lean_obj_tag(x_153)) { +lean_object* x_147; +x_147 = lean_ctor_get(x_68, 0); +lean_inc(x_147); +lean_dec(x_68); +switch (lean_obj_tag(x_147)) { case 7: { -lean_object* x_154; lean_object* x_155; -lean_dec(x_71); -x_154 = lean_ctor_get(x_73, 1); -lean_inc(x_154); -lean_dec(x_73); -x_155 = l_Lean_IR_Checker_checkObjType(x_1, x_3, x_154); -return x_155; +lean_object* x_148; lean_object* x_149; +lean_dec(x_65); +x_148 = lean_ctor_get(x_67, 1); +lean_inc(x_148); +lean_dec(x_67); +x_149 = l_Lean_IR_Checker_checkObjType(x_1, x_3, x_148); +return x_149; } case 8: { -lean_object* x_156; lean_object* x_157; -lean_dec(x_71); -x_156 = lean_ctor_get(x_73, 1); -lean_inc(x_156); -lean_dec(x_73); -x_157 = l_Lean_IR_Checker_checkObjType(x_1, x_3, x_156); -return x_157; +lean_object* x_150; lean_object* x_151; +lean_dec(x_65); +x_150 = lean_ctor_get(x_67, 1); +lean_inc(x_150); +lean_dec(x_67); +x_151 = l_Lean_IR_Checker_checkObjType(x_1, x_3, x_150); +return x_151; } case 9: { -lean_object* x_158; lean_object* x_159; lean_object* x_160; lean_object* x_161; uint8_t x_162; -x_158 = lean_ctor_get(x_73, 1); -lean_inc(x_158); -if (lean_is_exclusive(x_73)) { - lean_ctor_release(x_73, 0); - lean_ctor_release(x_73, 1); - x_159 = x_73; +lean_object* x_152; lean_object* x_153; lean_object* x_154; lean_object* x_155; uint8_t x_156; +x_152 = lean_ctor_get(x_67, 1); +lean_inc(x_152); +if (lean_is_exclusive(x_67)) { + lean_ctor_release(x_67, 0); + lean_ctor_release(x_67, 1); + x_153 = x_67; } else { - lean_dec_ref(x_73); - x_159 = lean_box(0); + lean_dec_ref(x_67); + x_153 = lean_box(0); } -x_160 = lean_ctor_get(x_153, 1); -lean_inc(x_160); -lean_dec(x_153); -x_161 = lean_array_get_size(x_160); -x_162 = lean_nat_dec_lt(x_71, x_161); -lean_dec(x_161); -if (x_162 == 0) +x_154 = lean_ctor_get(x_147, 1); +lean_inc(x_154); +lean_dec(x_147); +x_155 = lean_array_get_size(x_154); +x_156 = lean_nat_dec_lt(x_65, x_155); +lean_dec(x_155); +if (x_156 == 0) +{ +lean_object* x_157; lean_object* x_158; +lean_dec(x_154); +lean_dec(x_65); +lean_dec(x_1); +x_157 = l_Lean_IR_Checker_checkExpr___closed__4; +if (lean_is_scalar(x_153)) { + x_158 = lean_alloc_ctor(0, 2, 0); +} else { + x_158 = x_153; +} +lean_ctor_set(x_158, 0, x_157); +lean_ctor_set(x_158, 1, x_152); +return x_158; +} +else +{ +lean_object* x_159; uint8_t x_160; +x_159 = lean_array_fget(x_154, x_65); +lean_dec(x_65); +lean_dec(x_154); +x_160 = l_Lean_IR_IRType_beq(x_159, x_1); +lean_dec(x_1); +lean_dec(x_159); +if (x_160 == 0) +{ +lean_object* x_161; lean_object* x_162; +x_161 = l_Lean_IR_Checker_checkEqTypes___closed__2; +if (lean_is_scalar(x_153)) { + x_162 = lean_alloc_ctor(0, 2, 0); +} else { + x_162 = x_153; +} +lean_ctor_set(x_162, 0, x_161); +lean_ctor_set(x_162, 1, x_152); +return x_162; +} +else { lean_object* x_163; lean_object* x_164; -lean_dec(x_160); -lean_dec(x_71); -lean_dec(x_1); -x_163 = l_Lean_IR_Checker_checkExpr___closed__3; -if (lean_is_scalar(x_159)) { +x_163 = l_Lean_Compiler_checkIsDefinition___closed__3; +if (lean_is_scalar(x_153)) { x_164 = lean_alloc_ctor(0, 2, 0); } else { - x_164 = x_159; + x_164 = x_153; } lean_ctor_set(x_164, 0, x_163); -lean_ctor_set(x_164, 1, x_158); +lean_ctor_set(x_164, 1, x_152); return x_164; } -else -{ -lean_object* x_165; uint8_t x_166; -x_165 = lean_array_fget(x_160, x_71); -lean_dec(x_71); -lean_dec(x_160); -x_166 = l_Lean_IR_IRType_beq(x_165, x_1); -lean_dec(x_1); -lean_dec(x_165); -if (x_166 == 0) -{ -lean_object* x_167; lean_object* x_168; -x_167 = l_Lean_IR_Checker_checkEqTypes___closed__2; -if (lean_is_scalar(x_159)) { - x_168 = lean_alloc_ctor(0, 2, 0); -} else { - x_168 = x_159; -} -lean_ctor_set(x_168, 0, x_167); -lean_ctor_set(x_168, 1, x_158); -return x_168; -} -else -{ -lean_object* x_169; lean_object* x_170; -x_169 = l_Lean_Compiler_checkIsDefinition___closed__3; -if (lean_is_scalar(x_159)) { - x_170 = lean_alloc_ctor(0, 2, 0); -} else { - x_170 = x_159; -} -lean_ctor_set(x_170, 0, x_169); -lean_ctor_set(x_170, 1, x_158); -return x_170; -} } } case 10: { -lean_object* x_171; lean_object* x_172; lean_object* x_173; lean_object* x_174; uint8_t x_175; -x_171 = lean_ctor_get(x_73, 1); -lean_inc(x_171); -if (lean_is_exclusive(x_73)) { - lean_ctor_release(x_73, 0); - lean_ctor_release(x_73, 1); - x_172 = x_73; +lean_object* x_165; lean_object* x_166; lean_object* x_167; lean_object* x_168; uint8_t x_169; +x_165 = lean_ctor_get(x_67, 1); +lean_inc(x_165); +if (lean_is_exclusive(x_67)) { + lean_ctor_release(x_67, 0); + lean_ctor_release(x_67, 1); + x_166 = x_67; } else { - lean_dec_ref(x_73); - x_172 = lean_box(0); + lean_dec_ref(x_67); + x_166 = lean_box(0); } -x_173 = lean_ctor_get(x_153, 1); -lean_inc(x_173); -lean_dec(x_153); -x_174 = lean_array_get_size(x_173); -x_175 = lean_nat_dec_lt(x_71, x_174); -lean_dec(x_174); -if (x_175 == 0) +x_167 = lean_ctor_get(x_147, 1); +lean_inc(x_167); +lean_dec(x_147); +x_168 = lean_array_get_size(x_167); +x_169 = lean_nat_dec_lt(x_65, x_168); +lean_dec(x_168); +if (x_169 == 0) +{ +lean_object* x_170; lean_object* x_171; +lean_dec(x_167); +lean_dec(x_65); +lean_dec(x_1); +x_170 = l_Lean_IR_Checker_checkExpr___closed__4; +if (lean_is_scalar(x_166)) { + x_171 = lean_alloc_ctor(0, 2, 0); +} else { + x_171 = x_166; +} +lean_ctor_set(x_171, 0, x_170); +lean_ctor_set(x_171, 1, x_165); +return x_171; +} +else +{ +lean_object* x_172; uint8_t x_173; +x_172 = lean_array_fget(x_167, x_65); +lean_dec(x_65); +lean_dec(x_167); +x_173 = l_Lean_IR_IRType_beq(x_172, x_1); +lean_dec(x_1); +lean_dec(x_172); +if (x_173 == 0) +{ +lean_object* x_174; lean_object* x_175; +x_174 = l_Lean_IR_Checker_checkEqTypes___closed__2; +if (lean_is_scalar(x_166)) { + x_175 = lean_alloc_ctor(0, 2, 0); +} else { + x_175 = x_166; +} +lean_ctor_set(x_175, 0, x_174); +lean_ctor_set(x_175, 1, x_165); +return x_175; +} +else { lean_object* x_176; lean_object* x_177; -lean_dec(x_173); -lean_dec(x_71); -lean_dec(x_1); -x_176 = l_Lean_IR_Checker_checkExpr___closed__3; -if (lean_is_scalar(x_172)) { +x_176 = l_Lean_Compiler_checkIsDefinition___closed__3; +if (lean_is_scalar(x_166)) { x_177 = lean_alloc_ctor(0, 2, 0); } else { - x_177 = x_172; + x_177 = x_166; } lean_ctor_set(x_177, 0, x_176); -lean_ctor_set(x_177, 1, x_171); +lean_ctor_set(x_177, 1, x_165); return x_177; } -else -{ -lean_object* x_178; uint8_t x_179; -x_178 = lean_array_fget(x_173, x_71); -lean_dec(x_71); -lean_dec(x_173); -x_179 = l_Lean_IR_IRType_beq(x_178, x_1); -lean_dec(x_1); -lean_dec(x_178); -if (x_179 == 0) -{ -lean_object* x_180; lean_object* x_181; -x_180 = l_Lean_IR_Checker_checkEqTypes___closed__2; -if (lean_is_scalar(x_172)) { - x_181 = lean_alloc_ctor(0, 2, 0); -} else { - x_181 = x_172; -} -lean_ctor_set(x_181, 0, x_180); -lean_ctor_set(x_181, 1, x_171); -return x_181; -} -else -{ -lean_object* x_182; lean_object* x_183; -x_182 = l_Lean_Compiler_checkIsDefinition___closed__3; -if (lean_is_scalar(x_172)) { - x_183 = lean_alloc_ctor(0, 2, 0); -} else { - x_183 = x_172; -} -lean_ctor_set(x_183, 0, x_182); -lean_ctor_set(x_183, 1, x_171); -return x_183; -} } } default: { -lean_object* x_184; lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; lean_object* x_189; lean_object* x_190; lean_object* x_191; lean_object* x_192; lean_object* x_193; lean_object* x_194; -lean_dec(x_71); +lean_object* x_178; lean_object* x_179; lean_object* x_180; lean_object* x_181; lean_object* x_182; lean_object* x_183; lean_object* x_184; lean_object* x_185; lean_object* x_186; lean_object* x_187; lean_object* x_188; +lean_dec(x_65); lean_dec(x_1); -x_184 = lean_ctor_get(x_73, 1); -lean_inc(x_184); -if (lean_is_exclusive(x_73)) { - lean_ctor_release(x_73, 0); - lean_ctor_release(x_73, 1); - x_185 = x_73; +x_178 = lean_ctor_get(x_67, 1); +lean_inc(x_178); +if (lean_is_exclusive(x_67)) { + lean_ctor_release(x_67, 0); + lean_ctor_release(x_67, 1); + x_179 = x_67; } else { - lean_dec_ref(x_73); - x_185 = lean_box(0); + lean_dec_ref(x_67); + x_179 = lean_box(0); } -x_186 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_153); -x_187 = l_Std_Format_defWidth; -x_188 = lean_format_pretty(x_186, x_187); -x_189 = l_Lean_IR_Checker_checkExpr___closed__1; -x_190 = lean_string_append(x_189, x_188); -lean_dec(x_188); -x_191 = l_Char_quote___closed__1; -x_192 = lean_string_append(x_190, x_191); -x_193 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_193, 0, x_192); -if (lean_is_scalar(x_185)) { - x_194 = lean_alloc_ctor(0, 2, 0); +x_180 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_147); +x_181 = l_Std_Format_defWidth; +x_182 = lean_format_pretty(x_180, x_181); +x_183 = l_Lean_IR_Checker_checkExpr___closed__2; +x_184 = lean_string_append(x_183, x_182); +lean_dec(x_182); +x_185 = l_Char_quote___closed__1; +x_186 = lean_string_append(x_184, x_185); +x_187 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_187, 0, x_186); +if (lean_is_scalar(x_179)) { + x_188 = lean_alloc_ctor(0, 2, 0); } else { - x_194 = x_185; + x_188 = x_179; } -lean_ctor_set(x_194, 0, x_193); -lean_ctor_set(x_194, 1, x_184); -return x_194; +lean_ctor_set(x_188, 0, x_187); +lean_ctor_set(x_188, 1, x_178); +return x_188; } } } @@ -3591,766 +3792,766 @@ return x_194; } case 4: { -lean_object* x_195; lean_object* x_196; lean_object* x_197; -x_195 = lean_ctor_get(x_2, 1); -lean_inc(x_195); +lean_object* x_189; lean_object* x_190; lean_object* x_191; +x_189 = lean_ctor_get(x_2, 1); +lean_inc(x_189); lean_dec(x_2); -x_196 = l_Lean_IR_Checker_checkObjVar(x_195, x_3, x_4); -x_197 = lean_ctor_get(x_196, 0); +x_190 = l_Lean_IR_Checker_checkObjVar(x_189, x_3, x_4); +x_191 = lean_ctor_get(x_190, 0); +lean_inc(x_191); +if (lean_obj_tag(x_191) == 0) +{ +uint8_t x_192; +lean_dec(x_1); +x_192 = !lean_is_exclusive(x_190); +if (x_192 == 0) +{ +lean_object* x_193; uint8_t x_194; +x_193 = lean_ctor_get(x_190, 0); +lean_dec(x_193); +x_194 = !lean_is_exclusive(x_191); +if (x_194 == 0) +{ +return x_190; +} +else +{ +lean_object* x_195; lean_object* x_196; +x_195 = lean_ctor_get(x_191, 0); +lean_inc(x_195); +lean_dec(x_191); +x_196 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_196, 0, x_195); +lean_ctor_set(x_190, 0, x_196); +return x_190; +} +} +else +{ +lean_object* x_197; lean_object* x_198; lean_object* x_199; lean_object* x_200; lean_object* x_201; +x_197 = lean_ctor_get(x_190, 1); lean_inc(x_197); -if (lean_obj_tag(x_197) == 0) +lean_dec(x_190); +x_198 = lean_ctor_get(x_191, 0); +lean_inc(x_198); +if (lean_is_exclusive(x_191)) { + lean_ctor_release(x_191, 0); + x_199 = x_191; +} else { + lean_dec_ref(x_191); + x_199 = lean_box(0); +} +if (lean_is_scalar(x_199)) { + x_200 = lean_alloc_ctor(0, 1, 0); +} else { + x_200 = x_199; +} +lean_ctor_set(x_200, 0, x_198); +x_201 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_201, 0, x_200); +lean_ctor_set(x_201, 1, x_197); +return x_201; +} +} +else { -uint8_t x_198; +uint8_t x_202; +x_202 = !lean_is_exclusive(x_191); +if (x_202 == 0) +{ +lean_object* x_203; uint8_t x_204; +x_203 = lean_ctor_get(x_191, 0); +lean_dec(x_203); +x_204 = !lean_is_exclusive(x_190); +if (x_204 == 0) +{ +lean_object* x_205; lean_object* x_206; uint8_t x_207; +x_205 = lean_ctor_get(x_190, 0); +lean_dec(x_205); +x_206 = lean_box(5); +x_207 = l_Lean_IR_IRType_beq(x_1, x_206); +if (x_207 == 0) +{ +lean_object* x_208; lean_object* x_209; lean_object* x_210; lean_object* x_211; lean_object* x_212; lean_object* x_213; lean_object* x_214; +x_208 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_1); +x_209 = l_Std_Format_defWidth; +x_210 = lean_format_pretty(x_208, x_209); +x_211 = l_Lean_IR_Checker_checkType___closed__1; +x_212 = lean_string_append(x_211, x_210); +lean_dec(x_210); +x_213 = l_Char_quote___closed__1; +x_214 = lean_string_append(x_212, x_213); +lean_ctor_set_tag(x_191, 0); +lean_ctor_set(x_191, 0, x_214); +return x_190; +} +else +{ +lean_object* x_215; +lean_free_object(x_191); lean_dec(x_1); -x_198 = !lean_is_exclusive(x_196); -if (x_198 == 0) -{ -lean_object* x_199; uint8_t x_200; -x_199 = lean_ctor_get(x_196, 0); -lean_dec(x_199); -x_200 = !lean_is_exclusive(x_197); -if (x_200 == 0) -{ -return x_196; -} -else -{ -lean_object* x_201; lean_object* x_202; -x_201 = lean_ctor_get(x_197, 0); -lean_inc(x_201); -lean_dec(x_197); -x_202 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_202, 0, x_201); -lean_ctor_set(x_196, 0, x_202); -return x_196; +x_215 = l_Lean_Compiler_checkIsDefinition___closed__3; +lean_ctor_set(x_190, 0, x_215); +return x_190; } } else { -lean_object* x_203; lean_object* x_204; lean_object* x_205; lean_object* x_206; lean_object* x_207; -x_203 = lean_ctor_get(x_196, 1); -lean_inc(x_203); -lean_dec(x_196); -x_204 = lean_ctor_get(x_197, 0); -lean_inc(x_204); -if (lean_is_exclusive(x_197)) { - lean_ctor_release(x_197, 0); - x_205 = x_197; -} else { - lean_dec_ref(x_197); - x_205 = lean_box(0); -} -if (lean_is_scalar(x_205)) { - x_206 = lean_alloc_ctor(0, 1, 0); -} else { - x_206 = x_205; -} -lean_ctor_set(x_206, 0, x_204); -x_207 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_207, 0, x_206); -lean_ctor_set(x_207, 1, x_203); -return x_207; -} +lean_object* x_216; lean_object* x_217; uint8_t x_218; +x_216 = lean_ctor_get(x_190, 1); +lean_inc(x_216); +lean_dec(x_190); +x_217 = lean_box(5); +x_218 = l_Lean_IR_IRType_beq(x_1, x_217); +if (x_218 == 0) +{ +lean_object* x_219; lean_object* x_220; lean_object* x_221; lean_object* x_222; lean_object* x_223; lean_object* x_224; lean_object* x_225; lean_object* x_226; +x_219 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_1); +x_220 = l_Std_Format_defWidth; +x_221 = lean_format_pretty(x_219, x_220); +x_222 = l_Lean_IR_Checker_checkType___closed__1; +x_223 = lean_string_append(x_222, x_221); +lean_dec(x_221); +x_224 = l_Char_quote___closed__1; +x_225 = lean_string_append(x_223, x_224); +lean_ctor_set_tag(x_191, 0); +lean_ctor_set(x_191, 0, x_225); +x_226 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_226, 0, x_191); +lean_ctor_set(x_226, 1, x_216); +return x_226; } else { -uint8_t x_208; -x_208 = !lean_is_exclusive(x_197); -if (x_208 == 0) -{ -lean_object* x_209; uint8_t x_210; -x_209 = lean_ctor_get(x_197, 0); -lean_dec(x_209); -x_210 = !lean_is_exclusive(x_196); -if (x_210 == 0) -{ -lean_object* x_211; lean_object* x_212; uint8_t x_213; -x_211 = lean_ctor_get(x_196, 0); -lean_dec(x_211); -x_212 = lean_box(5); -x_213 = l_Lean_IR_IRType_beq(x_1, x_212); -if (x_213 == 0) -{ -lean_object* x_214; lean_object* x_215; lean_object* x_216; lean_object* x_217; lean_object* x_218; lean_object* x_219; lean_object* x_220; -x_214 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_1); -x_215 = l_Std_Format_defWidth; -x_216 = lean_format_pretty(x_214, x_215); -x_217 = l_Lean_IR_Checker_checkType___closed__1; -x_218 = lean_string_append(x_217, x_216); -lean_dec(x_216); -x_219 = l_Char_quote___closed__1; -x_220 = lean_string_append(x_218, x_219); -lean_ctor_set_tag(x_197, 0); -lean_ctor_set(x_197, 0, x_220); -return x_196; -} -else -{ -lean_object* x_221; -lean_free_object(x_197); +lean_object* x_227; lean_object* x_228; +lean_free_object(x_191); lean_dec(x_1); -x_221 = l_Lean_Compiler_checkIsDefinition___closed__3; -lean_ctor_set(x_196, 0, x_221); -return x_196; +x_227 = l_Lean_Compiler_checkIsDefinition___closed__3; +x_228 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_228, 0, x_227); +lean_ctor_set(x_228, 1, x_216); +return x_228; +} } } else { -lean_object* x_222; lean_object* x_223; uint8_t x_224; -x_222 = lean_ctor_get(x_196, 1); -lean_inc(x_222); -lean_dec(x_196); -x_223 = lean_box(5); -x_224 = l_Lean_IR_IRType_beq(x_1, x_223); -if (x_224 == 0) +lean_object* x_229; lean_object* x_230; lean_object* x_231; uint8_t x_232; +lean_dec(x_191); +x_229 = lean_ctor_get(x_190, 1); +lean_inc(x_229); +if (lean_is_exclusive(x_190)) { + lean_ctor_release(x_190, 0); + lean_ctor_release(x_190, 1); + x_230 = x_190; +} else { + lean_dec_ref(x_190); + x_230 = lean_box(0); +} +x_231 = lean_box(5); +x_232 = l_Lean_IR_IRType_beq(x_1, x_231); +if (x_232 == 0) { -lean_object* x_225; lean_object* x_226; lean_object* x_227; lean_object* x_228; lean_object* x_229; lean_object* x_230; lean_object* x_231; lean_object* x_232; -x_225 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_1); -x_226 = l_Std_Format_defWidth; -x_227 = lean_format_pretty(x_225, x_226); -x_228 = l_Lean_IR_Checker_checkType___closed__1; -x_229 = lean_string_append(x_228, x_227); -lean_dec(x_227); -x_230 = l_Char_quote___closed__1; -x_231 = lean_string_append(x_229, x_230); -lean_ctor_set_tag(x_197, 0); -lean_ctor_set(x_197, 0, x_231); -x_232 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_232, 0, x_197); -lean_ctor_set(x_232, 1, x_222); -return x_232; +lean_object* x_233; lean_object* x_234; lean_object* x_235; lean_object* x_236; lean_object* x_237; lean_object* x_238; lean_object* x_239; lean_object* x_240; lean_object* x_241; +x_233 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_1); +x_234 = l_Std_Format_defWidth; +x_235 = lean_format_pretty(x_233, x_234); +x_236 = l_Lean_IR_Checker_checkType___closed__1; +x_237 = lean_string_append(x_236, x_235); +lean_dec(x_235); +x_238 = l_Char_quote___closed__1; +x_239 = lean_string_append(x_237, x_238); +x_240 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_240, 0, x_239); +if (lean_is_scalar(x_230)) { + x_241 = lean_alloc_ctor(0, 2, 0); +} else { + x_241 = x_230; +} +lean_ctor_set(x_241, 0, x_240); +lean_ctor_set(x_241, 1, x_229); +return x_241; } else { -lean_object* x_233; lean_object* x_234; -lean_free_object(x_197); +lean_object* x_242; lean_object* x_243; lean_dec(x_1); -x_233 = l_Lean_Compiler_checkIsDefinition___closed__3; -x_234 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_234, 0, x_233); -lean_ctor_set(x_234, 1, x_222); -return x_234; -} -} -} -else -{ -lean_object* x_235; lean_object* x_236; lean_object* x_237; uint8_t x_238; -lean_dec(x_197); -x_235 = lean_ctor_get(x_196, 1); -lean_inc(x_235); -if (lean_is_exclusive(x_196)) { - lean_ctor_release(x_196, 0); - lean_ctor_release(x_196, 1); - x_236 = x_196; +x_242 = l_Lean_Compiler_checkIsDefinition___closed__3; +if (lean_is_scalar(x_230)) { + x_243 = lean_alloc_ctor(0, 2, 0); } else { - lean_dec_ref(x_196); - x_236 = lean_box(0); + x_243 = x_230; } -x_237 = lean_box(5); -x_238 = l_Lean_IR_IRType_beq(x_1, x_237); -if (x_238 == 0) -{ -lean_object* x_239; lean_object* x_240; lean_object* x_241; lean_object* x_242; lean_object* x_243; lean_object* x_244; lean_object* x_245; lean_object* x_246; lean_object* x_247; -x_239 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_1); -x_240 = l_Std_Format_defWidth; -x_241 = lean_format_pretty(x_239, x_240); -x_242 = l_Lean_IR_Checker_checkType___closed__1; -x_243 = lean_string_append(x_242, x_241); -lean_dec(x_241); -x_244 = l_Char_quote___closed__1; -x_245 = lean_string_append(x_243, x_244); -x_246 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_246, 0, x_245); -if (lean_is_scalar(x_236)) { - x_247 = lean_alloc_ctor(0, 2, 0); -} else { - x_247 = x_236; -} -lean_ctor_set(x_247, 0, x_246); -lean_ctor_set(x_247, 1, x_235); -return x_247; -} -else -{ -lean_object* x_248; lean_object* x_249; -lean_dec(x_1); -x_248 = l_Lean_Compiler_checkIsDefinition___closed__3; -if (lean_is_scalar(x_236)) { - x_249 = lean_alloc_ctor(0, 2, 0); -} else { - x_249 = x_236; -} -lean_ctor_set(x_249, 0, x_248); -lean_ctor_set(x_249, 1, x_235); -return x_249; +lean_ctor_set(x_243, 0, x_242); +lean_ctor_set(x_243, 1, x_229); +return x_243; } } } } case 5: { -lean_object* x_250; lean_object* x_251; lean_object* x_252; -x_250 = lean_ctor_get(x_2, 2); -lean_inc(x_250); +lean_object* x_244; lean_object* x_245; lean_object* x_246; +x_244 = lean_ctor_get(x_2, 2); +lean_inc(x_244); lean_dec(x_2); -x_251 = l_Lean_IR_Checker_checkObjVar(x_250, x_3, x_4); -x_252 = lean_ctor_get(x_251, 0); -lean_inc(x_252); -if (lean_obj_tag(x_252) == 0) +x_245 = l_Lean_IR_Checker_checkObjVar(x_244, x_3, x_4); +x_246 = lean_ctor_get(x_245, 0); +lean_inc(x_246); +if (lean_obj_tag(x_246) == 0) { -uint8_t x_253; +uint8_t x_247; lean_dec(x_1); -x_253 = !lean_is_exclusive(x_251); -if (x_253 == 0) +x_247 = !lean_is_exclusive(x_245); +if (x_247 == 0) { -lean_object* x_254; uint8_t x_255; -x_254 = lean_ctor_get(x_251, 0); -lean_dec(x_254); -x_255 = !lean_is_exclusive(x_252); -if (x_255 == 0) +lean_object* x_248; uint8_t x_249; +x_248 = lean_ctor_get(x_245, 0); +lean_dec(x_248); +x_249 = !lean_is_exclusive(x_246); +if (x_249 == 0) { -return x_251; +return x_245; } else { -lean_object* x_256; lean_object* x_257; -x_256 = lean_ctor_get(x_252, 0); -lean_inc(x_256); -lean_dec(x_252); -x_257 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_257, 0, x_256); -lean_ctor_set(x_251, 0, x_257); -return x_251; +lean_object* x_250; lean_object* x_251; +x_250 = lean_ctor_get(x_246, 0); +lean_inc(x_250); +lean_dec(x_246); +x_251 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_251, 0, x_250); +lean_ctor_set(x_245, 0, x_251); +return x_245; } } else { -lean_object* x_258; lean_object* x_259; lean_object* x_260; lean_object* x_261; lean_object* x_262; -x_258 = lean_ctor_get(x_251, 1); -lean_inc(x_258); -lean_dec(x_251); -x_259 = lean_ctor_get(x_252, 0); -lean_inc(x_259); -if (lean_is_exclusive(x_252)) { - lean_ctor_release(x_252, 0); - x_260 = x_252; +lean_object* x_252; lean_object* x_253; lean_object* x_254; lean_object* x_255; lean_object* x_256; +x_252 = lean_ctor_get(x_245, 1); +lean_inc(x_252); +lean_dec(x_245); +x_253 = lean_ctor_get(x_246, 0); +lean_inc(x_253); +if (lean_is_exclusive(x_246)) { + lean_ctor_release(x_246, 0); + x_254 = x_246; } else { - lean_dec_ref(x_252); - x_260 = lean_box(0); + lean_dec_ref(x_246); + x_254 = lean_box(0); } -if (lean_is_scalar(x_260)) { - x_261 = lean_alloc_ctor(0, 1, 0); +if (lean_is_scalar(x_254)) { + x_255 = lean_alloc_ctor(0, 1, 0); } else { - x_261 = x_260; + x_255 = x_254; } -lean_ctor_set(x_261, 0, x_259); -x_262 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_262, 0, x_261); -lean_ctor_set(x_262, 1, x_258); -return x_262; +lean_ctor_set(x_255, 0, x_253); +x_256 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_256, 0, x_255); +lean_ctor_set(x_256, 1, x_252); +return x_256; } } else { -lean_object* x_263; lean_object* x_264; -lean_dec(x_252); -x_263 = lean_ctor_get(x_251, 1); -lean_inc(x_263); -lean_dec(x_251); -x_264 = l_Lean_IR_Checker_checkScalarType(x_1, x_3, x_263); -return x_264; +lean_object* x_257; lean_object* x_258; +lean_dec(x_246); +x_257 = lean_ctor_get(x_245, 1); +lean_inc(x_257); +lean_dec(x_245); +x_258 = l_Lean_IR_Checker_checkScalarType(x_1, x_3, x_257); +return x_258; } } case 6: { -lean_object* x_265; lean_object* x_266; lean_object* x_267; +lean_object* x_259; lean_object* x_260; lean_object* x_261; lean_dec(x_1); -x_265 = lean_ctor_get(x_2, 0); -lean_inc(x_265); -x_266 = lean_ctor_get(x_2, 1); -lean_inc(x_266); +x_259 = lean_ctor_get(x_2, 0); +lean_inc(x_259); +x_260 = lean_ctor_get(x_2, 1); +lean_inc(x_260); lean_dec(x_2); -x_267 = l_Lean_IR_Checker_checkFullApp(x_265, x_266, x_3, x_4); -lean_dec(x_266); -return x_267; +x_261 = l_Lean_IR_Checker_checkFullApp(x_259, x_260, x_3, x_4); +lean_dec(x_260); +return x_261; } case 7: { -lean_object* x_268; lean_object* x_269; lean_object* x_270; lean_object* x_271; -x_268 = lean_ctor_get(x_2, 0); -lean_inc(x_268); -x_269 = lean_ctor_get(x_2, 1); -lean_inc(x_269); +lean_object* x_262; lean_object* x_263; lean_object* x_264; lean_object* x_265; +x_262 = lean_ctor_get(x_2, 0); +lean_inc(x_262); +x_263 = lean_ctor_get(x_2, 1); +lean_inc(x_263); lean_dec(x_2); -x_270 = l_Lean_IR_Checker_checkPartialApp(x_268, x_269, x_3, x_4); -lean_dec(x_269); -x_271 = lean_ctor_get(x_270, 0); -lean_inc(x_271); -if (lean_obj_tag(x_271) == 0) +x_264 = l_Lean_IR_Checker_checkPartialApp(x_262, x_263, x_3, x_4); +lean_dec(x_263); +x_265 = lean_ctor_get(x_264, 0); +lean_inc(x_265); +if (lean_obj_tag(x_265) == 0) { -uint8_t x_272; +uint8_t x_266; lean_dec(x_1); -x_272 = !lean_is_exclusive(x_270); -if (x_272 == 0) +x_266 = !lean_is_exclusive(x_264); +if (x_266 == 0) { -lean_object* x_273; uint8_t x_274; -x_273 = lean_ctor_get(x_270, 0); -lean_dec(x_273); -x_274 = !lean_is_exclusive(x_271); -if (x_274 == 0) +lean_object* x_267; uint8_t x_268; +x_267 = lean_ctor_get(x_264, 0); +lean_dec(x_267); +x_268 = !lean_is_exclusive(x_265); +if (x_268 == 0) { -return x_270; +return x_264; } else { -lean_object* x_275; lean_object* x_276; -x_275 = lean_ctor_get(x_271, 0); -lean_inc(x_275); -lean_dec(x_271); -x_276 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_276, 0, x_275); -lean_ctor_set(x_270, 0, x_276); -return x_270; +lean_object* x_269; lean_object* x_270; +x_269 = lean_ctor_get(x_265, 0); +lean_inc(x_269); +lean_dec(x_265); +x_270 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_270, 0, x_269); +lean_ctor_set(x_264, 0, x_270); +return x_264; } } else { -lean_object* x_277; lean_object* x_278; lean_object* x_279; lean_object* x_280; lean_object* x_281; -x_277 = lean_ctor_get(x_270, 1); -lean_inc(x_277); -lean_dec(x_270); -x_278 = lean_ctor_get(x_271, 0); -lean_inc(x_278); -if (lean_is_exclusive(x_271)) { - lean_ctor_release(x_271, 0); - x_279 = x_271; +lean_object* x_271; lean_object* x_272; lean_object* x_273; lean_object* x_274; lean_object* x_275; +x_271 = lean_ctor_get(x_264, 1); +lean_inc(x_271); +lean_dec(x_264); +x_272 = lean_ctor_get(x_265, 0); +lean_inc(x_272); +if (lean_is_exclusive(x_265)) { + lean_ctor_release(x_265, 0); + x_273 = x_265; } else { - lean_dec_ref(x_271); - x_279 = lean_box(0); + lean_dec_ref(x_265); + x_273 = lean_box(0); } -if (lean_is_scalar(x_279)) { - x_280 = lean_alloc_ctor(0, 1, 0); +if (lean_is_scalar(x_273)) { + x_274 = lean_alloc_ctor(0, 1, 0); } else { - x_280 = x_279; + x_274 = x_273; } -lean_ctor_set(x_280, 0, x_278); -x_281 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_281, 0, x_280); -lean_ctor_set(x_281, 1, x_277); -return x_281; +lean_ctor_set(x_274, 0, x_272); +x_275 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_275, 0, x_274); +lean_ctor_set(x_275, 1, x_271); +return x_275; } } else { -lean_object* x_282; lean_object* x_283; -lean_dec(x_271); -x_282 = lean_ctor_get(x_270, 1); -lean_inc(x_282); -lean_dec(x_270); -x_283 = l_Lean_IR_Checker_checkObjType(x_1, x_3, x_282); -return x_283; +lean_object* x_276; lean_object* x_277; +lean_dec(x_265); +x_276 = lean_ctor_get(x_264, 1); +lean_inc(x_276); +lean_dec(x_264); +x_277 = l_Lean_IR_Checker_checkObjType(x_1, x_3, x_276); +return x_277; } } case 8: { -lean_object* x_284; lean_object* x_285; lean_object* x_286; lean_object* x_287; +lean_object* x_278; lean_object* x_279; lean_object* x_280; lean_object* x_281; lean_dec(x_1); -x_284 = lean_ctor_get(x_2, 0); -lean_inc(x_284); -x_285 = lean_ctor_get(x_2, 1); -lean_inc(x_285); +x_278 = lean_ctor_get(x_2, 0); +lean_inc(x_278); +x_279 = lean_ctor_get(x_2, 1); +lean_inc(x_279); lean_dec(x_2); -x_286 = l_Lean_IR_Checker_checkObjVar(x_284, x_3, x_4); -x_287 = lean_ctor_get(x_286, 0); +x_280 = l_Lean_IR_Checker_checkObjVar(x_278, x_3, x_4); +x_281 = lean_ctor_get(x_280, 0); +lean_inc(x_281); +if (lean_obj_tag(x_281) == 0) +{ +uint8_t x_282; +lean_dec(x_279); +x_282 = !lean_is_exclusive(x_280); +if (x_282 == 0) +{ +lean_object* x_283; uint8_t x_284; +x_283 = lean_ctor_get(x_280, 0); +lean_dec(x_283); +x_284 = !lean_is_exclusive(x_281); +if (x_284 == 0) +{ +return x_280; +} +else +{ +lean_object* x_285; lean_object* x_286; +x_285 = lean_ctor_get(x_281, 0); +lean_inc(x_285); +lean_dec(x_281); +x_286 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_286, 0, x_285); +lean_ctor_set(x_280, 0, x_286); +return x_280; +} +} +else +{ +lean_object* x_287; lean_object* x_288; lean_object* x_289; lean_object* x_290; lean_object* x_291; +x_287 = lean_ctor_get(x_280, 1); lean_inc(x_287); -if (lean_obj_tag(x_287) == 0) -{ -uint8_t x_288; -lean_dec(x_285); -x_288 = !lean_is_exclusive(x_286); -if (x_288 == 0) -{ -lean_object* x_289; uint8_t x_290; -x_289 = lean_ctor_get(x_286, 0); -lean_dec(x_289); -x_290 = !lean_is_exclusive(x_287); -if (x_290 == 0) -{ -return x_286; -} -else -{ -lean_object* x_291; lean_object* x_292; -x_291 = lean_ctor_get(x_287, 0); -lean_inc(x_291); -lean_dec(x_287); -x_292 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_292, 0, x_291); -lean_ctor_set(x_286, 0, x_292); -return x_286; -} -} -else -{ -lean_object* x_293; lean_object* x_294; lean_object* x_295; lean_object* x_296; lean_object* x_297; -x_293 = lean_ctor_get(x_286, 1); -lean_inc(x_293); -lean_dec(x_286); -x_294 = lean_ctor_get(x_287, 0); -lean_inc(x_294); -if (lean_is_exclusive(x_287)) { - lean_ctor_release(x_287, 0); - x_295 = x_287; +lean_dec(x_280); +x_288 = lean_ctor_get(x_281, 0); +lean_inc(x_288); +if (lean_is_exclusive(x_281)) { + lean_ctor_release(x_281, 0); + x_289 = x_281; } else { - lean_dec_ref(x_287); - x_295 = lean_box(0); + lean_dec_ref(x_281); + x_289 = lean_box(0); } -if (lean_is_scalar(x_295)) { - x_296 = lean_alloc_ctor(0, 1, 0); +if (lean_is_scalar(x_289)) { + x_290 = lean_alloc_ctor(0, 1, 0); } else { - x_296 = x_295; + x_290 = x_289; } -lean_ctor_set(x_296, 0, x_294); -x_297 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_297, 0, x_296); -lean_ctor_set(x_297, 1, x_293); -return x_297; +lean_ctor_set(x_290, 0, x_288); +x_291 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_291, 0, x_290); +lean_ctor_set(x_291, 1, x_287); +return x_291; } } else { -lean_object* x_298; lean_object* x_299; -lean_dec(x_287); -x_298 = lean_ctor_get(x_286, 1); -lean_inc(x_298); -lean_dec(x_286); -x_299 = l_Lean_IR_Checker_checkArgs(x_285, x_3, x_298); -lean_dec(x_285); -return x_299; +lean_object* x_292; lean_object* x_293; +lean_dec(x_281); +x_292 = lean_ctor_get(x_280, 1); +lean_inc(x_292); +lean_dec(x_280); +x_293 = l_Lean_IR_Checker_checkArgs(x_279, x_3, x_292); +lean_dec(x_279); +return x_293; } } case 9: { -lean_object* x_300; lean_object* x_301; lean_object* x_302; lean_object* x_303; -x_300 = lean_ctor_get(x_2, 0); -lean_inc(x_300); -x_301 = lean_ctor_get(x_2, 1); -lean_inc(x_301); +lean_object* x_294; lean_object* x_295; lean_object* x_296; lean_object* x_297; +x_294 = lean_ctor_get(x_2, 0); +lean_inc(x_294); +x_295 = lean_ctor_get(x_2, 1); +lean_inc(x_295); lean_dec(x_2); -x_302 = l_Lean_IR_Checker_checkObjType(x_1, x_3, x_4); -x_303 = lean_ctor_get(x_302, 0); -lean_inc(x_303); -if (lean_obj_tag(x_303) == 0) +x_296 = l_Lean_IR_Checker_checkObjType(x_1, x_3, x_4); +x_297 = lean_ctor_get(x_296, 0); +lean_inc(x_297); +if (lean_obj_tag(x_297) == 0) { -uint8_t x_304; -lean_dec(x_301); -lean_dec(x_300); -x_304 = !lean_is_exclusive(x_302); -if (x_304 == 0) +uint8_t x_298; +lean_dec(x_295); +lean_dec(x_294); +x_298 = !lean_is_exclusive(x_296); +if (x_298 == 0) { -lean_object* x_305; uint8_t x_306; -x_305 = lean_ctor_get(x_302, 0); -lean_dec(x_305); -x_306 = !lean_is_exclusive(x_303); -if (x_306 == 0) +lean_object* x_299; uint8_t x_300; +x_299 = lean_ctor_get(x_296, 0); +lean_dec(x_299); +x_300 = !lean_is_exclusive(x_297); +if (x_300 == 0) { -return x_302; +return x_296; } else { -lean_object* x_307; lean_object* x_308; -x_307 = lean_ctor_get(x_303, 0); -lean_inc(x_307); -lean_dec(x_303); -x_308 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_308, 0, x_307); -lean_ctor_set(x_302, 0, x_308); -return x_302; -} -} -else -{ -lean_object* x_309; lean_object* x_310; lean_object* x_311; lean_object* x_312; lean_object* x_313; -x_309 = lean_ctor_get(x_302, 1); -lean_inc(x_309); -lean_dec(x_302); -x_310 = lean_ctor_get(x_303, 0); -lean_inc(x_310); -if (lean_is_exclusive(x_303)) { - lean_ctor_release(x_303, 0); - x_311 = x_303; -} else { - lean_dec_ref(x_303); - x_311 = lean_box(0); -} -if (lean_is_scalar(x_311)) { - x_312 = lean_alloc_ctor(0, 1, 0); -} else { - x_312 = x_311; -} -lean_ctor_set(x_312, 0, x_310); -x_313 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_313, 0, x_312); -lean_ctor_set(x_313, 1, x_309); -return x_313; -} -} -else -{ -lean_object* x_314; lean_object* x_315; lean_object* x_316; -lean_dec(x_303); -x_314 = lean_ctor_get(x_302, 1); -lean_inc(x_314); -lean_dec(x_302); +lean_object* x_301; lean_object* x_302; +x_301 = lean_ctor_get(x_297, 0); lean_inc(x_301); -x_315 = l_Lean_IR_Checker_checkScalarVar(x_301, x_3, x_314); -x_316 = lean_ctor_get(x_315, 0); +lean_dec(x_297); +x_302 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_302, 0, x_301); +lean_ctor_set(x_296, 0, x_302); +return x_296; +} +} +else +{ +lean_object* x_303; lean_object* x_304; lean_object* x_305; lean_object* x_306; lean_object* x_307; +x_303 = lean_ctor_get(x_296, 1); +lean_inc(x_303); +lean_dec(x_296); +x_304 = lean_ctor_get(x_297, 0); +lean_inc(x_304); +if (lean_is_exclusive(x_297)) { + lean_ctor_release(x_297, 0); + x_305 = x_297; +} else { + lean_dec_ref(x_297); + x_305 = lean_box(0); +} +if (lean_is_scalar(x_305)) { + x_306 = lean_alloc_ctor(0, 1, 0); +} else { + x_306 = x_305; +} +lean_ctor_set(x_306, 0, x_304); +x_307 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_307, 0, x_306); +lean_ctor_set(x_307, 1, x_303); +return x_307; +} +} +else +{ +lean_object* x_308; lean_object* x_309; lean_object* x_310; +lean_dec(x_297); +x_308 = lean_ctor_get(x_296, 1); +lean_inc(x_308); +lean_dec(x_296); +lean_inc(x_295); +x_309 = l_Lean_IR_Checker_checkScalarVar(x_295, x_3, x_308); +x_310 = lean_ctor_get(x_309, 0); +lean_inc(x_310); +if (lean_obj_tag(x_310) == 0) +{ +uint8_t x_311; +lean_dec(x_295); +lean_dec(x_294); +x_311 = !lean_is_exclusive(x_309); +if (x_311 == 0) +{ +lean_object* x_312; uint8_t x_313; +x_312 = lean_ctor_get(x_309, 0); +lean_dec(x_312); +x_313 = !lean_is_exclusive(x_310); +if (x_313 == 0) +{ +return x_309; +} +else +{ +lean_object* x_314; lean_object* x_315; +x_314 = lean_ctor_get(x_310, 0); +lean_inc(x_314); +lean_dec(x_310); +x_315 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_315, 0, x_314); +lean_ctor_set(x_309, 0, x_315); +return x_309; +} +} +else +{ +lean_object* x_316; lean_object* x_317; lean_object* x_318; lean_object* x_319; lean_object* x_320; +x_316 = lean_ctor_get(x_309, 1); lean_inc(x_316); -if (lean_obj_tag(x_316) == 0) -{ -uint8_t x_317; -lean_dec(x_301); -lean_dec(x_300); -x_317 = !lean_is_exclusive(x_315); -if (x_317 == 0) -{ -lean_object* x_318; uint8_t x_319; -x_318 = lean_ctor_get(x_315, 0); -lean_dec(x_318); -x_319 = !lean_is_exclusive(x_316); -if (x_319 == 0) -{ -return x_315; +lean_dec(x_309); +x_317 = lean_ctor_get(x_310, 0); +lean_inc(x_317); +if (lean_is_exclusive(x_310)) { + lean_ctor_release(x_310, 0); + x_318 = x_310; +} else { + lean_dec_ref(x_310); + x_318 = lean_box(0); } -else -{ -lean_object* x_320; lean_object* x_321; -x_320 = lean_ctor_get(x_316, 0); -lean_inc(x_320); -lean_dec(x_316); -x_321 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_321, 0, x_320); -lean_ctor_set(x_315, 0, x_321); -return x_315; +if (lean_is_scalar(x_318)) { + x_319 = lean_alloc_ctor(0, 1, 0); +} else { + x_319 = x_318; +} +lean_ctor_set(x_319, 0, x_317); +x_320 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_320, 0, x_319); +lean_ctor_set(x_320, 1, x_316); +return x_320; } } else { -lean_object* x_322; lean_object* x_323; lean_object* x_324; lean_object* x_325; lean_object* x_326; -x_322 = lean_ctor_get(x_315, 1); -lean_inc(x_322); -lean_dec(x_315); -x_323 = lean_ctor_get(x_316, 0); +lean_object* x_321; lean_object* x_322; lean_object* x_323; +lean_dec(x_310); +x_321 = lean_ctor_get(x_309, 1); +lean_inc(x_321); +lean_dec(x_309); +x_322 = l_Lean_IR_Checker_getType(x_295, x_3, x_321); +x_323 = lean_ctor_get(x_322, 0); lean_inc(x_323); -if (lean_is_exclusive(x_316)) { - lean_ctor_release(x_316, 0); - x_324 = x_316; -} else { - lean_dec_ref(x_316); - x_324 = lean_box(0); -} -if (lean_is_scalar(x_324)) { - x_325 = lean_alloc_ctor(0, 1, 0); -} else { - x_325 = x_324; -} -lean_ctor_set(x_325, 0, x_323); -x_326 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_326, 0, x_325); -lean_ctor_set(x_326, 1, x_322); -return x_326; -} +if (lean_obj_tag(x_323) == 0) +{ +uint8_t x_324; +lean_dec(x_294); +x_324 = !lean_is_exclusive(x_322); +if (x_324 == 0) +{ +lean_object* x_325; uint8_t x_326; +x_325 = lean_ctor_get(x_322, 0); +lean_dec(x_325); +x_326 = !lean_is_exclusive(x_323); +if (x_326 == 0) +{ +return x_322; } else { -lean_object* x_327; lean_object* x_328; lean_object* x_329; -lean_dec(x_316); -x_327 = lean_ctor_get(x_315, 1); +lean_object* x_327; lean_object* x_328; +x_327 = lean_ctor_get(x_323, 0); lean_inc(x_327); -lean_dec(x_315); -x_328 = l_Lean_IR_Checker_getType(x_301, x_3, x_327); -x_329 = lean_ctor_get(x_328, 0); +lean_dec(x_323); +x_328 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_328, 0, x_327); +lean_ctor_set(x_322, 0, x_328); +return x_322; +} +} +else +{ +lean_object* x_329; lean_object* x_330; lean_object* x_331; lean_object* x_332; lean_object* x_333; +x_329 = lean_ctor_get(x_322, 1); lean_inc(x_329); -if (lean_obj_tag(x_329) == 0) -{ -uint8_t x_330; -lean_dec(x_300); -x_330 = !lean_is_exclusive(x_328); -if (x_330 == 0) -{ -lean_object* x_331; uint8_t x_332; -x_331 = lean_ctor_get(x_328, 0); -lean_dec(x_331); -x_332 = !lean_is_exclusive(x_329); -if (x_332 == 0) -{ -return x_328; -} -else -{ -lean_object* x_333; lean_object* x_334; -x_333 = lean_ctor_get(x_329, 0); -lean_inc(x_333); -lean_dec(x_329); -x_334 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_334, 0, x_333); -lean_ctor_set(x_328, 0, x_334); -return x_328; -} -} -else -{ -lean_object* x_335; lean_object* x_336; lean_object* x_337; lean_object* x_338; lean_object* x_339; -x_335 = lean_ctor_get(x_328, 1); -lean_inc(x_335); -lean_dec(x_328); -x_336 = lean_ctor_get(x_329, 0); -lean_inc(x_336); -if (lean_is_exclusive(x_329)) { - lean_ctor_release(x_329, 0); - x_337 = x_329; +lean_dec(x_322); +x_330 = lean_ctor_get(x_323, 0); +lean_inc(x_330); +if (lean_is_exclusive(x_323)) { + lean_ctor_release(x_323, 0); + x_331 = x_323; } else { - lean_dec_ref(x_329); - x_337 = lean_box(0); + lean_dec_ref(x_323); + x_331 = lean_box(0); } -if (lean_is_scalar(x_337)) { - x_338 = lean_alloc_ctor(0, 1, 0); +if (lean_is_scalar(x_331)) { + x_332 = lean_alloc_ctor(0, 1, 0); } else { - x_338 = x_337; + x_332 = x_331; } -lean_ctor_set(x_338, 0, x_336); -x_339 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_339, 0, x_338); -lean_ctor_set(x_339, 1, x_335); -return x_339; +lean_ctor_set(x_332, 0, x_330); +x_333 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_333, 0, x_332); +lean_ctor_set(x_333, 1, x_329); +return x_333; } } else { -uint8_t x_340; -x_340 = !lean_is_exclusive(x_328); -if (x_340 == 0) +uint8_t x_334; +x_334 = !lean_is_exclusive(x_322); +if (x_334 == 0) { -lean_object* x_341; uint8_t x_342; -x_341 = lean_ctor_get(x_328, 0); +lean_object* x_335; uint8_t x_336; +x_335 = lean_ctor_get(x_322, 0); +lean_dec(x_335); +x_336 = !lean_is_exclusive(x_323); +if (x_336 == 0) +{ +lean_object* x_337; uint8_t x_338; +x_337 = lean_ctor_get(x_323, 0); +x_338 = l_Lean_IR_IRType_beq(x_337, x_294); +lean_dec(x_294); +if (x_338 == 0) +{ +lean_object* x_339; lean_object* x_340; lean_object* x_341; lean_object* x_342; lean_object* x_343; lean_object* x_344; lean_object* x_345; +x_339 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_337); +x_340 = l_Std_Format_defWidth; +x_341 = lean_format_pretty(x_339, x_340); +x_342 = l_Lean_IR_Checker_checkType___closed__1; +x_343 = lean_string_append(x_342, x_341); lean_dec(x_341); -x_342 = !lean_is_exclusive(x_329); -if (x_342 == 0) +x_344 = l_Char_quote___closed__1; +x_345 = lean_string_append(x_343, x_344); +lean_ctor_set_tag(x_323, 0); +lean_ctor_set(x_323, 0, x_345); +return x_322; +} +else { -lean_object* x_343; uint8_t x_344; -x_343 = lean_ctor_get(x_329, 0); -x_344 = l_Lean_IR_IRType_beq(x_343, x_300); -lean_dec(x_300); -if (x_344 == 0) +lean_object* x_346; +lean_free_object(x_323); +lean_dec(x_337); +x_346 = l_Lean_Compiler_checkIsDefinition___closed__3; +lean_ctor_set(x_322, 0, x_346); +return x_322; +} +} +else { -lean_object* x_345; lean_object* x_346; lean_object* x_347; lean_object* x_348; lean_object* x_349; lean_object* x_350; lean_object* x_351; -x_345 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_343); -x_346 = l_Std_Format_defWidth; -x_347 = lean_format_pretty(x_345, x_346); -x_348 = l_Lean_IR_Checker_checkType___closed__1; -x_349 = lean_string_append(x_348, x_347); +lean_object* x_347; uint8_t x_348; +x_347 = lean_ctor_get(x_323, 0); +lean_inc(x_347); +lean_dec(x_323); +x_348 = l_Lean_IR_IRType_beq(x_347, x_294); +lean_dec(x_294); +if (x_348 == 0) +{ +lean_object* x_349; lean_object* x_350; lean_object* x_351; lean_object* x_352; lean_object* x_353; lean_object* x_354; lean_object* x_355; lean_object* x_356; +x_349 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_347); +x_350 = l_Std_Format_defWidth; +x_351 = lean_format_pretty(x_349, x_350); +x_352 = l_Lean_IR_Checker_checkType___closed__1; +x_353 = lean_string_append(x_352, x_351); +lean_dec(x_351); +x_354 = l_Char_quote___closed__1; +x_355 = lean_string_append(x_353, x_354); +x_356 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_356, 0, x_355); +lean_ctor_set(x_322, 0, x_356); +return x_322; +} +else +{ +lean_object* x_357; lean_dec(x_347); -x_350 = l_Char_quote___closed__1; -x_351 = lean_string_append(x_349, x_350); -lean_ctor_set_tag(x_329, 0); -lean_ctor_set(x_329, 0, x_351); -return x_328; -} -else -{ -lean_object* x_352; -lean_free_object(x_329); -lean_dec(x_343); -x_352 = l_Lean_Compiler_checkIsDefinition___closed__3; -lean_ctor_set(x_328, 0, x_352); -return x_328; -} -} -else -{ -lean_object* x_353; uint8_t x_354; -x_353 = lean_ctor_get(x_329, 0); -lean_inc(x_353); -lean_dec(x_329); -x_354 = l_Lean_IR_IRType_beq(x_353, x_300); -lean_dec(x_300); -if (x_354 == 0) -{ -lean_object* x_355; lean_object* x_356; lean_object* x_357; lean_object* x_358; lean_object* x_359; lean_object* x_360; lean_object* x_361; lean_object* x_362; -x_355 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_353); -x_356 = l_Std_Format_defWidth; -x_357 = lean_format_pretty(x_355, x_356); -x_358 = l_Lean_IR_Checker_checkType___closed__1; -x_359 = lean_string_append(x_358, x_357); -lean_dec(x_357); -x_360 = l_Char_quote___closed__1; -x_361 = lean_string_append(x_359, x_360); -x_362 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_362, 0, x_361); -lean_ctor_set(x_328, 0, x_362); -return x_328; -} -else -{ -lean_object* x_363; -lean_dec(x_353); -x_363 = l_Lean_Compiler_checkIsDefinition___closed__3; -lean_ctor_set(x_328, 0, x_363); -return x_328; +x_357 = l_Lean_Compiler_checkIsDefinition___closed__3; +lean_ctor_set(x_322, 0, x_357); +return x_322; } } } else { -lean_object* x_364; lean_object* x_365; lean_object* x_366; uint8_t x_367; -x_364 = lean_ctor_get(x_328, 1); -lean_inc(x_364); -lean_dec(x_328); -x_365 = lean_ctor_get(x_329, 0); -lean_inc(x_365); -if (lean_is_exclusive(x_329)) { - lean_ctor_release(x_329, 0); - x_366 = x_329; +lean_object* x_358; lean_object* x_359; lean_object* x_360; uint8_t x_361; +x_358 = lean_ctor_get(x_322, 1); +lean_inc(x_358); +lean_dec(x_322); +x_359 = lean_ctor_get(x_323, 0); +lean_inc(x_359); +if (lean_is_exclusive(x_323)) { + lean_ctor_release(x_323, 0); + x_360 = x_323; } else { - lean_dec_ref(x_329); - x_366 = lean_box(0); + lean_dec_ref(x_323); + x_360 = lean_box(0); } -x_367 = l_Lean_IR_IRType_beq(x_365, x_300); -lean_dec(x_300); -if (x_367 == 0) +x_361 = l_Lean_IR_IRType_beq(x_359, x_294); +lean_dec(x_294); +if (x_361 == 0) { -lean_object* x_368; lean_object* x_369; lean_object* x_370; lean_object* x_371; lean_object* x_372; lean_object* x_373; lean_object* x_374; lean_object* x_375; lean_object* x_376; -x_368 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_365); -x_369 = l_Std_Format_defWidth; -x_370 = lean_format_pretty(x_368, x_369); -x_371 = l_Lean_IR_Checker_checkType___closed__1; -x_372 = lean_string_append(x_371, x_370); -lean_dec(x_370); -x_373 = l_Char_quote___closed__1; -x_374 = lean_string_append(x_372, x_373); -if (lean_is_scalar(x_366)) { - x_375 = lean_alloc_ctor(0, 1, 0); +lean_object* x_362; lean_object* x_363; lean_object* x_364; lean_object* x_365; lean_object* x_366; lean_object* x_367; lean_object* x_368; lean_object* x_369; lean_object* x_370; +x_362 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_359); +x_363 = l_Std_Format_defWidth; +x_364 = lean_format_pretty(x_362, x_363); +x_365 = l_Lean_IR_Checker_checkType___closed__1; +x_366 = lean_string_append(x_365, x_364); +lean_dec(x_364); +x_367 = l_Char_quote___closed__1; +x_368 = lean_string_append(x_366, x_367); +if (lean_is_scalar(x_360)) { + x_369 = lean_alloc_ctor(0, 1, 0); } else { - x_375 = x_366; - lean_ctor_set_tag(x_375, 0); + x_369 = x_360; + lean_ctor_set_tag(x_369, 0); } -lean_ctor_set(x_375, 0, x_374); -x_376 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_376, 0, x_375); -lean_ctor_set(x_376, 1, x_364); -return x_376; +lean_ctor_set(x_369, 0, x_368); +x_370 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_370, 0, x_369); +lean_ctor_set(x_370, 1, x_358); +return x_370; } else { -lean_object* x_377; lean_object* x_378; -lean_dec(x_366); -lean_dec(x_365); -x_377 = l_Lean_Compiler_checkIsDefinition___closed__3; -x_378 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_378, 0, x_377); -lean_ctor_set(x_378, 1, x_364); -return x_378; +lean_object* x_371; lean_object* x_372; +lean_dec(x_360); +lean_dec(x_359); +x_371 = l_Lean_Compiler_checkIsDefinition___closed__3; +x_372 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_372, 0, x_371); +lean_ctor_set(x_372, 1, x_358); +return x_372; } } } @@ -4359,303 +4560,326 @@ return x_378; } case 10: { -lean_object* x_379; lean_object* x_380; lean_object* x_381; -x_379 = lean_ctor_get(x_2, 0); -lean_inc(x_379); +lean_object* x_373; lean_object* x_374; lean_object* x_375; +x_373 = lean_ctor_get(x_2, 0); +lean_inc(x_373); lean_dec(x_2); -x_380 = l_Lean_IR_Checker_checkScalarType(x_1, x_3, x_4); -x_381 = lean_ctor_get(x_380, 0); +x_374 = l_Lean_IR_Checker_checkScalarType(x_1, x_3, x_4); +x_375 = lean_ctor_get(x_374, 0); +lean_inc(x_375); +if (lean_obj_tag(x_375) == 0) +{ +uint8_t x_376; +lean_dec(x_373); +x_376 = !lean_is_exclusive(x_374); +if (x_376 == 0) +{ +lean_object* x_377; uint8_t x_378; +x_377 = lean_ctor_get(x_374, 0); +lean_dec(x_377); +x_378 = !lean_is_exclusive(x_375); +if (x_378 == 0) +{ +return x_374; +} +else +{ +lean_object* x_379; lean_object* x_380; +x_379 = lean_ctor_get(x_375, 0); +lean_inc(x_379); +lean_dec(x_375); +x_380 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_380, 0, x_379); +lean_ctor_set(x_374, 0, x_380); +return x_374; +} +} +else +{ +lean_object* x_381; lean_object* x_382; lean_object* x_383; lean_object* x_384; lean_object* x_385; +x_381 = lean_ctor_get(x_374, 1); lean_inc(x_381); -if (lean_obj_tag(x_381) == 0) -{ -uint8_t x_382; -lean_dec(x_379); -x_382 = !lean_is_exclusive(x_380); -if (x_382 == 0) -{ -lean_object* x_383; uint8_t x_384; -x_383 = lean_ctor_get(x_380, 0); -lean_dec(x_383); -x_384 = !lean_is_exclusive(x_381); -if (x_384 == 0) -{ -return x_380; -} -else -{ -lean_object* x_385; lean_object* x_386; -x_385 = lean_ctor_get(x_381, 0); -lean_inc(x_385); -lean_dec(x_381); -x_386 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_386, 0, x_385); -lean_ctor_set(x_380, 0, x_386); -return x_380; -} -} -else -{ -lean_object* x_387; lean_object* x_388; lean_object* x_389; lean_object* x_390; lean_object* x_391; -x_387 = lean_ctor_get(x_380, 1); -lean_inc(x_387); -lean_dec(x_380); -x_388 = lean_ctor_get(x_381, 0); -lean_inc(x_388); -if (lean_is_exclusive(x_381)) { - lean_ctor_release(x_381, 0); - x_389 = x_381; +lean_dec(x_374); +x_382 = lean_ctor_get(x_375, 0); +lean_inc(x_382); +if (lean_is_exclusive(x_375)) { + lean_ctor_release(x_375, 0); + x_383 = x_375; } else { - lean_dec_ref(x_381); - x_389 = lean_box(0); + lean_dec_ref(x_375); + x_383 = lean_box(0); } -if (lean_is_scalar(x_389)) { - x_390 = lean_alloc_ctor(0, 1, 0); +if (lean_is_scalar(x_383)) { + x_384 = lean_alloc_ctor(0, 1, 0); } else { - x_390 = x_389; + x_384 = x_383; } -lean_ctor_set(x_390, 0, x_388); -x_391 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_391, 0, x_390); -lean_ctor_set(x_391, 1, x_387); -return x_391; +lean_ctor_set(x_384, 0, x_382); +x_385 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_385, 0, x_384); +lean_ctor_set(x_385, 1, x_381); +return x_385; } } else { -lean_object* x_392; lean_object* x_393; -lean_dec(x_381); -x_392 = lean_ctor_get(x_380, 1); -lean_inc(x_392); -lean_dec(x_380); -x_393 = l_Lean_IR_Checker_checkObjVar(x_379, x_3, x_392); -return x_393; +lean_object* x_386; lean_object* x_387; +lean_dec(x_375); +x_386 = lean_ctor_get(x_374, 1); +lean_inc(x_386); +lean_dec(x_374); +x_387 = l_Lean_IR_Checker_checkObjVar(x_373, x_3, x_386); +return x_387; } } case 11: { -lean_object* x_394; -x_394 = lean_ctor_get(x_2, 0); -lean_inc(x_394); +lean_object* x_388; +x_388 = lean_ctor_get(x_2, 0); +lean_inc(x_388); lean_dec(x_2); -if (lean_obj_tag(x_394) == 0) +if (lean_obj_tag(x_388) == 0) { -lean_object* x_395; lean_object* x_396; -lean_dec(x_394); +lean_object* x_389; lean_object* x_390; +lean_dec(x_388); lean_dec(x_1); -x_395 = l_Lean_Compiler_checkIsDefinition___closed__3; -x_396 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_396, 0, x_395); -lean_ctor_set(x_396, 1, x_4); -return x_396; +x_389 = l_Lean_Compiler_checkIsDefinition___closed__3; +x_390 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_390, 0, x_389); +lean_ctor_set(x_390, 1, x_4); +return x_390; } else { -lean_object* x_397; -lean_dec(x_394); -x_397 = l_Lean_IR_Checker_checkObjType(x_1, x_3, x_4); -return x_397; +lean_object* x_391; +lean_dec(x_388); +x_391 = l_Lean_IR_Checker_checkObjType(x_1, x_3, x_4); +return x_391; } } default: { -lean_object* x_398; lean_object* x_399; lean_object* x_400; -x_398 = lean_ctor_get(x_2, 0); -lean_inc(x_398); +lean_object* x_392; lean_object* x_393; lean_object* x_394; +x_392 = lean_ctor_get(x_2, 0); +lean_inc(x_392); lean_dec(x_2); -x_399 = l_Lean_IR_Checker_checkObjVar(x_398, x_3, x_4); -x_400 = lean_ctor_get(x_399, 0); +x_393 = l_Lean_IR_Checker_checkObjVar(x_392, x_3, x_4); +x_394 = lean_ctor_get(x_393, 0); +lean_inc(x_394); +if (lean_obj_tag(x_394) == 0) +{ +uint8_t x_395; +lean_dec(x_1); +x_395 = !lean_is_exclusive(x_393); +if (x_395 == 0) +{ +lean_object* x_396; uint8_t x_397; +x_396 = lean_ctor_get(x_393, 0); +lean_dec(x_396); +x_397 = !lean_is_exclusive(x_394); +if (x_397 == 0) +{ +return x_393; +} +else +{ +lean_object* x_398; lean_object* x_399; +x_398 = lean_ctor_get(x_394, 0); +lean_inc(x_398); +lean_dec(x_394); +x_399 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_399, 0, x_398); +lean_ctor_set(x_393, 0, x_399); +return x_393; +} +} +else +{ +lean_object* x_400; lean_object* x_401; lean_object* x_402; lean_object* x_403; lean_object* x_404; +x_400 = lean_ctor_get(x_393, 1); lean_inc(x_400); -if (lean_obj_tag(x_400) == 0) +lean_dec(x_393); +x_401 = lean_ctor_get(x_394, 0); +lean_inc(x_401); +if (lean_is_exclusive(x_394)) { + lean_ctor_release(x_394, 0); + x_402 = x_394; +} else { + lean_dec_ref(x_394); + x_402 = lean_box(0); +} +if (lean_is_scalar(x_402)) { + x_403 = lean_alloc_ctor(0, 1, 0); +} else { + x_403 = x_402; +} +lean_ctor_set(x_403, 0, x_401); +x_404 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_404, 0, x_403); +lean_ctor_set(x_404, 1, x_400); +return x_404; +} +} +else { -uint8_t x_401; +uint8_t x_405; +x_405 = !lean_is_exclusive(x_394); +if (x_405 == 0) +{ +lean_object* x_406; uint8_t x_407; +x_406 = lean_ctor_get(x_394, 0); +lean_dec(x_406); +x_407 = !lean_is_exclusive(x_393); +if (x_407 == 0) +{ +lean_object* x_408; lean_object* x_409; uint8_t x_410; +x_408 = lean_ctor_get(x_393, 0); +lean_dec(x_408); +x_409 = lean_box(1); +x_410 = l_Lean_IR_IRType_beq(x_1, x_409); +if (x_410 == 0) +{ +lean_object* x_411; lean_object* x_412; lean_object* x_413; lean_object* x_414; lean_object* x_415; lean_object* x_416; lean_object* x_417; +x_411 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_1); +x_412 = l_Std_Format_defWidth; +x_413 = lean_format_pretty(x_411, x_412); +x_414 = l_Lean_IR_Checker_checkType___closed__1; +x_415 = lean_string_append(x_414, x_413); +lean_dec(x_413); +x_416 = l_Char_quote___closed__1; +x_417 = lean_string_append(x_415, x_416); +lean_ctor_set_tag(x_394, 0); +lean_ctor_set(x_394, 0, x_417); +return x_393; +} +else +{ +lean_object* x_418; +lean_free_object(x_394); lean_dec(x_1); -x_401 = !lean_is_exclusive(x_399); -if (x_401 == 0) -{ -lean_object* x_402; uint8_t x_403; -x_402 = lean_ctor_get(x_399, 0); -lean_dec(x_402); -x_403 = !lean_is_exclusive(x_400); -if (x_403 == 0) -{ -return x_399; -} -else -{ -lean_object* x_404; lean_object* x_405; -x_404 = lean_ctor_get(x_400, 0); -lean_inc(x_404); -lean_dec(x_400); -x_405 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_405, 0, x_404); -lean_ctor_set(x_399, 0, x_405); -return x_399; +x_418 = l_Lean_Compiler_checkIsDefinition___closed__3; +lean_ctor_set(x_393, 0, x_418); +return x_393; } } else { -lean_object* x_406; lean_object* x_407; lean_object* x_408; lean_object* x_409; lean_object* x_410; -x_406 = lean_ctor_get(x_399, 1); -lean_inc(x_406); -lean_dec(x_399); -x_407 = lean_ctor_get(x_400, 0); -lean_inc(x_407); -if (lean_is_exclusive(x_400)) { - lean_ctor_release(x_400, 0); - x_408 = x_400; -} else { - lean_dec_ref(x_400); - x_408 = lean_box(0); -} -if (lean_is_scalar(x_408)) { - x_409 = lean_alloc_ctor(0, 1, 0); -} else { - x_409 = x_408; -} -lean_ctor_set(x_409, 0, x_407); -x_410 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_410, 0, x_409); -lean_ctor_set(x_410, 1, x_406); -return x_410; -} +lean_object* x_419; lean_object* x_420; uint8_t x_421; +x_419 = lean_ctor_get(x_393, 1); +lean_inc(x_419); +lean_dec(x_393); +x_420 = lean_box(1); +x_421 = l_Lean_IR_IRType_beq(x_1, x_420); +if (x_421 == 0) +{ +lean_object* x_422; lean_object* x_423; lean_object* x_424; lean_object* x_425; lean_object* x_426; lean_object* x_427; lean_object* x_428; lean_object* x_429; +x_422 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_1); +x_423 = l_Std_Format_defWidth; +x_424 = lean_format_pretty(x_422, x_423); +x_425 = l_Lean_IR_Checker_checkType___closed__1; +x_426 = lean_string_append(x_425, x_424); +lean_dec(x_424); +x_427 = l_Char_quote___closed__1; +x_428 = lean_string_append(x_426, x_427); +lean_ctor_set_tag(x_394, 0); +lean_ctor_set(x_394, 0, x_428); +x_429 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_429, 0, x_394); +lean_ctor_set(x_429, 1, x_419); +return x_429; } else { -uint8_t x_411; -x_411 = !lean_is_exclusive(x_400); -if (x_411 == 0) -{ -lean_object* x_412; uint8_t x_413; -x_412 = lean_ctor_get(x_400, 0); -lean_dec(x_412); -x_413 = !lean_is_exclusive(x_399); -if (x_413 == 0) -{ -lean_object* x_414; lean_object* x_415; uint8_t x_416; -x_414 = lean_ctor_get(x_399, 0); -lean_dec(x_414); -x_415 = lean_box(1); -x_416 = l_Lean_IR_IRType_beq(x_1, x_415); -if (x_416 == 0) -{ -lean_object* x_417; lean_object* x_418; lean_object* x_419; lean_object* x_420; lean_object* x_421; lean_object* x_422; lean_object* x_423; -x_417 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_1); -x_418 = l_Std_Format_defWidth; -x_419 = lean_format_pretty(x_417, x_418); -x_420 = l_Lean_IR_Checker_checkType___closed__1; -x_421 = lean_string_append(x_420, x_419); -lean_dec(x_419); -x_422 = l_Char_quote___closed__1; -x_423 = lean_string_append(x_421, x_422); -lean_ctor_set_tag(x_400, 0); -lean_ctor_set(x_400, 0, x_423); -return x_399; -} -else -{ -lean_object* x_424; -lean_free_object(x_400); +lean_object* x_430; lean_object* x_431; +lean_free_object(x_394); lean_dec(x_1); -x_424 = l_Lean_Compiler_checkIsDefinition___closed__3; -lean_ctor_set(x_399, 0, x_424); -return x_399; +x_430 = l_Lean_Compiler_checkIsDefinition___closed__3; +x_431 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_431, 0, x_430); +lean_ctor_set(x_431, 1, x_419); +return x_431; +} } } else { -lean_object* x_425; lean_object* x_426; uint8_t x_427; -x_425 = lean_ctor_get(x_399, 1); -lean_inc(x_425); -lean_dec(x_399); -x_426 = lean_box(1); -x_427 = l_Lean_IR_IRType_beq(x_1, x_426); -if (x_427 == 0) +lean_object* x_432; lean_object* x_433; lean_object* x_434; uint8_t x_435; +lean_dec(x_394); +x_432 = lean_ctor_get(x_393, 1); +lean_inc(x_432); +if (lean_is_exclusive(x_393)) { + lean_ctor_release(x_393, 0); + lean_ctor_release(x_393, 1); + x_433 = x_393; +} else { + lean_dec_ref(x_393); + x_433 = lean_box(0); +} +x_434 = lean_box(1); +x_435 = l_Lean_IR_IRType_beq(x_1, x_434); +if (x_435 == 0) { -lean_object* x_428; lean_object* x_429; lean_object* x_430; lean_object* x_431; lean_object* x_432; lean_object* x_433; lean_object* x_434; lean_object* x_435; -x_428 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_1); -x_429 = l_Std_Format_defWidth; -x_430 = lean_format_pretty(x_428, x_429); -x_431 = l_Lean_IR_Checker_checkType___closed__1; -x_432 = lean_string_append(x_431, x_430); -lean_dec(x_430); -x_433 = l_Char_quote___closed__1; -x_434 = lean_string_append(x_432, x_433); -lean_ctor_set_tag(x_400, 0); -lean_ctor_set(x_400, 0, x_434); -x_435 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_435, 0, x_400); -lean_ctor_set(x_435, 1, x_425); -return x_435; +lean_object* x_436; lean_object* x_437; lean_object* x_438; lean_object* x_439; lean_object* x_440; lean_object* x_441; lean_object* x_442; lean_object* x_443; lean_object* x_444; +x_436 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_1); +x_437 = l_Std_Format_defWidth; +x_438 = lean_format_pretty(x_436, x_437); +x_439 = l_Lean_IR_Checker_checkType___closed__1; +x_440 = lean_string_append(x_439, x_438); +lean_dec(x_438); +x_441 = l_Char_quote___closed__1; +x_442 = lean_string_append(x_440, x_441); +x_443 = lean_alloc_ctor(0, 1, 0); +lean_ctor_set(x_443, 0, x_442); +if (lean_is_scalar(x_433)) { + x_444 = lean_alloc_ctor(0, 2, 0); +} else { + x_444 = x_433; +} +lean_ctor_set(x_444, 0, x_443); +lean_ctor_set(x_444, 1, x_432); +return x_444; } else { -lean_object* x_436; lean_object* x_437; -lean_free_object(x_400); +lean_object* x_445; lean_object* x_446; lean_dec(x_1); -x_436 = l_Lean_Compiler_checkIsDefinition___closed__3; -x_437 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_437, 0, x_436); -lean_ctor_set(x_437, 1, x_425); -return x_437; -} -} -} -else -{ -lean_object* x_438; lean_object* x_439; lean_object* x_440; uint8_t x_441; -lean_dec(x_400); -x_438 = lean_ctor_get(x_399, 1); -lean_inc(x_438); -if (lean_is_exclusive(x_399)) { - lean_ctor_release(x_399, 0); - lean_ctor_release(x_399, 1); - x_439 = x_399; +x_445 = l_Lean_Compiler_checkIsDefinition___closed__3; +if (lean_is_scalar(x_433)) { + x_446 = lean_alloc_ctor(0, 2, 0); } else { - lean_dec_ref(x_399); - x_439 = lean_box(0); + x_446 = x_433; } -x_440 = lean_box(1); -x_441 = l_Lean_IR_IRType_beq(x_1, x_440); -if (x_441 == 0) +lean_ctor_set(x_446, 0, x_445); +lean_ctor_set(x_446, 1, x_432); +return x_446; +} +} +} +} +} +} +} +lean_object* l_Lean_IR_Checker_checkExpr___lambda__1___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) { +_start: { -lean_object* x_442; lean_object* x_443; lean_object* x_444; lean_object* x_445; lean_object* x_446; lean_object* x_447; lean_object* x_448; lean_object* x_449; lean_object* x_450; -x_442 = l___private_Lean_Compiler_IR_Format_0__Lean_IR_formatIRType(x_1); -x_443 = l_Std_Format_defWidth; -x_444 = lean_format_pretty(x_442, x_443); -x_445 = l_Lean_IR_Checker_checkType___closed__1; -x_446 = lean_string_append(x_445, x_444); -lean_dec(x_444); -x_447 = l_Char_quote___closed__1; -x_448 = lean_string_append(x_446, x_447); -x_449 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_449, 0, x_448); -if (lean_is_scalar(x_439)) { - x_450 = lean_alloc_ctor(0, 2, 0); -} else { - x_450 = x_439; +lean_object* x_7; +x_7 = l_Lean_IR_Checker_checkExpr___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; } -lean_ctor_set(x_450, 0, x_449); -lean_ctor_set(x_450, 1, x_438); -return x_450; } -else +lean_object* l_Lean_IR_Checker_checkExpr___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) { +_start: { -lean_object* x_451; lean_object* x_452; -lean_dec(x_1); -x_451 = l_Lean_Compiler_checkIsDefinition___closed__3; -if (lean_is_scalar(x_439)) { - x_452 = lean_alloc_ctor(0, 2, 0); -} else { - x_452 = x_439; -} -lean_ctor_set(x_452, 0, x_451); -lean_ctor_set(x_452, 1, x_438); -return x_452; -} -} -} -} -} +lean_object* x_7; +x_7 = l_Lean_IR_Checker_checkExpr___lambda__2(x_1, x_2, x_3, x_4, x_5, x_6); +lean_dec(x_5); +lean_dec(x_4); +lean_dec(x_3); +return x_7; } } lean_object* l_Lean_IR_Checker_checkExpr___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) { @@ -7637,6 +7861,18 @@ lean_dec_ref(res); res = initialize_Lean_Compiler_IR_Format(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +l_Lean_IR_Checker_maxCtorFields___closed__1 = _init_l_Lean_IR_Checker_maxCtorFields___closed__1(); +lean_mark_persistent(l_Lean_IR_Checker_maxCtorFields___closed__1); +l_Lean_IR_Checker_maxCtorFields = _init_l_Lean_IR_Checker_maxCtorFields(); +lean_mark_persistent(l_Lean_IR_Checker_maxCtorFields); +l_Lean_IR_Checker_maxCtorScalarsSize___closed__1 = _init_l_Lean_IR_Checker_maxCtorScalarsSize___closed__1(); +lean_mark_persistent(l_Lean_IR_Checker_maxCtorScalarsSize___closed__1); +l_Lean_IR_Checker_maxCtorScalarsSize = _init_l_Lean_IR_Checker_maxCtorScalarsSize(); +lean_mark_persistent(l_Lean_IR_Checker_maxCtorScalarsSize); +l_Lean_IR_Checker_usizeSize___closed__1 = _init_l_Lean_IR_Checker_usizeSize___closed__1(); +lean_mark_persistent(l_Lean_IR_Checker_usizeSize___closed__1); +l_Lean_IR_Checker_usizeSize = _init_l_Lean_IR_Checker_usizeSize(); +lean_mark_persistent(l_Lean_IR_Checker_usizeSize); l_Lean_IR_Checker_CheckerContext_localCtx___default = _init_l_Lean_IR_Checker_CheckerContext_localCtx___default(); lean_mark_persistent(l_Lean_IR_Checker_CheckerContext_localCtx___default); l_Lean_IR_Checker_CheckerState_foundVars___default = _init_l_Lean_IR_Checker_CheckerState_foundVars___default(); @@ -7669,12 +7905,18 @@ l_Lean_IR_Checker_checkPartialApp___closed__2 = _init_l_Lean_IR_Checker_checkPar lean_mark_persistent(l_Lean_IR_Checker_checkPartialApp___closed__2); l_Lean_IR_Checker_checkPartialApp___closed__3 = _init_l_Lean_IR_Checker_checkPartialApp___closed__3(); lean_mark_persistent(l_Lean_IR_Checker_checkPartialApp___closed__3); +l_Lean_IR_Checker_checkExpr___lambda__2___closed__1 = _init_l_Lean_IR_Checker_checkExpr___lambda__2___closed__1(); +lean_mark_persistent(l_Lean_IR_Checker_checkExpr___lambda__2___closed__1); +l_Lean_IR_Checker_checkExpr___lambda__2___closed__2 = _init_l_Lean_IR_Checker_checkExpr___lambda__2___closed__2(); +lean_mark_persistent(l_Lean_IR_Checker_checkExpr___lambda__2___closed__2); l_Lean_IR_Checker_checkExpr___closed__1 = _init_l_Lean_IR_Checker_checkExpr___closed__1(); lean_mark_persistent(l_Lean_IR_Checker_checkExpr___closed__1); l_Lean_IR_Checker_checkExpr___closed__2 = _init_l_Lean_IR_Checker_checkExpr___closed__2(); lean_mark_persistent(l_Lean_IR_Checker_checkExpr___closed__2); l_Lean_IR_Checker_checkExpr___closed__3 = _init_l_Lean_IR_Checker_checkExpr___closed__3(); lean_mark_persistent(l_Lean_IR_Checker_checkExpr___closed__3); +l_Lean_IR_Checker_checkExpr___closed__4 = _init_l_Lean_IR_Checker_checkExpr___closed__4(); +lean_mark_persistent(l_Lean_IR_Checker_checkExpr___closed__4); l_Lean_IR_checkDecl___closed__1 = _init_l_Lean_IR_checkDecl___closed__1(); lean_mark_persistent(l_Lean_IR_checkDecl___closed__1); l_Lean_IR_checkDecl___closed__2 = _init_l_Lean_IR_checkDecl___closed__2(); diff --git a/stage0/stdlib/Lean/Compiler/IR/EmitC.c b/stage0/stdlib/Lean/Compiler/IR/EmitC.c index 5d250b27eb..b40c3d6540 100644 --- a/stage0/stdlib/Lean/Compiler/IR/EmitC.c +++ b/stage0/stdlib/Lean/Compiler/IR/EmitC.c @@ -80,6 +80,7 @@ lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitFnDeclAux___spec__2(lean_obj lean_object* l_Lean_IR_EmitC_emitMainFn___closed__2; extern lean_object* l_Lean_Parser_Syntax_addPrec___closed__2; lean_object* lean_name_mk_string(lean_object*, lean_object*); +lean_object* l_Lean_IR_EmitC_emitAllocCtor___closed__2; lean_object* l_Lean_IR_EmitC_emitCtor(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); uint8_t l_USize_decEq(size_t, size_t); lean_object* lean_array_uget(lean_object*, size_t); @@ -100,6 +101,7 @@ lean_object* l_Lean_IR_EmitC_emitDeclInit_match__1(lean_object*); lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitArgs___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_collectUsedDecls(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitSSet___closed__6; +lean_object* l_Lean_IR_EmitC_getCtorHeaderSize(lean_object*); lean_object* l_Lean_IR_EmitC_emitInc___closed__5; lean_object* l_Lean_IR_EmitC_isTailCall_match__1(lean_object*); lean_object* l_Lean_IR_EmitC_emitSProj___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -137,6 +139,7 @@ lean_object* l_Lean_IR_EmitC_emitApp___closed__3; lean_object* lean_ir_emit_c(lean_object*, lean_object*); uint8_t l_Nat_anyAux___at_Lean_IR_EmitC_overwriteParam___spec__1(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitApp___closed__5; +lean_object* l_Lean_IR_EmitC_maxSmallObjectSize; lean_object* l_Lean_IR_EmitC_emitLhs___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_String_quote___closed__2; @@ -282,6 +285,7 @@ lean_object* l_Lean_IR_EmitC_emitJmp(lean_object*, lean_object*, lean_object*, l lean_object* l_List_map___at_Lean_IR_EmitC_toStringArgs___spec__1(lean_object*); lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__6; lean_object* l_Lean_IR_EmitC_emitDeclAux___lambda__3___closed__1; +lean_object* l_Lean_IR_EmitC_getUSizeSize___boxed(lean_object*); lean_object* l_Lean_IR_EmitC_emitMainFnIfNeeded(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitFileHeader___closed__13; lean_object* l_Lean_IR_EmitC_hasMainFn(lean_object*, lean_object*); @@ -327,9 +331,11 @@ lean_object* l_Lean_IR_EmitC_emitDeclInit(lean_object*, lean_object*, lean_objec lean_object* l_Lean_IR_EmitC_emitIf___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__12; +lean_object* l_Lean_IR_EmitC_usizeSize; lean_object* l_Lean_IR_EmitC_emitIf___closed__1; lean_object* l_Lean_IR_EmitC_toCName___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitDeclAux___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l___private_Lean_Compiler_IR_EmitC_0__Lean_IR_EmitC_isSmallCtor___boxed(lean_object*); lean_object* lean_array_to_list(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitFnDeclAux___lambda__1___boxed(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitFileHeader___closed__2; @@ -340,6 +346,7 @@ lean_object* l_Lean_IR_EmitC_toCType___closed__1; lean_object* l_Lean_IR_EmitC_emitInc(lean_object*, lean_object*, uint8_t, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_leanMainFn; lean_object* l_Lean_IR_EmitC_emitNumLit___closed__4; +lean_object* l_Lean_IR_EmitC_getMaxSmallObjectSize(lean_object*); lean_object* l_Lean_IR_EmitC_emitDecl___closed__1; lean_object* l_Lean_IR_EmitC_emitSSet_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_emitC_match__1(lean_object*); @@ -369,6 +376,7 @@ lean_object* l_Lean_IR_EmitC_toCType___closed__4; lean_object* l_Std_RBTree_toList___at_Lean_IR_EmitC_emitFnDecls___spec__3(lean_object*); lean_object* l_Lean_IR_EmitC_emitProj___closed__1; lean_object* l_Lean_IR_EmitC_emitIsShared___closed__1; +uint8_t l___private_Lean_Compiler_IR_EmitC_0__Lean_IR_EmitC_isSmallCtor(lean_object*); lean_object* l_Lean_IR_EmitC_emitCase_match__1___rarg(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__5; lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__1; @@ -377,12 +385,15 @@ lean_object* l_Lean_IR_EmitC_emitVDecl___boxed(lean_object*, lean_object*, lean_ lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__17; lean_object* l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitFileHeader___spec__1(lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_isTailCall_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_IR_EmitC_usizeSize___closed__1; lean_object* l_Lean_IR_EmitC_emitFileHeader___closed__14; lean_object* l_Lean_IR_EmitC_emitFileHeader___closed__7; +lean_object* l_Lean_IR_EmitC_ctorHeaderSize; lean_object* l_Lean_IR_EmitC_toCInitName_match__1___rarg(lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitUProj___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_List_foldr___at_Lean_IR_EmitC_hasMainFn___spec__1___boxed(lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitCInitName___boxed(lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_IR_EmitC_getUSizeSize(lean_object*); size_t lean_usize_of_nat(lean_object*); lean_object* l_Lean_IR_EmitC_emitReuse___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); extern lean_object* l_Lean_NameSet_empty; @@ -413,11 +424,13 @@ lean_object* l_Lean_IR_EmitC_declareParams(lean_object*, lean_object*, lean_obje lean_object* l_List_foldl___at_Lean_IR_EmitC_emitFnDecls___spec__2(lean_object*, lean_object*, lean_object*); lean_object* l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitInitFn___spec__3___closed__1; lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__2___closed__2; +lean_object* l_Lean_IR_EmitC_getMaxSmallObjectSize___boxed(lean_object*); lean_object* l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitInitFn___spec__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitReset___closed__2; lean_object* l_Lean_IR_EmitC_emitMainFn___lambda__1___closed__3; lean_object* l_Lean_IR_EmitC_emitAllocCtor(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitLn___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_IR_EmitC_ctorHeaderSize___closed__1; lean_object* l_Lean_IR_EmitC_toCName_match__1(lean_object*); lean_object* l_Lean_IR_EmitC_quoteString___lambda__1___boxed(lean_object*, lean_object*); uint8_t l_UInt32_decEq(uint32_t, uint32_t); @@ -450,6 +463,7 @@ lean_object* lean_mk_module_initialization_function_name(lean_object*); lean_object* l_Lean_IR_EmitC_toCType___closed__11; lean_object* l_Lean_IR_EmitC_emitFileHeader___closed__3; lean_object* l_Lean_IR_EmitC_emitReuse(lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_IR_EmitC_getCtorHeaderSize___boxed(lean_object*); lean_object* l_Lean_IR_EmitC_emitLns(lean_object*); lean_object* l_Lean_IR_EmitC_paramEqArg___boxed(lean_object*, lean_object*); uint8_t lean_nat_dec_le(lean_object*, lean_object*); @@ -495,6 +509,7 @@ lean_object* l_Lean_IR_EmitC_emitNumLit___closed__1; lean_object* l_Lean_IR_EmitC_emitSSet___closed__5; lean_object* l_Lean_IR_EmitC_emitTailCall_match__1(lean_object*); lean_object* l_Lean_IR_EmitC_emitApp(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* lean_nat_mul(lean_object*, lean_object*); lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitArgs___spec__1___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Nat_foldM_loop___at_Lean_IR_EmitC_emitSimpleExternalCall___spec__1___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Nat_foldM_loop___at_Lean_IR_EmitC_emitSimpleExternalCall___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, uint8_t, lean_object*, lean_object*); @@ -590,6 +605,7 @@ lean_object* l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_emitInitFn___spec__3(l lean_object* l_Lean_IR_EmitC_emitSSet___closed__4; lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitTailCall___spec__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitInitFn___closed__2; +lean_object* l_Lean_IR_EmitC_maxSmallObjectSize___closed__1; extern lean_object* l_Lean_Parser_Syntax_addPrec___closed__11; lean_object* l_List_forM___at_Lean_IR_EmitC_emitMainFn___spec__3(lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_emitLn(lean_object*); @@ -654,6 +670,81 @@ lean_object* l_Lean_IR_EmitC_emitCtorSetArgs___boxed(lean_object*, lean_object*, lean_object* l_Nat_forM_loop___at_Lean_IR_EmitC_emitDeclAux___spec__3(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); lean_object* l_Lean_IR_EmitC_getDecl(lean_object*, lean_object*, lean_object*); lean_object* l_Array_foldlMUnsafe_fold___at_Lean_IR_EmitC_declareParams___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +lean_object* l_Lean_IR_EmitC_getMaxSmallObjectSize___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_box(LEAN_MAX_SMALL_OBJECT_SIZE); +return x_2; +} +} +static lean_object* _init_l_Lean_IR_EmitC_maxSmallObjectSize___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = lean_box(0); +x_2 = lean_box(LEAN_MAX_SMALL_OBJECT_SIZE); +return x_2; +} +} +static lean_object* _init_l_Lean_IR_EmitC_maxSmallObjectSize() { +_start: +{ +lean_object* x_1; +x_1 = l_Lean_IR_EmitC_maxSmallObjectSize___closed__1; +return x_1; +} +} +lean_object* l_Lean_IR_EmitC_getCtorHeaderSize___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_box(sizeof(lean_ctor_object)); +return x_2; +} +} +static lean_object* _init_l_Lean_IR_EmitC_ctorHeaderSize___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = lean_box(0); +x_2 = lean_box(sizeof(lean_ctor_object)); +return x_2; +} +} +static lean_object* _init_l_Lean_IR_EmitC_ctorHeaderSize() { +_start: +{ +lean_object* x_1; +x_1 = l_Lean_IR_EmitC_ctorHeaderSize___closed__1; +return x_1; +} +} +lean_object* l_Lean_IR_EmitC_getUSizeSize___boxed(lean_object* x_1) { +_start: +{ +lean_object* x_2; +x_2 = lean_box(sizeof(size_t)); +return x_2; +} +} +static lean_object* _init_l_Lean_IR_EmitC_usizeSize___closed__1() { +_start: +{ +lean_object* x_1; lean_object* x_2; +x_1 = lean_box(0); +x_2 = lean_box(sizeof(size_t)); +return x_2; +} +} +static lean_object* _init_l_Lean_IR_EmitC_usizeSize() { +_start: +{ +lean_object* x_1; +x_1 = l_Lean_IR_EmitC_usizeSize___closed__1; +return x_1; +} +} static lean_object* _init_l_Lean_IR_EmitC_leanMainFn___closed__1() { _start: { @@ -1372,7 +1463,7 @@ _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_Lean_IR_EmitC_toCType___closed__8; x_2 = l_Lean_IR_EmitC_toCType___closed__9; -x_3 = lean_unsigned_to_nat(65u); +x_3 = lean_unsigned_to_nat(77u); x_4 = lean_unsigned_to_nat(25u); x_5 = l_Lean_IR_EmitC_toCType___closed__10; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -1385,7 +1476,7 @@ _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_Lean_IR_EmitC_toCType___closed__8; x_2 = l_Lean_IR_EmitC_toCType___closed__9; -x_3 = lean_unsigned_to_nat(66u); +x_3 = lean_unsigned_to_nat(78u); x_4 = lean_unsigned_to_nat(25u); x_5 = l_Lean_IR_EmitC_toCType___closed__10; x_6 = l___private_Init_Util_0__mkPanicMessageWithDecl(x_1, x_2, x_3, x_4, x_5); @@ -6500,6 +6591,40 @@ lean_dec(x_1); return x_4; } } +uint8_t l___private_Lean_Compiler_IR_EmitC_0__Lean_IR_EmitC_isSmallCtor(lean_object* x_1) { +_start: +{ +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; uint8_t x_13; +x_2 = lean_ctor_get(x_1, 2); +x_3 = l_Lean_IR_EmitC_usizeSize; +x_4 = lean_nat_mul(x_2, x_3); +x_5 = l_Lean_IR_EmitC_ctorHeaderSize; +x_6 = lean_nat_add(x_5, x_4); +lean_dec(x_4); +x_7 = lean_ctor_get(x_1, 3); +x_8 = lean_nat_mul(x_7, x_3); +x_9 = lean_nat_add(x_6, x_8); +lean_dec(x_8); +lean_dec(x_6); +x_10 = lean_ctor_get(x_1, 4); +x_11 = lean_nat_add(x_9, x_10); +lean_dec(x_9); +x_12 = l_Lean_IR_EmitC_maxSmallObjectSize; +x_13 = lean_nat_dec_le(x_11, x_12); +lean_dec(x_11); +return x_13; +} +} +lean_object* l___private_Lean_Compiler_IR_EmitC_0__Lean_IR_EmitC_isSmallCtor___boxed(lean_object* x_1) { +_start: +{ +uint8_t x_2; lean_object* x_3; +x_2 = l___private_Lean_Compiler_IR_EmitC_0__Lean_IR_EmitC_isSmallCtor(x_1); +lean_dec(x_1); +x_3 = lean_box(x_2); +return x_3; +} +} static lean_object* _init_l_Lean_IR_EmitC_emitCtorScalarSize___closed__1() { _start: { @@ -6581,66 +6706,134 @@ static lean_object* _init_l_Lean_IR_EmitC_emitAllocCtor___closed__1() { _start: { lean_object* x_1; -x_1 = lean_mk_string("lean_alloc_ctor("); +x_1 = lean_mk_string("lean_alloc_ctor_big"); +return x_1; +} +} +static lean_object* _init_l_Lean_IR_EmitC_emitAllocCtor___closed__2() { +_start: +{ +lean_object* x_1; +x_1 = lean_mk_string("lean_alloc_ctor"); return x_1; } } lean_object* l_Lean_IR_EmitC_emitAllocCtor(lean_object* x_1, lean_object* x_2, lean_object* x_3) { _start: { -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; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; uint8_t x_18; -x_4 = l_Lean_IR_EmitC_emitAllocCtor___closed__1; -x_5 = lean_string_append(x_3, x_4); -x_6 = lean_ctor_get(x_1, 1); -lean_inc(x_6); -x_7 = l_Nat_repr(x_6); -x_8 = lean_string_append(x_5, x_7); -lean_dec(x_7); -x_9 = l_term_x5b___x5d___closed__5; -x_10 = lean_string_append(x_8, x_9); -x_11 = lean_ctor_get(x_1, 2); -lean_inc(x_11); -x_12 = l_Nat_repr(x_11); -x_13 = lean_string_append(x_10, x_12); -lean_dec(x_12); -x_14 = lean_string_append(x_13, x_9); -x_15 = lean_ctor_get(x_1, 3); -lean_inc(x_15); -x_16 = lean_ctor_get(x_1, 4); -lean_inc(x_16); -lean_dec(x_1); -x_17 = l_Lean_IR_EmitC_emitCtorScalarSize(x_15, x_16, x_2, x_14); -x_18 = !lean_is_exclusive(x_17); -if (x_18 == 0) +uint8_t x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; +x_4 = l___private_Lean_Compiler_IR_EmitC_0__Lean_IR_EmitC_isSmallCtor(x_1); +x_5 = lean_ctor_get(x_1, 1); +lean_inc(x_5); +x_6 = l_Nat_repr(x_5); +x_7 = lean_ctor_get(x_1, 2); +lean_inc(x_7); +x_8 = l_Nat_repr(x_7); +if (x_4 == 0) { -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; -x_19 = lean_ctor_get(x_17, 1); -x_20 = lean_ctor_get(x_17, 0); -lean_dec(x_20); -x_21 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; -x_22 = lean_string_append(x_19, x_21); -x_23 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; -x_24 = lean_string_append(x_22, x_23); -x_25 = lean_box(0); -lean_ctor_set(x_17, 1, x_24); -lean_ctor_set(x_17, 0, x_25); -return x_17; +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; lean_object* x_18; lean_object* x_19; lean_object* x_20; uint8_t x_21; +x_9 = lean_ctor_get(x_1, 3); +lean_inc(x_9); +x_10 = lean_ctor_get(x_1, 4); +lean_inc(x_10); +lean_dec(x_1); +x_11 = l_Lean_IR_EmitC_emitAllocCtor___closed__1; +x_12 = lean_string_append(x_3, x_11); +x_13 = l_prec_x28___x29___closed__3; +x_14 = lean_string_append(x_12, x_13); +x_15 = lean_string_append(x_14, x_6); +lean_dec(x_6); +x_16 = l_term_x5b___x5d___closed__5; +x_17 = lean_string_append(x_15, x_16); +x_18 = lean_string_append(x_17, x_8); +lean_dec(x_8); +x_19 = lean_string_append(x_18, x_16); +x_20 = l_Lean_IR_EmitC_emitCtorScalarSize(x_9, x_10, x_2, x_19); +x_21 = !lean_is_exclusive(x_20); +if (x_21 == 0) +{ +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; +x_22 = lean_ctor_get(x_20, 1); +x_23 = lean_ctor_get(x_20, 0); +lean_dec(x_23); +x_24 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; +x_25 = lean_string_append(x_22, x_24); +x_26 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; +x_27 = lean_string_append(x_25, x_26); +x_28 = lean_box(0); +lean_ctor_set(x_20, 1, x_27); +lean_ctor_set(x_20, 0, x_28); +return x_20; } else { -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; -x_26 = lean_ctor_get(x_17, 1); -lean_inc(x_26); -lean_dec(x_17); -x_27 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; -x_28 = lean_string_append(x_26, x_27); -x_29 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; -x_30 = lean_string_append(x_28, x_29); -x_31 = lean_box(0); -x_32 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_32, 0, x_31); -lean_ctor_set(x_32, 1, x_30); -return x_32; +lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; +x_29 = lean_ctor_get(x_20, 1); +lean_inc(x_29); +lean_dec(x_20); +x_30 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; +x_31 = lean_string_append(x_29, x_30); +x_32 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; +x_33 = lean_string_append(x_31, x_32); +x_34 = lean_box(0); +x_35 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_35, 0, x_34); +lean_ctor_set(x_35, 1, x_33); +return x_35; +} +} +else +{ +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; lean_object* x_47; uint8_t x_48; +x_36 = lean_ctor_get(x_1, 3); +lean_inc(x_36); +x_37 = lean_ctor_get(x_1, 4); +lean_inc(x_37); +lean_dec(x_1); +x_38 = l_Lean_IR_EmitC_emitAllocCtor___closed__2; +x_39 = lean_string_append(x_3, x_38); +x_40 = l_prec_x28___x29___closed__3; +x_41 = lean_string_append(x_39, x_40); +x_42 = lean_string_append(x_41, x_6); +lean_dec(x_6); +x_43 = l_term_x5b___x5d___closed__5; +x_44 = lean_string_append(x_42, x_43); +x_45 = lean_string_append(x_44, x_8); +lean_dec(x_8); +x_46 = lean_string_append(x_45, x_43); +x_47 = l_Lean_IR_EmitC_emitCtorScalarSize(x_36, x_37, x_2, x_46); +x_48 = !lean_is_exclusive(x_47); +if (x_48 == 0) +{ +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; +x_49 = lean_ctor_get(x_47, 1); +x_50 = lean_ctor_get(x_47, 0); +lean_dec(x_50); +x_51 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; +x_52 = lean_string_append(x_49, x_51); +x_53 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; +x_54 = lean_string_append(x_52, x_53); +x_55 = lean_box(0); +lean_ctor_set(x_47, 1, x_54); +lean_ctor_set(x_47, 0, x_55); +return x_47; +} +else +{ +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_56 = lean_ctor_get(x_47, 1); +lean_inc(x_56); +lean_dec(x_47); +x_57 = l_Lean_IR_EmitC_emitInc___lambda__1___closed__1; +x_58 = lean_string_append(x_56, x_57); +x_59 = l___private_Init_Data_Format_Basic_0__Std_Format_pushNewline___closed__1; +x_60 = lean_string_append(x_58, x_59); +x_61 = lean_box(0); +x_62 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_62, 0, x_61); +lean_ctor_set(x_62, 1, x_60); +return x_62; +} } } } @@ -15418,6 +15611,18 @@ lean_dec_ref(res); res = initialize_Lean_Compiler_IR_Boxing(lean_io_mk_world()); if (lean_io_result_is_error(res)) return res; lean_dec_ref(res); +l_Lean_IR_EmitC_maxSmallObjectSize___closed__1 = _init_l_Lean_IR_EmitC_maxSmallObjectSize___closed__1(); +lean_mark_persistent(l_Lean_IR_EmitC_maxSmallObjectSize___closed__1); +l_Lean_IR_EmitC_maxSmallObjectSize = _init_l_Lean_IR_EmitC_maxSmallObjectSize(); +lean_mark_persistent(l_Lean_IR_EmitC_maxSmallObjectSize); +l_Lean_IR_EmitC_ctorHeaderSize___closed__1 = _init_l_Lean_IR_EmitC_ctorHeaderSize___closed__1(); +lean_mark_persistent(l_Lean_IR_EmitC_ctorHeaderSize___closed__1); +l_Lean_IR_EmitC_ctorHeaderSize = _init_l_Lean_IR_EmitC_ctorHeaderSize(); +lean_mark_persistent(l_Lean_IR_EmitC_ctorHeaderSize); +l_Lean_IR_EmitC_usizeSize___closed__1 = _init_l_Lean_IR_EmitC_usizeSize___closed__1(); +lean_mark_persistent(l_Lean_IR_EmitC_usizeSize___closed__1); +l_Lean_IR_EmitC_usizeSize = _init_l_Lean_IR_EmitC_usizeSize(); +lean_mark_persistent(l_Lean_IR_EmitC_usizeSize); l_Lean_IR_EmitC_leanMainFn___closed__1 = _init_l_Lean_IR_EmitC_leanMainFn___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_leanMainFn___closed__1); l_Lean_IR_EmitC_leanMainFn = _init_l_Lean_IR_EmitC_leanMainFn(); @@ -15660,6 +15865,8 @@ l_Lean_IR_EmitC_emitCtorScalarSize___closed__1 = _init_l_Lean_IR_EmitC_emitCtorS lean_mark_persistent(l_Lean_IR_EmitC_emitCtorScalarSize___closed__1); l_Lean_IR_EmitC_emitAllocCtor___closed__1 = _init_l_Lean_IR_EmitC_emitAllocCtor___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitAllocCtor___closed__1); +l_Lean_IR_EmitC_emitAllocCtor___closed__2 = _init_l_Lean_IR_EmitC_emitAllocCtor___closed__2(); +lean_mark_persistent(l_Lean_IR_EmitC_emitAllocCtor___closed__2); l_Lean_IR_EmitC_emitCtor___closed__1 = _init_l_Lean_IR_EmitC_emitCtor___closed__1(); lean_mark_persistent(l_Lean_IR_EmitC_emitCtor___closed__1); l_Nat_forM_loop___at_Lean_IR_EmitC_emitReset___spec__1___closed__1 = _init_l_Nat_forM_loop___at_Lean_IR_EmitC_emitReset___spec__1___closed__1();