From cf6f6bc96d89233509d1c8bf67fa2d58a2288910 Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Thu, 27 Jun 2019 09:30:53 -0700 Subject: [PATCH] chore(stage0): update --- src/stage0/init/data/ordering/basic.cpp | 60 +- src/stage0/init/lean/attributes.cpp | 10 +- src/stage0/init/lean/class.cpp | 1679 ++++++++++++++---- src/stage0/init/lean/compiler/exportattr.cpp | 46 +- src/stage0/init/lean/compiler/externattr.cpp | 50 +- src/stage0/init/lean/compiler/ir/basic.cpp | 238 +-- src/stage0/init/lean/compiler/ir/emitcpp.cpp | 1487 +++++++--------- src/stage0/init/lean/expr.cpp | 178 +- src/stage0/init/lean/format.cpp | 14 +- src/stage0/init/lean/level.cpp | 160 +- src/stage0/init/lean/message.cpp | 24 +- src/stage0/init/lean/modifiers.cpp | 10 +- src/stage0/init/lean/name.cpp | 167 +- src/stage0/init/lean/parser/parser.cpp | 1660 ++++++++--------- src/stage0/init/lean/syntax.cpp | 906 +++++----- 15 files changed, 3614 insertions(+), 3075 deletions(-) diff --git a/src/stage0/init/data/ordering/basic.cpp b/src/stage0/init/data/ordering/basic.cpp index bb40f757e8..f6265d70db 100644 --- a/src/stage0/init/data/ordering/basic.cpp +++ b/src/stage0/init/data/ordering/basic.cpp @@ -152,22 +152,19 @@ return x_4; uint8 l_Ordering_orElse___main(uint8 x_1, uint8 x_2) { _start: { -switch (x_1) { -case 0: -{ -return x_1; -} -case 1: +obj* x_3; +x_3 = lean::box(x_1); +if (lean::obj_tag(x_3) == 1) { return x_2; } -default: +else { +lean::dec(x_3); return x_1; } } } -} obj* l_Ordering_orElse___main___boxed(obj* x_1, obj* x_2) { _start: { @@ -184,22 +181,19 @@ return x_6; uint8 l_Ordering_orElse(uint8 x_1, uint8 x_2) { _start: { -switch (x_1) { -case 0: -{ -return x_1; -} -case 1: +obj* x_3; +x_3 = lean::box(x_1); +if (lean::obj_tag(x_3) == 1) { return x_2; } -default: +else { +lean::dec(x_3); return x_1; } } } -} obj* l_Ordering_orElse___boxed(obj* x_1, obj* x_2) { _start: { @@ -369,53 +363,43 @@ return x_5; } case 1: { -switch (x_2) { -case 0: -{ -uint8 x_6; -x_6 = 0; -return x_6; -} -case 1: +obj* x_6; +x_6 = lean::box(x_2); +if (lean::obj_tag(x_6) == 1) { uint8 x_7; x_7 = 1; return x_7; } -default: +else { uint8 x_8; +lean::dec(x_6); x_8 = 0; return x_8; } } -} default: { -switch (x_2) { -case 0: -{ -uint8 x_9; -x_9 = 0; -return x_9; -} -case 1: +obj* x_9; +x_9 = lean::box(x_2); +if (lean::obj_tag(x_9) == 2) { uint8 x_10; -x_10 = 0; +x_10 = 1; return x_10; } -default: +else { uint8 x_11; -x_11 = 1; +lean::dec(x_9); +x_11 = 0; return x_11; } } } } } -} obj* l_Ordering_DecidableEq___boxed(obj* x_1, obj* x_2) { _start: { diff --git a/src/stage0/init/lean/attributes.cpp b/src/stage0/init/lean/attributes.cpp index f57bf6975f..8bfcd7840b 100644 --- a/src/stage0/init/lean/attributes.cpp +++ b/src/stage0/init/lean/attributes.cpp @@ -996,12 +996,7 @@ return x_1; obj* l_Lean_Environment_registerNamespace___main(obj* x_1, obj* x_2) { _start: { -switch (lean::obj_tag(x_2)) { -case 0: -{ -return x_1; -} -case 1: +if (lean::obj_tag(x_2) == 1) { obj* x_3; obj* x_4; x_3 = lean::cnstr_get(x_2, 0); @@ -1011,14 +1006,13 @@ x_1 = x_4; x_2 = x_3; goto _start; } -default: +else { lean::dec(x_2); return x_1; } } } -} namespace lean { obj* register_namespace_core(obj* x_1, obj* x_2) { _start: diff --git a/src/stage0/init/lean/class.cpp b/src/stage0/init/lean/class.cpp index 738cbe5e59..2adba35ae7 100644 --- a/src/stage0/init/lean/class.cpp +++ b/src/stage0/init/lean/class.cpp @@ -17,105 +17,156 @@ typedef lean::uint32 uint32; typedef lean::uint64 uint64; obj* l_RBNode_ins___main___at_Lean_ClassState_addEntry___spec__3(obj*, obj*, uint8); obj* l_Lean_ClassEntry_getName___boxed(obj*); obj* l_RBNode_setBlack___main___rarg(obj*); -obj* l_Lean_ClassState_addEntry___boxed(obj*, obj*, obj*); +obj* l_Lean_classExtension___elambda__2(obj*); obj* l_AssocList_find___main___at_Lean_ClassState_addEntry___spec__13___boxed(obj*, obj*); obj* l_RBNode_find___main___at_Lean_ClassState_addEntry___spec__11___boxed(obj*, obj*); +obj* l_HashMapImp_contains___at_Lean_isClass___spec__2___boxed(obj*, obj*); extern "C" uint8 lean_name_dec_eq(obj*, obj*); -obj* l_RBNode_ins___main___at_Lean_ClassState_addEntry___spec__16(obj*, obj*, obj*); +obj* l_RBNode_insert___at_Lean_ClassState_addEntry___spec__22(obj*, obj*, obj*); +obj* l_Lean_SMap_insert___main___at_Lean_ClassState_addEntry___spec__21(obj*, obj*, obj*); +uint8 l_Lean_SMap_contains___main___at_Lean_isInstance___spec__1(obj*, obj*); +extern obj* l_Array_empty___closed__1; +obj* l_Lean_isInstance___boxed(obj*, obj*); +uint8 l___private_init_lean_class_2__hasOutParam(obj*); +obj* l_Lean_isClass___boxed(obj*, obj*); obj* l_Array_mkArray(obj*, obj*, obj*); obj* l_Lean_ClassEntry_lt___boxed(obj*, obj*); obj* l_Lean_SMap_find___main___at_Lean_ClassState_addEntry___spec__10___boxed(obj*, obj*); +obj* l_AssocList_replace___main___at_Lean_ClassState_addEntry___spec__29(obj*, obj*, obj*); obj* l_HashMapImp_insert___at_Lean_ClassState_addEntry___spec__4___boxed(obj*, obj*, obj*); +obj* l_Array_miterateAux___main___at_Lean_mkClassExtension___spec__2(obj*, obj*, obj*, obj*); uint8 l_Lean_ClassEntry_lt(obj*, obj*); obj* l_HashMapImp_moveEntries___main___at_Lean_ClassState_addEntry___spec__7(obj*, obj*, obj*); obj* l_RBNode_insert___at_Lean_ClassState_addEntry___spec__2___boxed(obj*, obj*, obj*); -obj* l_HashMapImp_insert___at_Lean_ClassState_addEntry___spec__17(obj*, obj*, obj*); -obj* l_Lean_SMap_empty___at_Lean_mkClassExtension___spec__1; -obj* l_Lean_SMap_empty___at_Lean_mkClassExtension___spec__3; -obj* l_Lean_ClassState_addEntry(uint8, obj*, obj*); +obj* l_Lean_ClassState_addEntry(obj*, obj*); +obj* l_Lean_classExtension___elambda__1___boxed(obj*); +obj* l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__1; obj* l_Array_uget(obj*, obj*, usize, obj*); -obj* l_HashMapImp_moveEntries___main___at_Lean_ClassState_addEntry___spec__20(obj*, obj*, obj*); +obj* l_Lean_Name_toStringWithSep___main(obj*, obj*); +obj* l_Lean_SimplePersistentEnvExtension_getState___rarg(obj*, obj*); obj* l_Array_uset(obj*, obj*, usize, obj*, obj*); -obj* l_AssocList_replace___main___at_Lean_ClassState_addEntry___spec__22(obj*, obj*, obj*); +obj* l_HashMapImp_moveEntries___main___at_Lean_ClassState_addEntry___spec__27(obj*, obj*, obj*); obj* l_RBNode_ins___main___at_Lean_ClassState_addEntry___spec__3___boxed(obj*, obj*, obj*); -obj* l_mkHashMap___at_Lean_mkClassExtension___spec__2(obj*); +obj* l_Array_mkEmpty(obj*, obj*); +obj* l_Lean_getClassInstances___boxed(obj*, obj*); +obj* l_AssocList_mfoldl___main___at_Lean_ClassState_addEntry___spec__19(obj*, obj*); obj* l_Lean_ClassEntry_getName___main(obj*); obj* l_AssocList_mfoldl___main___at_Lean_ClassState_addEntry___spec__8(obj*, obj*); +obj* l_AssocList_mfoldl___main___at_Lean_ClassState_addEntry___spec__28(obj*, obj*); obj* l_Lean_SMap_insert___main___at_Lean_ClassState_addEntry___spec__1___boxed(obj*, obj*, obj*); obj* l_Lean_ClassEntry_getName(obj*); obj* l_AssocList_replace___main___at_Lean_ClassState_addEntry___spec__9(obj*, uint8, obj*); uint8 l_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__5(obj*, obj*); +obj* l_HashMapImp_contains___at_Lean_isInstance___spec__2___boxed(obj*, obj*); obj* l_RBNode_insert___at_Lean_NameSet_insert___spec__1(obj*, obj*, obj*); +obj* l_Lean_SMap_contains___main___at_Lean_isInstance___spec__1___boxed(obj*, obj*); extern "C" usize lean_name_hash_usize(obj*); obj* l_HashMapImp_find___at_Lean_ClassState_addEntry___spec__12(obj*, obj*); -obj* l_mkHashMap___at_Lean_mkClassExtension___spec__4(obj*); +obj* l_Lean_addClass(obj*, obj*); +obj* l_Lean_classExtension___elambda__3(obj*, obj*); +uint8 l_Lean_SMap_contains___main___at_Lean_isClass___spec__1(obj*, obj*); +uint8 l_HashMapImp_contains___at_Lean_isInstance___spec__2(obj*, obj*); obj* l_Lean_SMap_find___main___at_Lean_ClassState_addEntry___spec__10(obj*, obj*); -obj* l_Array_miterateAux___main___at_Lean_mkClassExtension___spec__7(obj*, obj*, obj*, obj*); +namespace lean { +obj* string_append(obj*, obj*); +} +obj* l___private_init_lean_class_1__isOutParam___closed__1; obj* l_HashMapImp_insert___at_Lean_ClassState_addEntry___spec__4(obj*, obj*, uint8); namespace lean { uint8 nat_dec_lt(obj*, obj*); } +obj* l___private_init_lean_class_2__hasOutParam___boxed(obj*); +extern obj* l_Char_HasRepr___closed__1; +obj* l_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__25___boxed(obj*, obj*); +obj* l_Lean_classExtension___elambda__3___boxed(obj*, obj*); +uint8 l_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__16(obj*, obj*); obj* l_Array_fget(obj*, obj*, obj*); extern "C" obj* lean_name_mk_string(obj*, obj*); +obj* l_Array_miterateAux___main___at_Lean_mkClassExtension___spec__2___boxed(obj*, obj*, obj*, obj*); obj* l_Lean_registerSimplePersistentEnvExtension___rarg(obj*, obj*); obj* l_Lean_mkClassExtension___closed__1; namespace lean { obj* nat_add(obj*, obj*); } -obj* l_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__18___boxed(obj*, obj*); +obj* l_mkHashMap___at_Lean_ClassState_Inhabited___spec__4(obj*); +obj* l_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__16___boxed(obj*, obj*); +obj* l_HashMapImp_moveEntries___main___at_Lean_ClassState_addEntry___spec__18(obj*, obj*, obj*); +obj* l_HashMapImp_expand___at_Lean_ClassState_addEntry___spec__26(obj*, obj*); uint8 l_RBNode_isRed___main___rarg(obj*); -obj* l_Array_miterateAux___main___at_Lean_mkClassExtension___spec__6___boxed(obj*, obj*, obj*, obj*); -obj* l_Array_miterateAux___main___at_Lean_mkClassExtension___spec__6(obj*, obj*, obj*, obj*); -obj* l_HashMapImp_expand___at_Lean_ClassState_addEntry___spec__19(obj*, obj*); +obj* l_Lean_SMap_contains___main___at_Lean_isClass___spec__1___boxed(obj*, obj*); +obj* l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__5; +uint8 l_HashMapImp_contains___at_Lean_isClass___spec__2(obj*, obj*); +obj* l_HashMapImp_insert___at_Lean_ClassState_addEntry___spec__15(obj*, obj*, obj*); obj* l_Lean_SMap_insert___main___at_Lean_ClassState_addEntry___spec__14(obj*, obj*, obj*); -obj* l_RBNode_insert___at_Lean_ClassState_addEntry___spec__15(obj*, obj*, obj*); obj* l_AssocList_replace___main___at_Lean_ClassState_addEntry___spec__9___boxed(obj*, obj*, obj*); -obj* l_AssocList_mfoldl___main___at_Lean_ClassState_addEntry___spec__21(obj*, obj*); +obj* l_Lean_classExtension___elambda__4(obj*, obj*, obj*); +uint8 l_Lean_Expr_isAppOfArity___main(obj*, obj*, obj*); +obj* l_AssocList_replace___main___at_Lean_ClassState_addEntry___spec__20(obj*, obj*, obj*); +obj* l_mkHashMap___at_Lean_ClassState_Inhabited___spec__2(obj*); +obj* l_Lean_mkStateFromImportedEntries___at_Lean_mkClassExtension___spec__1___boxed(obj*, obj*); obj* l_HashMapImp_expand___at_Lean_ClassState_addEntry___spec__6(obj*, obj*); -obj* l_Lean_mkStateFromImportedEntries___at_Lean_mkClassExtension___spec__5(obj*, obj*); +uint8 l_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__25(obj*, obj*); +obj* l_Lean_PersistentEnvExtension_addEntry___rarg(obj*, obj*, obj*); uint8 l_Lean_Name_quickLt(obj*, obj*); namespace lean { usize usize_modn(usize, obj*); } obj* l_Lean_ClassEntry_getName___main___boxed(obj*); +obj* l_Lean_ConstantInfo_type(obj*); +namespace lean { +obj* environment_find_core(obj*, obj*); +} +uint8 l_Lean_isClass(obj*, obj*); +obj* l_RBNode_find___main___at_Lean_isClass___spec__3(obj*, obj*); +obj* l_Lean_getClassInstances(obj*, obj*); obj* l_Array_size(obj*, obj*); +obj* l_Lean_addClass___closed__1; +obj* l_Lean_classExtension___elambda__2___boxed(obj*); +obj* l_RBNode_find___main___at_Lean_NameSet_contains___spec__1(obj*, obj*); obj* l_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__5___boxed(obj*, obj*); +obj* l___private_init_lean_class_1__isOutParam___boxed(obj*); obj* l_Array_fset(obj*, obj*, obj*, obj*); obj* l_mkHashMapImp___rarg(obj*); +obj* l_Lean_mkStateFromImportedEntries___at_Lean_mkClassExtension___spec__1(obj*, obj*); +obj* l___private_init_lean_class_2__hasOutParam___main___boxed(obj*); obj* l_RBNode_insert___at_Lean_ClassState_addEntry___spec__2(obj*, obj*, uint8); +obj* l_HashMapImp_insert___at_Lean_ClassState_addEntry___spec__24(obj*, obj*, obj*); obj* l_Lean_SMap_insert___main___at_Lean_ClassState_addEntry___spec__1(obj*, obj*, uint8); +extern obj* l_Lean_Name_toString___closed__1; +obj* l_mkHashMap___at_Lean_ClassState_Inhabited___spec__6(obj*); namespace lean { uint8 nat_dec_le(obj*, obj*); } +obj* l_Lean_classExtension; +uint8 l___private_init_lean_class_1__isOutParam(obj*); +uint8 l_Lean_isInstance(obj*, obj*); obj* l_Lean_mkClassExtension(obj*); obj* l_AssocList_find___main___at_Lean_ClassState_addEntry___spec__13(obj*, obj*); obj* l_HashMapImp_find___at_Lean_ClassState_addEntry___spec__12___boxed(obj*, obj*); +obj* l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__3; +obj* l_Lean_classExtension___elambda__1(obj*); +obj* l_Lean_classExtension___elambda__4___boxed(obj*, obj*, obj*); +obj* l_Lean_ClassState_Inhabited; +obj* l_RBNode_ins___main___at_Lean_ClassState_addEntry___spec__23(obj*, obj*, obj*); +obj* l_Lean_addClass___closed__2; namespace lean { obj* nat_mul(obj*, obj*); } -obj* l_Lean_mkStateFromImportedEntries___at_Lean_mkClassExtension___spec__5___boxed(obj*, obj*); -uint8 l_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__18(obj*, obj*); -obj* l_Array_miterateAux___main___at_Lean_mkClassExtension___spec__7___boxed(obj*, obj*, obj*, obj*); +obj* l_HashMapImp_expand___at_Lean_ClassState_addEntry___spec__17(obj*, obj*); +obj* l_RBNode_find___main___at_Lean_isClass___spec__3___boxed(obj*, obj*); +uint8 l___private_init_lean_class_2__hasOutParam___main(obj*); obj* l_Lean_regScopeManagerExtension___lambda__3(obj*); obj* l_RBNode_find___main___at_Lean_ClassState_addEntry___spec__11(obj*, obj*); +obj* l_Array_miterateAux___main___at_Lean_mkClassExtension___spec__3(obj*, obj*, obj*, obj*); +obj* l_Array_miterateAux___main___at_Lean_mkClassExtension___spec__3___boxed(obj*, obj*, obj*, obj*); obj* l_Lean_ClassEntry_getName___main(obj* x_1) { _start: { -if (lean::obj_tag(x_1) == 0) -{ obj* x_2; x_2 = lean::cnstr_get(x_1, 0); lean::inc(x_2); return x_2; } -else -{ -obj* x_3; -x_3 = lean::cnstr_get(x_1, 0); -lean::inc(x_3); -return x_3; -} -} } obj* l_Lean_ClassEntry_getName___main___boxed(obj* x_1) { _start: @@ -129,21 +180,11 @@ return x_2; obj* l_Lean_ClassEntry_getName(obj* x_1) { _start: { -if (lean::obj_tag(x_1) == 0) -{ obj* x_2; x_2 = lean::cnstr_get(x_1, 0); lean::inc(x_2); return x_2; } -else -{ -obj* x_3; -x_3 = lean::cnstr_get(x_1, 0); -lean::inc(x_3); -return x_3; -} -} } obj* l_Lean_ClassEntry_getName___boxed(obj* x_1) { _start: @@ -157,45 +198,12 @@ return x_2; uint8 l_Lean_ClassEntry_lt(obj* x_1, obj* x_2) { _start: { -if (lean::obj_tag(x_1) == 0) -{ -if (lean::obj_tag(x_2) == 0) -{ obj* x_3; obj* x_4; uint8 x_5; x_3 = lean::cnstr_get(x_1, 0); x_4 = lean::cnstr_get(x_2, 0); x_5 = l_Lean_Name_quickLt(x_3, x_4); return x_5; } -else -{ -obj* x_6; obj* x_7; uint8 x_8; -x_6 = lean::cnstr_get(x_1, 0); -x_7 = lean::cnstr_get(x_2, 0); -x_8 = l_Lean_Name_quickLt(x_6, x_7); -return x_8; -} -} -else -{ -if (lean::obj_tag(x_2) == 0) -{ -obj* x_9; obj* x_10; uint8 x_11; -x_9 = lean::cnstr_get(x_1, 0); -x_10 = lean::cnstr_get(x_2, 0); -x_11 = l_Lean_Name_quickLt(x_9, x_10); -return x_11; -} -else -{ -obj* x_12; obj* x_13; uint8 x_14; -x_12 = lean::cnstr_get(x_1, 0); -x_13 = lean::cnstr_get(x_2, 0); -x_14 = l_Lean_Name_quickLt(x_12, x_13); -return x_14; -} -} -} } obj* l_Lean_ClassEntry_lt___boxed(obj* x_1, obj* x_2) { _start: @@ -208,6 +216,89 @@ x_4 = lean::box(x_3); return x_4; } } +obj* l_mkHashMap___at_Lean_ClassState_Inhabited___spec__2(obj* x_1) { +_start: +{ +obj* x_2; +x_2 = l_mkHashMapImp___rarg(x_1); +return x_2; +} +} +obj* _init_l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__1() { +_start: +{ +obj* x_1; obj* x_2; obj* x_3; uint8 x_4; obj* x_5; +x_1 = lean::mk_nat_obj(8u); +x_2 = l_mkHashMapImp___rarg(x_1); +x_3 = lean::box(0); +x_4 = 1; +x_5 = lean::alloc_cnstr(0, 2, 1); +lean::cnstr_set(x_5, 0, x_2); +lean::cnstr_set(x_5, 1, x_3); +lean::cnstr_set_scalar(x_5, sizeof(void*)*2, x_4); +return x_5; +} +} +obj* l_mkHashMap___at_Lean_ClassState_Inhabited___spec__4(obj* x_1) { +_start: +{ +obj* x_2; +x_2 = l_mkHashMapImp___rarg(x_1); +return x_2; +} +} +obj* _init_l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__3() { +_start: +{ +obj* x_1; obj* x_2; obj* x_3; uint8 x_4; obj* x_5; +x_1 = lean::mk_nat_obj(8u); +x_2 = l_mkHashMapImp___rarg(x_1); +x_3 = lean::box(0); +x_4 = 1; +x_5 = lean::alloc_cnstr(0, 2, 1); +lean::cnstr_set(x_5, 0, x_2); +lean::cnstr_set(x_5, 1, x_3); +lean::cnstr_set_scalar(x_5, sizeof(void*)*2, x_4); +return x_5; +} +} +obj* l_mkHashMap___at_Lean_ClassState_Inhabited___spec__6(obj* x_1) { +_start: +{ +obj* x_2; +x_2 = l_mkHashMapImp___rarg(x_1); +return x_2; +} +} +obj* _init_l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__5() { +_start: +{ +obj* x_1; obj* x_2; obj* x_3; uint8 x_4; obj* x_5; +x_1 = lean::mk_nat_obj(8u); +x_2 = l_mkHashMapImp___rarg(x_1); +x_3 = lean::box(0); +x_4 = 1; +x_5 = lean::alloc_cnstr(0, 2, 1); +lean::cnstr_set(x_5, 0, x_2); +lean::cnstr_set(x_5, 1, x_3); +lean::cnstr_set_scalar(x_5, sizeof(void*)*2, x_4); +return x_5; +} +} +obj* _init_l_Lean_ClassState_Inhabited() { +_start: +{ +obj* x_1; obj* x_2; obj* x_3; obj* x_4; +x_1 = l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__1; +x_2 = l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__3; +x_3 = l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__5; +x_4 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_4, 0, x_1); +lean::cnstr_set(x_4, 1, x_2); +lean::cnstr_set(x_4, 2, x_3); +return x_4; +} +} obj* l_RBNode_ins___main___at_Lean_ClassState_addEntry___spec__3(obj* x_1, obj* x_2, uint8 x_3) { _start: { @@ -3187,7 +3278,400 @@ return x_9; } } } -obj* l_RBNode_ins___main___at_Lean_ClassState_addEntry___spec__16(obj* x_1, obj* x_2, obj* x_3) { +uint8 l_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__16(obj* x_1, obj* x_2) { +_start: +{ +if (lean::obj_tag(x_2) == 0) +{ +uint8 x_3; +x_3 = 0; +return x_3; +} +else +{ +obj* x_4; obj* x_5; uint8 x_6; +x_4 = lean::cnstr_get(x_2, 0); +x_5 = lean::cnstr_get(x_2, 2); +x_6 = lean_name_dec_eq(x_4, x_1); +if (x_6 == 0) +{ +x_2 = x_5; +goto _start; +} +else +{ +uint8 x_8; +x_8 = 1; +return x_8; +} +} +} +} +obj* l_AssocList_mfoldl___main___at_Lean_ClassState_addEntry___spec__19(obj* x_1, obj* x_2) { +_start: +{ +if (lean::obj_tag(x_2) == 0) +{ +return x_1; +} +else +{ +uint8 x_3; +x_3 = !lean::is_exclusive(x_2); +if (x_3 == 0) +{ +obj* x_4; obj* x_5; obj* x_6; usize x_7; usize x_8; obj* x_9; usize x_10; obj* x_11; usize x_12; obj* x_13; +x_4 = lean::cnstr_get(x_2, 0); +x_5 = lean::cnstr_get(x_2, 2); +x_6 = lean::array_get_size(x_1); +x_7 = lean_name_hash_usize(x_4); +x_8 = lean::usize_modn(x_7, x_6); +lean::dec(x_6); +x_9 = lean::box_size_t(x_8); +x_10 = lean::unbox_size_t(x_9); +x_11 = lean::array_uget(x_1, x_10); +lean::cnstr_set(x_2, 2, x_11); +x_12 = lean::unbox_size_t(x_9); +lean::dec(x_9); +x_13 = lean::array_uset(x_1, x_12, x_2); +x_1 = x_13; +x_2 = x_5; +goto _start; +} +else +{ +obj* x_15; obj* x_16; obj* x_17; obj* x_18; usize x_19; usize x_20; obj* x_21; usize x_22; obj* x_23; obj* x_24; usize x_25; obj* x_26; +x_15 = lean::cnstr_get(x_2, 0); +x_16 = lean::cnstr_get(x_2, 1); +x_17 = lean::cnstr_get(x_2, 2); +lean::inc(x_17); +lean::inc(x_16); +lean::inc(x_15); +lean::dec(x_2); +x_18 = lean::array_get_size(x_1); +x_19 = lean_name_hash_usize(x_15); +x_20 = lean::usize_modn(x_19, x_18); +lean::dec(x_18); +x_21 = lean::box_size_t(x_20); +x_22 = lean::unbox_size_t(x_21); +x_23 = lean::array_uget(x_1, x_22); +x_24 = lean::alloc_cnstr(1, 3, 0); +lean::cnstr_set(x_24, 0, x_15); +lean::cnstr_set(x_24, 1, x_16); +lean::cnstr_set(x_24, 2, x_23); +x_25 = lean::unbox_size_t(x_21); +lean::dec(x_21); +x_26 = lean::array_uset(x_1, x_25, x_24); +x_1 = x_26; +x_2 = x_17; +goto _start; +} +} +} +} +obj* l_HashMapImp_moveEntries___main___at_Lean_ClassState_addEntry___spec__18(obj* x_1, obj* x_2, obj* x_3) { +_start: +{ +obj* x_4; uint8 x_5; +x_4 = lean::array_get_size(x_2); +x_5 = lean::nat_dec_lt(x_1, x_4); +lean::dec(x_4); +if (x_5 == 0) +{ +lean::dec(x_2); +lean::dec(x_1); +return x_3; +} +else +{ +obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; +x_6 = lean::array_fget(x_2, x_1); +x_7 = lean::box(0); +x_8 = lean::array_fset(x_2, x_1, x_7); +x_9 = l_AssocList_mfoldl___main___at_Lean_ClassState_addEntry___spec__19(x_3, x_6); +x_10 = lean::mk_nat_obj(1u); +x_11 = lean::nat_add(x_1, x_10); +lean::dec(x_1); +x_1 = x_11; +x_2 = x_8; +x_3 = x_9; +goto _start; +} +} +} +obj* l_HashMapImp_expand___at_Lean_ClassState_addEntry___spec__17(obj* x_1, obj* x_2) { +_start: +{ +obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; +x_3 = lean::array_get_size(x_2); +x_4 = lean::mk_nat_obj(2u); +x_5 = lean::nat_mul(x_3, x_4); +lean::dec(x_3); +x_6 = lean::box(0); +x_7 = lean::mk_array(x_5, x_6); +x_8 = lean::mk_nat_obj(0u); +x_9 = l_HashMapImp_moveEntries___main___at_Lean_ClassState_addEntry___spec__18(x_8, x_2, x_7); +x_10 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_10, 0, x_1); +lean::cnstr_set(x_10, 1, x_9); +return x_10; +} +} +obj* l_AssocList_replace___main___at_Lean_ClassState_addEntry___spec__20(obj* x_1, obj* x_2, obj* x_3) { +_start: +{ +if (lean::obj_tag(x_3) == 0) +{ +lean::dec(x_2); +lean::dec(x_1); +return x_3; +} +else +{ +uint8 x_4; +x_4 = !lean::is_exclusive(x_3); +if (x_4 == 0) +{ +obj* x_5; obj* x_6; obj* x_7; uint8 x_8; +x_5 = lean::cnstr_get(x_3, 0); +x_6 = lean::cnstr_get(x_3, 1); +x_7 = lean::cnstr_get(x_3, 2); +x_8 = lean_name_dec_eq(x_5, x_1); +if (x_8 == 0) +{ +obj* x_9; +x_9 = l_AssocList_replace___main___at_Lean_ClassState_addEntry___spec__20(x_1, x_2, x_7); +lean::cnstr_set(x_3, 2, x_9); +return x_3; +} +else +{ +lean::dec(x_6); +lean::dec(x_5); +lean::cnstr_set(x_3, 1, x_2); +lean::cnstr_set(x_3, 0, x_1); +return x_3; +} +} +else +{ +obj* x_10; obj* x_11; obj* x_12; uint8 x_13; +x_10 = lean::cnstr_get(x_3, 0); +x_11 = lean::cnstr_get(x_3, 1); +x_12 = lean::cnstr_get(x_3, 2); +lean::inc(x_12); +lean::inc(x_11); +lean::inc(x_10); +lean::dec(x_3); +x_13 = lean_name_dec_eq(x_10, x_1); +if (x_13 == 0) +{ +obj* x_14; obj* x_15; +x_14 = l_AssocList_replace___main___at_Lean_ClassState_addEntry___spec__20(x_1, x_2, x_12); +x_15 = lean::alloc_cnstr(1, 3, 0); +lean::cnstr_set(x_15, 0, x_10); +lean::cnstr_set(x_15, 1, x_11); +lean::cnstr_set(x_15, 2, x_14); +return x_15; +} +else +{ +obj* x_16; +lean::dec(x_11); +lean::dec(x_10); +x_16 = lean::alloc_cnstr(1, 3, 0); +lean::cnstr_set(x_16, 0, x_1); +lean::cnstr_set(x_16, 1, x_2); +lean::cnstr_set(x_16, 2, x_12); +return x_16; +} +} +} +} +} +obj* l_HashMapImp_insert___at_Lean_ClassState_addEntry___spec__15(obj* x_1, obj* x_2, obj* x_3) { +_start: +{ +uint8 x_4; +x_4 = !lean::is_exclusive(x_1); +if (x_4 == 0) +{ +obj* x_5; obj* x_6; obj* x_7; usize x_8; usize x_9; obj* x_10; usize x_11; obj* x_12; uint8 x_13; +x_5 = lean::cnstr_get(x_1, 0); +x_6 = lean::cnstr_get(x_1, 1); +x_7 = lean::array_get_size(x_6); +x_8 = lean_name_hash_usize(x_2); +x_9 = lean::usize_modn(x_8, x_7); +x_10 = lean::box_size_t(x_9); +x_11 = lean::unbox_size_t(x_10); +x_12 = lean::array_uget(x_6, x_11); +x_13 = l_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__16(x_2, x_12); +if (x_13 == 0) +{ +obj* x_14; obj* x_15; obj* x_16; usize x_17; obj* x_18; uint8 x_19; +x_14 = lean::mk_nat_obj(1u); +x_15 = lean::nat_add(x_5, x_14); +lean::dec(x_5); +x_16 = lean::alloc_cnstr(1, 3, 0); +lean::cnstr_set(x_16, 0, x_2); +lean::cnstr_set(x_16, 1, x_3); +lean::cnstr_set(x_16, 2, x_12); +x_17 = lean::unbox_size_t(x_10); +lean::dec(x_10); +x_18 = lean::array_uset(x_6, x_17, x_16); +x_19 = lean::nat_dec_le(x_15, x_7); +lean::dec(x_7); +if (x_19 == 0) +{ +obj* x_20; +lean::free_heap_obj(x_1); +x_20 = l_HashMapImp_expand___at_Lean_ClassState_addEntry___spec__17(x_15, x_18); +return x_20; +} +else +{ +lean::cnstr_set(x_1, 1, x_18); +lean::cnstr_set(x_1, 0, x_15); +return x_1; +} +} +else +{ +obj* x_21; usize x_22; obj* x_23; +lean::dec(x_7); +x_21 = l_AssocList_replace___main___at_Lean_ClassState_addEntry___spec__20(x_2, x_3, x_12); +x_22 = lean::unbox_size_t(x_10); +lean::dec(x_10); +x_23 = lean::array_uset(x_6, x_22, x_21); +lean::cnstr_set(x_1, 1, x_23); +return x_1; +} +} +else +{ +obj* x_24; obj* x_25; obj* x_26; usize x_27; usize x_28; obj* x_29; usize x_30; obj* x_31; uint8 x_32; +x_24 = lean::cnstr_get(x_1, 0); +x_25 = lean::cnstr_get(x_1, 1); +lean::inc(x_25); +lean::inc(x_24); +lean::dec(x_1); +x_26 = lean::array_get_size(x_25); +x_27 = lean_name_hash_usize(x_2); +x_28 = lean::usize_modn(x_27, x_26); +x_29 = lean::box_size_t(x_28); +x_30 = lean::unbox_size_t(x_29); +x_31 = lean::array_uget(x_25, x_30); +x_32 = l_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__16(x_2, x_31); +if (x_32 == 0) +{ +obj* x_33; obj* x_34; obj* x_35; usize x_36; obj* x_37; uint8 x_38; +x_33 = lean::mk_nat_obj(1u); +x_34 = lean::nat_add(x_24, x_33); +lean::dec(x_24); +x_35 = lean::alloc_cnstr(1, 3, 0); +lean::cnstr_set(x_35, 0, x_2); +lean::cnstr_set(x_35, 1, x_3); +lean::cnstr_set(x_35, 2, x_31); +x_36 = lean::unbox_size_t(x_29); +lean::dec(x_29); +x_37 = lean::array_uset(x_25, x_36, x_35); +x_38 = lean::nat_dec_le(x_34, x_26); +lean::dec(x_26); +if (x_38 == 0) +{ +obj* x_39; +x_39 = l_HashMapImp_expand___at_Lean_ClassState_addEntry___spec__17(x_34, x_37); +return x_39; +} +else +{ +obj* x_40; +x_40 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_40, 0, x_34); +lean::cnstr_set(x_40, 1, x_37); +return x_40; +} +} +else +{ +obj* x_41; usize x_42; obj* x_43; obj* x_44; +lean::dec(x_26); +x_41 = l_AssocList_replace___main___at_Lean_ClassState_addEntry___spec__20(x_2, x_3, x_31); +x_42 = lean::unbox_size_t(x_29); +lean::dec(x_29); +x_43 = lean::array_uset(x_25, x_42, x_41); +x_44 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_44, 0, x_24); +lean::cnstr_set(x_44, 1, x_43); +return x_44; +} +} +} +} +obj* l_Lean_SMap_insert___main___at_Lean_ClassState_addEntry___spec__14(obj* x_1, obj* x_2, obj* x_3) { +_start: +{ +uint8 x_4; +x_4 = lean::cnstr_get_scalar(x_1, sizeof(void*)*2); +if (x_4 == 0) +{ +uint8 x_5; +x_5 = !lean::is_exclusive(x_1); +if (x_5 == 0) +{ +obj* x_6; obj* x_7; +x_6 = lean::cnstr_get(x_1, 1); +x_7 = l_RBNode_insert___at_Lean_NameSet_insert___spec__1(x_6, x_2, x_3); +lean::cnstr_set(x_1, 1, x_7); +return x_1; +} +else +{ +obj* x_8; obj* x_9; obj* x_10; obj* x_11; +x_8 = lean::cnstr_get(x_1, 0); +x_9 = lean::cnstr_get(x_1, 1); +lean::inc(x_9); +lean::inc(x_8); +lean::dec(x_1); +x_10 = l_RBNode_insert___at_Lean_NameSet_insert___spec__1(x_9, x_2, x_3); +x_11 = lean::alloc_cnstr(0, 2, 1); +lean::cnstr_set(x_11, 0, x_8); +lean::cnstr_set(x_11, 1, x_10); +lean::cnstr_set_scalar(x_11, sizeof(void*)*2, x_4); +return x_11; +} +} +else +{ +uint8 x_12; +x_12 = !lean::is_exclusive(x_1); +if (x_12 == 0) +{ +obj* x_13; obj* x_14; +x_13 = lean::cnstr_get(x_1, 0); +x_14 = l_HashMapImp_insert___at_Lean_ClassState_addEntry___spec__15(x_13, x_2, x_3); +lean::cnstr_set(x_1, 0, x_14); +return x_1; +} +else +{ +obj* x_15; obj* x_16; obj* x_17; obj* x_18; +x_15 = lean::cnstr_get(x_1, 0); +x_16 = lean::cnstr_get(x_1, 1); +lean::inc(x_16); +lean::inc(x_15); +lean::dec(x_1); +x_17 = l_HashMapImp_insert___at_Lean_ClassState_addEntry___spec__15(x_15, x_2, x_3); +x_18 = lean::alloc_cnstr(0, 2, 1); +lean::cnstr_set(x_18, 0, x_17); +lean::cnstr_set(x_18, 1, x_16); +lean::cnstr_set_scalar(x_18, sizeof(void*)*2, x_4); +return x_18; +} +} +} +} +obj* l_RBNode_ins___main___at_Lean_ClassState_addEntry___spec__23(obj* x_1, obj* x_2, obj* x_3) { _start: { if (lean::obj_tag(x_1) == 0) @@ -3233,7 +3717,7 @@ return x_1; else { obj* x_14; -x_14 = l_RBNode_ins___main___at_Lean_ClassState_addEntry___spec__16(x_11, x_2, x_3); +x_14 = l_RBNode_ins___main___at_Lean_ClassState_addEntry___spec__23(x_11, x_2, x_3); lean::cnstr_set(x_1, 3, x_14); return x_1; } @@ -3241,7 +3725,7 @@ return x_1; else { obj* x_15; -x_15 = l_RBNode_ins___main___at_Lean_ClassState_addEntry___spec__16(x_8, x_2, x_3); +x_15 = l_RBNode_ins___main___at_Lean_ClassState_addEntry___spec__23(x_8, x_2, x_3); lean::cnstr_set(x_1, 0, x_15); return x_1; } @@ -3279,7 +3763,7 @@ return x_22; else { obj* x_23; obj* x_24; -x_23 = l_RBNode_ins___main___at_Lean_ClassState_addEntry___spec__16(x_19, x_2, x_3); +x_23 = l_RBNode_ins___main___at_Lean_ClassState_addEntry___spec__23(x_19, x_2, x_3); x_24 = lean::alloc_cnstr(1, 4, 1); lean::cnstr_set(x_24, 0, x_16); lean::cnstr_set(x_24, 1, x_17); @@ -3292,7 +3776,7 @@ return x_24; else { obj* x_25; obj* x_26; -x_25 = l_RBNode_ins___main___at_Lean_ClassState_addEntry___spec__16(x_16, x_2, x_3); +x_25 = l_RBNode_ins___main___at_Lean_ClassState_addEntry___spec__23(x_16, x_2, x_3); x_26 = lean::alloc_cnstr(1, 4, 1); lean::cnstr_set(x_26, 0, x_25); lean::cnstr_set(x_26, 1, x_17); @@ -3334,14 +3818,14 @@ x_34 = l_RBNode_isRed___main___rarg(x_31); if (x_34 == 0) { obj* x_35; -x_35 = l_RBNode_ins___main___at_Lean_ClassState_addEntry___spec__16(x_31, x_2, x_3); +x_35 = l_RBNode_ins___main___at_Lean_ClassState_addEntry___spec__23(x_31, x_2, x_3); lean::cnstr_set(x_1, 3, x_35); return x_1; } else { obj* x_36; -x_36 = l_RBNode_ins___main___at_Lean_ClassState_addEntry___spec__16(x_31, x_2, x_3); +x_36 = l_RBNode_ins___main___at_Lean_ClassState_addEntry___spec__23(x_31, x_2, x_3); if (lean::obj_tag(x_36) == 0) { lean::free_heap_obj(x_1); @@ -4014,14 +4498,14 @@ x_174 = l_RBNode_isRed___main___rarg(x_28); if (x_174 == 0) { obj* x_175; -x_175 = l_RBNode_ins___main___at_Lean_ClassState_addEntry___spec__16(x_28, x_2, x_3); +x_175 = l_RBNode_ins___main___at_Lean_ClassState_addEntry___spec__23(x_28, x_2, x_3); lean::cnstr_set(x_1, 0, x_175); return x_1; } else { obj* x_176; -x_176 = l_RBNode_ins___main___at_Lean_ClassState_addEntry___spec__16(x_28, x_2, x_3); +x_176 = l_RBNode_ins___main___at_Lean_ClassState_addEntry___spec__23(x_28, x_2, x_3); if (lean::obj_tag(x_176) == 0) { lean::free_heap_obj(x_1); @@ -4733,7 +5217,7 @@ x_322 = l_RBNode_isRed___main___rarg(x_318); if (x_322 == 0) { obj* x_323; obj* x_324; -x_323 = l_RBNode_ins___main___at_Lean_ClassState_addEntry___spec__16(x_318, x_2, x_3); +x_323 = l_RBNode_ins___main___at_Lean_ClassState_addEntry___spec__23(x_318, x_2, x_3); x_324 = lean::alloc_cnstr(1, 4, 1); lean::cnstr_set(x_324, 0, x_315); lean::cnstr_set(x_324, 1, x_316); @@ -4745,7 +5229,7 @@ return x_324; else { obj* x_325; -x_325 = l_RBNode_ins___main___at_Lean_ClassState_addEntry___spec__16(x_318, x_2, x_3); +x_325 = l_RBNode_ins___main___at_Lean_ClassState_addEntry___spec__23(x_318, x_2, x_3); if (lean::obj_tag(x_325) == 0) { lean::dec(x_317); @@ -5177,7 +5661,7 @@ x_400 = l_RBNode_isRed___main___rarg(x_315); if (x_400 == 0) { obj* x_401; obj* x_402; -x_401 = l_RBNode_ins___main___at_Lean_ClassState_addEntry___spec__16(x_315, x_2, x_3); +x_401 = l_RBNode_ins___main___at_Lean_ClassState_addEntry___spec__23(x_315, x_2, x_3); x_402 = lean::alloc_cnstr(1, 4, 1); lean::cnstr_set(x_402, 0, x_401); lean::cnstr_set(x_402, 1, x_316); @@ -5189,7 +5673,7 @@ return x_402; else { obj* x_403; -x_403 = l_RBNode_ins___main___at_Lean_ClassState_addEntry___spec__16(x_315, x_2, x_3); +x_403 = l_RBNode_ins___main___at_Lean_ClassState_addEntry___spec__23(x_315, x_2, x_3); if (lean::obj_tag(x_403) == 0) { lean::dec(x_318); @@ -5618,7 +6102,7 @@ return x_477; } } } -obj* l_RBNode_insert___at_Lean_ClassState_addEntry___spec__15(obj* x_1, obj* x_2, obj* x_3) { +obj* l_RBNode_insert___at_Lean_ClassState_addEntry___spec__22(obj* x_1, obj* x_2, obj* x_3) { _start: { uint8 x_4; @@ -5626,19 +6110,19 @@ x_4 = l_RBNode_isRed___main___rarg(x_1); if (x_4 == 0) { obj* x_5; -x_5 = l_RBNode_ins___main___at_Lean_ClassState_addEntry___spec__16(x_1, x_2, x_3); +x_5 = l_RBNode_ins___main___at_Lean_ClassState_addEntry___spec__23(x_1, x_2, x_3); return x_5; } else { obj* x_6; obj* x_7; -x_6 = l_RBNode_ins___main___at_Lean_ClassState_addEntry___spec__16(x_1, x_2, x_3); +x_6 = l_RBNode_ins___main___at_Lean_ClassState_addEntry___spec__23(x_1, x_2, x_3); x_7 = l_RBNode_setBlack___main___rarg(x_6); return x_7; } } } -uint8 l_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__18(obj* x_1, obj* x_2) { +uint8 l_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__25(obj* x_1, obj* x_2) { _start: { if (lean::obj_tag(x_2) == 0) @@ -5667,7 +6151,7 @@ return x_8; } } } -obj* l_AssocList_mfoldl___main___at_Lean_ClassState_addEntry___spec__21(obj* x_1, obj* x_2) { +obj* l_AssocList_mfoldl___main___at_Lean_ClassState_addEntry___spec__28(obj* x_1, obj* x_2) { _start: { if (lean::obj_tag(x_2) == 0) @@ -5729,7 +6213,7 @@ goto _start; } } } -obj* l_HashMapImp_moveEntries___main___at_Lean_ClassState_addEntry___spec__20(obj* x_1, obj* x_2, obj* x_3) { +obj* l_HashMapImp_moveEntries___main___at_Lean_ClassState_addEntry___spec__27(obj* x_1, obj* x_2, obj* x_3) { _start: { obj* x_4; uint8 x_5; @@ -5748,7 +6232,7 @@ obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; x_6 = lean::array_fget(x_2, x_1); x_7 = lean::box(0); x_8 = lean::array_fset(x_2, x_1, x_7); -x_9 = l_AssocList_mfoldl___main___at_Lean_ClassState_addEntry___spec__21(x_3, x_6); +x_9 = l_AssocList_mfoldl___main___at_Lean_ClassState_addEntry___spec__28(x_3, x_6); x_10 = lean::mk_nat_obj(1u); x_11 = lean::nat_add(x_1, x_10); lean::dec(x_1); @@ -5759,7 +6243,7 @@ goto _start; } } } -obj* l_HashMapImp_expand___at_Lean_ClassState_addEntry___spec__19(obj* x_1, obj* x_2) { +obj* l_HashMapImp_expand___at_Lean_ClassState_addEntry___spec__26(obj* x_1, obj* x_2) { _start: { obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; @@ -5770,14 +6254,14 @@ lean::dec(x_3); x_6 = lean::box(0); x_7 = lean::mk_array(x_5, x_6); x_8 = lean::mk_nat_obj(0u); -x_9 = l_HashMapImp_moveEntries___main___at_Lean_ClassState_addEntry___spec__20(x_8, x_2, x_7); +x_9 = l_HashMapImp_moveEntries___main___at_Lean_ClassState_addEntry___spec__27(x_8, x_2, x_7); x_10 = lean::alloc_cnstr(0, 2, 0); lean::cnstr_set(x_10, 0, x_1); lean::cnstr_set(x_10, 1, x_9); return x_10; } } -obj* l_AssocList_replace___main___at_Lean_ClassState_addEntry___spec__22(obj* x_1, obj* x_2, obj* x_3) { +obj* l_AssocList_replace___main___at_Lean_ClassState_addEntry___spec__29(obj* x_1, obj* x_2, obj* x_3) { _start: { if (lean::obj_tag(x_3) == 0) @@ -5800,7 +6284,7 @@ x_8 = lean_name_dec_eq(x_5, x_1); if (x_8 == 0) { obj* x_9; -x_9 = l_AssocList_replace___main___at_Lean_ClassState_addEntry___spec__22(x_1, x_2, x_7); +x_9 = l_AssocList_replace___main___at_Lean_ClassState_addEntry___spec__29(x_1, x_2, x_7); lean::cnstr_set(x_3, 2, x_9); return x_3; } @@ -5827,7 +6311,7 @@ x_13 = lean_name_dec_eq(x_10, x_1); if (x_13 == 0) { obj* x_14; obj* x_15; -x_14 = l_AssocList_replace___main___at_Lean_ClassState_addEntry___spec__22(x_1, x_2, x_12); +x_14 = l_AssocList_replace___main___at_Lean_ClassState_addEntry___spec__29(x_1, x_2, x_12); x_15 = lean::alloc_cnstr(1, 3, 0); lean::cnstr_set(x_15, 0, x_10); lean::cnstr_set(x_15, 1, x_11); @@ -5849,7 +6333,7 @@ return x_16; } } } -obj* l_HashMapImp_insert___at_Lean_ClassState_addEntry___spec__17(obj* x_1, obj* x_2, obj* x_3) { +obj* l_HashMapImp_insert___at_Lean_ClassState_addEntry___spec__24(obj* x_1, obj* x_2, obj* x_3) { _start: { uint8 x_4; @@ -5865,7 +6349,7 @@ x_9 = lean::usize_modn(x_8, x_7); x_10 = lean::box_size_t(x_9); x_11 = lean::unbox_size_t(x_10); x_12 = lean::array_uget(x_6, x_11); -x_13 = l_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__18(x_2, x_12); +x_13 = l_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__25(x_2, x_12); if (x_13 == 0) { obj* x_14; obj* x_15; obj* x_16; usize x_17; obj* x_18; uint8 x_19; @@ -5885,7 +6369,7 @@ if (x_19 == 0) { obj* x_20; lean::free_heap_obj(x_1); -x_20 = l_HashMapImp_expand___at_Lean_ClassState_addEntry___spec__19(x_15, x_18); +x_20 = l_HashMapImp_expand___at_Lean_ClassState_addEntry___spec__26(x_15, x_18); return x_20; } else @@ -5899,7 +6383,7 @@ else { obj* x_21; usize x_22; obj* x_23; lean::dec(x_7); -x_21 = l_AssocList_replace___main___at_Lean_ClassState_addEntry___spec__22(x_2, x_3, x_12); +x_21 = l_AssocList_replace___main___at_Lean_ClassState_addEntry___spec__29(x_2, x_3, x_12); x_22 = lean::unbox_size_t(x_10); lean::dec(x_10); x_23 = lean::array_uset(x_6, x_22, x_21); @@ -5921,7 +6405,7 @@ x_28 = lean::usize_modn(x_27, x_26); x_29 = lean::box_size_t(x_28); x_30 = lean::unbox_size_t(x_29); x_31 = lean::array_uget(x_25, x_30); -x_32 = l_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__18(x_2, x_31); +x_32 = l_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__25(x_2, x_31); if (x_32 == 0) { obj* x_33; obj* x_34; obj* x_35; usize x_36; obj* x_37; uint8 x_38; @@ -5940,7 +6424,7 @@ lean::dec(x_26); if (x_38 == 0) { obj* x_39; -x_39 = l_HashMapImp_expand___at_Lean_ClassState_addEntry___spec__19(x_34, x_37); +x_39 = l_HashMapImp_expand___at_Lean_ClassState_addEntry___spec__26(x_34, x_37); return x_39; } else @@ -5956,7 +6440,7 @@ else { obj* x_41; usize x_42; obj* x_43; obj* x_44; lean::dec(x_26); -x_41 = l_AssocList_replace___main___at_Lean_ClassState_addEntry___spec__22(x_2, x_3, x_31); +x_41 = l_AssocList_replace___main___at_Lean_ClassState_addEntry___spec__29(x_2, x_3, x_31); x_42 = lean::unbox_size_t(x_29); lean::dec(x_29); x_43 = lean::array_uset(x_25, x_42, x_41); @@ -5968,7 +6452,7 @@ return x_44; } } } -obj* l_Lean_SMap_insert___main___at_Lean_ClassState_addEntry___spec__14(obj* x_1, obj* x_2, obj* x_3) { +obj* l_Lean_SMap_insert___main___at_Lean_ClassState_addEntry___spec__21(obj* x_1, obj* x_2, obj* x_3) { _start: { uint8 x_4; @@ -5981,7 +6465,7 @@ if (x_5 == 0) { obj* x_6; obj* x_7; x_6 = lean::cnstr_get(x_1, 1); -x_7 = l_RBNode_insert___at_Lean_ClassState_addEntry___spec__15(x_6, x_2, x_3); +x_7 = l_RBNode_insert___at_Lean_ClassState_addEntry___spec__22(x_6, x_2, x_3); lean::cnstr_set(x_1, 1, x_7); return x_1; } @@ -5993,7 +6477,7 @@ x_9 = lean::cnstr_get(x_1, 1); lean::inc(x_9); lean::inc(x_8); lean::dec(x_1); -x_10 = l_RBNode_insert___at_Lean_ClassState_addEntry___spec__15(x_9, x_2, x_3); +x_10 = l_RBNode_insert___at_Lean_ClassState_addEntry___spec__22(x_9, x_2, x_3); x_11 = lean::alloc_cnstr(0, 2, 1); lean::cnstr_set(x_11, 0, x_8); lean::cnstr_set(x_11, 1, x_10); @@ -6009,7 +6493,7 @@ if (x_12 == 0) { obj* x_13; obj* x_14; x_13 = lean::cnstr_get(x_1, 0); -x_14 = l_HashMapImp_insert___at_Lean_ClassState_addEntry___spec__17(x_13, x_2, x_3); +x_14 = l_HashMapImp_insert___at_Lean_ClassState_addEntry___spec__24(x_13, x_2, x_3); lean::cnstr_set(x_1, 0, x_14); return x_1; } @@ -6021,7 +6505,7 @@ x_16 = lean::cnstr_get(x_1, 1); lean::inc(x_16); lean::inc(x_15); lean::dec(x_1); -x_17 = l_HashMapImp_insert___at_Lean_ClassState_addEntry___spec__17(x_15, x_2, x_3); +x_17 = l_HashMapImp_insert___at_Lean_ClassState_addEntry___spec__24(x_15, x_2, x_3); x_18 = lean::alloc_cnstr(0, 2, 1); lean::cnstr_set(x_18, 0, x_17); lean::cnstr_set(x_18, 1, x_16); @@ -6031,187 +6515,133 @@ return x_18; } } } -obj* l_Lean_ClassState_addEntry(uint8 x_1, obj* x_2, obj* x_3) { +obj* l_Lean_ClassState_addEntry(obj* x_1, obj* x_2) { _start: { -if (lean::obj_tag(x_3) == 0) +if (lean::obj_tag(x_2) == 0) { -obj* x_4; uint8 x_5; uint8 x_6; -x_4 = lean::cnstr_get(x_3, 0); -lean::inc(x_4); -x_5 = lean::cnstr_get_scalar(x_3, sizeof(void*)*1); -lean::dec(x_3); -x_6 = !lean::is_exclusive(x_2); -if (x_6 == 0) +obj* x_3; uint8 x_4; uint8 x_5; +x_3 = lean::cnstr_get(x_2, 0); +lean::inc(x_3); +x_4 = lean::cnstr_get_scalar(x_2, sizeof(void*)*1); +lean::dec(x_2); +x_5 = !lean::is_exclusive(x_1); +if (x_5 == 0) { -obj* x_7; obj* x_8; -x_7 = lean::cnstr_get(x_2, 1); -x_8 = l_Lean_SMap_insert___main___at_Lean_ClassState_addEntry___spec__1(x_7, x_4, x_5); -lean::cnstr_set(x_2, 1, x_8); -return x_2; +obj* x_6; obj* x_7; +x_6 = lean::cnstr_get(x_1, 1); +x_7 = l_Lean_SMap_insert___main___at_Lean_ClassState_addEntry___spec__1(x_6, x_3, x_4); +lean::cnstr_set(x_1, 1, x_7); +return x_1; } else { -obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; -x_9 = lean::cnstr_get(x_2, 0); -x_10 = lean::cnstr_get(x_2, 1); -x_11 = lean::cnstr_get(x_2, 2); -lean::inc(x_11); +obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; +x_8 = lean::cnstr_get(x_1, 0); +x_9 = lean::cnstr_get(x_1, 1); +x_10 = lean::cnstr_get(x_1, 2); lean::inc(x_10); lean::inc(x_9); +lean::inc(x_8); +lean::dec(x_1); +x_11 = l_Lean_SMap_insert___main___at_Lean_ClassState_addEntry___spec__1(x_9, x_3, x_4); +x_12 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_12, 0, x_8); +lean::cnstr_set(x_12, 1, x_11); +lean::cnstr_set(x_12, 2, x_10); +return x_12; +} +} +else +{ +obj* x_13; obj* x_14; uint8 x_15; +x_13 = lean::cnstr_get(x_2, 0); +lean::inc(x_13); +x_14 = lean::cnstr_get(x_2, 1); +lean::inc(x_14); lean::dec(x_2); -x_12 = l_Lean_SMap_insert___main___at_Lean_ClassState_addEntry___spec__1(x_10, x_4, x_5); -x_13 = lean::alloc_cnstr(0, 3, 0); -lean::cnstr_set(x_13, 0, x_9); -lean::cnstr_set(x_13, 1, x_12); -lean::cnstr_set(x_13, 2, x_11); -return x_13; +x_15 = !lean::is_exclusive(x_1); +if (x_15 == 0) +{ +obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; +x_16 = lean::cnstr_get(x_1, 0); +x_17 = lean::cnstr_get(x_1, 2); +x_18 = l_Lean_SMap_find___main___at_Lean_ClassState_addEntry___spec__10(x_16, x_14); +x_19 = lean::box(0); +lean::inc(x_13); +x_20 = l_Lean_SMap_insert___main___at_Lean_ClassState_addEntry___spec__14(x_17, x_13, x_19); +if (lean::obj_tag(x_18) == 0) +{ +obj* x_21; obj* x_22; obj* x_23; +x_21 = lean::box(0); +x_22 = lean::alloc_cnstr(1, 2, 0); +lean::cnstr_set(x_22, 0, x_13); +lean::cnstr_set(x_22, 1, x_21); +x_23 = l_Lean_SMap_insert___main___at_Lean_ClassState_addEntry___spec__21(x_16, x_14, x_22); +lean::cnstr_set(x_1, 2, x_20); +lean::cnstr_set(x_1, 0, x_23); +return x_1; +} +else +{ +obj* x_24; obj* x_25; obj* x_26; +x_24 = lean::cnstr_get(x_18, 0); +lean::inc(x_24); +lean::dec(x_18); +x_25 = lean::alloc_cnstr(1, 2, 0); +lean::cnstr_set(x_25, 0, x_13); +lean::cnstr_set(x_25, 1, x_24); +x_26 = l_Lean_SMap_insert___main___at_Lean_ClassState_addEntry___spec__21(x_16, x_14, x_25); +lean::cnstr_set(x_1, 2, x_20); +lean::cnstr_set(x_1, 0, x_26); +return x_1; } } else { -obj* x_14; obj* x_15; uint8 x_16; -x_14 = lean::cnstr_get(x_3, 0); -lean::inc(x_14); -x_15 = lean::cnstr_get(x_3, 1); -lean::inc(x_15); -lean::dec(x_3); -x_16 = !lean::is_exclusive(x_2); -if (x_16 == 0) +obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; +x_27 = lean::cnstr_get(x_1, 0); +x_28 = lean::cnstr_get(x_1, 1); +x_29 = lean::cnstr_get(x_1, 2); +lean::inc(x_29); +lean::inc(x_28); +lean::inc(x_27); +lean::dec(x_1); +x_30 = l_Lean_SMap_find___main___at_Lean_ClassState_addEntry___spec__10(x_27, x_14); +x_31 = lean::box(0); +lean::inc(x_13); +x_32 = l_Lean_SMap_insert___main___at_Lean_ClassState_addEntry___spec__14(x_29, x_13, x_31); +if (lean::obj_tag(x_30) == 0) { -obj* x_17; obj* x_18; obj* x_19; -x_17 = lean::cnstr_get(x_2, 0); -x_18 = lean::cnstr_get(x_2, 2); -x_19 = l_Lean_SMap_find___main___at_Lean_ClassState_addEntry___spec__10(x_17, x_15); -if (lean::obj_tag(x_19) == 0) -{ -obj* x_20; obj* x_21; obj* x_22; -x_20 = lean::box(0); -lean::inc(x_14); -x_21 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_21, 0, x_14); -lean::cnstr_set(x_21, 1, x_20); -x_22 = l_Lean_SMap_insert___main___at_Lean_ClassState_addEntry___spec__14(x_17, x_15, x_21); -if (x_1 == 0) -{ -obj* x_23; obj* x_24; -x_23 = lean::box(0); -x_24 = l_RBNode_insert___at_Lean_NameSet_insert___spec__1(x_18, x_14, x_23); -lean::cnstr_set(x_2, 2, x_24); -lean::cnstr_set(x_2, 0, x_22); -return x_2; +obj* x_33; obj* x_34; obj* x_35; obj* x_36; +x_33 = lean::box(0); +x_34 = lean::alloc_cnstr(1, 2, 0); +lean::cnstr_set(x_34, 0, x_13); +lean::cnstr_set(x_34, 1, x_33); +x_35 = l_Lean_SMap_insert___main___at_Lean_ClassState_addEntry___spec__21(x_27, x_14, x_34); +x_36 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_36, 0, x_35); +lean::cnstr_set(x_36, 1, x_28); +lean::cnstr_set(x_36, 2, x_32); +return x_36; } else { -lean::dec(x_14); -lean::cnstr_set(x_2, 0, x_22); -return x_2; -} -} -else -{ -obj* x_25; obj* x_26; obj* x_27; -x_25 = lean::cnstr_get(x_19, 0); -lean::inc(x_25); -lean::dec(x_19); -lean::inc(x_14); -x_26 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_26, 0, x_14); -lean::cnstr_set(x_26, 1, x_25); -x_27 = l_Lean_SMap_insert___main___at_Lean_ClassState_addEntry___spec__14(x_17, x_15, x_26); -if (x_1 == 0) -{ -obj* x_28; obj* x_29; -x_28 = lean::box(0); -x_29 = l_RBNode_insert___at_Lean_NameSet_insert___spec__1(x_18, x_14, x_28); -lean::cnstr_set(x_2, 2, x_29); -lean::cnstr_set(x_2, 0, x_27); -return x_2; -} -else -{ -lean::dec(x_14); -lean::cnstr_set(x_2, 0, x_27); -return x_2; -} -} -} -else -{ -obj* x_30; obj* x_31; obj* x_32; obj* x_33; -x_30 = lean::cnstr_get(x_2, 0); -x_31 = lean::cnstr_get(x_2, 1); -x_32 = lean::cnstr_get(x_2, 2); -lean::inc(x_32); -lean::inc(x_31); -lean::inc(x_30); -lean::dec(x_2); -x_33 = l_Lean_SMap_find___main___at_Lean_ClassState_addEntry___spec__10(x_30, x_15); -if (lean::obj_tag(x_33) == 0) -{ -obj* x_34; obj* x_35; obj* x_36; -x_34 = lean::box(0); -lean::inc(x_14); -x_35 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_35, 0, x_14); -lean::cnstr_set(x_35, 1, x_34); -x_36 = l_Lean_SMap_insert___main___at_Lean_ClassState_addEntry___spec__14(x_30, x_15, x_35); -if (x_1 == 0) -{ -obj* x_37; obj* x_38; obj* x_39; -x_37 = lean::box(0); -x_38 = l_RBNode_insert___at_Lean_NameSet_insert___spec__1(x_32, x_14, x_37); -x_39 = lean::alloc_cnstr(0, 3, 0); -lean::cnstr_set(x_39, 0, x_36); -lean::cnstr_set(x_39, 1, x_31); -lean::cnstr_set(x_39, 2, x_38); -return x_39; -} -else -{ -obj* x_40; -lean::dec(x_14); +obj* x_37; obj* x_38; obj* x_39; obj* x_40; +x_37 = lean::cnstr_get(x_30, 0); +lean::inc(x_37); +lean::dec(x_30); +x_38 = lean::alloc_cnstr(1, 2, 0); +lean::cnstr_set(x_38, 0, x_13); +lean::cnstr_set(x_38, 1, x_37); +x_39 = l_Lean_SMap_insert___main___at_Lean_ClassState_addEntry___spec__21(x_27, x_14, x_38); x_40 = lean::alloc_cnstr(0, 3, 0); -lean::cnstr_set(x_40, 0, x_36); -lean::cnstr_set(x_40, 1, x_31); +lean::cnstr_set(x_40, 0, x_39); +lean::cnstr_set(x_40, 1, x_28); lean::cnstr_set(x_40, 2, x_32); return x_40; } } -else -{ -obj* x_41; obj* x_42; obj* x_43; -x_41 = lean::cnstr_get(x_33, 0); -lean::inc(x_41); -lean::dec(x_33); -lean::inc(x_14); -x_42 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_42, 0, x_14); -lean::cnstr_set(x_42, 1, x_41); -x_43 = l_Lean_SMap_insert___main___at_Lean_ClassState_addEntry___spec__14(x_30, x_15, x_42); -if (x_1 == 0) -{ -obj* x_44; obj* x_45; obj* x_46; -x_44 = lean::box(0); -x_45 = l_RBNode_insert___at_Lean_NameSet_insert___spec__1(x_32, x_14, x_44); -x_46 = lean::alloc_cnstr(0, 3, 0); -lean::cnstr_set(x_46, 0, x_43); -lean::cnstr_set(x_46, 1, x_31); -lean::cnstr_set(x_46, 2, x_45); -return x_46; -} -else -{ -obj* x_47; -lean::dec(x_14); -x_47 = lean::alloc_cnstr(0, 3, 0); -lean::cnstr_set(x_47, 0, x_43); -lean::cnstr_set(x_47, 1, x_31); -lean::cnstr_set(x_47, 2, x_32); -return x_47; -} -} -} } } } @@ -6316,74 +6746,29 @@ lean::dec(x_1); return x_3; } } -obj* l_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__18___boxed(obj* x_1, obj* x_2) { +obj* l_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__16___boxed(obj* x_1, obj* x_2) { _start: { uint8 x_3; obj* x_4; -x_3 = l_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__18(x_1, x_2); +x_3 = l_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__16(x_1, x_2); lean::dec(x_2); lean::dec(x_1); x_4 = lean::box(x_3); return x_4; } } -obj* l_Lean_ClassState_addEntry___boxed(obj* x_1, obj* x_2, obj* x_3) { +obj* l_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__25___boxed(obj* x_1, obj* x_2) { _start: { -uint8 x_4; obj* x_5; -x_4 = lean::unbox(x_1); +uint8 x_3; obj* x_4; +x_3 = l_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__25(x_1, x_2); +lean::dec(x_2); lean::dec(x_1); -x_5 = l_Lean_ClassState_addEntry(x_4, x_2, x_3); -return x_5; +x_4 = lean::box(x_3); +return x_4; } } -obj* l_mkHashMap___at_Lean_mkClassExtension___spec__2(obj* x_1) { -_start: -{ -obj* x_2; -x_2 = l_mkHashMapImp___rarg(x_1); -return x_2; -} -} -obj* _init_l_Lean_SMap_empty___at_Lean_mkClassExtension___spec__1() { -_start: -{ -obj* x_1; obj* x_2; obj* x_3; uint8 x_4; obj* x_5; -x_1 = lean::mk_nat_obj(8u); -x_2 = l_mkHashMapImp___rarg(x_1); -x_3 = lean::box(0); -x_4 = 1; -x_5 = lean::alloc_cnstr(0, 2, 1); -lean::cnstr_set(x_5, 0, x_2); -lean::cnstr_set(x_5, 1, x_3); -lean::cnstr_set_scalar(x_5, sizeof(void*)*2, x_4); -return x_5; -} -} -obj* l_mkHashMap___at_Lean_mkClassExtension___spec__4(obj* x_1) { -_start: -{ -obj* x_2; -x_2 = l_mkHashMapImp___rarg(x_1); -return x_2; -} -} -obj* _init_l_Lean_SMap_empty___at_Lean_mkClassExtension___spec__3() { -_start: -{ -obj* x_1; obj* x_2; obj* x_3; uint8 x_4; obj* x_5; -x_1 = lean::mk_nat_obj(8u); -x_2 = l_mkHashMapImp___rarg(x_1); -x_3 = lean::box(0); -x_4 = 1; -x_5 = lean::alloc_cnstr(0, 2, 1); -lean::cnstr_set(x_5, 0, x_2); -lean::cnstr_set(x_5, 1, x_3); -lean::cnstr_set_scalar(x_5, sizeof(void*)*2, x_4); -return x_5; -} -} -obj* l_Array_miterateAux___main___at_Lean_mkClassExtension___spec__6(obj* x_1, obj* x_2, obj* x_3, obj* x_4) { +obj* l_Array_miterateAux___main___at_Lean_mkClassExtension___spec__2(obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { obj* x_5; uint8 x_6; @@ -6397,20 +6782,19 @@ return x_4; } else { -obj* x_7; uint8 x_8; obj* x_9; obj* x_10; obj* x_11; +obj* x_7; obj* x_8; obj* x_9; obj* x_10; x_7 = lean::array_fget(x_2, x_3); -x_8 = 1; -x_9 = l_Lean_ClassState_addEntry(x_8, x_4, x_7); -x_10 = lean::mk_nat_obj(1u); -x_11 = lean::nat_add(x_3, x_10); +x_8 = l_Lean_ClassState_addEntry(x_4, x_7); +x_9 = lean::mk_nat_obj(1u); +x_10 = lean::nat_add(x_3, x_9); lean::dec(x_3); -x_3 = x_11; -x_4 = x_9; +x_3 = x_10; +x_4 = x_8; goto _start; } } } -obj* l_Array_miterateAux___main___at_Lean_mkClassExtension___spec__7(obj* x_1, obj* x_2, obj* x_3, obj* x_4) { +obj* l_Array_miterateAux___main___at_Lean_mkClassExtension___spec__3(obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { obj* x_5; uint8 x_6; @@ -6427,7 +6811,7 @@ else obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; x_7 = lean::array_fget(x_2, x_3); x_8 = lean::mk_nat_obj(0u); -x_9 = l_Array_miterateAux___main___at_Lean_mkClassExtension___spec__6(x_7, x_7, x_8, x_4); +x_9 = l_Array_miterateAux___main___at_Lean_mkClassExtension___spec__2(x_7, x_7, x_8, x_4); lean::dec(x_7); x_10 = lean::mk_nat_obj(1u); x_11 = lean::nat_add(x_3, x_10); @@ -6438,42 +6822,39 @@ goto _start; } } } -obj* l_Lean_mkStateFromImportedEntries___at_Lean_mkClassExtension___spec__5(obj* x_1, obj* x_2) { +obj* l_Lean_mkStateFromImportedEntries___at_Lean_mkClassExtension___spec__1(obj* x_1, obj* x_2) { _start: { obj* x_3; obj* x_4; x_3 = lean::mk_nat_obj(0u); -x_4 = l_Array_miterateAux___main___at_Lean_mkClassExtension___spec__7(x_2, x_2, x_3, x_1); +x_4 = l_Array_miterateAux___main___at_Lean_mkClassExtension___spec__3(x_2, x_2, x_3, x_1); return x_4; } } obj* _init_l_Lean_mkClassExtension___closed__1() { _start: { -obj* x_1; obj* x_2; obj* x_3; uint8 x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; x_1 = lean::box(0); x_2 = lean::mk_string("class"); x_3 = lean_name_mk_string(x_1, x_2); -x_4 = 0; -x_5 = lean::box(x_4); -x_6 = lean::alloc_closure(reinterpret_cast(l_Lean_ClassState_addEntry___boxed), 3, 1); -lean::closure_set(x_6, 0, x_5); -x_7 = lean::box(0); -x_8 = l_Lean_SMap_empty___at_Lean_mkClassExtension___spec__1; -x_9 = l_Lean_SMap_empty___at_Lean_mkClassExtension___spec__3; -x_10 = lean::alloc_cnstr(0, 3, 0); -lean::cnstr_set(x_10, 0, x_8); -lean::cnstr_set(x_10, 1, x_9); -lean::cnstr_set(x_10, 2, x_7); -x_11 = lean::alloc_closure(reinterpret_cast(l_Lean_mkStateFromImportedEntries___at_Lean_mkClassExtension___spec__5___boxed), 2, 1); -lean::closure_set(x_11, 0, x_10); -x_12 = lean::alloc_closure(reinterpret_cast(l_Lean_regScopeManagerExtension___lambda__3), 1, 0); -x_13 = lean::alloc_cnstr(0, 4, 0); -lean::cnstr_set(x_13, 0, x_3); -lean::cnstr_set(x_13, 1, x_6); -lean::cnstr_set(x_13, 2, x_11); -lean::cnstr_set(x_13, 3, x_12); -return x_13; +x_4 = l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__1; +x_5 = l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__3; +x_6 = l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__5; +x_7 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_7, 0, x_4); +lean::cnstr_set(x_7, 1, x_5); +lean::cnstr_set(x_7, 2, x_6); +x_8 = lean::alloc_closure(reinterpret_cast(l_Lean_mkStateFromImportedEntries___at_Lean_mkClassExtension___spec__1___boxed), 2, 1); +lean::closure_set(x_8, 0, x_7); +x_9 = lean::alloc_closure(reinterpret_cast(l_Lean_ClassState_addEntry), 2, 0); +x_10 = lean::alloc_closure(reinterpret_cast(l_Lean_regScopeManagerExtension___lambda__3), 1, 0); +x_11 = lean::alloc_cnstr(0, 4, 0); +lean::cnstr_set(x_11, 0, x_3); +lean::cnstr_set(x_11, 1, x_9); +lean::cnstr_set(x_11, 2, x_8); +lean::cnstr_set(x_11, 3, x_10); +return x_11; } } obj* l_Lean_mkClassExtension(obj* x_1) { @@ -6485,35 +6866,581 @@ x_3 = l_Lean_registerSimplePersistentEnvExtension___rarg(x_2, x_1); return x_3; } } -obj* l_Array_miterateAux___main___at_Lean_mkClassExtension___spec__6___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4) { +obj* l_Array_miterateAux___main___at_Lean_mkClassExtension___spec__2___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { obj* x_5; -x_5 = l_Array_miterateAux___main___at_Lean_mkClassExtension___spec__6(x_1, x_2, x_3, x_4); +x_5 = l_Array_miterateAux___main___at_Lean_mkClassExtension___spec__2(x_1, x_2, x_3, x_4); lean::dec(x_2); lean::dec(x_1); return x_5; } } -obj* l_Array_miterateAux___main___at_Lean_mkClassExtension___spec__7___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4) { +obj* l_Array_miterateAux___main___at_Lean_mkClassExtension___spec__3___boxed(obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { obj* x_5; -x_5 = l_Array_miterateAux___main___at_Lean_mkClassExtension___spec__7(x_1, x_2, x_3, x_4); +x_5 = l_Array_miterateAux___main___at_Lean_mkClassExtension___spec__3(x_1, x_2, x_3, x_4); lean::dec(x_2); lean::dec(x_1); return x_5; } } -obj* l_Lean_mkStateFromImportedEntries___at_Lean_mkClassExtension___spec__5___boxed(obj* x_1, obj* x_2) { +obj* l_Lean_mkStateFromImportedEntries___at_Lean_mkClassExtension___spec__1___boxed(obj* x_1, obj* x_2) { _start: { obj* x_3; -x_3 = l_Lean_mkStateFromImportedEntries___at_Lean_mkClassExtension___spec__5(x_1, x_2); +x_3 = l_Lean_mkStateFromImportedEntries___at_Lean_mkClassExtension___spec__1(x_1, x_2); lean::dec(x_2); return x_3; } } +obj* l_Lean_classExtension___elambda__1(obj* x_1) { +_start: +{ +obj* x_2; +x_2 = lean::box(0); +return x_2; +} +} +obj* l_Lean_classExtension___elambda__2(obj* x_1) { +_start: +{ +obj* x_2; +x_2 = l_Array_empty___closed__1; +return x_2; +} +} +obj* l_Lean_classExtension___elambda__3(obj* x_1, obj* x_2) { +_start: +{ +lean::inc(x_1); +return x_1; +} +} +obj* l_Lean_classExtension___elambda__4(obj* x_1, obj* x_2, obj* x_3) { +_start: +{ +obj* x_4; +x_4 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_4, 0, x_1); +lean::cnstr_set(x_4, 1, x_2); +return x_4; +} +} +obj* l_Lean_classExtension___elambda__1___boxed(obj* x_1) { +_start: +{ +obj* x_2; +x_2 = l_Lean_classExtension___elambda__1(x_1); +lean::dec(x_1); +return x_2; +} +} +obj* l_Lean_classExtension___elambda__2___boxed(obj* x_1) { +_start: +{ +obj* x_2; +x_2 = l_Lean_classExtension___elambda__2(x_1); +lean::dec(x_1); +return x_2; +} +} +obj* l_Lean_classExtension___elambda__3___boxed(obj* x_1, obj* x_2) { +_start: +{ +obj* x_3; +x_3 = l_Lean_classExtension___elambda__3(x_1, x_2); +lean::dec(x_2); +lean::dec(x_1); +return x_3; +} +} +obj* l_Lean_classExtension___elambda__4___boxed(obj* x_1, obj* x_2, obj* x_3) { +_start: +{ +obj* x_4; +x_4 = l_Lean_classExtension___elambda__4(x_1, x_2, x_3); +lean::dec(x_3); +return x_4; +} +} +uint8 l_HashMapImp_contains___at_Lean_isClass___spec__2(obj* x_1, obj* x_2) { +_start: +{ +obj* x_3; obj* x_4; usize x_5; usize x_6; obj* x_7; usize x_8; obj* x_9; uint8 x_10; +x_3 = lean::cnstr_get(x_1, 1); +x_4 = lean::array_get_size(x_3); +x_5 = lean_name_hash_usize(x_2); +x_6 = lean::usize_modn(x_5, x_4); +lean::dec(x_4); +x_7 = lean::box_size_t(x_6); +x_8 = lean::unbox_size_t(x_7); +lean::dec(x_7); +x_9 = lean::array_uget(x_3, x_8); +x_10 = l_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__5(x_2, x_9); +lean::dec(x_9); +return x_10; +} +} +obj* l_RBNode_find___main___at_Lean_isClass___spec__3(obj* x_1, obj* x_2) { +_start: +{ +if (lean::obj_tag(x_1) == 0) +{ +obj* x_3; +x_3 = lean::box(0); +return x_3; +} +else +{ +obj* x_4; obj* x_5; obj* x_6; obj* x_7; uint8 x_8; +x_4 = lean::cnstr_get(x_1, 0); +x_5 = lean::cnstr_get(x_1, 1); +x_6 = lean::cnstr_get(x_1, 2); +x_7 = lean::cnstr_get(x_1, 3); +x_8 = l_Lean_Name_quickLt(x_2, x_5); +if (x_8 == 0) +{ +uint8 x_9; +x_9 = l_Lean_Name_quickLt(x_5, x_2); +if (x_9 == 0) +{ +obj* x_10; +lean::inc(x_6); +x_10 = lean::alloc_cnstr(1, 1, 0); +lean::cnstr_set(x_10, 0, x_6); +return x_10; +} +else +{ +x_1 = x_7; +goto _start; +} +} +else +{ +x_1 = x_4; +goto _start; +} +} +} +} +uint8 l_Lean_SMap_contains___main___at_Lean_isClass___spec__1(obj* x_1, obj* x_2) { +_start: +{ +uint8 x_3; +x_3 = lean::cnstr_get_scalar(x_1, sizeof(void*)*2); +if (x_3 == 0) +{ +obj* x_4; obj* x_5; uint8 x_6; +x_4 = lean::cnstr_get(x_1, 0); +x_5 = lean::cnstr_get(x_1, 1); +x_6 = l_HashMapImp_contains___at_Lean_isClass___spec__2(x_4, x_2); +if (x_6 == 0) +{ +obj* x_7; +x_7 = l_RBNode_find___main___at_Lean_isClass___spec__3(x_5, x_2); +if (lean::obj_tag(x_7) == 0) +{ +uint8 x_8; +x_8 = 0; +return x_8; +} +else +{ +uint8 x_9; +lean::dec(x_7); +x_9 = 1; +return x_9; +} +} +else +{ +uint8 x_10; +x_10 = 1; +return x_10; +} +} +else +{ +obj* x_11; uint8 x_12; +x_11 = lean::cnstr_get(x_1, 0); +x_12 = l_HashMapImp_contains___at_Lean_isClass___spec__2(x_11, x_2); +return x_12; +} +} +} +uint8 l_Lean_isClass(obj* x_1, obj* x_2) { +_start: +{ +obj* x_3; obj* x_4; obj* x_5; uint8 x_6; +x_3 = l_Lean_classExtension; +x_4 = l_Lean_SimplePersistentEnvExtension_getState___rarg(x_3, x_1); +x_5 = lean::cnstr_get(x_4, 1); +lean::inc(x_5); +lean::dec(x_4); +x_6 = l_Lean_SMap_contains___main___at_Lean_isClass___spec__1(x_5, x_2); +lean::dec(x_5); +return x_6; +} +} +obj* l_HashMapImp_contains___at_Lean_isClass___spec__2___boxed(obj* x_1, obj* x_2) { +_start: +{ +uint8 x_3; obj* x_4; +x_3 = l_HashMapImp_contains___at_Lean_isClass___spec__2(x_1, x_2); +lean::dec(x_2); +lean::dec(x_1); +x_4 = lean::box(x_3); +return x_4; +} +} +obj* l_RBNode_find___main___at_Lean_isClass___spec__3___boxed(obj* x_1, obj* x_2) { +_start: +{ +obj* x_3; +x_3 = l_RBNode_find___main___at_Lean_isClass___spec__3(x_1, x_2); +lean::dec(x_2); +lean::dec(x_1); +return x_3; +} +} +obj* l_Lean_SMap_contains___main___at_Lean_isClass___spec__1___boxed(obj* x_1, obj* x_2) { +_start: +{ +uint8 x_3; obj* x_4; +x_3 = l_Lean_SMap_contains___main___at_Lean_isClass___spec__1(x_1, x_2); +lean::dec(x_2); +lean::dec(x_1); +x_4 = lean::box(x_3); +return x_4; +} +} +obj* l_Lean_isClass___boxed(obj* x_1, obj* x_2) { +_start: +{ +uint8 x_3; obj* x_4; +x_3 = l_Lean_isClass(x_1, x_2); +lean::dec(x_2); +lean::dec(x_1); +x_4 = lean::box(x_3); +return x_4; +} +} +uint8 l_HashMapImp_contains___at_Lean_isInstance___spec__2(obj* x_1, obj* x_2) { +_start: +{ +obj* x_3; obj* x_4; usize x_5; usize x_6; obj* x_7; usize x_8; obj* x_9; uint8 x_10; +x_3 = lean::cnstr_get(x_1, 1); +x_4 = lean::array_get_size(x_3); +x_5 = lean_name_hash_usize(x_2); +x_6 = lean::usize_modn(x_5, x_4); +lean::dec(x_4); +x_7 = lean::box_size_t(x_6); +x_8 = lean::unbox_size_t(x_7); +lean::dec(x_7); +x_9 = lean::array_uget(x_3, x_8); +x_10 = l_AssocList_contains___main___at_Lean_ClassState_addEntry___spec__16(x_2, x_9); +lean::dec(x_9); +return x_10; +} +} +uint8 l_Lean_SMap_contains___main___at_Lean_isInstance___spec__1(obj* x_1, obj* x_2) { +_start: +{ +uint8 x_3; +x_3 = lean::cnstr_get_scalar(x_1, sizeof(void*)*2); +if (x_3 == 0) +{ +obj* x_4; obj* x_5; uint8 x_6; +x_4 = lean::cnstr_get(x_1, 0); +x_5 = lean::cnstr_get(x_1, 1); +x_6 = l_HashMapImp_contains___at_Lean_isInstance___spec__2(x_4, x_2); +if (x_6 == 0) +{ +obj* x_7; +x_7 = l_RBNode_find___main___at_Lean_NameSet_contains___spec__1(x_5, x_2); +if (lean::obj_tag(x_7) == 0) +{ +uint8 x_8; +x_8 = 0; +return x_8; +} +else +{ +uint8 x_9; +lean::dec(x_7); +x_9 = 1; +return x_9; +} +} +else +{ +uint8 x_10; +x_10 = 1; +return x_10; +} +} +else +{ +obj* x_11; uint8 x_12; +x_11 = lean::cnstr_get(x_1, 0); +x_12 = l_HashMapImp_contains___at_Lean_isInstance___spec__2(x_11, x_2); +return x_12; +} +} +} +uint8 l_Lean_isInstance(obj* x_1, obj* x_2) { +_start: +{ +obj* x_3; obj* x_4; obj* x_5; uint8 x_6; +x_3 = l_Lean_classExtension; +x_4 = l_Lean_SimplePersistentEnvExtension_getState___rarg(x_3, x_1); +x_5 = lean::cnstr_get(x_4, 2); +lean::inc(x_5); +lean::dec(x_4); +x_6 = l_Lean_SMap_contains___main___at_Lean_isInstance___spec__1(x_5, x_2); +lean::dec(x_5); +return x_6; +} +} +obj* l_HashMapImp_contains___at_Lean_isInstance___spec__2___boxed(obj* x_1, obj* x_2) { +_start: +{ +uint8 x_3; obj* x_4; +x_3 = l_HashMapImp_contains___at_Lean_isInstance___spec__2(x_1, x_2); +lean::dec(x_2); +lean::dec(x_1); +x_4 = lean::box(x_3); +return x_4; +} +} +obj* l_Lean_SMap_contains___main___at_Lean_isInstance___spec__1___boxed(obj* x_1, obj* x_2) { +_start: +{ +uint8 x_3; obj* x_4; +x_3 = l_Lean_SMap_contains___main___at_Lean_isInstance___spec__1(x_1, x_2); +lean::dec(x_2); +lean::dec(x_1); +x_4 = lean::box(x_3); +return x_4; +} +} +obj* l_Lean_isInstance___boxed(obj* x_1, obj* x_2) { +_start: +{ +uint8 x_3; obj* x_4; +x_3 = l_Lean_isInstance(x_1, x_2); +lean::dec(x_2); +lean::dec(x_1); +x_4 = lean::box(x_3); +return x_4; +} +} +obj* l_Lean_getClassInstances(obj* x_1, obj* x_2) { +_start: +{ +obj* x_3; obj* x_4; obj* x_5; obj* x_6; +x_3 = l_Lean_classExtension; +x_4 = l_Lean_SimplePersistentEnvExtension_getState___rarg(x_3, x_1); +x_5 = lean::cnstr_get(x_4, 0); +lean::inc(x_5); +lean::dec(x_4); +x_6 = l_Lean_SMap_find___main___at_Lean_ClassState_addEntry___spec__10(x_5, x_2); +lean::dec(x_5); +if (lean::obj_tag(x_6) == 0) +{ +obj* x_7; +x_7 = lean::box(0); +return x_7; +} +else +{ +obj* x_8; +x_8 = lean::cnstr_get(x_6, 0); +lean::inc(x_8); +lean::dec(x_6); +return x_8; +} +} +} +obj* l_Lean_getClassInstances___boxed(obj* x_1, obj* x_2) { +_start: +{ +obj* x_3; +x_3 = l_Lean_getClassInstances(x_1, x_2); +lean::dec(x_2); +lean::dec(x_1); +return x_3; +} +} +obj* _init_l___private_init_lean_class_1__isOutParam___closed__1() { +_start: +{ +obj* x_1; obj* x_2; obj* x_3; +x_1 = lean::box(0); +x_2 = lean::mk_string("outParam"); +x_3 = lean_name_mk_string(x_1, x_2); +return x_3; +} +} +uint8 l___private_init_lean_class_1__isOutParam(obj* x_1) { +_start: +{ +obj* x_2; obj* x_3; uint8 x_4; +x_2 = l___private_init_lean_class_1__isOutParam___closed__1; +x_3 = lean::mk_nat_obj(1u); +x_4 = l_Lean_Expr_isAppOfArity___main(x_1, x_2, x_3); +return x_4; +} +} +obj* l___private_init_lean_class_1__isOutParam___boxed(obj* x_1) { +_start: +{ +uint8 x_2; obj* x_3; +x_2 = l___private_init_lean_class_1__isOutParam(x_1); +lean::dec(x_1); +x_3 = lean::box(x_2); +return x_3; +} +} +uint8 l___private_init_lean_class_2__hasOutParam___main(obj* x_1) { +_start: +{ +if (lean::obj_tag(x_1) == 7) +{ +obj* x_2; obj* x_3; uint8 x_4; +x_2 = lean::cnstr_get(x_1, 1); +x_3 = lean::cnstr_get(x_1, 2); +x_4 = l___private_init_lean_class_1__isOutParam(x_2); +if (x_4 == 0) +{ +x_1 = x_3; +goto _start; +} +else +{ +uint8 x_6; +x_6 = 1; +return x_6; +} +} +else +{ +uint8 x_7; +x_7 = 0; +return x_7; +} +} +} +obj* l___private_init_lean_class_2__hasOutParam___main___boxed(obj* x_1) { +_start: +{ +uint8 x_2; obj* x_3; +x_2 = l___private_init_lean_class_2__hasOutParam___main(x_1); +lean::dec(x_1); +x_3 = lean::box(x_2); +return x_3; +} +} +uint8 l___private_init_lean_class_2__hasOutParam(obj* x_1) { +_start: +{ +uint8 x_2; +x_2 = l___private_init_lean_class_2__hasOutParam___main(x_1); +return x_2; +} +} +obj* l___private_init_lean_class_2__hasOutParam___boxed(obj* x_1) { +_start: +{ +uint8 x_2; obj* x_3; +x_2 = l___private_init_lean_class_2__hasOutParam(x_1); +lean::dec(x_1); +x_3 = lean::box(x_2); +return x_3; +} +} +obj* _init_l_Lean_addClass___closed__1() { +_start: +{ +obj* x_1; +x_1 = lean::mk_string("unknown declaration '"); +return x_1; +} +} +obj* _init_l_Lean_addClass___closed__2() { +_start: +{ +obj* x_1; +x_1 = lean::mk_string("class has already been declared '"); +return x_1; +} +} +obj* l_Lean_addClass(obj* x_1, obj* x_2) { +_start: +{ +uint8 x_3; +x_3 = l_Lean_isClass(x_1, x_2); +if (x_3 == 0) +{ +obj* x_4; +lean::inc(x_2); +lean::inc(x_1); +x_4 = lean::environment_find_core(x_1, x_2); +if (lean::obj_tag(x_4) == 0) +{ +obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; +lean::dec(x_1); +x_5 = l_Lean_Name_toString___closed__1; +x_6 = l_Lean_Name_toStringWithSep___main(x_5, x_2); +x_7 = l_Lean_addClass___closed__1; +x_8 = lean::string_append(x_7, x_6); +lean::dec(x_6); +x_9 = l_Char_HasRepr___closed__1; +x_10 = lean::string_append(x_8, x_9); +x_11 = lean::alloc_cnstr(0, 1, 0); +lean::cnstr_set(x_11, 0, x_10); +return x_11; +} +else +{ +obj* x_12; obj* x_13; uint8 x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; +x_12 = lean::cnstr_get(x_4, 0); +lean::inc(x_12); +lean::dec(x_4); +x_13 = l_Lean_ConstantInfo_type(x_12); +lean::dec(x_12); +x_14 = l___private_init_lean_class_2__hasOutParam___main(x_13); +lean::dec(x_13); +x_15 = lean::alloc_cnstr(0, 1, 1); +lean::cnstr_set(x_15, 0, x_2); +lean::cnstr_set_scalar(x_15, sizeof(void*)*1, x_14); +x_16 = l_Lean_classExtension; +x_17 = l_Lean_PersistentEnvExtension_addEntry___rarg(x_16, x_1, x_15); +x_18 = lean::alloc_cnstr(1, 1, 0); +lean::cnstr_set(x_18, 0, x_17); +return x_18; +} +} +else +{ +obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; +lean::dec(x_1); +x_19 = l_Lean_Name_toString___closed__1; +x_20 = l_Lean_Name_toStringWithSep___main(x_19, x_2); +x_21 = l_Lean_addClass___closed__2; +x_22 = lean::string_append(x_21, x_20); +lean::dec(x_20); +x_23 = l_Char_HasRepr___closed__1; +x_24 = lean::string_append(x_22, x_23); +x_25 = lean::alloc_cnstr(0, 1, 0); +lean::cnstr_set(x_25, 0, x_24); +return x_25; +} +} +} obj* initialize_init_lean_attributes(obj*); static bool _G_initialized = false; obj* initialize_init_lean_class(obj* w) { @@ -6524,13 +7451,33 @@ w = initialize_init_lean_attributes(w); if (io_result_is_error(w)) return w; REGISTER_LEAN_FUNCTION(lean::mk_const_name(lean::mk_const_name(lean::mk_const_name("Lean"), "ClassEntry"), "getName"), 1, l_Lean_ClassEntry_getName___boxed); REGISTER_LEAN_FUNCTION(lean::mk_const_name(lean::mk_const_name(lean::mk_const_name("Lean"), "ClassEntry"), "lt"), 2, l_Lean_ClassEntry_lt___boxed); -REGISTER_LEAN_FUNCTION(lean::mk_const_name(lean::mk_const_name(lean::mk_const_name("Lean"), "ClassState"), "addEntry"), 3, l_Lean_ClassState_addEntry___boxed); -l_Lean_SMap_empty___at_Lean_mkClassExtension___spec__1 = _init_l_Lean_SMap_empty___at_Lean_mkClassExtension___spec__1(); -lean::mark_persistent(l_Lean_SMap_empty___at_Lean_mkClassExtension___spec__1); -l_Lean_SMap_empty___at_Lean_mkClassExtension___spec__3 = _init_l_Lean_SMap_empty___at_Lean_mkClassExtension___spec__3(); -lean::mark_persistent(l_Lean_SMap_empty___at_Lean_mkClassExtension___spec__3); +l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__1 = _init_l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__1(); +lean::mark_persistent(l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__1); +l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__3 = _init_l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__3(); +lean::mark_persistent(l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__3); +l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__5 = _init_l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__5(); +lean::mark_persistent(l_Lean_SMap_empty___at_Lean_ClassState_Inhabited___spec__5); +l_Lean_ClassState_Inhabited = _init_l_Lean_ClassState_Inhabited(); +lean::mark_persistent(l_Lean_ClassState_Inhabited); +lean::register_constant(lean::mk_const_name(lean::mk_const_name(lean::mk_const_name("Lean"), "ClassState"), "Inhabited"), l_Lean_ClassState_Inhabited); +REGISTER_LEAN_FUNCTION(lean::mk_const_name(lean::mk_const_name(lean::mk_const_name("Lean"), "ClassState"), "addEntry"), 2, l_Lean_ClassState_addEntry); l_Lean_mkClassExtension___closed__1 = _init_l_Lean_mkClassExtension___closed__1(); lean::mark_persistent(l_Lean_mkClassExtension___closed__1); REGISTER_LEAN_FUNCTION(lean::mk_const_name(lean::mk_const_name("Lean"), "mkClassExtension"), 1, l_Lean_mkClassExtension); +w = l_Lean_mkClassExtension(w); +if (io_result_is_error(w)) return w; +l_Lean_classExtension = io_result_get_value(w); +lean::mark_persistent(l_Lean_classExtension); +lean::register_constant(lean::mk_const_name(lean::mk_const_name("Lean"), "classExtension"), l_Lean_classExtension); +REGISTER_LEAN_FUNCTION(lean::mk_const_name(lean::mk_const_name("Lean"), "isClass"), 2, l_Lean_isClass___boxed); +REGISTER_LEAN_FUNCTION(lean::mk_const_name(lean::mk_const_name("Lean"), "isInstance"), 2, l_Lean_isInstance___boxed); +REGISTER_LEAN_FUNCTION(lean::mk_const_name(lean::mk_const_name("Lean"), "getClassInstances"), 2, l_Lean_getClassInstances___boxed); +l___private_init_lean_class_1__isOutParam___closed__1 = _init_l___private_init_lean_class_1__isOutParam___closed__1(); +lean::mark_persistent(l___private_init_lean_class_1__isOutParam___closed__1); +l_Lean_addClass___closed__1 = _init_l_Lean_addClass___closed__1(); +lean::mark_persistent(l_Lean_addClass___closed__1); +l_Lean_addClass___closed__2 = _init_l_Lean_addClass___closed__2(); +lean::mark_persistent(l_Lean_addClass___closed__2); +REGISTER_LEAN_FUNCTION(lean::mk_const_name(lean::mk_const_name("Lean"), "addClass"), 2, l_Lean_addClass); return w; } diff --git a/src/stage0/init/lean/compiler/exportattr.cpp b/src/stage0/init/lean/compiler/exportattr.cpp index 9fd711a834..02544f5e94 100644 --- a/src/stage0/init/lean/compiler/exportattr.cpp +++ b/src/stage0/init/lean/compiler/exportattr.cpp @@ -276,49 +276,41 @@ return x_3; uint8 l___private_init_lean_compiler_exportattr_2__isValidCppName___main(obj* x_1) { _start: { -switch (lean::obj_tag(x_1)) { -case 0: +if (lean::obj_tag(x_1) == 1) { -uint8 x_2; -x_2 = 0; -return x_2; -} -case 1: +obj* x_2; obj* x_3; obj* x_4; uint8 x_5; +x_2 = lean::cnstr_get(x_1, 0); +x_3 = lean::cnstr_get(x_1, 1); +x_4 = lean::box(0); +x_5 = lean_name_dec_eq(x_2, x_4); +if (x_5 == 0) { -obj* x_3; obj* x_4; obj* x_5; uint8 x_6; -x_3 = lean::cnstr_get(x_1, 0); -x_4 = lean::cnstr_get(x_1, 1); -x_5 = lean::box(0); -x_6 = lean_name_dec_eq(x_3, x_5); +uint8 x_6; +x_6 = l___private_init_lean_compiler_exportattr_1__isValidCppId(x_3); if (x_6 == 0) { uint8 x_7; -x_7 = l___private_init_lean_compiler_exportattr_1__isValidCppId(x_4); -if (x_7 == 0) -{ -uint8 x_8; -x_8 = 0; -return x_8; +x_7 = 0; +return x_7; } else { -x_1 = x_3; +x_1 = x_2; goto _start; } } else { -uint8 x_10; -x_10 = l___private_init_lean_compiler_exportattr_1__isValidCppId(x_4); -return x_10; +uint8 x_9; +x_9 = l___private_init_lean_compiler_exportattr_1__isValidCppId(x_3); +return x_9; } } -default: +else { -uint8 x_11; -x_11 = 0; -return x_11; -} +uint8 x_10; +x_10 = 0; +return x_10; } } } diff --git a/src/stage0/init/lean/compiler/externattr.cpp b/src/stage0/init/lean/compiler/externattr.cpp index 73283a98b4..def648057c 100644 --- a/src/stage0/init/lean/compiler/externattr.cpp +++ b/src/stage0/init/lean/compiler/externattr.cpp @@ -2333,30 +2333,31 @@ if (x_10 == 0) obj* x_11; x_11 = lean::cnstr_get(x_8, 0); switch (lean::obj_tag(x_11)) { -case 0: +case 2: { obj* x_12; -lean::free_heap_obj(x_8); +x_12 = lean::cnstr_get(x_11, 1); +lean::inc(x_12); lean::dec(x_11); -x_12 = lean::box(0); -return x_12; +lean::cnstr_set(x_8, 0, x_12); +return x_8; } -case 1: +case 3: { obj* x_13; -lean::free_heap_obj(x_8); +x_13 = lean::cnstr_get(x_11, 1); +lean::inc(x_13); lean::dec(x_11); -x_13 = lean::box(0); -return x_13; +lean::cnstr_set(x_8, 0, x_13); +return x_8; } default: { obj* x_14; -x_14 = lean::cnstr_get(x_11, 1); -lean::inc(x_14); +lean::free_heap_obj(x_8); lean::dec(x_11); -lean::cnstr_set(x_8, 0, x_14); -return x_8; +x_14 = lean::box(0); +return x_14; } } } @@ -2367,21 +2368,17 @@ x_15 = lean::cnstr_get(x_8, 0); lean::inc(x_15); lean::dec(x_8); switch (lean::obj_tag(x_15)) { -case 0: +case 2: { -obj* x_16; +obj* x_16; obj* x_17; +x_16 = lean::cnstr_get(x_15, 1); +lean::inc(x_16); lean::dec(x_15); -x_16 = lean::box(0); -return x_16; -} -case 1: -{ -obj* x_17; -lean::dec(x_15); -x_17 = lean::box(0); +x_17 = lean::alloc_cnstr(1, 1, 0); +lean::cnstr_set(x_17, 0, x_16); return x_17; } -default: +case 3: { obj* x_18; obj* x_19; x_18 = lean::cnstr_get(x_15, 1); @@ -2391,6 +2388,13 @@ x_19 = lean::alloc_cnstr(1, 1, 0); lean::cnstr_set(x_19, 0, x_18); return x_19; } +default: +{ +obj* x_20; +lean::dec(x_15); +x_20 = lean::box(0); +return x_20; +} } } } diff --git a/src/stage0/init/lean/compiler/ir/basic.cpp b/src/stage0/init/lean/compiler/ir/basic.cpp index d5d1e3e95e..b4048aad4b 100644 --- a/src/stage0/init/lean/compiler/ir/basic.cpp +++ b/src/stage0/init/lean/compiler/ir/basic.cpp @@ -1718,81 +1718,74 @@ obj* l_Lean_IR_FnBody_body___main(obj* x_1) { _start: { switch (lean::obj_tag(x_1)) { -case 0: +case 1: { obj* x_2; -x_2 = lean::cnstr_get(x_1, 2); +x_2 = lean::cnstr_get(x_1, 3); lean::inc(x_2); return x_2; } -case 1: +case 2: { obj* x_3; x_3 = lean::cnstr_get(x_1, 3); lean::inc(x_3); return x_3; } -case 2: +case 4: { obj* x_4; x_4 = lean::cnstr_get(x_1, 3); lean::inc(x_4); return x_4; } -case 3: +case 5: { obj* x_5; -x_5 = lean::cnstr_get(x_1, 2); +x_5 = lean::cnstr_get(x_1, 4); lean::inc(x_5); return x_5; } -case 4: +case 8: { obj* x_6; -x_6 = lean::cnstr_get(x_1, 3); +x_6 = lean::cnstr_get(x_1, 1); lean::inc(x_6); return x_6; } -case 5: +case 9: { obj* x_7; -x_7 = lean::cnstr_get(x_1, 4); +x_7 = lean::cnstr_get(x_1, 1); lean::inc(x_7); return x_7; } -case 6: +case 10: +{ +lean::inc(x_1); +return x_1; +} +case 11: +{ +lean::inc(x_1); +return x_1; +} +case 12: +{ +lean::inc(x_1); +return x_1; +} +case 13: +{ +return x_1; +} +default: { obj* x_8; x_8 = lean::cnstr_get(x_1, 2); lean::inc(x_8); return x_8; } -case 7: -{ -obj* x_9; -x_9 = lean::cnstr_get(x_1, 2); -lean::inc(x_9); -return x_9; -} -case 8: -{ -obj* x_10; -x_10 = lean::cnstr_get(x_1, 1); -lean::inc(x_10); -return x_10; -} -case 9: -{ -obj* x_11; -x_11 = lean::cnstr_get(x_1, 1); -lean::inc(x_11); -return x_11; -} -default: -{ -lean::inc(x_1); -return x_1; -} } } } @@ -2948,21 +2941,11 @@ return x_6; obj* l_Lean_IR_Decl_name___main(obj* x_1) { _start: { -if (lean::obj_tag(x_1) == 0) -{ obj* x_2; x_2 = lean::cnstr_get(x_1, 0); lean::inc(x_2); return x_2; } -else -{ -obj* x_3; -x_3 = lean::cnstr_get(x_1, 0); -lean::inc(x_3); -return x_3; -} -} } obj* l_Lean_IR_Decl_name___main___boxed(obj* x_1) { _start: @@ -2993,21 +2976,11 @@ return x_2; obj* l_Lean_IR_Decl_params___main(obj* x_1) { _start: { -if (lean::obj_tag(x_1) == 0) -{ obj* x_2; x_2 = lean::cnstr_get(x_1, 1); lean::inc(x_2); return x_2; } -else -{ -obj* x_3; -x_3 = lean::cnstr_get(x_1, 1); -lean::inc(x_3); -return x_3; -} -} } obj* l_Lean_IR_Decl_params___main___boxed(obj* x_1) { _start: @@ -3038,19 +3011,10 @@ return x_2; uint8 l_Lean_IR_Decl_resultType___main(obj* x_1) { _start: { -if (lean::obj_tag(x_1) == 0) -{ uint8 x_2; x_2 = lean::cnstr_get_scalar(x_1, sizeof(void*)*3); return x_2; } -else -{ -uint8 x_3; -x_3 = lean::cnstr_get_scalar(x_1, sizeof(void*)*3); -return x_3; -} -} } obj* l_Lean_IR_Decl_resultType___main___boxed(obj* x_1) { _start: @@ -5751,29 +5715,20 @@ obj* x_5; x_5 = lean::cnstr_get(x_3, 0); lean::inc(x_5); lean::dec(x_3); -switch (lean::obj_tag(x_5)) { -case 0: +if (lean::obj_tag(x_5) == 2) { uint8 x_6; lean::dec(x_5); -x_6 = 0; +x_6 = 1; return x_6; } -case 1: +else { uint8 x_7; lean::dec(x_5); x_7 = 0; return x_7; } -default: -{ -uint8 x_8; -lean::dec(x_5); -x_8 = 1; -return x_8; -} -} } } } @@ -5817,16 +5772,16 @@ if (x_5 == 0) { obj* x_6; x_6 = lean::cnstr_get(x_3, 0); -switch (lean::obj_tag(x_6)) { -case 0: +if (lean::obj_tag(x_6) == 2) { obj* x_7; -lean::free_heap_obj(x_3); +x_7 = lean::cnstr_get(x_6, 1); +lean::inc(x_7); lean::dec(x_6); -x_7 = lean::box(0); -return x_7; +lean::cnstr_set(x_3, 0, x_7); +return x_3; } -case 1: +else { obj* x_8; lean::free_heap_obj(x_3); @@ -5834,49 +5789,30 @@ lean::dec(x_6); x_8 = lean::box(0); return x_8; } -default: -{ -obj* x_9; -x_9 = lean::cnstr_get(x_6, 1); -lean::inc(x_9); -lean::dec(x_6); -lean::cnstr_set(x_3, 0, x_9); -return x_3; -} -} } else { -obj* x_10; -x_10 = lean::cnstr_get(x_3, 0); -lean::inc(x_10); +obj* x_9; +x_9 = lean::cnstr_get(x_3, 0); +lean::inc(x_9); lean::dec(x_3); -switch (lean::obj_tag(x_10)) { -case 0: +if (lean::obj_tag(x_9) == 2) { -obj* x_11; -lean::dec(x_10); -x_11 = lean::box(0); +obj* x_10; obj* x_11; +x_10 = lean::cnstr_get(x_9, 1); +lean::inc(x_10); +lean::dec(x_9); +x_11 = lean::alloc_cnstr(1, 1, 0); +lean::cnstr_set(x_11, 0, x_10); return x_11; } -case 1: +else { obj* x_12; -lean::dec(x_10); +lean::dec(x_9); x_12 = lean::box(0); return x_12; } -default: -{ -obj* x_13; obj* x_14; -x_13 = lean::cnstr_get(x_10, 1); -lean::inc(x_13); -lean::dec(x_10); -x_14 = lean::alloc_cnstr(1, 1, 0); -lean::cnstr_set(x_14, 0, x_13); -return x_14; -} -} } } } @@ -5910,16 +5846,16 @@ if (x_5 == 0) { obj* x_6; x_6 = lean::cnstr_get(x_3, 0); -switch (lean::obj_tag(x_6)) { -case 0: +if (lean::obj_tag(x_6) == 2) { obj* x_7; -lean::free_heap_obj(x_3); +x_7 = lean::cnstr_get(x_6, 0); +lean::inc(x_7); lean::dec(x_6); -x_7 = lean::box(0); -return x_7; +lean::cnstr_set(x_3, 0, x_7); +return x_3; } -case 1: +else { obj* x_8; lean::free_heap_obj(x_3); @@ -5927,49 +5863,30 @@ lean::dec(x_6); x_8 = lean::box(0); return x_8; } -default: -{ -obj* x_9; -x_9 = lean::cnstr_get(x_6, 0); -lean::inc(x_9); -lean::dec(x_6); -lean::cnstr_set(x_3, 0, x_9); -return x_3; -} -} } else { -obj* x_10; -x_10 = lean::cnstr_get(x_3, 0); -lean::inc(x_10); +obj* x_9; +x_9 = lean::cnstr_get(x_3, 0); +lean::inc(x_9); lean::dec(x_3); -switch (lean::obj_tag(x_10)) { -case 0: +if (lean::obj_tag(x_9) == 2) { -obj* x_11; -lean::dec(x_10); -x_11 = lean::box(0); +obj* x_10; obj* x_11; +x_10 = lean::cnstr_get(x_9, 0); +lean::inc(x_10); +lean::dec(x_9); +x_11 = lean::alloc_cnstr(1, 1, 0); +lean::cnstr_set(x_11, 0, x_10); return x_11; } -case 1: +else { obj* x_12; -lean::dec(x_10); +lean::dec(x_9); x_12 = lean::box(0); return x_12; } -default: -{ -obj* x_13; obj* x_14; -x_13 = lean::cnstr_get(x_10, 0); -lean::inc(x_13); -lean::dec(x_10); -x_14 = lean::alloc_cnstr(1, 1, 0); -lean::cnstr_set(x_14, 0, x_13); -return x_14; -} -} } } } @@ -6046,29 +5963,20 @@ obj* x_5; x_5 = lean::cnstr_get(x_3, 0); lean::inc(x_5); lean::dec(x_3); -switch (lean::obj_tag(x_5)) { -case 0: +if (lean::obj_tag(x_5) == 1) { uint8 x_6; lean::dec(x_5); -x_6 = 0; +x_6 = 1; return x_6; } -case 1: +else { uint8 x_7; lean::dec(x_5); -x_7 = 1; +x_7 = 0; return x_7; } -default: -{ -uint8 x_8; -lean::dec(x_5); -x_8 = 0; -return x_8; -} -} } } } diff --git a/src/stage0/init/lean/compiler/ir/emitcpp.cpp b/src/stage0/init/lean/compiler/ir/emitcpp.cpp index 5832df979a..74a252503c 100644 --- a/src/stage0/init/lean/compiler/ir/emitcpp.cpp +++ b/src/stage0/init/lean/compiler/ir/emitcpp.cpp @@ -1920,142 +1920,124 @@ obj* x_18; x_18 = lean::cnstr_get(x_10, 0); lean::inc(x_18); lean::dec(x_10); -switch (lean::obj_tag(x_18)) { -case 0: +if (lean::obj_tag(x_18) == 1) { -obj* x_19; -lean::dec(x_7); -x_19 = l_Lean_IR_EmitCpp_throwInvalidExportName___rarg(x_1, x_2, x_4); -return x_19; -} -case 1: -{ -obj* x_20; obj* x_21; +obj* x_19; obj* x_20; lean::dec(x_4); lean::dec(x_1); -x_20 = lean::cnstr_get(x_18, 1); -lean::inc(x_20); +x_19 = lean::cnstr_get(x_18, 1); +lean::inc(x_19); lean::dec(x_18); -x_21 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_21, 0, x_20); -lean::cnstr_set(x_21, 1, x_7); +x_20 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_20, 0, x_19); +lean::cnstr_set(x_20, 1, x_7); +return x_20; +} +else +{ +obj* x_21; +lean::dec(x_18); +lean::dec(x_7); +x_21 = l_Lean_IR_EmitCpp_throwInvalidExportName___rarg(x_1, x_2, x_4); return x_21; } -default: -{ -obj* x_22; -lean::dec(x_18); -lean::dec(x_7); -x_22 = l_Lean_IR_EmitCpp_throwInvalidExportName___rarg(x_1, x_2, x_4); -return x_22; -} -} } } else { -obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; -x_23 = lean::cnstr_get(x_4, 0); -x_24 = lean::cnstr_get(x_4, 1); -lean::inc(x_24); +obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; +x_22 = lean::cnstr_get(x_4, 0); +x_23 = lean::cnstr_get(x_4, 1); lean::inc(x_23); +lean::inc(x_22); lean::dec(x_4); -x_25 = lean::box(0); -lean::inc(x_24); -x_26 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_26, 0, x_25); -lean::cnstr_set(x_26, 1, x_24); -x_27 = l_Lean_exportAttr; +x_24 = lean::box(0); +lean::inc(x_23); +x_25 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_25, 0, x_24); +lean::cnstr_set(x_25, 1, x_23); +x_26 = l_Lean_exportAttr; lean::inc(x_1); -x_28 = l_Lean_ParametricAttribute_getParam___at_Lean_isIOUnitInitFn___spec__1(x_27, x_23, x_1); -lean::dec(x_23); -if (lean::obj_tag(x_28) == 0) +x_27 = l_Lean_ParametricAttribute_getParam___at_Lean_isIOUnitInitFn___spec__1(x_26, x_22, x_1); +lean::dec(x_22); +if (lean::obj_tag(x_27) == 0) { -obj* x_29; uint8 x_30; -lean::dec(x_26); -x_29 = l_Lean_IR_EmitCpp_toBaseCppName___closed__1; -x_30 = lean_name_dec_eq(x_1, x_29); -if (x_30 == 0) +obj* x_28; uint8 x_29; +lean::dec(x_25); +x_28 = l_Lean_IR_EmitCpp_toBaseCppName___closed__1; +x_29 = lean_name_dec_eq(x_1, x_28); +if (x_29 == 0) { -obj* x_31; obj* x_32; obj* x_33; -x_31 = l_Lean_IR_EmitCpp_toBaseCppName___closed__2; -x_32 = l_Lean_Name_mangle(x_1, x_31); -x_33 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_33, 0, x_32); -lean::cnstr_set(x_33, 1, x_24); -return x_33; +obj* x_30; obj* x_31; obj* x_32; +x_30 = l_Lean_IR_EmitCpp_toBaseCppName___closed__2; +x_31 = l_Lean_Name_mangle(x_1, x_30); +x_32 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_32, 0, x_31); +lean::cnstr_set(x_32, 1, x_23); +return x_32; } else { -obj* x_34; obj* x_35; +obj* x_33; obj* x_34; lean::dec(x_1); -x_34 = l_Lean_IR_EmitCpp_leanMainFn; -x_35 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_35, 0, x_34); -lean::cnstr_set(x_35, 1, x_24); -return x_35; +x_33 = l_Lean_IR_EmitCpp_leanMainFn; +x_34 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_34, 0, x_33); +lean::cnstr_set(x_34, 1, x_23); +return x_34; } } else { -obj* x_36; -x_36 = lean::cnstr_get(x_28, 0); -lean::inc(x_36); -lean::dec(x_28); -switch (lean::obj_tag(x_36)) { -case 0: +obj* x_35; +x_35 = lean::cnstr_get(x_27, 0); +lean::inc(x_35); +lean::dec(x_27); +if (lean::obj_tag(x_35) == 1) { -obj* x_37; -lean::dec(x_24); -x_37 = l_Lean_IR_EmitCpp_throwInvalidExportName___rarg(x_1, x_2, x_26); +obj* x_36; obj* x_37; +lean::dec(x_25); +lean::dec(x_1); +x_36 = lean::cnstr_get(x_35, 1); +lean::inc(x_36); +lean::dec(x_35); +x_37 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_37, 0, x_36); +lean::cnstr_set(x_37, 1, x_23); return x_37; } -case 1: +else { -obj* x_38; obj* x_39; -lean::dec(x_26); -lean::dec(x_1); -x_38 = lean::cnstr_get(x_36, 1); -lean::inc(x_38); -lean::dec(x_36); -x_39 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_39, 0, x_38); -lean::cnstr_set(x_39, 1, x_24); -return x_39; -} -default: -{ -obj* x_40; -lean::dec(x_36); -lean::dec(x_24); -x_40 = l_Lean_IR_EmitCpp_throwInvalidExportName___rarg(x_1, x_2, x_26); -return x_40; -} +obj* x_38; +lean::dec(x_35); +lean::dec(x_23); +x_38 = l_Lean_IR_EmitCpp_throwInvalidExportName___rarg(x_1, x_2, x_25); +return x_38; } } } } else { -uint8 x_41; +uint8 x_39; lean::dec(x_1); -x_41 = !lean::is_exclusive(x_4); -if (x_41 == 0) +x_39 = !lean::is_exclusive(x_4); +if (x_39 == 0) { return x_4; } else { -obj* x_42; obj* x_43; obj* x_44; -x_42 = lean::cnstr_get(x_4, 0); -x_43 = lean::cnstr_get(x_4, 1); -lean::inc(x_43); -lean::inc(x_42); +obj* x_40; obj* x_41; obj* x_42; +x_40 = lean::cnstr_get(x_4, 0); +x_41 = lean::cnstr_get(x_4, 1); +lean::inc(x_41); +lean::inc(x_40); lean::dec(x_4); -x_44 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_44, 0, x_42); -lean::cnstr_set(x_44, 1, x_43); -return x_44; +x_42 = lean::alloc_cnstr(1, 2, 0); +lean::cnstr_set(x_42, 0, x_40); +lean::cnstr_set(x_42, 1, x_41); +return x_42; } } } @@ -2337,145 +2319,127 @@ obj* x_16; x_16 = lean::cnstr_get(x_10, 0); lean::inc(x_16); lean::dec(x_10); -switch (lean::obj_tag(x_16)) { -case 0: +if (lean::obj_tag(x_16) == 1) { -obj* x_17; -lean::dec(x_7); -x_17 = l_Lean_IR_EmitCpp_throwInvalidExportName___rarg(x_1, x_2, x_4); -return x_17; -} -case 1: -{ -obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; +obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; lean::dec(x_4); lean::dec(x_1); -x_18 = lean::cnstr_get(x_16, 0); +x_17 = lean::cnstr_get(x_16, 0); +lean::inc(x_17); +x_18 = lean::cnstr_get(x_16, 1); lean::inc(x_18); -x_19 = lean::cnstr_get(x_16, 1); -lean::inc(x_19); lean::dec(x_16); -x_20 = l_Lean_IR_EmitCpp_toCppInitName___closed__1; -x_21 = lean::string_append(x_20, x_19); -lean::dec(x_19); -x_22 = lean_name_mk_string(x_18, x_21); -x_23 = l_Lean_IR_EmitCpp_toCppName___closed__1; -x_24 = l_Lean_Name_toStringWithSep___main(x_23, x_22); -x_25 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_25, 0, x_24); -lean::cnstr_set(x_25, 1, x_7); +x_19 = l_Lean_IR_EmitCpp_toCppInitName___closed__1; +x_20 = lean::string_append(x_19, x_18); +lean::dec(x_18); +x_21 = lean_name_mk_string(x_17, x_20); +x_22 = l_Lean_IR_EmitCpp_toCppName___closed__1; +x_23 = l_Lean_Name_toStringWithSep___main(x_22, x_21); +x_24 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_24, 0, x_23); +lean::cnstr_set(x_24, 1, x_7); +return x_24; +} +else +{ +obj* x_25; +lean::dec(x_16); +lean::dec(x_7); +x_25 = l_Lean_IR_EmitCpp_throwInvalidExportName___rarg(x_1, x_2, x_4); return x_25; } -default: -{ -obj* x_26; -lean::dec(x_16); -lean::dec(x_7); -x_26 = l_Lean_IR_EmitCpp_throwInvalidExportName___rarg(x_1, x_2, x_4); -return x_26; -} -} } } else { -obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; -x_27 = lean::cnstr_get(x_4, 0); -x_28 = lean::cnstr_get(x_4, 1); -lean::inc(x_28); +obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; +x_26 = lean::cnstr_get(x_4, 0); +x_27 = lean::cnstr_get(x_4, 1); lean::inc(x_27); +lean::inc(x_26); lean::dec(x_4); -x_29 = lean::box(0); -lean::inc(x_28); -x_30 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_30, 0, x_29); -lean::cnstr_set(x_30, 1, x_28); -x_31 = l_Lean_exportAttr; +x_28 = lean::box(0); +lean::inc(x_27); +x_29 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_29, 0, x_28); +lean::cnstr_set(x_29, 1, x_27); +x_30 = l_Lean_exportAttr; lean::inc(x_1); -x_32 = l_Lean_ParametricAttribute_getParam___at_Lean_isIOUnitInitFn___spec__1(x_31, x_27, x_1); -lean::dec(x_27); -if (lean::obj_tag(x_32) == 0) +x_31 = l_Lean_ParametricAttribute_getParam___at_Lean_isIOUnitInitFn___spec__1(x_30, x_26, x_1); +lean::dec(x_26); +if (lean::obj_tag(x_31) == 0) { -obj* x_33; obj* x_34; obj* x_35; obj* x_36; obj* x_37; -lean::dec(x_30); -x_33 = l_Lean_IR_EmitCpp_toBaseCppName___closed__2; -x_34 = l_Lean_Name_mangle(x_1, x_33); -x_35 = l_Lean_IR_EmitCpp_toCppInitName___closed__1; -x_36 = lean::string_append(x_35, x_34); -lean::dec(x_34); -x_37 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_37, 0, x_36); -lean::cnstr_set(x_37, 1, x_28); -return x_37; +obj* x_32; obj* x_33; obj* x_34; obj* x_35; obj* x_36; +lean::dec(x_29); +x_32 = l_Lean_IR_EmitCpp_toBaseCppName___closed__2; +x_33 = l_Lean_Name_mangle(x_1, x_32); +x_34 = l_Lean_IR_EmitCpp_toCppInitName___closed__1; +x_35 = lean::string_append(x_34, x_33); +lean::dec(x_33); +x_36 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_36, 0, x_35); +lean::cnstr_set(x_36, 1, x_27); +return x_36; } else { -obj* x_38; -x_38 = lean::cnstr_get(x_32, 0); +obj* x_37; +x_37 = lean::cnstr_get(x_31, 0); +lean::inc(x_37); +lean::dec(x_31); +if (lean::obj_tag(x_37) == 1) +{ +obj* x_38; obj* x_39; obj* x_40; obj* x_41; obj* x_42; obj* x_43; obj* x_44; obj* x_45; +lean::dec(x_29); +lean::dec(x_1); +x_38 = lean::cnstr_get(x_37, 0); lean::inc(x_38); -lean::dec(x_32); -switch (lean::obj_tag(x_38)) { -case 0: -{ -obj* x_39; -lean::dec(x_28); -x_39 = l_Lean_IR_EmitCpp_throwInvalidExportName___rarg(x_1, x_2, x_30); -return x_39; +x_39 = lean::cnstr_get(x_37, 1); +lean::inc(x_39); +lean::dec(x_37); +x_40 = l_Lean_IR_EmitCpp_toCppInitName___closed__1; +x_41 = lean::string_append(x_40, x_39); +lean::dec(x_39); +x_42 = lean_name_mk_string(x_38, x_41); +x_43 = l_Lean_IR_EmitCpp_toCppName___closed__1; +x_44 = l_Lean_Name_toStringWithSep___main(x_43, x_42); +x_45 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_45, 0, x_44); +lean::cnstr_set(x_45, 1, x_27); +return x_45; } -case 1: +else { -obj* x_40; obj* x_41; obj* x_42; obj* x_43; obj* x_44; obj* x_45; obj* x_46; obj* x_47; -lean::dec(x_30); -lean::dec(x_1); -x_40 = lean::cnstr_get(x_38, 0); -lean::inc(x_40); -x_41 = lean::cnstr_get(x_38, 1); -lean::inc(x_41); -lean::dec(x_38); -x_42 = l_Lean_IR_EmitCpp_toCppInitName___closed__1; -x_43 = lean::string_append(x_42, x_41); -lean::dec(x_41); -x_44 = lean_name_mk_string(x_40, x_43); -x_45 = l_Lean_IR_EmitCpp_toCppName___closed__1; -x_46 = l_Lean_Name_toStringWithSep___main(x_45, x_44); -x_47 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_47, 0, x_46); -lean::cnstr_set(x_47, 1, x_28); -return x_47; -} -default: -{ -obj* x_48; -lean::dec(x_38); -lean::dec(x_28); -x_48 = l_Lean_IR_EmitCpp_throwInvalidExportName___rarg(x_1, x_2, x_30); -return x_48; -} +obj* x_46; +lean::dec(x_37); +lean::dec(x_27); +x_46 = l_Lean_IR_EmitCpp_throwInvalidExportName___rarg(x_1, x_2, x_29); +return x_46; } } } } else { -uint8 x_49; +uint8 x_47; lean::dec(x_1); -x_49 = !lean::is_exclusive(x_4); -if (x_49 == 0) +x_47 = !lean::is_exclusive(x_4); +if (x_47 == 0) { return x_4; } else { -obj* x_50; obj* x_51; obj* x_52; -x_50 = lean::cnstr_get(x_4, 0); -x_51 = lean::cnstr_get(x_4, 1); -lean::inc(x_51); -lean::inc(x_50); +obj* x_48; obj* x_49; obj* x_50; +x_48 = lean::cnstr_get(x_4, 0); +x_49 = lean::cnstr_get(x_4, 1); +lean::inc(x_49); +lean::inc(x_48); lean::dec(x_4); -x_52 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_52, 0, x_50); -lean::cnstr_set(x_52, 1, x_51); -return x_52; +x_50 = lean::alloc_cnstr(1, 2, 0); +lean::cnstr_set(x_50, 0, x_48); +lean::cnstr_set(x_50, 1, x_49); +return x_50; } } } @@ -3290,666 +3254,591 @@ x_15 = l_Lean_isExternC(x_12, x_14); lean::dec(x_12); if (x_15 == 0) { -switch (lean::obj_tag(x_5)) { -case 0: +if (lean::obj_tag(x_5) == 1) { -obj* x_16; -x_16 = l_Lean_IR_EmitCpp_emitExternDeclAux___closed__1; -lean::cnstr_set_tag(x_10, 1); -lean::cnstr_set(x_10, 0, x_16); -return x_10; -} -case 1: -{ -obj* x_17; uint8 x_18; obj* x_19; -x_17 = lean::cnstr_get(x_5, 1); -lean::inc(x_17); +obj* x_16; uint8 x_17; obj* x_18; +x_16 = lean::cnstr_get(x_5, 1); +lean::inc(x_16); lean::cnstr_set(x_10, 0, x_9); -x_18 = 1; -x_19 = l_Lean_IR_EmitCpp_emitFnDeclAux(x_1, x_17, x_18, x_3, x_10); -lean::dec(x_17); -if (lean::obj_tag(x_19) == 0) +x_17 = 1; +x_18 = l_Lean_IR_EmitCpp_emitFnDeclAux(x_1, x_16, x_17, x_3, x_10); +lean::dec(x_16); +if (lean::obj_tag(x_18) == 0) { -uint8 x_20; -x_20 = !lean::is_exclusive(x_19); -if (x_20 == 0) +uint8 x_19; +x_19 = !lean::is_exclusive(x_18); +if (x_19 == 0) { -obj* x_21; obj* x_22; -x_21 = lean::cnstr_get(x_19, 0); -lean::dec(x_21); -lean::cnstr_set(x_19, 0, x_9); -x_22 = l_Lean_IR_EmitCpp_closeNamespaces(x_5, x_3, x_19); +obj* x_20; obj* x_21; +x_20 = lean::cnstr_get(x_18, 0); +lean::dec(x_20); +lean::cnstr_set(x_18, 0, x_9); +x_21 = l_Lean_IR_EmitCpp_closeNamespaces(x_5, x_3, x_18); lean::dec(x_5); -return x_22; +return x_21; } else { -obj* x_23; obj* x_24; obj* x_25; -x_23 = lean::cnstr_get(x_19, 1); -lean::inc(x_23); -lean::dec(x_19); -x_24 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_24, 0, x_9); -lean::cnstr_set(x_24, 1, x_23); -x_25 = l_Lean_IR_EmitCpp_closeNamespaces(x_5, x_3, x_24); +obj* x_22; obj* x_23; obj* x_24; +x_22 = lean::cnstr_get(x_18, 1); +lean::inc(x_22); +lean::dec(x_18); +x_23 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_23, 0, x_9); +lean::cnstr_set(x_23, 1, x_22); +x_24 = l_Lean_IR_EmitCpp_closeNamespaces(x_5, x_3, x_23); lean::dec(x_5); -return x_25; +return x_24; } } else { -uint8 x_26; +uint8 x_25; lean::dec(x_5); -x_26 = !lean::is_exclusive(x_19); -if (x_26 == 0) +x_25 = !lean::is_exclusive(x_18); +if (x_25 == 0) { -return x_19; +return x_18; } else { -obj* x_27; obj* x_28; obj* x_29; -x_27 = lean::cnstr_get(x_19, 0); -x_28 = lean::cnstr_get(x_19, 1); -lean::inc(x_28); +obj* x_26; obj* x_27; obj* x_28; +x_26 = lean::cnstr_get(x_18, 0); +x_27 = lean::cnstr_get(x_18, 1); lean::inc(x_27); -lean::dec(x_19); -x_29 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_29, 0, x_27); -lean::cnstr_set(x_29, 1, x_28); -return x_29; -} -} -} -default: -{ -obj* x_30; -lean::dec(x_5); -x_30 = l_Lean_IR_EmitCpp_emitExternDeclAux___closed__1; -lean::cnstr_set_tag(x_10, 1); -lean::cnstr_set(x_10, 0, x_30); -return x_10; +lean::inc(x_26); +lean::dec(x_18); +x_28 = lean::alloc_cnstr(1, 2, 0); +lean::cnstr_set(x_28, 0, x_26); +lean::cnstr_set(x_28, 1, x_27); +return x_28; } } } else { -obj* x_31; obj* x_32; -x_31 = l_Lean_IR_EmitCpp_emitExternDeclAux___closed__2; -x_32 = lean::string_append(x_13, x_31); -switch (lean::obj_tag(x_5)) { -case 0: -{ -obj* x_33; -x_33 = l_Lean_IR_EmitCpp_emitExternDeclAux___closed__1; +obj* x_29; +lean::dec(x_5); +x_29 = l_Lean_IR_EmitCpp_emitExternDeclAux___closed__1; lean::cnstr_set_tag(x_10, 1); -lean::cnstr_set(x_10, 1, x_32); -lean::cnstr_set(x_10, 0, x_33); +lean::cnstr_set(x_10, 0, x_29); return x_10; } -case 1: +} +else { -obj* x_34; uint8 x_35; obj* x_36; -x_34 = lean::cnstr_get(x_5, 1); -lean::inc(x_34); -lean::cnstr_set(x_10, 1, x_32); +obj* x_30; obj* x_31; +x_30 = l_Lean_IR_EmitCpp_emitExternDeclAux___closed__2; +x_31 = lean::string_append(x_13, x_30); +if (lean::obj_tag(x_5) == 1) +{ +obj* x_32; uint8 x_33; obj* x_34; +x_32 = lean::cnstr_get(x_5, 1); +lean::inc(x_32); +lean::cnstr_set(x_10, 1, x_31); lean::cnstr_set(x_10, 0, x_9); -x_35 = 0; -x_36 = l_Lean_IR_EmitCpp_emitFnDeclAux(x_1, x_34, x_35, x_3, x_10); +x_33 = 0; +x_34 = l_Lean_IR_EmitCpp_emitFnDeclAux(x_1, x_32, x_33, x_3, x_10); +lean::dec(x_32); +if (lean::obj_tag(x_34) == 0) +{ +uint8 x_35; +x_35 = !lean::is_exclusive(x_34); +if (x_35 == 0) +{ +obj* x_36; obj* x_37; +x_36 = lean::cnstr_get(x_34, 0); +lean::dec(x_36); +lean::cnstr_set(x_34, 0, x_9); +x_37 = l_Lean_IR_EmitCpp_closeNamespaces(x_5, x_3, x_34); +lean::dec(x_5); +return x_37; +} +else +{ +obj* x_38; obj* x_39; obj* x_40; +x_38 = lean::cnstr_get(x_34, 1); +lean::inc(x_38); lean::dec(x_34); -if (lean::obj_tag(x_36) == 0) -{ -uint8 x_37; -x_37 = !lean::is_exclusive(x_36); -if (x_37 == 0) -{ -obj* x_38; obj* x_39; -x_38 = lean::cnstr_get(x_36, 0); -lean::dec(x_38); -lean::cnstr_set(x_36, 0, x_9); -x_39 = l_Lean_IR_EmitCpp_closeNamespaces(x_5, x_3, x_36); +x_39 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_39, 0, x_9); +lean::cnstr_set(x_39, 1, x_38); +x_40 = l_Lean_IR_EmitCpp_closeNamespaces(x_5, x_3, x_39); lean::dec(x_5); -return x_39; -} -else -{ -obj* x_40; obj* x_41; obj* x_42; -x_40 = lean::cnstr_get(x_36, 1); -lean::inc(x_40); -lean::dec(x_36); -x_41 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_41, 0, x_9); -lean::cnstr_set(x_41, 1, x_40); -x_42 = l_Lean_IR_EmitCpp_closeNamespaces(x_5, x_3, x_41); -lean::dec(x_5); -return x_42; +return x_40; } } else { -uint8 x_43; +uint8 x_41; lean::dec(x_5); -x_43 = !lean::is_exclusive(x_36); -if (x_43 == 0) +x_41 = !lean::is_exclusive(x_34); +if (x_41 == 0) { -return x_36; +return x_34; } else { -obj* x_44; obj* x_45; obj* x_46; -x_44 = lean::cnstr_get(x_36, 0); -x_45 = lean::cnstr_get(x_36, 1); -lean::inc(x_45); -lean::inc(x_44); -lean::dec(x_36); -x_46 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_46, 0, x_44); -lean::cnstr_set(x_46, 1, x_45); -return x_46; +obj* x_42; obj* x_43; obj* x_44; +x_42 = lean::cnstr_get(x_34, 0); +x_43 = lean::cnstr_get(x_34, 1); +lean::inc(x_43); +lean::inc(x_42); +lean::dec(x_34); +x_44 = lean::alloc_cnstr(1, 2, 0); +lean::cnstr_set(x_44, 0, x_42); +lean::cnstr_set(x_44, 1, x_43); +return x_44; } } } -default: +else { -obj* x_47; +obj* x_45; lean::dec(x_5); -x_47 = l_Lean_IR_EmitCpp_emitExternDeclAux___closed__1; +x_45 = l_Lean_IR_EmitCpp_emitExternDeclAux___closed__1; lean::cnstr_set_tag(x_10, 1); -lean::cnstr_set(x_10, 1, x_32); -lean::cnstr_set(x_10, 0, x_47); +lean::cnstr_set(x_10, 1, x_31); +lean::cnstr_set(x_10, 0, x_45); return x_10; } } } -} else { -obj* x_48; obj* x_49; obj* x_50; uint8 x_51; -x_48 = lean::cnstr_get(x_10, 0); -x_49 = lean::cnstr_get(x_10, 1); -lean::inc(x_49); -lean::inc(x_48); +obj* x_46; obj* x_47; obj* x_48; uint8 x_49; +x_46 = lean::cnstr_get(x_10, 0); +x_47 = lean::cnstr_get(x_10, 1); +lean::inc(x_47); +lean::inc(x_46); lean::dec(x_10); -x_50 = l_Lean_IR_Decl_name___main(x_1); -x_51 = l_Lean_isExternC(x_48, x_50); -lean::dec(x_48); -if (x_51 == 0) +x_48 = l_Lean_IR_Decl_name___main(x_1); +x_49 = l_Lean_isExternC(x_46, x_48); +lean::dec(x_46); +if (x_49 == 0) { -switch (lean::obj_tag(x_5)) { -case 0: +if (lean::obj_tag(x_5) == 1) { -obj* x_52; obj* x_53; -x_52 = l_Lean_IR_EmitCpp_emitExternDeclAux___closed__1; -x_53 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_53, 0, x_52); -lean::cnstr_set(x_53, 1, x_49); -return x_53; -} -case 1: +obj* x_50; obj* x_51; uint8 x_52; obj* x_53; +x_50 = lean::cnstr_get(x_5, 1); +lean::inc(x_50); +x_51 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_51, 0, x_9); +lean::cnstr_set(x_51, 1, x_47); +x_52 = 1; +x_53 = l_Lean_IR_EmitCpp_emitFnDeclAux(x_1, x_50, x_52, x_3, x_51); +lean::dec(x_50); +if (lean::obj_tag(x_53) == 0) { -obj* x_54; obj* x_55; uint8 x_56; obj* x_57; -x_54 = lean::cnstr_get(x_5, 1); +obj* x_54; obj* x_55; obj* x_56; obj* x_57; +x_54 = lean::cnstr_get(x_53, 1); lean::inc(x_54); -x_55 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_55, 0, x_9); -lean::cnstr_set(x_55, 1, x_49); -x_56 = 1; -x_57 = l_Lean_IR_EmitCpp_emitFnDeclAux(x_1, x_54, x_56, x_3, x_55); -lean::dec(x_54); -if (lean::obj_tag(x_57) == 0) +if (lean::is_exclusive(x_53)) { + lean::cnstr_release(x_53, 0); + lean::cnstr_release(x_53, 1); + x_55 = x_53; +} else { + lean::dec_ref(x_53); + x_55 = lean::box(0); +} +if (lean::is_scalar(x_55)) { + x_56 = lean::alloc_cnstr(0, 2, 0); +} else { + x_56 = x_55; +} +lean::cnstr_set(x_56, 0, x_9); +lean::cnstr_set(x_56, 1, x_54); +x_57 = l_Lean_IR_EmitCpp_closeNamespaces(x_5, x_3, x_56); +lean::dec(x_5); +return x_57; +} +else { obj* x_58; obj* x_59; obj* x_60; obj* x_61; -x_58 = lean::cnstr_get(x_57, 1); -lean::inc(x_58); -if (lean::is_exclusive(x_57)) { - lean::cnstr_release(x_57, 0); - lean::cnstr_release(x_57, 1); - x_59 = x_57; -} else { - lean::dec_ref(x_57); - x_59 = lean::box(0); -} -if (lean::is_scalar(x_59)) { - x_60 = lean::alloc_cnstr(0, 2, 0); -} else { - x_60 = x_59; -} -lean::cnstr_set(x_60, 0, x_9); -lean::cnstr_set(x_60, 1, x_58); -x_61 = l_Lean_IR_EmitCpp_closeNamespaces(x_5, x_3, x_60); lean::dec(x_5); +x_58 = lean::cnstr_get(x_53, 0); +lean::inc(x_58); +x_59 = lean::cnstr_get(x_53, 1); +lean::inc(x_59); +if (lean::is_exclusive(x_53)) { + lean::cnstr_release(x_53, 0); + lean::cnstr_release(x_53, 1); + x_60 = x_53; +} else { + lean::dec_ref(x_53); + x_60 = lean::box(0); +} +if (lean::is_scalar(x_60)) { + x_61 = lean::alloc_cnstr(1, 2, 0); +} else { + x_61 = x_60; +} +lean::cnstr_set(x_61, 0, x_58); +lean::cnstr_set(x_61, 1, x_59); return x_61; } +} else { -obj* x_62; obj* x_63; obj* x_64; obj* x_65; +obj* x_62; obj* x_63; lean::dec(x_5); -x_62 = lean::cnstr_get(x_57, 0); -lean::inc(x_62); -x_63 = lean::cnstr_get(x_57, 1); -lean::inc(x_63); -if (lean::is_exclusive(x_57)) { - lean::cnstr_release(x_57, 0); - lean::cnstr_release(x_57, 1); - x_64 = x_57; -} else { - lean::dec_ref(x_57); - x_64 = lean::box(0); -} -if (lean::is_scalar(x_64)) { - x_65 = lean::alloc_cnstr(1, 2, 0); -} else { - x_65 = x_64; -} -lean::cnstr_set(x_65, 0, x_62); -lean::cnstr_set(x_65, 1, x_63); -return x_65; -} -} -default: -{ -obj* x_66; obj* x_67; -lean::dec(x_5); -x_66 = l_Lean_IR_EmitCpp_emitExternDeclAux___closed__1; -x_67 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_67, 0, x_66); -lean::cnstr_set(x_67, 1, x_49); -return x_67; -} +x_62 = l_Lean_IR_EmitCpp_emitExternDeclAux___closed__1; +x_63 = lean::alloc_cnstr(1, 2, 0); +lean::cnstr_set(x_63, 0, x_62); +lean::cnstr_set(x_63, 1, x_47); +return x_63; } } else { -obj* x_68; obj* x_69; -x_68 = l_Lean_IR_EmitCpp_emitExternDeclAux___closed__2; -x_69 = lean::string_append(x_49, x_68); -switch (lean::obj_tag(x_5)) { -case 0: +obj* x_64; obj* x_65; +x_64 = l_Lean_IR_EmitCpp_emitExternDeclAux___closed__2; +x_65 = lean::string_append(x_47, x_64); +if (lean::obj_tag(x_5) == 1) { -obj* x_70; obj* x_71; -x_70 = l_Lean_IR_EmitCpp_emitExternDeclAux___closed__1; -x_71 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_71, 0, x_70); -lean::cnstr_set(x_71, 1, x_69); -return x_71; -} -case 1: +obj* x_66; obj* x_67; uint8 x_68; obj* x_69; +x_66 = lean::cnstr_get(x_5, 1); +lean::inc(x_66); +x_67 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_67, 0, x_9); +lean::cnstr_set(x_67, 1, x_65); +x_68 = 0; +x_69 = l_Lean_IR_EmitCpp_emitFnDeclAux(x_1, x_66, x_68, x_3, x_67); +lean::dec(x_66); +if (lean::obj_tag(x_69) == 0) { -obj* x_72; obj* x_73; uint8 x_74; obj* x_75; -x_72 = lean::cnstr_get(x_5, 1); -lean::inc(x_72); -x_73 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_73, 0, x_9); -lean::cnstr_set(x_73, 1, x_69); -x_74 = 0; -x_75 = l_Lean_IR_EmitCpp_emitFnDeclAux(x_1, x_72, x_74, x_3, x_73); -lean::dec(x_72); -if (lean::obj_tag(x_75) == 0) -{ -obj* x_76; obj* x_77; obj* x_78; obj* x_79; -x_76 = lean::cnstr_get(x_75, 1); -lean::inc(x_76); -if (lean::is_exclusive(x_75)) { - lean::cnstr_release(x_75, 0); - lean::cnstr_release(x_75, 1); - x_77 = x_75; +obj* x_70; obj* x_71; obj* x_72; obj* x_73; +x_70 = lean::cnstr_get(x_69, 1); +lean::inc(x_70); +if (lean::is_exclusive(x_69)) { + lean::cnstr_release(x_69, 0); + lean::cnstr_release(x_69, 1); + x_71 = x_69; } else { - lean::dec_ref(x_75); - x_77 = lean::box(0); + lean::dec_ref(x_69); + x_71 = lean::box(0); } -if (lean::is_scalar(x_77)) { - x_78 = lean::alloc_cnstr(0, 2, 0); +if (lean::is_scalar(x_71)) { + x_72 = lean::alloc_cnstr(0, 2, 0); } else { - x_78 = x_77; + x_72 = x_71; } -lean::cnstr_set(x_78, 0, x_9); -lean::cnstr_set(x_78, 1, x_76); -x_79 = l_Lean_IR_EmitCpp_closeNamespaces(x_5, x_3, x_78); +lean::cnstr_set(x_72, 0, x_9); +lean::cnstr_set(x_72, 1, x_70); +x_73 = l_Lean_IR_EmitCpp_closeNamespaces(x_5, x_3, x_72); lean::dec(x_5); +return x_73; +} +else +{ +obj* x_74; obj* x_75; obj* x_76; obj* x_77; +lean::dec(x_5); +x_74 = lean::cnstr_get(x_69, 0); +lean::inc(x_74); +x_75 = lean::cnstr_get(x_69, 1); +lean::inc(x_75); +if (lean::is_exclusive(x_69)) { + lean::cnstr_release(x_69, 0); + lean::cnstr_release(x_69, 1); + x_76 = x_69; +} else { + lean::dec_ref(x_69); + x_76 = lean::box(0); +} +if (lean::is_scalar(x_76)) { + x_77 = lean::alloc_cnstr(1, 2, 0); +} else { + x_77 = x_76; +} +lean::cnstr_set(x_77, 0, x_74); +lean::cnstr_set(x_77, 1, x_75); +return x_77; +} +} +else +{ +obj* x_78; obj* x_79; +lean::dec(x_5); +x_78 = l_Lean_IR_EmitCpp_emitExternDeclAux___closed__1; +x_79 = lean::alloc_cnstr(1, 2, 0); +lean::cnstr_set(x_79, 0, x_78); +lean::cnstr_set(x_79, 1, x_65); return x_79; } +} +} +} else { -obj* x_80; obj* x_81; obj* x_82; obj* x_83; +uint8 x_80; lean::dec(x_5); -x_80 = lean::cnstr_get(x_75, 0); -lean::inc(x_80); -x_81 = lean::cnstr_get(x_75, 1); +x_80 = !lean::is_exclusive(x_10); +if (x_80 == 0) +{ +return x_10; +} +else +{ +obj* x_81; obj* x_82; obj* x_83; +x_81 = lean::cnstr_get(x_10, 0); +x_82 = lean::cnstr_get(x_10, 1); +lean::inc(x_82); lean::inc(x_81); -if (lean::is_exclusive(x_75)) { - lean::cnstr_release(x_75, 0); - lean::cnstr_release(x_75, 1); - x_82 = x_75; -} else { - lean::dec_ref(x_75); - x_82 = lean::box(0); -} -if (lean::is_scalar(x_82)) { - x_83 = lean::alloc_cnstr(1, 2, 0); -} else { - x_83 = x_82; -} -lean::cnstr_set(x_83, 0, x_80); -lean::cnstr_set(x_83, 1, x_81); +lean::dec(x_10); +x_83 = lean::alloc_cnstr(1, 2, 0); +lean::cnstr_set(x_83, 0, x_81); +lean::cnstr_set(x_83, 1, x_82); return x_83; } } -default: -{ -obj* x_84; obj* x_85; -lean::dec(x_5); -x_84 = l_Lean_IR_EmitCpp_emitExternDeclAux___closed__1; -x_85 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_85, 0, x_84); -lean::cnstr_set(x_85, 1, x_69); -return x_85; -} -} -} -} } else { -uint8 x_86; -lean::dec(x_5); -x_86 = !lean::is_exclusive(x_10); -if (x_86 == 0) -{ -return x_10; -} -else -{ -obj* x_87; obj* x_88; obj* x_89; -x_87 = lean::cnstr_get(x_10, 0); -x_88 = lean::cnstr_get(x_10, 1); -lean::inc(x_88); -lean::inc(x_87); -lean::dec(x_10); -x_89 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_89, 0, x_87); -lean::cnstr_set(x_89, 1, x_88); -return x_89; -} -} -} -else -{ -obj* x_90; obj* x_91; obj* x_92; obj* x_93; -x_90 = lean::cnstr_get(x_6, 1); -lean::inc(x_90); +obj* x_84; obj* x_85; obj* x_86; obj* x_87; +x_84 = lean::cnstr_get(x_6, 1); +lean::inc(x_84); lean::dec(x_6); -x_91 = lean::box(0); -x_92 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_92, 0, x_91); -lean::cnstr_set(x_92, 1, x_90); -x_93 = l_Lean_IR_EmitCpp_getEnv(x_3, x_92); -if (lean::obj_tag(x_93) == 0) +x_85 = lean::box(0); +x_86 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_86, 0, x_85); +lean::cnstr_set(x_86, 1, x_84); +x_87 = l_Lean_IR_EmitCpp_getEnv(x_3, x_86); +if (lean::obj_tag(x_87) == 0) { -obj* x_94; obj* x_95; obj* x_96; obj* x_97; uint8 x_98; -x_94 = lean::cnstr_get(x_93, 0); -lean::inc(x_94); -x_95 = lean::cnstr_get(x_93, 1); -lean::inc(x_95); -if (lean::is_exclusive(x_93)) { - lean::cnstr_release(x_93, 0); - lean::cnstr_release(x_93, 1); - x_96 = x_93; +obj* x_88; obj* x_89; obj* x_90; obj* x_91; uint8 x_92; +x_88 = lean::cnstr_get(x_87, 0); +lean::inc(x_88); +x_89 = lean::cnstr_get(x_87, 1); +lean::inc(x_89); +if (lean::is_exclusive(x_87)) { + lean::cnstr_release(x_87, 0); + lean::cnstr_release(x_87, 1); + x_90 = x_87; } else { - lean::dec_ref(x_93); - x_96 = lean::box(0); + lean::dec_ref(x_87); + x_90 = lean::box(0); } -x_97 = l_Lean_IR_Decl_name___main(x_1); -x_98 = l_Lean_isExternC(x_94, x_97); -lean::dec(x_94); -if (x_98 == 0) +x_91 = l_Lean_IR_Decl_name___main(x_1); +x_92 = l_Lean_isExternC(x_88, x_91); +lean::dec(x_88); +if (x_92 == 0) { -switch (lean::obj_tag(x_5)) { -case 0: +if (lean::obj_tag(x_5) == 1) { -obj* x_99; obj* x_100; -x_99 = l_Lean_IR_EmitCpp_emitExternDeclAux___closed__1; -if (lean::is_scalar(x_96)) { - x_100 = lean::alloc_cnstr(1, 2, 0); +obj* x_93; obj* x_94; uint8 x_95; obj* x_96; +x_93 = lean::cnstr_get(x_5, 1); +lean::inc(x_93); +if (lean::is_scalar(x_90)) { + x_94 = lean::alloc_cnstr(0, 2, 0); } else { - x_100 = x_96; - lean::cnstr_set_tag(x_100, 1); + x_94 = x_90; } -lean::cnstr_set(x_100, 0, x_99); -lean::cnstr_set(x_100, 1, x_95); +lean::cnstr_set(x_94, 0, x_85); +lean::cnstr_set(x_94, 1, x_89); +x_95 = 1; +x_96 = l_Lean_IR_EmitCpp_emitFnDeclAux(x_1, x_93, x_95, x_3, x_94); +lean::dec(x_93); +if (lean::obj_tag(x_96) == 0) +{ +obj* x_97; obj* x_98; obj* x_99; obj* x_100; +x_97 = lean::cnstr_get(x_96, 1); +lean::inc(x_97); +if (lean::is_exclusive(x_96)) { + lean::cnstr_release(x_96, 0); + lean::cnstr_release(x_96, 1); + x_98 = x_96; +} else { + lean::dec_ref(x_96); + x_98 = lean::box(0); +} +if (lean::is_scalar(x_98)) { + x_99 = lean::alloc_cnstr(0, 2, 0); +} else { + x_99 = x_98; +} +lean::cnstr_set(x_99, 0, x_85); +lean::cnstr_set(x_99, 1, x_97); +x_100 = l_Lean_IR_EmitCpp_closeNamespaces(x_5, x_3, x_99); +lean::dec(x_5); return x_100; } -case 1: +else { -obj* x_101; obj* x_102; uint8 x_103; obj* x_104; -x_101 = lean::cnstr_get(x_5, 1); +obj* x_101; obj* x_102; obj* x_103; obj* x_104; +lean::dec(x_5); +x_101 = lean::cnstr_get(x_96, 0); lean::inc(x_101); -if (lean::is_scalar(x_96)) { - x_102 = lean::alloc_cnstr(0, 2, 0); +x_102 = lean::cnstr_get(x_96, 1); +lean::inc(x_102); +if (lean::is_exclusive(x_96)) { + lean::cnstr_release(x_96, 0); + lean::cnstr_release(x_96, 1); + x_103 = x_96; } else { - x_102 = x_96; + lean::dec_ref(x_96); + x_103 = lean::box(0); } -lean::cnstr_set(x_102, 0, x_91); -lean::cnstr_set(x_102, 1, x_95); -x_103 = 1; -x_104 = l_Lean_IR_EmitCpp_emitFnDeclAux(x_1, x_101, x_103, x_3, x_102); -lean::dec(x_101); -if (lean::obj_tag(x_104) == 0) -{ -obj* x_105; obj* x_106; obj* x_107; obj* x_108; -x_105 = lean::cnstr_get(x_104, 1); -lean::inc(x_105); -if (lean::is_exclusive(x_104)) { - lean::cnstr_release(x_104, 0); - lean::cnstr_release(x_104, 1); - x_106 = x_104; +if (lean::is_scalar(x_103)) { + x_104 = lean::alloc_cnstr(1, 2, 0); } else { - lean::dec_ref(x_104); - x_106 = lean::box(0); + x_104 = x_103; } -if (lean::is_scalar(x_106)) { - x_107 = lean::alloc_cnstr(0, 2, 0); -} else { - x_107 = x_106; +lean::cnstr_set(x_104, 0, x_101); +lean::cnstr_set(x_104, 1, x_102); +return x_104; } -lean::cnstr_set(x_107, 0, x_91); -lean::cnstr_set(x_107, 1, x_105); -x_108 = l_Lean_IR_EmitCpp_closeNamespaces(x_5, x_3, x_107); -lean::dec(x_5); -return x_108; } else { -obj* x_109; obj* x_110; obj* x_111; obj* x_112; +obj* x_105; obj* x_106; lean::dec(x_5); -x_109 = lean::cnstr_get(x_104, 0); +x_105 = l_Lean_IR_EmitCpp_emitExternDeclAux___closed__1; +if (lean::is_scalar(x_90)) { + x_106 = lean::alloc_cnstr(1, 2, 0); +} else { + x_106 = x_90; + lean::cnstr_set_tag(x_106, 1); +} +lean::cnstr_set(x_106, 0, x_105); +lean::cnstr_set(x_106, 1, x_89); +return x_106; +} +} +else +{ +obj* x_107; obj* x_108; +x_107 = l_Lean_IR_EmitCpp_emitExternDeclAux___closed__2; +x_108 = lean::string_append(x_89, x_107); +if (lean::obj_tag(x_5) == 1) +{ +obj* x_109; obj* x_110; uint8 x_111; obj* x_112; +x_109 = lean::cnstr_get(x_5, 1); lean::inc(x_109); -x_110 = lean::cnstr_get(x_104, 1); -lean::inc(x_110); -if (lean::is_exclusive(x_104)) { - lean::cnstr_release(x_104, 0); - lean::cnstr_release(x_104, 1); - x_111 = x_104; +if (lean::is_scalar(x_90)) { + x_110 = lean::alloc_cnstr(0, 2, 0); } else { - lean::dec_ref(x_104); - x_111 = lean::box(0); + x_110 = x_90; } -if (lean::is_scalar(x_111)) { - x_112 = lean::alloc_cnstr(1, 2, 0); -} else { - x_112 = x_111; -} -lean::cnstr_set(x_112, 0, x_109); -lean::cnstr_set(x_112, 1, x_110); -return x_112; -} -} -default: +lean::cnstr_set(x_110, 0, x_85); +lean::cnstr_set(x_110, 1, x_108); +x_111 = 0; +x_112 = l_Lean_IR_EmitCpp_emitFnDeclAux(x_1, x_109, x_111, x_3, x_110); +lean::dec(x_109); +if (lean::obj_tag(x_112) == 0) { -obj* x_113; obj* x_114; -lean::dec(x_5); -x_113 = l_Lean_IR_EmitCpp_emitExternDeclAux___closed__1; -if (lean::is_scalar(x_96)) { - x_114 = lean::alloc_cnstr(1, 2, 0); +obj* x_113; obj* x_114; obj* x_115; obj* x_116; +x_113 = lean::cnstr_get(x_112, 1); +lean::inc(x_113); +if (lean::is_exclusive(x_112)) { + lean::cnstr_release(x_112, 0); + lean::cnstr_release(x_112, 1); + x_114 = x_112; } else { - x_114 = x_96; - lean::cnstr_set_tag(x_114, 1); + lean::dec_ref(x_112); + x_114 = lean::box(0); } -lean::cnstr_set(x_114, 0, x_113); -lean::cnstr_set(x_114, 1, x_95); -return x_114; +if (lean::is_scalar(x_114)) { + x_115 = lean::alloc_cnstr(0, 2, 0); +} else { + x_115 = x_114; } +lean::cnstr_set(x_115, 0, x_85); +lean::cnstr_set(x_115, 1, x_113); +x_116 = l_Lean_IR_EmitCpp_closeNamespaces(x_5, x_3, x_115); +lean::dec(x_5); +return x_116; +} +else +{ +obj* x_117; obj* x_118; obj* x_119; obj* x_120; +lean::dec(x_5); +x_117 = lean::cnstr_get(x_112, 0); +lean::inc(x_117); +x_118 = lean::cnstr_get(x_112, 1); +lean::inc(x_118); +if (lean::is_exclusive(x_112)) { + lean::cnstr_release(x_112, 0); + lean::cnstr_release(x_112, 1); + x_119 = x_112; +} else { + lean::dec_ref(x_112); + x_119 = lean::box(0); +} +if (lean::is_scalar(x_119)) { + x_120 = lean::alloc_cnstr(1, 2, 0); +} else { + x_120 = x_119; +} +lean::cnstr_set(x_120, 0, x_117); +lean::cnstr_set(x_120, 1, x_118); +return x_120; } } else { -obj* x_115; obj* x_116; -x_115 = l_Lean_IR_EmitCpp_emitExternDeclAux___closed__2; -x_116 = lean::string_append(x_95, x_115); -switch (lean::obj_tag(x_5)) { -case 0: -{ -obj* x_117; obj* x_118; -x_117 = l_Lean_IR_EmitCpp_emitExternDeclAux___closed__1; -if (lean::is_scalar(x_96)) { - x_118 = lean::alloc_cnstr(1, 2, 0); +obj* x_121; obj* x_122; +lean::dec(x_5); +x_121 = l_Lean_IR_EmitCpp_emitExternDeclAux___closed__1; +if (lean::is_scalar(x_90)) { + x_122 = lean::alloc_cnstr(1, 2, 0); } else { - x_118 = x_96; - lean::cnstr_set_tag(x_118, 1); + x_122 = x_90; + lean::cnstr_set_tag(x_122, 1); } -lean::cnstr_set(x_118, 0, x_117); -lean::cnstr_set(x_118, 1, x_116); -return x_118; +lean::cnstr_set(x_122, 0, x_121); +lean::cnstr_set(x_122, 1, x_108); +return x_122; } -case 1: -{ -obj* x_119; obj* x_120; uint8 x_121; obj* x_122; -x_119 = lean::cnstr_get(x_5, 1); -lean::inc(x_119); -if (lean::is_scalar(x_96)) { - x_120 = lean::alloc_cnstr(0, 2, 0); -} else { - x_120 = x_96; } -lean::cnstr_set(x_120, 0, x_91); -lean::cnstr_set(x_120, 1, x_116); -x_121 = 0; -x_122 = l_Lean_IR_EmitCpp_emitFnDeclAux(x_1, x_119, x_121, x_3, x_120); -lean::dec(x_119); -if (lean::obj_tag(x_122) == 0) +} +else { obj* x_123; obj* x_124; obj* x_125; obj* x_126; -x_123 = lean::cnstr_get(x_122, 1); -lean::inc(x_123); -if (lean::is_exclusive(x_122)) { - lean::cnstr_release(x_122, 0); - lean::cnstr_release(x_122, 1); - x_124 = x_122; -} else { - lean::dec_ref(x_122); - x_124 = lean::box(0); -} -if (lean::is_scalar(x_124)) { - x_125 = lean::alloc_cnstr(0, 2, 0); -} else { - x_125 = x_124; -} -lean::cnstr_set(x_125, 0, x_91); -lean::cnstr_set(x_125, 1, x_123); -x_126 = l_Lean_IR_EmitCpp_closeNamespaces(x_5, x_3, x_125); lean::dec(x_5); +x_123 = lean::cnstr_get(x_87, 0); +lean::inc(x_123); +x_124 = lean::cnstr_get(x_87, 1); +lean::inc(x_124); +if (lean::is_exclusive(x_87)) { + lean::cnstr_release(x_87, 0); + lean::cnstr_release(x_87, 1); + x_125 = x_87; +} else { + lean::dec_ref(x_87); + x_125 = lean::box(0); +} +if (lean::is_scalar(x_125)) { + x_126 = lean::alloc_cnstr(1, 2, 0); +} else { + x_126 = x_125; +} +lean::cnstr_set(x_126, 0, x_123); +lean::cnstr_set(x_126, 1, x_124); return x_126; } -else -{ -obj* x_127; obj* x_128; obj* x_129; obj* x_130; -lean::dec(x_5); -x_127 = lean::cnstr_get(x_122, 0); -lean::inc(x_127); -x_128 = lean::cnstr_get(x_122, 1); -lean::inc(x_128); -if (lean::is_exclusive(x_122)) { - lean::cnstr_release(x_122, 0); - lean::cnstr_release(x_122, 1); - x_129 = x_122; -} else { - lean::dec_ref(x_122); - x_129 = lean::box(0); -} -if (lean::is_scalar(x_129)) { - x_130 = lean::alloc_cnstr(1, 2, 0); -} else { - x_130 = x_129; -} -lean::cnstr_set(x_130, 0, x_127); -lean::cnstr_set(x_130, 1, x_128); -return x_130; -} -} -default: -{ -obj* x_131; obj* x_132; -lean::dec(x_5); -x_131 = l_Lean_IR_EmitCpp_emitExternDeclAux___closed__1; -if (lean::is_scalar(x_96)) { - x_132 = lean::alloc_cnstr(1, 2, 0); -} else { - x_132 = x_96; - lean::cnstr_set_tag(x_132, 1); -} -lean::cnstr_set(x_132, 0, x_131); -lean::cnstr_set(x_132, 1, x_116); -return x_132; -} -} } } else { -obj* x_133; obj* x_134; obj* x_135; obj* x_136; +uint8 x_127; lean::dec(x_5); -x_133 = lean::cnstr_get(x_93, 0); -lean::inc(x_133); -x_134 = lean::cnstr_get(x_93, 1); -lean::inc(x_134); -if (lean::is_exclusive(x_93)) { - lean::cnstr_release(x_93, 0); - lean::cnstr_release(x_93, 1); - x_135 = x_93; -} else { - lean::dec_ref(x_93); - x_135 = lean::box(0); -} -if (lean::is_scalar(x_135)) { - x_136 = lean::alloc_cnstr(1, 2, 0); -} else { - x_136 = x_135; -} -lean::cnstr_set(x_136, 0, x_133); -lean::cnstr_set(x_136, 1, x_134); -return x_136; -} -} -} -else -{ -uint8 x_137; -lean::dec(x_5); -x_137 = !lean::is_exclusive(x_6); -if (x_137 == 0) +x_127 = !lean::is_exclusive(x_6); +if (x_127 == 0) { return x_6; } else { -obj* x_138; obj* x_139; obj* x_140; -x_138 = lean::cnstr_get(x_6, 0); -x_139 = lean::cnstr_get(x_6, 1); -lean::inc(x_139); -lean::inc(x_138); +obj* x_128; obj* x_129; obj* x_130; +x_128 = lean::cnstr_get(x_6, 0); +x_129 = lean::cnstr_get(x_6, 1); +lean::inc(x_129); +lean::inc(x_128); lean::dec(x_6); -x_140 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_140, 0, x_138); -lean::cnstr_set(x_140, 1, x_139); -return x_140; +x_130 = lean::alloc_cnstr(1, 2, 0); +lean::cnstr_set(x_130, 0, x_128); +lean::cnstr_set(x_130, 1, x_129); +return x_130; } } } @@ -24505,97 +24394,89 @@ return x_1; obj* l_Lean_IR_EmitCpp_quoteNameAux___main(obj* x_1) { _start: { -switch (lean::obj_tag(x_1)) { -case 0: +if (lean::obj_tag(x_1) == 1) { -obj* x_2; -x_2 = lean::box(0); -return x_2; -} -case 1: -{ -obj* x_3; obj* x_4; obj* x_5; uint8 x_6; -x_3 = lean::cnstr_get(x_1, 0); +obj* x_2; obj* x_3; obj* x_4; uint8 x_5; +x_2 = lean::cnstr_get(x_1, 0); +lean::inc(x_2); +x_3 = lean::cnstr_get(x_1, 1); lean::inc(x_3); -x_4 = lean::cnstr_get(x_1, 1); -lean::inc(x_4); lean::dec(x_1); -x_5 = lean::box(0); -x_6 = lean_name_dec_eq(x_3, x_5); -if (x_6 == 0) +x_4 = lean::box(0); +x_5 = lean_name_dec_eq(x_2, x_4); +if (x_5 == 0) { -obj* x_7; -x_7 = l_Lean_IR_EmitCpp_quoteNameAux___main(x_3); -if (lean::obj_tag(x_7) == 0) +obj* x_6; +x_6 = l_Lean_IR_EmitCpp_quoteNameAux___main(x_2); +if (lean::obj_tag(x_6) == 0) { -lean::dec(x_4); -return x_7; -} -else -{ -uint8 x_8; -x_8 = !lean::is_exclusive(x_7); -if (x_8 == 0) -{ -obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; -x_9 = lean::cnstr_get(x_7, 0); -x_10 = l_Lean_IR_EmitCpp_quoteNameAux___main___closed__1; -x_11 = lean::string_append(x_10, x_9); -lean::dec(x_9); -x_12 = l_List_reprAux___main___rarg___closed__1; -x_13 = lean::string_append(x_11, x_12); -x_14 = l_String_quote(x_4); -x_15 = lean::string_append(x_13, x_14); -lean::dec(x_14); -x_16 = l_Option_HasRepr___rarg___closed__3; -x_17 = lean::string_append(x_15, x_16); -lean::cnstr_set(x_7, 0, x_17); -return x_7; -} -else -{ -obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; -x_18 = lean::cnstr_get(x_7, 0); -lean::inc(x_18); -lean::dec(x_7); -x_19 = l_Lean_IR_EmitCpp_quoteNameAux___main___closed__1; -x_20 = lean::string_append(x_19, x_18); -lean::dec(x_18); -x_21 = l_List_reprAux___main___rarg___closed__1; -x_22 = lean::string_append(x_20, x_21); -x_23 = l_String_quote(x_4); -x_24 = lean::string_append(x_22, x_23); -lean::dec(x_23); -x_25 = l_Option_HasRepr___rarg___closed__3; -x_26 = lean::string_append(x_24, x_25); -x_27 = lean::alloc_cnstr(1, 1, 0); -lean::cnstr_set(x_27, 0, x_26); -return x_27; -} -} -} -else -{ -obj* x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; obj* x_33; lean::dec(x_3); -x_28 = l_String_quote(x_4); -x_29 = l_Lean_IR_EmitCpp_quoteNameAux___main___closed__1; -x_30 = lean::string_append(x_29, x_28); -lean::dec(x_28); -x_31 = l_Option_HasRepr___rarg___closed__3; -x_32 = lean::string_append(x_30, x_31); -x_33 = lean::alloc_cnstr(1, 1, 0); -lean::cnstr_set(x_33, 0, x_32); -return x_33; +return x_6; } -} -default: +else { -obj* x_34; -lean::dec(x_1); -x_34 = lean::box(0); -return x_34; +uint8 x_7; +x_7 = !lean::is_exclusive(x_6); +if (x_7 == 0) +{ +obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; +x_8 = lean::cnstr_get(x_6, 0); +x_9 = l_Lean_IR_EmitCpp_quoteNameAux___main___closed__1; +x_10 = lean::string_append(x_9, x_8); +lean::dec(x_8); +x_11 = l_List_reprAux___main___rarg___closed__1; +x_12 = lean::string_append(x_10, x_11); +x_13 = l_String_quote(x_3); +x_14 = lean::string_append(x_12, x_13); +lean::dec(x_13); +x_15 = l_Option_HasRepr___rarg___closed__3; +x_16 = lean::string_append(x_14, x_15); +lean::cnstr_set(x_6, 0, x_16); +return x_6; } +else +{ +obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; +x_17 = lean::cnstr_get(x_6, 0); +lean::inc(x_17); +lean::dec(x_6); +x_18 = l_Lean_IR_EmitCpp_quoteNameAux___main___closed__1; +x_19 = lean::string_append(x_18, x_17); +lean::dec(x_17); +x_20 = l_List_reprAux___main___rarg___closed__1; +x_21 = lean::string_append(x_19, x_20); +x_22 = l_String_quote(x_3); +x_23 = lean::string_append(x_21, x_22); +lean::dec(x_22); +x_24 = l_Option_HasRepr___rarg___closed__3; +x_25 = lean::string_append(x_23, x_24); +x_26 = lean::alloc_cnstr(1, 1, 0); +lean::cnstr_set(x_26, 0, x_25); +return x_26; +} +} +} +else +{ +obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; +lean::dec(x_2); +x_27 = l_String_quote(x_3); +x_28 = l_Lean_IR_EmitCpp_quoteNameAux___main___closed__1; +x_29 = lean::string_append(x_28, x_27); +lean::dec(x_27); +x_30 = l_Option_HasRepr___rarg___closed__3; +x_31 = lean::string_append(x_29, x_30); +x_32 = lean::alloc_cnstr(1, 1, 0); +lean::cnstr_set(x_32, 0, x_31); +return x_32; +} +} +else +{ +obj* x_33; +lean::dec(x_1); +x_33 = lean::box(0); +return x_33; } } } diff --git a/src/stage0/init/lean/expr.cpp b/src/stage0/init/lean/expr.cpp index cbfb5a0593..d9268cb886 100644 --- a/src/stage0/init/lean/expr.cpp +++ b/src/stage0/init/lean/expr.cpp @@ -15,26 +15,32 @@ typedef lean::uint32 uint32; typedef lean::uint64 uint64; #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #endif extern "C" obj* lean_expr_mk_mdata(obj*, obj*); -obj* l_Lean_getAppFn___main(obj*); obj* l_Lean_Expr_lam___boxed(obj*, obj*, obj*, obj*); extern "C" uint8 lean_expr_quick_lt(obj*, obj*); obj* l_Lean_Expr_hash___boxed(obj*); +extern "C" uint8 lean_name_dec_eq(obj*, obj*); +obj* l_Lean_Expr_getAppFn(obj*); obj* l_Lean_mkBinApp(obj*, obj*, obj*); obj* l_Lean_MData_empty; extern "C" obj* lean_expr_mk_sort(obj*); obj* l_Lean_Expr_pi___boxed(obj*, obj*, obj*, obj*); -obj* l_Lean_getAppFn(obj*); +namespace lean { +obj* nat_sub(obj*, obj*); +} +obj* l_Lean_Expr_isAppOfArity___main___boxed(obj*, obj*, obj*); obj* l_Lean_exprIsInhabited; extern "C" usize lean_expr_hash(obj*); -obj* l_Lean_getAppFn___main___boxed(obj*); extern "C" obj* lean_expr_dbg_to_string(obj*); obj* l_Lean_mkApp(obj*, obj*); obj* l_Lean_Expr_eqv___boxed(obj*, obj*); extern "C" obj* lean_expr_mk_pi(obj*, uint8, obj*, obj*); extern "C" obj* lean_expr_mk_app(obj*, obj*); obj* l_Lean_Expr_quickLt___boxed(obj*, obj*); +obj* l_Lean_Expr_isAppOf___boxed(obj*, obj*); extern "C" obj* lean_expr_mk_let(obj*, obj*, obj*, obj*); +obj* l_Lean_Expr_getAppFn___main(obj*); obj* l_Lean_mkDecIsFalse___closed__1; +obj* l_Lean_Expr_isAppOfArity___boxed(obj*, obj*, obj*); obj* l_Lean_mkConst(obj*, obj*); obj* l_Lean_Expr_sort___boxed(obj*); extern "C" obj* lean_expr_mk_fvar(obj*); @@ -51,14 +57,19 @@ obj* l_Lean_mkBinCApp(obj*, obj*, obj*); obj* l_Lean_mkDecIsFalse(obj*, obj*); extern "C" obj* lean_name_mk_string(obj*, obj*); obj* l_Lean_Expr_lit___boxed(obj*); +namespace lean { +uint8 nat_dec_eq(obj*, obj*); +} obj* l_Lean_Expr_app___boxed(obj*, obj*); +obj* l_Lean_Expr_getAppFn___main___boxed(obj*); obj* l_Lean_mkCApp(obj*, obj*); +uint8 l_Lean_Expr_isAppOfArity___main(obj*, obj*, obj*); extern "C" obj* lean_expr_mk_mvar(obj*, obj*); -obj* l_Lean_getAppFn___boxed(obj*); extern "C" obj* lean_expr_mk_bvar(obj*); obj* l_Lean_Expr_proj___boxed(obj*, obj*, obj*); extern "C" uint8 lean_expr_lt(obj*, obj*); obj* l_Lean_mkDecIsTrue(obj*, obj*); +uint8 l_Lean_Expr_isAppOf(obj*, obj*); obj* l_Lean_Expr_const___boxed(obj*, obj*); obj* l_Lean_Expr_fvar___boxed(obj*); extern "C" obj* lean_expr_mk_lambda(obj*, uint8, obj*, obj*); @@ -66,6 +77,8 @@ obj* l_Lean_Expr_mdata___boxed(obj*, obj*); obj* l_Lean_Expr_HasBeq; obj* l_Lean_Expr_Hashable; obj* l_Lean_Expr_mvar___boxed(obj*, obj*); +obj* l_Lean_Expr_getAppFn___boxed(obj*); +uint8 l_Lean_Expr_isAppOfArity(obj*, obj*, obj*); extern "C" obj* lean_expr_mk_lit(obj*); obj* l_Lean_Expr_lt___boxed(obj*, obj*); obj* _init_l_Lean_MData_empty() { @@ -292,15 +305,7 @@ x_1 = lean::alloc_closure(reinterpret_cast(l_Lean_Expr_eqv___boxed), 2, 0 return x_1; } } -obj* l_Lean_mkConst(obj* x_1, obj* x_2) { -_start: -{ -obj* x_3; -x_3 = lean_expr_mk_const(x_1, x_2); -return x_3; -} -} -obj* l_Lean_getAppFn___main(obj* x_1) { +obj* l_Lean_Expr_getAppFn___main(obj* x_1) { _start: { if (lean::obj_tag(x_1) == 5) @@ -317,32 +322,163 @@ return x_1; } } } -obj* l_Lean_getAppFn___main___boxed(obj* x_1) { +obj* l_Lean_Expr_getAppFn___main___boxed(obj* x_1) { _start: { obj* x_2; -x_2 = l_Lean_getAppFn___main(x_1); +x_2 = l_Lean_Expr_getAppFn___main(x_1); lean::dec(x_1); return x_2; } } -obj* l_Lean_getAppFn(obj* x_1) { +obj* l_Lean_Expr_getAppFn(obj* x_1) { _start: { obj* x_2; -x_2 = l_Lean_getAppFn___main(x_1); +x_2 = l_Lean_Expr_getAppFn___main(x_1); return x_2; } } -obj* l_Lean_getAppFn___boxed(obj* x_1) { +obj* l_Lean_Expr_getAppFn___boxed(obj* x_1) { _start: { obj* x_2; -x_2 = l_Lean_getAppFn(x_1); +x_2 = l_Lean_Expr_getAppFn(x_1); lean::dec(x_1); return x_2; } } +uint8 l_Lean_Expr_isAppOf(obj* x_1, obj* x_2) { +_start: +{ +obj* x_3; +x_3 = l_Lean_Expr_getAppFn___main(x_1); +if (lean::obj_tag(x_3) == 4) +{ +obj* x_4; uint8 x_5; +x_4 = lean::cnstr_get(x_3, 0); +lean::inc(x_4); +lean::dec(x_3); +x_5 = lean_name_dec_eq(x_4, x_2); +lean::dec(x_4); +return x_5; +} +else +{ +uint8 x_6; +lean::dec(x_3); +x_6 = 0; +return x_6; +} +} +} +obj* l_Lean_Expr_isAppOf___boxed(obj* x_1, obj* x_2) { +_start: +{ +uint8 x_3; obj* x_4; +x_3 = l_Lean_Expr_isAppOf(x_1, x_2); +lean::dec(x_2); +lean::dec(x_1); +x_4 = lean::box(x_3); +return x_4; +} +} +uint8 l_Lean_Expr_isAppOfArity___main(obj* x_1, obj* x_2, obj* x_3) { +_start: +{ +switch (lean::obj_tag(x_1)) { +case 4: +{ +obj* x_4; obj* x_5; uint8 x_6; +x_4 = lean::cnstr_get(x_1, 0); +x_5 = lean::mk_nat_obj(0u); +x_6 = lean::nat_dec_eq(x_3, x_5); +lean::dec(x_3); +if (x_6 == 0) +{ +uint8 x_7; +x_7 = 0; +return x_7; +} +else +{ +uint8 x_8; +x_8 = lean_name_dec_eq(x_4, x_2); +return x_8; +} +} +case 5: +{ +obj* x_9; obj* x_10; uint8 x_11; +x_9 = lean::cnstr_get(x_1, 0); +x_10 = lean::mk_nat_obj(0u); +x_11 = lean::nat_dec_eq(x_3, x_10); +if (x_11 == 0) +{ +obj* x_12; obj* x_13; +x_12 = lean::mk_nat_obj(1u); +x_13 = lean::nat_sub(x_3, x_12); +lean::dec(x_3); +x_1 = x_9; +x_3 = x_13; +goto _start; +} +else +{ +uint8 x_15; +lean::dec(x_3); +x_15 = 0; +return x_15; +} +} +default: +{ +uint8 x_16; +lean::dec(x_3); +x_16 = 0; +return x_16; +} +} +} +} +obj* l_Lean_Expr_isAppOfArity___main___boxed(obj* x_1, obj* x_2, obj* x_3) { +_start: +{ +uint8 x_4; obj* x_5; +x_4 = l_Lean_Expr_isAppOfArity___main(x_1, x_2, x_3); +lean::dec(x_2); +lean::dec(x_1); +x_5 = lean::box(x_4); +return x_5; +} +} +uint8 l_Lean_Expr_isAppOfArity(obj* x_1, obj* x_2, obj* x_3) { +_start: +{ +uint8 x_4; +x_4 = l_Lean_Expr_isAppOfArity___main(x_1, x_2, x_3); +return x_4; +} +} +obj* l_Lean_Expr_isAppOfArity___boxed(obj* x_1, obj* x_2, obj* x_3) { +_start: +{ +uint8 x_4; obj* x_5; +x_4 = l_Lean_Expr_isAppOfArity(x_1, x_2, x_3); +lean::dec(x_2); +lean::dec(x_1); +x_5 = lean::box(x_4); +return x_5; +} +} +obj* l_Lean_mkConst(obj* x_1, obj* x_2) { +_start: +{ +obj* x_3; +x_3 = lean_expr_mk_const(x_1, x_2); +return x_3; +} +} obj* l_Lean_mkBinApp(obj* x_1, obj* x_2, obj* x_3) { _start: { @@ -453,8 +589,10 @@ REGISTER_LEAN_FUNCTION(lean::mk_const_name(lean::mk_const_name(lean::mk_const_na l_Lean_Expr_HasBeq = _init_l_Lean_Expr_HasBeq(); lean::mark_persistent(l_Lean_Expr_HasBeq); lean::register_constant(lean::mk_const_name(lean::mk_const_name(lean::mk_const_name("Lean"), "Expr"), "HasBeq"), l_Lean_Expr_HasBeq); +REGISTER_LEAN_FUNCTION(lean::mk_const_name(lean::mk_const_name(lean::mk_const_name("Lean"), "Expr"), "getAppFn"), 1, l_Lean_Expr_getAppFn___boxed); +REGISTER_LEAN_FUNCTION(lean::mk_const_name(lean::mk_const_name(lean::mk_const_name("Lean"), "Expr"), "isAppOf"), 2, l_Lean_Expr_isAppOf___boxed); +REGISTER_LEAN_FUNCTION(lean::mk_const_name(lean::mk_const_name(lean::mk_const_name("Lean"), "Expr"), "isAppOfArity"), 3, l_Lean_Expr_isAppOfArity___boxed); REGISTER_LEAN_FUNCTION(lean::mk_const_name(lean::mk_const_name("Lean"), "mkConst"), 2, l_Lean_mkConst); -REGISTER_LEAN_FUNCTION(lean::mk_const_name(lean::mk_const_name("Lean"), "getAppFn"), 1, l_Lean_getAppFn___boxed); REGISTER_LEAN_FUNCTION(lean::mk_const_name(lean::mk_const_name("Lean"), "mkBinApp"), 3, l_Lean_mkBinApp); REGISTER_LEAN_FUNCTION(lean::mk_const_name(lean::mk_const_name("Lean"), "mkBinCApp"), 3, l_Lean_mkBinCApp); l_Lean_mkDecIsTrue___closed__1 = _init_l_Lean_mkDecIsTrue___closed__1(); diff --git a/src/stage0/init/lean/format.cpp b/src/stage0/init/lean/format.cpp index ea6d8cdc7b..4eafbb5037 100644 --- a/src/stage0/init/lean/format.cpp +++ b/src/stage0/init/lean/format.cpp @@ -358,20 +358,12 @@ obj* l_Lean_Format_flatten___main(obj* x_1) { _start: { switch (lean::obj_tag(x_1)) { -case 0: -{ -return x_1; -} case 1: { obj* x_2; x_2 = l_Lean_Format_flatten___main___closed__1; return x_2; } -case 2: -{ -return x_1; -} case 3: { obj* x_3; @@ -425,7 +417,7 @@ else return x_1; } } -default: +case 5: { obj* x_18; x_18 = lean::cnstr_get(x_1, 0); @@ -434,6 +426,10 @@ lean::dec(x_1); x_1 = x_18; goto _start; } +default: +{ +return x_1; +} } } } diff --git a/src/stage0/init/lean/level.cpp b/src/stage0/init/lean/level.cpp index d2380c9ff6..6a85918ec8 100644 --- a/src/stage0/init/lean/level.cpp +++ b/src/stage0/init/lean/level.cpp @@ -159,49 +159,61 @@ uint8 l_Lean_Level_hasParam___main(obj* x_1) { _start: { switch (lean::obj_tag(x_1)) { -case 0: -{ -uint8 x_2; -x_2 = 0; -return x_2; -} case 1: { -obj* x_3; -x_3 = lean::cnstr_get(x_1, 0); -x_1 = x_3; +obj* x_2; +x_2 = lean::cnstr_get(x_1, 0); +x_1 = x_2; goto _start; } -case 4: +case 2: { -uint8 x_5; -x_5 = 1; -return x_5; -} -case 5: +obj* x_4; obj* x_5; uint8 x_6; +x_4 = lean::cnstr_get(x_1, 0); +x_5 = lean::cnstr_get(x_1, 1); +x_6 = l_Lean_Level_hasParam___main(x_4); +if (x_6 == 0) { -uint8 x_6; -x_6 = 0; -return x_6; -} -default: -{ -obj* x_7; obj* x_8; uint8 x_9; -x_7 = lean::cnstr_get(x_1, 0); -x_8 = lean::cnstr_get(x_1, 1); -x_9 = l_Lean_Level_hasParam___main(x_7); -if (x_9 == 0) -{ -x_1 = x_8; +x_1 = x_5; goto _start; } else { -uint8 x_11; -x_11 = 1; -return x_11; +uint8 x_8; +x_8 = 1; +return x_8; } } +case 3: +{ +obj* x_9; obj* x_10; uint8 x_11; +x_9 = lean::cnstr_get(x_1, 0); +x_10 = lean::cnstr_get(x_1, 1); +x_11 = l_Lean_Level_hasParam___main(x_9); +if (x_11 == 0) +{ +x_1 = x_10; +goto _start; +} +else +{ +uint8 x_13; +x_13 = 1; +return x_13; +} +} +case 4: +{ +uint8 x_14; +x_14 = 1; +return x_14; +} +default: +{ +uint8 x_15; +x_15 = 0; +return x_15; +} } } } @@ -237,50 +249,63 @@ uint8 l_Lean_Level_hasMvar___main(obj* x_1) { _start: { switch (lean::obj_tag(x_1)) { -case 0: -{ -uint8 x_2; -x_2 = 0; -return x_2; -} case 1: { -obj* x_3; uint8 x_4; -x_3 = lean::cnstr_get(x_1, 0); -x_4 = l_Lean_Level_hasParam___main(x_3); -return x_4; +obj* x_2; uint8 x_3; +x_2 = lean::cnstr_get(x_1, 0); +x_3 = l_Lean_Level_hasParam___main(x_2); +return x_3; } -case 4: +case 2: { -uint8 x_5; -x_5 = 0; -return x_5; -} -case 5: +obj* x_4; obj* x_5; uint8 x_6; +x_4 = lean::cnstr_get(x_1, 0); +x_5 = lean::cnstr_get(x_1, 1); +x_6 = l_Lean_Level_hasParam___main(x_4); +if (x_6 == 0) { -uint8 x_6; -x_6 = 1; -return x_6; -} -default: -{ -obj* x_7; obj* x_8; uint8 x_9; -x_7 = lean::cnstr_get(x_1, 0); -x_8 = lean::cnstr_get(x_1, 1); -x_9 = l_Lean_Level_hasParam___main(x_7); -if (x_9 == 0) -{ -uint8 x_10; -x_10 = l_Lean_Level_hasParam___main(x_8); -return x_10; +uint8 x_7; +x_7 = l_Lean_Level_hasParam___main(x_5); +return x_7; } else { -uint8 x_11; -x_11 = 1; -return x_11; +uint8 x_8; +x_8 = 1; +return x_8; } } +case 3: +{ +obj* x_9; obj* x_10; uint8 x_11; +x_9 = lean::cnstr_get(x_1, 0); +x_10 = lean::cnstr_get(x_1, 1); +x_11 = l_Lean_Level_hasParam___main(x_9); +if (x_11 == 0) +{ +uint8 x_12; +x_12 = l_Lean_Level_hasParam___main(x_10); +return x_12; +} +else +{ +uint8 x_13; +x_13 = 1; +return x_13; +} +} +case 5: +{ +uint8 x_14; +x_14 = 1; +return x_14; +} +default: +{ +uint8 x_15; +x_15 = 0; +return x_15; +} } } } @@ -660,11 +685,6 @@ obj* l_Lean_Level_instantiate___main(obj* x_1, obj* x_2) { _start: { switch (lean::obj_tag(x_2)) { -case 0: -{ -lean::dec(x_1); -return x_2; -} case 1: { obj* x_3; obj* x_4; obj* x_5; diff --git a/src/stage0/init/lean/message.cpp b/src/stage0/init/lean/message.cpp index 2743ae4a54..847e35363f 100644 --- a/src/stage0/init/lean/message.cpp +++ b/src/stage0/init/lean/message.cpp @@ -266,27 +266,23 @@ return x_1; } else { -obj* x_3; obj* x_4; uint8 x_5; uint8 x_6; +obj* x_3; obj* x_4; uint8 x_5; uint8 x_6; obj* x_7; x_3 = lean::cnstr_get(x_2, 0); x_4 = lean::cnstr_get(x_2, 1); x_5 = l_List_foldr___main___at_Lean_MessageLog_hasErrors___spec__1(x_1, x_4); x_6 = lean::cnstr_get_scalar(x_3, sizeof(void*)*5); -switch (x_6) { -case 0: +x_7 = lean::box(x_6); +if (lean::obj_tag(x_7) == 2) { +uint8 x_8; +x_8 = 1; +return x_8; +} +else +{ +lean::dec(x_7); return x_5; } -case 1: -{ -return x_5; -} -default: -{ -uint8 x_7; -x_7 = 1; -return x_7; -} -} } } } diff --git a/src/stage0/init/lean/modifiers.cpp b/src/stage0/init/lean/modifiers.cpp index e773943521..457cc9d024 100644 --- a/src/stage0/init/lean/modifiers.cpp +++ b/src/stage0/init/lean/modifiers.cpp @@ -847,26 +847,20 @@ return x_5; obj* l___private_init_lean_modifiers_2__privatePrefixAux___main(obj* x_1) { _start: { -switch (lean::obj_tag(x_1)) { -case 0: -{ -return x_1; -} -case 1: +if (lean::obj_tag(x_1) == 1) { obj* x_2; x_2 = lean::cnstr_get(x_1, 0); x_1 = x_2; goto _start; } -default: +else { lean::inc(x_1); return x_1; } } } -} obj* l___private_init_lean_modifiers_2__privatePrefixAux___main___boxed(obj* x_1) { _start: { diff --git a/src/stage0/init/lean/name.cpp b/src/stage0/init/lean/name.cpp index db6109d87b..1633babb64 100644 --- a/src/stage0/init/lean/name.cpp +++ b/src/stage0/init/lean/name.cpp @@ -620,94 +620,86 @@ return x_5; } case 1: { -switch (lean::obj_tag(x_2)) { -case 0: +if (lean::obj_tag(x_2) == 1) { -uint8 x_6; -x_6 = 0; -return x_6; -} -case 1: +obj* x_6; obj* x_7; obj* x_8; obj* x_9; uint8 x_10; +x_6 = lean::cnstr_get(x_1, 0); +x_7 = lean::cnstr_get(x_1, 1); +x_8 = lean::cnstr_get(x_2, 0); +x_9 = lean::cnstr_get(x_2, 1); +x_10 = lean::string_dec_lt(x_7, x_9); +if (x_10 == 0) { -obj* x_7; obj* x_8; obj* x_9; obj* x_10; uint8 x_11; -x_7 = lean::cnstr_get(x_1, 0); -x_8 = lean::cnstr_get(x_1, 1); -x_9 = lean::cnstr_get(x_2, 0); -x_10 = lean::cnstr_get(x_2, 1); -x_11 = lean::string_dec_lt(x_8, x_10); +uint8 x_11; +x_11 = lean::string_dec_eq(x_7, x_9); if (x_11 == 0) { -uint8 x_12; -x_12 = lean::string_dec_eq(x_8, x_10); -if (x_12 == 0) -{ -return x_11; +return x_10; } else { -x_1 = x_7; -x_2 = x_9; +x_1 = x_6; +x_2 = x_8; goto _start; } } else { +uint8 x_13; +x_13 = 1; +return x_13; +} +} +else +{ uint8 x_14; -x_14 = 1; +x_14 = 0; return x_14; } } default: { -uint8 x_15; -x_15 = 0; -return x_15; -} -} -} -default: -{ switch (lean::obj_tag(x_2)) { case 0: { -uint8 x_16; -x_16 = 0; -return x_16; +uint8 x_15; +x_15 = 0; +return x_15; } case 1: { -uint8 x_17; -x_17 = 1; -return x_17; +uint8 x_16; +x_16 = 1; +return x_16; } default: { -obj* x_18; obj* x_19; obj* x_20; obj* x_21; uint8 x_22; -x_18 = lean::cnstr_get(x_1, 0); -x_19 = lean::cnstr_get(x_1, 1); -x_20 = lean::cnstr_get(x_2, 0); -x_21 = lean::cnstr_get(x_2, 1); -x_22 = lean::nat_dec_lt(x_19, x_21); +obj* x_17; obj* x_18; obj* x_19; obj* x_20; uint8 x_21; +x_17 = lean::cnstr_get(x_1, 0); +x_18 = lean::cnstr_get(x_1, 1); +x_19 = lean::cnstr_get(x_2, 0); +x_20 = lean::cnstr_get(x_2, 1); +x_21 = lean::nat_dec_lt(x_18, x_20); +if (x_21 == 0) +{ +uint8 x_22; +x_22 = lean::nat_dec_eq(x_18, x_20); if (x_22 == 0) { -uint8 x_23; -x_23 = lean::nat_dec_eq(x_19, x_21); -if (x_23 == 0) -{ -return x_22; +return x_21; } else { -x_1 = x_18; -x_2 = x_20; +x_1 = x_17; +x_2 = x_19; goto _start; } } else { -uint8 x_25; -x_25 = 1; -return x_25; +uint8 x_24; +x_24 = 1; +return x_24; } } } @@ -954,32 +946,24 @@ return x_1; obj* l_Lean_Name_appendAfter___main(obj* x_1, obj* x_2) { _start: { -switch (lean::obj_tag(x_1)) { -case 0: +if (lean::obj_tag(x_1) == 1) { -obj* x_3; -x_3 = lean_name_mk_string(x_1, x_2); -return x_3; -} -case 1: -{ -obj* x_4; obj* x_5; obj* x_6; obj* x_7; -x_4 = lean::cnstr_get(x_1, 0); +obj* x_3; obj* x_4; obj* x_5; obj* x_6; +x_3 = lean::cnstr_get(x_1, 0); +lean::inc(x_3); +x_4 = lean::cnstr_get(x_1, 1); lean::inc(x_4); -x_5 = lean::cnstr_get(x_1, 1); -lean::inc(x_5); lean::dec(x_1); -x_6 = lean::string_append(x_5, x_2); +x_5 = lean::string_append(x_4, x_2); lean::dec(x_2); -x_7 = lean_name_mk_string(x_4, x_6); -return x_7; +x_6 = lean_name_mk_string(x_3, x_5); +return x_6; } -default: +else { -obj* x_8; -x_8 = lean_name_mk_string(x_1, x_2); -return x_8; -} +obj* x_7; +x_7 = lean_name_mk_string(x_1, x_2); +return x_7; } } } @@ -1003,38 +987,29 @@ obj* l_Lean_Name_appendIndexAfter___main(obj* x_1, obj* x_2) { _start: { obj* x_3; -switch (lean::obj_tag(x_1)) { -case 0: +if (lean::obj_tag(x_1) == 1) { -obj* x_9; -x_9 = lean::box(0); -x_3 = x_9; -goto block_8; -} -case 1: -{ -obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; obj* x_16; -x_10 = lean::cnstr_get(x_1, 0); +obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_15; +x_9 = lean::cnstr_get(x_1, 0); +lean::inc(x_9); +x_10 = lean::cnstr_get(x_1, 1); lean::inc(x_10); -x_11 = lean::cnstr_get(x_1, 1); -lean::inc(x_11); lean::dec(x_1); -x_12 = l_Lean_Name_appendIndexAfter___main___closed__1; -x_13 = lean::string_append(x_11, x_12); -x_14 = l_Nat_repr(x_2); -x_15 = lean::string_append(x_13, x_14); -lean::dec(x_14); -x_16 = lean_name_mk_string(x_10, x_15); -return x_16; +x_11 = l_Lean_Name_appendIndexAfter___main___closed__1; +x_12 = lean::string_append(x_10, x_11); +x_13 = l_Nat_repr(x_2); +x_14 = lean::string_append(x_12, x_13); +lean::dec(x_13); +x_15 = lean_name_mk_string(x_9, x_14); +return x_15; } -default: +else { -obj* x_17; -x_17 = lean::box(0); -x_3 = x_17; +obj* x_16; +x_16 = lean::box(0); +x_3 = x_16; goto block_8; } -} block_8: { obj* x_4; obj* x_5; obj* x_6; obj* x_7; diff --git a/src/stage0/init/lean/parser/parser.cpp b/src/stage0/init/lean/parser/parser.cpp index 9d298fa957..8345092aba 100644 --- a/src/stage0/init/lean/parser/parser.cpp +++ b/src/stage0/init/lean/parser/parser.cpp @@ -1385,22 +1385,16 @@ return x_2; } case 1: { -switch (lean::obj_tag(x_2)) { -case 0: -{ -return x_1; -} -case 1: +if (lean::obj_tag(x_2) == 1) { return x_2; } -default: +else { lean::dec(x_2); return x_1; } } -} default: { switch (lean::obj_tag(x_2)) { @@ -19370,537 +19364,432 @@ obj* x_14; x_14 = lean::cnstr_get(x_12, 1); lean::inc(x_14); lean::dec(x_12); -switch (lean::obj_tag(x_14)) { -case 0: +if (lean::obj_tag(x_14) == 2) { uint8 x_15; -lean::dec(x_3); +lean::dec(x_2); x_15 = !lean::is_exclusive(x_13); if (x_15 == 0) { -obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; obj* x_22; +obj* x_16; obj* x_17; obj* x_18; obj* x_19; x_16 = lean::cnstr_get(x_13, 0); -lean::dec(x_16); -x_17 = l_Lean_Name_toString___closed__1; -x_18 = l_Lean_Name_toStringWithSep___main(x_17, x_2); -x_19 = l_Lean_Parser_addBuiltinLeadingParser___closed__1; -x_20 = lean::string_append(x_19, x_18); -lean::dec(x_18); -x_21 = l_Lean_Parser_addBuiltinLeadingParser___closed__2; -x_22 = lean::string_append(x_20, x_21); -lean::cnstr_set_tag(x_13, 1); -lean::cnstr_set(x_13, 0, x_22); -return x_13; -} -else -{ -obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; -x_23 = lean::cnstr_get(x_13, 1); -lean::inc(x_23); -lean::dec(x_13); -x_24 = l_Lean_Name_toString___closed__1; -x_25 = l_Lean_Name_toStringWithSep___main(x_24, x_2); -x_26 = l_Lean_Parser_addBuiltinLeadingParser___closed__1; -x_27 = lean::string_append(x_26, x_25); -lean::dec(x_25); -x_28 = l_Lean_Parser_addBuiltinLeadingParser___closed__2; -x_29 = lean::string_append(x_27, x_28); -x_30 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_30, 0, x_29); -lean::cnstr_set(x_30, 1, x_23); -return x_30; -} -} -case 1: -{ -uint8 x_31; -lean::dec(x_3); -x_31 = !lean::is_exclusive(x_13); -if (x_31 == 0) -{ -obj* x_32; obj* x_33; obj* x_34; obj* x_35; obj* x_36; obj* x_37; obj* x_38; -x_32 = lean::cnstr_get(x_13, 0); -lean::dec(x_32); -x_33 = l_Lean_Name_toString___closed__1; -x_34 = l_Lean_Name_toStringWithSep___main(x_33, x_2); -x_35 = l_Lean_Parser_addBuiltinLeadingParser___closed__1; -x_36 = lean::string_append(x_35, x_34); -lean::dec(x_34); -x_37 = l_Lean_Parser_addBuiltinLeadingParser___closed__2; -x_38 = lean::string_append(x_36, x_37); -lean::cnstr_set_tag(x_13, 1); -lean::cnstr_set(x_13, 0, x_38); -return x_13; -} -else -{ -obj* x_39; obj* x_40; obj* x_41; obj* x_42; obj* x_43; obj* x_44; obj* x_45; obj* x_46; -x_39 = lean::cnstr_get(x_13, 1); -lean::inc(x_39); -lean::dec(x_13); -x_40 = l_Lean_Name_toString___closed__1; -x_41 = l_Lean_Name_toStringWithSep___main(x_40, x_2); -x_42 = l_Lean_Parser_addBuiltinLeadingParser___closed__1; -x_43 = lean::string_append(x_42, x_41); -lean::dec(x_41); -x_44 = l_Lean_Parser_addBuiltinLeadingParser___closed__2; -x_45 = lean::string_append(x_43, x_44); -x_46 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_46, 0, x_45); -lean::cnstr_set(x_46, 1, x_39); -return x_46; -} -} -default: -{ -uint8 x_47; -lean::dec(x_2); -x_47 = !lean::is_exclusive(x_13); -if (x_47 == 0) -{ -obj* x_48; obj* x_49; obj* x_50; obj* x_51; -x_48 = lean::cnstr_get(x_13, 0); -x_49 = lean::cnstr_get(x_14, 0); -lean::inc(x_49); +x_17 = lean::cnstr_get(x_14, 0); +lean::inc(x_17); lean::dec(x_14); lean::cnstr_set(x_13, 0, x_8); -x_50 = l_List_foldl___main___at_Lean_Parser_addBuiltinLeadingParser___spec__1(x_3, x_48, x_49); -x_51 = lean::io_ref_set(x_1, x_50, x_13); -return x_51; +x_18 = l_List_foldl___main___at_Lean_Parser_addBuiltinLeadingParser___spec__1(x_3, x_16, x_17); +x_19 = lean::io_ref_set(x_1, x_18, x_13); +return x_19; } else { -obj* x_52; obj* x_53; obj* x_54; obj* x_55; obj* x_56; obj* x_57; -x_52 = lean::cnstr_get(x_13, 0); -x_53 = lean::cnstr_get(x_13, 1); -lean::inc(x_53); -lean::inc(x_52); +obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; +x_20 = lean::cnstr_get(x_13, 0); +x_21 = lean::cnstr_get(x_13, 1); +lean::inc(x_21); +lean::inc(x_20); lean::dec(x_13); -x_54 = lean::cnstr_get(x_14, 0); -lean::inc(x_54); +x_22 = lean::cnstr_get(x_14, 0); +lean::inc(x_22); lean::dec(x_14); -x_55 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_55, 0, x_8); -lean::cnstr_set(x_55, 1, x_53); -x_56 = l_List_foldl___main___at_Lean_Parser_addBuiltinLeadingParser___spec__1(x_3, x_52, x_54); -x_57 = lean::io_ref_set(x_1, x_56, x_55); -return x_57; +x_23 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_23, 0, x_8); +lean::cnstr_set(x_23, 1, x_21); +x_24 = l_List_foldl___main___at_Lean_Parser_addBuiltinLeadingParser___spec__1(x_3, x_20, x_22); +x_25 = lean::io_ref_set(x_1, x_24, x_23); +return x_25; } } +else +{ +uint8 x_26; +lean::dec(x_14); +lean::dec(x_3); +x_26 = !lean::is_exclusive(x_13); +if (x_26 == 0) +{ +obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; obj* x_33; +x_27 = lean::cnstr_get(x_13, 0); +lean::dec(x_27); +x_28 = l_Lean_Name_toString___closed__1; +x_29 = l_Lean_Name_toStringWithSep___main(x_28, x_2); +x_30 = l_Lean_Parser_addBuiltinLeadingParser___closed__1; +x_31 = lean::string_append(x_30, x_29); +lean::dec(x_29); +x_32 = l_Lean_Parser_addBuiltinLeadingParser___closed__2; +x_33 = lean::string_append(x_31, x_32); +lean::cnstr_set_tag(x_13, 1); +lean::cnstr_set(x_13, 0, x_33); +return x_13; +} +else +{ +obj* x_34; obj* x_35; obj* x_36; obj* x_37; obj* x_38; obj* x_39; obj* x_40; obj* x_41; +x_34 = lean::cnstr_get(x_13, 1); +lean::inc(x_34); +lean::dec(x_13); +x_35 = l_Lean_Name_toString___closed__1; +x_36 = l_Lean_Name_toStringWithSep___main(x_35, x_2); +x_37 = l_Lean_Parser_addBuiltinLeadingParser___closed__1; +x_38 = lean::string_append(x_37, x_36); +lean::dec(x_36); +x_39 = l_Lean_Parser_addBuiltinLeadingParser___closed__2; +x_40 = lean::string_append(x_38, x_39); +x_41 = lean::alloc_cnstr(1, 2, 0); +lean::cnstr_set(x_41, 0, x_40); +lean::cnstr_set(x_41, 1, x_34); +return x_41; +} } } else { -uint8 x_58; +uint8 x_42; lean::dec(x_12); lean::dec(x_3); lean::dec(x_2); -x_58 = !lean::is_exclusive(x_13); -if (x_58 == 0) +x_42 = !lean::is_exclusive(x_13); +if (x_42 == 0) { return x_13; } else { -obj* x_59; obj* x_60; obj* x_61; -x_59 = lean::cnstr_get(x_13, 0); -x_60 = lean::cnstr_get(x_13, 1); -lean::inc(x_60); -lean::inc(x_59); +obj* x_43; obj* x_44; obj* x_45; +x_43 = lean::cnstr_get(x_13, 0); +x_44 = lean::cnstr_get(x_13, 1); +lean::inc(x_44); +lean::inc(x_43); lean::dec(x_13); -x_61 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_61, 0, x_59); -lean::cnstr_set(x_61, 1, x_60); -return x_61; +x_45 = lean::alloc_cnstr(1, 2, 0); +lean::cnstr_set(x_45, 0, x_43); +lean::cnstr_set(x_45, 1, x_44); +return x_45; } } } else { -obj* x_62; obj* x_63; obj* x_64; obj* x_65; -x_62 = lean::cnstr_get(x_9, 1); -lean::inc(x_62); +obj* x_46; obj* x_47; obj* x_48; obj* x_49; +x_46 = lean::cnstr_get(x_9, 1); +lean::inc(x_46); lean::dec(x_9); -x_63 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_63, 0, x_8); -lean::cnstr_set(x_63, 1, x_62); -x_64 = lean::cnstr_get(x_3, 0); -lean::inc(x_64); -lean::inc(x_64); -x_65 = l___private_init_lean_parser_parser_7__updateTokens(x_7, x_64, x_63); -if (lean::obj_tag(x_65) == 0) +x_47 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_47, 0, x_8); +lean::cnstr_set(x_47, 1, x_46); +x_48 = lean::cnstr_get(x_3, 0); +lean::inc(x_48); +lean::inc(x_48); +x_49 = l___private_init_lean_parser_parser_7__updateTokens(x_7, x_48, x_47); +if (lean::obj_tag(x_49) == 0) { -obj* x_66; -x_66 = lean::cnstr_get(x_64, 1); -lean::inc(x_66); -lean::dec(x_64); -switch (lean::obj_tag(x_66)) { -case 0: +obj* x_50; +x_50 = lean::cnstr_get(x_48, 1); +lean::inc(x_50); +lean::dec(x_48); +if (lean::obj_tag(x_50) == 2) { -obj* x_67; obj* x_68; obj* x_69; obj* x_70; obj* x_71; obj* x_72; obj* x_73; obj* x_74; obj* x_75; +obj* x_51; obj* x_52; obj* x_53; obj* x_54; obj* x_55; obj* x_56; obj* x_57; +lean::dec(x_2); +x_51 = lean::cnstr_get(x_49, 0); +lean::inc(x_51); +x_52 = lean::cnstr_get(x_49, 1); +lean::inc(x_52); +if (lean::is_exclusive(x_49)) { + lean::cnstr_release(x_49, 0); + lean::cnstr_release(x_49, 1); + x_53 = x_49; +} else { + lean::dec_ref(x_49); + x_53 = lean::box(0); +} +x_54 = lean::cnstr_get(x_50, 0); +lean::inc(x_54); +lean::dec(x_50); +if (lean::is_scalar(x_53)) { + x_55 = lean::alloc_cnstr(0, 2, 0); +} else { + x_55 = x_53; +} +lean::cnstr_set(x_55, 0, x_8); +lean::cnstr_set(x_55, 1, x_52); +x_56 = l_List_foldl___main___at_Lean_Parser_addBuiltinLeadingParser___spec__1(x_3, x_51, x_54); +x_57 = lean::io_ref_set(x_1, x_56, x_55); +return x_57; +} +else +{ +obj* x_58; obj* x_59; obj* x_60; obj* x_61; obj* x_62; obj* x_63; obj* x_64; obj* x_65; obj* x_66; +lean::dec(x_50); lean::dec(x_3); -x_67 = lean::cnstr_get(x_65, 1); +x_58 = lean::cnstr_get(x_49, 1); +lean::inc(x_58); +if (lean::is_exclusive(x_49)) { + lean::cnstr_release(x_49, 0); + lean::cnstr_release(x_49, 1); + x_59 = x_49; +} else { + lean::dec_ref(x_49); + x_59 = lean::box(0); +} +x_60 = l_Lean_Name_toString___closed__1; +x_61 = l_Lean_Name_toStringWithSep___main(x_60, x_2); +x_62 = l_Lean_Parser_addBuiltinLeadingParser___closed__1; +x_63 = lean::string_append(x_62, x_61); +lean::dec(x_61); +x_64 = l_Lean_Parser_addBuiltinLeadingParser___closed__2; +x_65 = lean::string_append(x_63, x_64); +if (lean::is_scalar(x_59)) { + x_66 = lean::alloc_cnstr(1, 2, 0); +} else { + x_66 = x_59; + lean::cnstr_set_tag(x_66, 1); +} +lean::cnstr_set(x_66, 0, x_65); +lean::cnstr_set(x_66, 1, x_58); +return x_66; +} +} +else +{ +obj* x_67; obj* x_68; obj* x_69; obj* x_70; +lean::dec(x_48); +lean::dec(x_3); +lean::dec(x_2); +x_67 = lean::cnstr_get(x_49, 0); lean::inc(x_67); -if (lean::is_exclusive(x_65)) { - lean::cnstr_release(x_65, 0); - lean::cnstr_release(x_65, 1); - x_68 = x_65; +x_68 = lean::cnstr_get(x_49, 1); +lean::inc(x_68); +if (lean::is_exclusive(x_49)) { + lean::cnstr_release(x_49, 0); + lean::cnstr_release(x_49, 1); + x_69 = x_49; } else { - lean::dec_ref(x_65); - x_68 = lean::box(0); + lean::dec_ref(x_49); + x_69 = lean::box(0); } -x_69 = l_Lean_Name_toString___closed__1; -x_70 = l_Lean_Name_toStringWithSep___main(x_69, x_2); -x_71 = l_Lean_Parser_addBuiltinLeadingParser___closed__1; -x_72 = lean::string_append(x_71, x_70); -lean::dec(x_70); -x_73 = l_Lean_Parser_addBuiltinLeadingParser___closed__2; -x_74 = lean::string_append(x_72, x_73); -if (lean::is_scalar(x_68)) { - x_75 = lean::alloc_cnstr(1, 2, 0); +if (lean::is_scalar(x_69)) { + x_70 = lean::alloc_cnstr(1, 2, 0); } else { - x_75 = x_68; - lean::cnstr_set_tag(x_75, 1); + x_70 = x_69; } -lean::cnstr_set(x_75, 0, x_74); -lean::cnstr_set(x_75, 1, x_67); -return x_75; -} -case 1: -{ -obj* x_76; obj* x_77; obj* x_78; obj* x_79; obj* x_80; obj* x_81; obj* x_82; obj* x_83; obj* x_84; -lean::dec(x_3); -x_76 = lean::cnstr_get(x_65, 1); -lean::inc(x_76); -if (lean::is_exclusive(x_65)) { - lean::cnstr_release(x_65, 0); - lean::cnstr_release(x_65, 1); - x_77 = x_65; -} else { - lean::dec_ref(x_65); - x_77 = lean::box(0); -} -x_78 = l_Lean_Name_toString___closed__1; -x_79 = l_Lean_Name_toStringWithSep___main(x_78, x_2); -x_80 = l_Lean_Parser_addBuiltinLeadingParser___closed__1; -x_81 = lean::string_append(x_80, x_79); -lean::dec(x_79); -x_82 = l_Lean_Parser_addBuiltinLeadingParser___closed__2; -x_83 = lean::string_append(x_81, x_82); -if (lean::is_scalar(x_77)) { - x_84 = lean::alloc_cnstr(1, 2, 0); -} else { - x_84 = x_77; - lean::cnstr_set_tag(x_84, 1); -} -lean::cnstr_set(x_84, 0, x_83); -lean::cnstr_set(x_84, 1, x_76); -return x_84; -} -default: -{ -obj* x_85; obj* x_86; obj* x_87; obj* x_88; obj* x_89; obj* x_90; obj* x_91; -lean::dec(x_2); -x_85 = lean::cnstr_get(x_65, 0); -lean::inc(x_85); -x_86 = lean::cnstr_get(x_65, 1); -lean::inc(x_86); -if (lean::is_exclusive(x_65)) { - lean::cnstr_release(x_65, 0); - lean::cnstr_release(x_65, 1); - x_87 = x_65; -} else { - lean::dec_ref(x_65); - x_87 = lean::box(0); -} -x_88 = lean::cnstr_get(x_66, 0); -lean::inc(x_88); -lean::dec(x_66); -if (lean::is_scalar(x_87)) { - x_89 = lean::alloc_cnstr(0, 2, 0); -} else { - x_89 = x_87; -} -lean::cnstr_set(x_89, 0, x_8); -lean::cnstr_set(x_89, 1, x_86); -x_90 = l_List_foldl___main___at_Lean_Parser_addBuiltinLeadingParser___spec__1(x_3, x_85, x_88); -x_91 = lean::io_ref_set(x_1, x_90, x_89); -return x_91; +lean::cnstr_set(x_70, 0, x_67); +lean::cnstr_set(x_70, 1, x_68); +return x_70; } } } else { -obj* x_92; obj* x_93; obj* x_94; obj* x_95; -lean::dec(x_64); -lean::dec(x_3); -lean::dec(x_2); -x_92 = lean::cnstr_get(x_65, 0); -lean::inc(x_92); -x_93 = lean::cnstr_get(x_65, 1); -lean::inc(x_93); -if (lean::is_exclusive(x_65)) { - lean::cnstr_release(x_65, 0); - lean::cnstr_release(x_65, 1); - x_94 = x_65; -} else { - lean::dec_ref(x_65); - x_94 = lean::box(0); -} -if (lean::is_scalar(x_94)) { - x_95 = lean::alloc_cnstr(1, 2, 0); -} else { - x_95 = x_94; -} -lean::cnstr_set(x_95, 0, x_92); -lean::cnstr_set(x_95, 1, x_93); -return x_95; -} -} -} -else -{ -uint8 x_96; +uint8 x_71; lean::dec(x_7); lean::dec(x_3); lean::dec(x_2); -x_96 = !lean::is_exclusive(x_9); -if (x_96 == 0) +x_71 = !lean::is_exclusive(x_9); +if (x_71 == 0) { return x_9; } else { -obj* x_97; obj* x_98; obj* x_99; -x_97 = lean::cnstr_get(x_9, 0); -x_98 = lean::cnstr_get(x_9, 1); -lean::inc(x_98); -lean::inc(x_97); +obj* x_72; obj* x_73; obj* x_74; +x_72 = lean::cnstr_get(x_9, 0); +x_73 = lean::cnstr_get(x_9, 1); +lean::inc(x_73); +lean::inc(x_72); lean::dec(x_9); -x_99 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_99, 0, x_97); -lean::cnstr_set(x_99, 1, x_98); -return x_99; +x_74 = lean::alloc_cnstr(1, 2, 0); +lean::cnstr_set(x_74, 0, x_72); +lean::cnstr_set(x_74, 1, x_73); +return x_74; } } } else { -obj* x_100; obj* x_101; obj* x_102; obj* x_103; obj* x_104; -x_100 = lean::cnstr_get(x_5, 0); -x_101 = lean::cnstr_get(x_5, 1); -lean::inc(x_101); -lean::inc(x_100); +obj* x_75; obj* x_76; obj* x_77; obj* x_78; obj* x_79; +x_75 = lean::cnstr_get(x_5, 0); +x_76 = lean::cnstr_get(x_5, 1); +lean::inc(x_76); +lean::inc(x_75); lean::dec(x_5); -x_102 = lean::box(0); -x_103 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_103, 0, x_102); -lean::cnstr_set(x_103, 1, x_101); -x_104 = lean::io_ref_reset(x_1, x_103); -if (lean::obj_tag(x_104) == 0) +x_77 = lean::box(0); +x_78 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_78, 0, x_77); +lean::cnstr_set(x_78, 1, x_76); +x_79 = lean::io_ref_reset(x_1, x_78); +if (lean::obj_tag(x_79) == 0) { -obj* x_105; obj* x_106; obj* x_107; obj* x_108; obj* x_109; -x_105 = lean::cnstr_get(x_104, 1); -lean::inc(x_105); -if (lean::is_exclusive(x_104)) { - lean::cnstr_release(x_104, 0); - lean::cnstr_release(x_104, 1); - x_106 = x_104; +obj* x_80; obj* x_81; obj* x_82; obj* x_83; obj* x_84; +x_80 = lean::cnstr_get(x_79, 1); +lean::inc(x_80); +if (lean::is_exclusive(x_79)) { + lean::cnstr_release(x_79, 0); + lean::cnstr_release(x_79, 1); + x_81 = x_79; } else { - lean::dec_ref(x_104); - x_106 = lean::box(0); + lean::dec_ref(x_79); + x_81 = lean::box(0); } -if (lean::is_scalar(x_106)) { - x_107 = lean::alloc_cnstr(0, 2, 0); +if (lean::is_scalar(x_81)) { + x_82 = lean::alloc_cnstr(0, 2, 0); } else { - x_107 = x_106; + x_82 = x_81; } -lean::cnstr_set(x_107, 0, x_102); -lean::cnstr_set(x_107, 1, x_105); -x_108 = lean::cnstr_get(x_3, 0); -lean::inc(x_108); -lean::inc(x_108); -x_109 = l___private_init_lean_parser_parser_7__updateTokens(x_100, x_108, x_107); -if (lean::obj_tag(x_109) == 0) +lean::cnstr_set(x_82, 0, x_77); +lean::cnstr_set(x_82, 1, x_80); +x_83 = lean::cnstr_get(x_3, 0); +lean::inc(x_83); +lean::inc(x_83); +x_84 = l___private_init_lean_parser_parser_7__updateTokens(x_75, x_83, x_82); +if (lean::obj_tag(x_84) == 0) { -obj* x_110; -x_110 = lean::cnstr_get(x_108, 1); -lean::inc(x_110); -lean::dec(x_108); -switch (lean::obj_tag(x_110)) { -case 0: +obj* x_85; +x_85 = lean::cnstr_get(x_83, 1); +lean::inc(x_85); +lean::dec(x_83); +if (lean::obj_tag(x_85) == 2) { -obj* x_111; obj* x_112; obj* x_113; obj* x_114; obj* x_115; obj* x_116; obj* x_117; obj* x_118; obj* x_119; -lean::dec(x_3); -x_111 = lean::cnstr_get(x_109, 1); -lean::inc(x_111); -if (lean::is_exclusive(x_109)) { - lean::cnstr_release(x_109, 0); - lean::cnstr_release(x_109, 1); - x_112 = x_109; -} else { - lean::dec_ref(x_109); - x_112 = lean::box(0); -} -x_113 = l_Lean_Name_toString___closed__1; -x_114 = l_Lean_Name_toStringWithSep___main(x_113, x_2); -x_115 = l_Lean_Parser_addBuiltinLeadingParser___closed__1; -x_116 = lean::string_append(x_115, x_114); -lean::dec(x_114); -x_117 = l_Lean_Parser_addBuiltinLeadingParser___closed__2; -x_118 = lean::string_append(x_116, x_117); -if (lean::is_scalar(x_112)) { - x_119 = lean::alloc_cnstr(1, 2, 0); -} else { - x_119 = x_112; - lean::cnstr_set_tag(x_119, 1); -} -lean::cnstr_set(x_119, 0, x_118); -lean::cnstr_set(x_119, 1, x_111); -return x_119; -} -case 1: -{ -obj* x_120; obj* x_121; obj* x_122; obj* x_123; obj* x_124; obj* x_125; obj* x_126; obj* x_127; obj* x_128; -lean::dec(x_3); -x_120 = lean::cnstr_get(x_109, 1); -lean::inc(x_120); -if (lean::is_exclusive(x_109)) { - lean::cnstr_release(x_109, 0); - lean::cnstr_release(x_109, 1); - x_121 = x_109; -} else { - lean::dec_ref(x_109); - x_121 = lean::box(0); -} -x_122 = l_Lean_Name_toString___closed__1; -x_123 = l_Lean_Name_toStringWithSep___main(x_122, x_2); -x_124 = l_Lean_Parser_addBuiltinLeadingParser___closed__1; -x_125 = lean::string_append(x_124, x_123); -lean::dec(x_123); -x_126 = l_Lean_Parser_addBuiltinLeadingParser___closed__2; -x_127 = lean::string_append(x_125, x_126); -if (lean::is_scalar(x_121)) { - x_128 = lean::alloc_cnstr(1, 2, 0); -} else { - x_128 = x_121; - lean::cnstr_set_tag(x_128, 1); -} -lean::cnstr_set(x_128, 0, x_127); -lean::cnstr_set(x_128, 1, x_120); -return x_128; -} -default: -{ -obj* x_129; obj* x_130; obj* x_131; obj* x_132; obj* x_133; obj* x_134; obj* x_135; +obj* x_86; obj* x_87; obj* x_88; obj* x_89; obj* x_90; obj* x_91; obj* x_92; lean::dec(x_2); -x_129 = lean::cnstr_get(x_109, 0); -lean::inc(x_129); -x_130 = lean::cnstr_get(x_109, 1); -lean::inc(x_130); -if (lean::is_exclusive(x_109)) { - lean::cnstr_release(x_109, 0); - lean::cnstr_release(x_109, 1); - x_131 = x_109; +x_86 = lean::cnstr_get(x_84, 0); +lean::inc(x_86); +x_87 = lean::cnstr_get(x_84, 1); +lean::inc(x_87); +if (lean::is_exclusive(x_84)) { + lean::cnstr_release(x_84, 0); + lean::cnstr_release(x_84, 1); + x_88 = x_84; } else { - lean::dec_ref(x_109); - x_131 = lean::box(0); + lean::dec_ref(x_84); + x_88 = lean::box(0); } -x_132 = lean::cnstr_get(x_110, 0); -lean::inc(x_132); -lean::dec(x_110); -if (lean::is_scalar(x_131)) { - x_133 = lean::alloc_cnstr(0, 2, 0); +x_89 = lean::cnstr_get(x_85, 0); +lean::inc(x_89); +lean::dec(x_85); +if (lean::is_scalar(x_88)) { + x_90 = lean::alloc_cnstr(0, 2, 0); } else { - x_133 = x_131; + x_90 = x_88; } -lean::cnstr_set(x_133, 0, x_102); -lean::cnstr_set(x_133, 1, x_130); -x_134 = l_List_foldl___main___at_Lean_Parser_addBuiltinLeadingParser___spec__1(x_3, x_129, x_132); -x_135 = lean::io_ref_set(x_1, x_134, x_133); -return x_135; +lean::cnstr_set(x_90, 0, x_77); +lean::cnstr_set(x_90, 1, x_87); +x_91 = l_List_foldl___main___at_Lean_Parser_addBuiltinLeadingParser___spec__1(x_3, x_86, x_89); +x_92 = lean::io_ref_set(x_1, x_91, x_90); +return x_92; +} +else +{ +obj* x_93; obj* x_94; obj* x_95; obj* x_96; obj* x_97; obj* x_98; obj* x_99; obj* x_100; obj* x_101; +lean::dec(x_85); +lean::dec(x_3); +x_93 = lean::cnstr_get(x_84, 1); +lean::inc(x_93); +if (lean::is_exclusive(x_84)) { + lean::cnstr_release(x_84, 0); + lean::cnstr_release(x_84, 1); + x_94 = x_84; +} else { + lean::dec_ref(x_84); + x_94 = lean::box(0); +} +x_95 = l_Lean_Name_toString___closed__1; +x_96 = l_Lean_Name_toStringWithSep___main(x_95, x_2); +x_97 = l_Lean_Parser_addBuiltinLeadingParser___closed__1; +x_98 = lean::string_append(x_97, x_96); +lean::dec(x_96); +x_99 = l_Lean_Parser_addBuiltinLeadingParser___closed__2; +x_100 = lean::string_append(x_98, x_99); +if (lean::is_scalar(x_94)) { + x_101 = lean::alloc_cnstr(1, 2, 0); +} else { + x_101 = x_94; + lean::cnstr_set_tag(x_101, 1); +} +lean::cnstr_set(x_101, 0, x_100); +lean::cnstr_set(x_101, 1, x_93); +return x_101; +} +} +else +{ +obj* x_102; obj* x_103; obj* x_104; obj* x_105; +lean::dec(x_83); +lean::dec(x_3); +lean::dec(x_2); +x_102 = lean::cnstr_get(x_84, 0); +lean::inc(x_102); +x_103 = lean::cnstr_get(x_84, 1); +lean::inc(x_103); +if (lean::is_exclusive(x_84)) { + lean::cnstr_release(x_84, 0); + lean::cnstr_release(x_84, 1); + x_104 = x_84; +} else { + lean::dec_ref(x_84); + x_104 = lean::box(0); +} +if (lean::is_scalar(x_104)) { + x_105 = lean::alloc_cnstr(1, 2, 0); +} else { + x_105 = x_104; +} +lean::cnstr_set(x_105, 0, x_102); +lean::cnstr_set(x_105, 1, x_103); +return x_105; +} +} +else +{ +obj* x_106; obj* x_107; obj* x_108; obj* x_109; +lean::dec(x_75); +lean::dec(x_3); +lean::dec(x_2); +x_106 = lean::cnstr_get(x_79, 0); +lean::inc(x_106); +x_107 = lean::cnstr_get(x_79, 1); +lean::inc(x_107); +if (lean::is_exclusive(x_79)) { + lean::cnstr_release(x_79, 0); + lean::cnstr_release(x_79, 1); + x_108 = x_79; +} else { + lean::dec_ref(x_79); + x_108 = lean::box(0); +} +if (lean::is_scalar(x_108)) { + x_109 = lean::alloc_cnstr(1, 2, 0); +} else { + x_109 = x_108; +} +lean::cnstr_set(x_109, 0, x_106); +lean::cnstr_set(x_109, 1, x_107); +return x_109; } } } else { -obj* x_136; obj* x_137; obj* x_138; obj* x_139; -lean::dec(x_108); +uint8 x_110; lean::dec(x_3); lean::dec(x_2); -x_136 = lean::cnstr_get(x_109, 0); -lean::inc(x_136); -x_137 = lean::cnstr_get(x_109, 1); -lean::inc(x_137); -if (lean::is_exclusive(x_109)) { - lean::cnstr_release(x_109, 0); - lean::cnstr_release(x_109, 1); - x_138 = x_109; -} else { - lean::dec_ref(x_109); - x_138 = lean::box(0); -} -if (lean::is_scalar(x_138)) { - x_139 = lean::alloc_cnstr(1, 2, 0); -} else { - x_139 = x_138; -} -lean::cnstr_set(x_139, 0, x_136); -lean::cnstr_set(x_139, 1, x_137); -return x_139; -} -} -else -{ -obj* x_140; obj* x_141; obj* x_142; obj* x_143; -lean::dec(x_100); -lean::dec(x_3); -lean::dec(x_2); -x_140 = lean::cnstr_get(x_104, 0); -lean::inc(x_140); -x_141 = lean::cnstr_get(x_104, 1); -lean::inc(x_141); -if (lean::is_exclusive(x_104)) { - lean::cnstr_release(x_104, 0); - lean::cnstr_release(x_104, 1); - x_142 = x_104; -} else { - lean::dec_ref(x_104); - x_142 = lean::box(0); -} -if (lean::is_scalar(x_142)) { - x_143 = lean::alloc_cnstr(1, 2, 0); -} else { - x_143 = x_142; -} -lean::cnstr_set(x_143, 0, x_140); -lean::cnstr_set(x_143, 1, x_141); -return x_143; -} -} -} -else -{ -uint8 x_144; -lean::dec(x_3); -lean::dec(x_2); -x_144 = !lean::is_exclusive(x_5); -if (x_144 == 0) +x_110 = !lean::is_exclusive(x_5); +if (x_110 == 0) { return x_5; } else { -obj* x_145; obj* x_146; obj* x_147; -x_145 = lean::cnstr_get(x_5, 0); -x_146 = lean::cnstr_get(x_5, 1); -lean::inc(x_146); -lean::inc(x_145); +obj* x_111; obj* x_112; obj* x_113; +x_111 = lean::cnstr_get(x_5, 0); +x_112 = lean::cnstr_get(x_5, 1); +lean::inc(x_112); +lean::inc(x_111); lean::dec(x_5); -x_147 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_147, 0, x_145); -lean::cnstr_set(x_147, 1, x_146); -return x_147; +x_113 = lean::alloc_cnstr(1, 2, 0); +lean::cnstr_set(x_113, 0, x_111); +lean::cnstr_set(x_113, 1, x_112); +return x_113; } } } @@ -20019,621 +19908,470 @@ lean::cnstr_set(x_13, 0, x_8); x_16 = lean::cnstr_get(x_12, 1); lean::inc(x_16); lean::dec(x_12); -switch (lean::obj_tag(x_16)) { -case 0: +if (lean::obj_tag(x_16) == 2) { -uint8 x_17; -x_17 = !lean::is_exclusive(x_15); -if (x_17 == 0) -{ -obj* x_18; obj* x_19; obj* x_20; -x_18 = lean::cnstr_get(x_15, 2); -x_19 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_19, 0, x_3); -lean::cnstr_set(x_19, 1, x_18); -lean::cnstr_set(x_15, 2, x_19); -x_20 = lean::io_ref_set(x_1, x_15, x_13); -return x_20; -} -else -{ -obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; -x_21 = lean::cnstr_get(x_15, 0); -x_22 = lean::cnstr_get(x_15, 1); -x_23 = lean::cnstr_get(x_15, 2); -x_24 = lean::cnstr_get(x_15, 3); -lean::inc(x_24); -lean::inc(x_23); -lean::inc(x_22); -lean::inc(x_21); -lean::dec(x_15); -x_25 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_25, 0, x_3); -lean::cnstr_set(x_25, 1, x_23); -x_26 = lean::alloc_cnstr(0, 4, 0); -lean::cnstr_set(x_26, 0, x_21); -lean::cnstr_set(x_26, 1, x_22); -lean::cnstr_set(x_26, 2, x_25); -lean::cnstr_set(x_26, 3, x_24); -x_27 = lean::io_ref_set(x_1, x_26, x_13); -return x_27; -} -} -case 1: -{ -uint8 x_28; -x_28 = !lean::is_exclusive(x_15); -if (x_28 == 0) -{ -obj* x_29; obj* x_30; obj* x_31; -x_29 = lean::cnstr_get(x_15, 2); -x_30 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_30, 0, x_3); -lean::cnstr_set(x_30, 1, x_29); -lean::cnstr_set(x_15, 2, x_30); -x_31 = lean::io_ref_set(x_1, x_15, x_13); -return x_31; -} -else -{ -obj* x_32; obj* x_33; obj* x_34; obj* x_35; obj* x_36; obj* x_37; obj* x_38; -x_32 = lean::cnstr_get(x_15, 0); -x_33 = lean::cnstr_get(x_15, 1); -x_34 = lean::cnstr_get(x_15, 2); -x_35 = lean::cnstr_get(x_15, 3); -lean::inc(x_35); -lean::inc(x_34); -lean::inc(x_33); -lean::inc(x_32); -lean::dec(x_15); -x_36 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_36, 0, x_3); -lean::cnstr_set(x_36, 1, x_34); -x_37 = lean::alloc_cnstr(0, 4, 0); -lean::cnstr_set(x_37, 0, x_32); -lean::cnstr_set(x_37, 1, x_33); -lean::cnstr_set(x_37, 2, x_36); -lean::cnstr_set(x_37, 3, x_35); -x_38 = lean::io_ref_set(x_1, x_37, x_13); -return x_38; -} -} -default: -{ -obj* x_39; obj* x_40; obj* x_41; -x_39 = lean::cnstr_get(x_16, 0); -lean::inc(x_39); +obj* x_17; obj* x_18; obj* x_19; +x_17 = lean::cnstr_get(x_16, 0); +lean::inc(x_17); lean::dec(x_16); -x_40 = l_List_foldl___main___at_Lean_Parser_addBuiltinTrailingParser___spec__1(x_3, x_15, x_39); -x_41 = lean::io_ref_set(x_1, x_40, x_13); -return x_41; +x_18 = l_List_foldl___main___at_Lean_Parser_addBuiltinTrailingParser___spec__1(x_3, x_15, x_17); +x_19 = lean::io_ref_set(x_1, x_18, x_13); +return x_19; +} +else +{ +uint8 x_20; +lean::dec(x_16); +x_20 = !lean::is_exclusive(x_15); +if (x_20 == 0) +{ +obj* x_21; obj* x_22; obj* x_23; +x_21 = lean::cnstr_get(x_15, 2); +x_22 = lean::alloc_cnstr(1, 2, 0); +lean::cnstr_set(x_22, 0, x_3); +lean::cnstr_set(x_22, 1, x_21); +lean::cnstr_set(x_15, 2, x_22); +x_23 = lean::io_ref_set(x_1, x_15, x_13); +return x_23; +} +else +{ +obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; +x_24 = lean::cnstr_get(x_15, 0); +x_25 = lean::cnstr_get(x_15, 1); +x_26 = lean::cnstr_get(x_15, 2); +x_27 = lean::cnstr_get(x_15, 3); +lean::inc(x_27); +lean::inc(x_26); +lean::inc(x_25); +lean::inc(x_24); +lean::dec(x_15); +x_28 = lean::alloc_cnstr(1, 2, 0); +lean::cnstr_set(x_28, 0, x_3); +lean::cnstr_set(x_28, 1, x_26); +x_29 = lean::alloc_cnstr(0, 4, 0); +lean::cnstr_set(x_29, 0, x_24); +lean::cnstr_set(x_29, 1, x_25); +lean::cnstr_set(x_29, 2, x_28); +lean::cnstr_set(x_29, 3, x_27); +x_30 = lean::io_ref_set(x_1, x_29, x_13); +return x_30; } } } else { -obj* x_42; obj* x_43; obj* x_44; obj* x_45; -x_42 = lean::cnstr_get(x_13, 0); -x_43 = lean::cnstr_get(x_13, 1); -lean::inc(x_43); -lean::inc(x_42); +obj* x_31; obj* x_32; obj* x_33; obj* x_34; +x_31 = lean::cnstr_get(x_13, 0); +x_32 = lean::cnstr_get(x_13, 1); +lean::inc(x_32); +lean::inc(x_31); lean::dec(x_13); -x_44 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_44, 0, x_8); -lean::cnstr_set(x_44, 1, x_43); -x_45 = lean::cnstr_get(x_12, 1); -lean::inc(x_45); +x_33 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_33, 0, x_8); +lean::cnstr_set(x_33, 1, x_32); +x_34 = lean::cnstr_get(x_12, 1); +lean::inc(x_34); lean::dec(x_12); -switch (lean::obj_tag(x_45)) { -case 0: +if (lean::obj_tag(x_34) == 2) { -obj* x_46; obj* x_47; obj* x_48; obj* x_49; obj* x_50; obj* x_51; obj* x_52; obj* x_53; -x_46 = lean::cnstr_get(x_42, 0); -lean::inc(x_46); -x_47 = lean::cnstr_get(x_42, 1); -lean::inc(x_47); -x_48 = lean::cnstr_get(x_42, 2); -lean::inc(x_48); -x_49 = lean::cnstr_get(x_42, 3); -lean::inc(x_49); -if (lean::is_exclusive(x_42)) { - lean::cnstr_release(x_42, 0); - lean::cnstr_release(x_42, 1); - lean::cnstr_release(x_42, 2); - lean::cnstr_release(x_42, 3); - x_50 = x_42; -} else { - lean::dec_ref(x_42); - x_50 = lean::box(0); +obj* x_35; obj* x_36; obj* x_37; +x_35 = lean::cnstr_get(x_34, 0); +lean::inc(x_35); +lean::dec(x_34); +x_36 = l_List_foldl___main___at_Lean_Parser_addBuiltinTrailingParser___spec__1(x_3, x_31, x_35); +x_37 = lean::io_ref_set(x_1, x_36, x_33); +return x_37; } -x_51 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_51, 0, x_3); -lean::cnstr_set(x_51, 1, x_48); -if (lean::is_scalar(x_50)) { - x_52 = lean::alloc_cnstr(0, 4, 0); -} else { - x_52 = x_50; -} -lean::cnstr_set(x_52, 0, x_46); -lean::cnstr_set(x_52, 1, x_47); -lean::cnstr_set(x_52, 2, x_51); -lean::cnstr_set(x_52, 3, x_49); -x_53 = lean::io_ref_set(x_1, x_52, x_44); -return x_53; -} -case 1: +else { -obj* x_54; obj* x_55; obj* x_56; obj* x_57; obj* x_58; obj* x_59; obj* x_60; obj* x_61; -x_54 = lean::cnstr_get(x_42, 0); -lean::inc(x_54); -x_55 = lean::cnstr_get(x_42, 1); -lean::inc(x_55); -x_56 = lean::cnstr_get(x_42, 2); -lean::inc(x_56); -x_57 = lean::cnstr_get(x_42, 3); -lean::inc(x_57); -if (lean::is_exclusive(x_42)) { - lean::cnstr_release(x_42, 0); - lean::cnstr_release(x_42, 1); - lean::cnstr_release(x_42, 2); - lean::cnstr_release(x_42, 3); - x_58 = x_42; +obj* x_38; obj* x_39; obj* x_40; obj* x_41; obj* x_42; obj* x_43; obj* x_44; obj* x_45; +lean::dec(x_34); +x_38 = lean::cnstr_get(x_31, 0); +lean::inc(x_38); +x_39 = lean::cnstr_get(x_31, 1); +lean::inc(x_39); +x_40 = lean::cnstr_get(x_31, 2); +lean::inc(x_40); +x_41 = lean::cnstr_get(x_31, 3); +lean::inc(x_41); +if (lean::is_exclusive(x_31)) { + lean::cnstr_release(x_31, 0); + lean::cnstr_release(x_31, 1); + lean::cnstr_release(x_31, 2); + lean::cnstr_release(x_31, 3); + x_42 = x_31; } else { - lean::dec_ref(x_42); - x_58 = lean::box(0); + lean::dec_ref(x_31); + x_42 = lean::box(0); } -x_59 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_59, 0, x_3); -lean::cnstr_set(x_59, 1, x_56); -if (lean::is_scalar(x_58)) { - x_60 = lean::alloc_cnstr(0, 4, 0); +x_43 = lean::alloc_cnstr(1, 2, 0); +lean::cnstr_set(x_43, 0, x_3); +lean::cnstr_set(x_43, 1, x_40); +if (lean::is_scalar(x_42)) { + x_44 = lean::alloc_cnstr(0, 4, 0); } else { - x_60 = x_58; -} -lean::cnstr_set(x_60, 0, x_54); -lean::cnstr_set(x_60, 1, x_55); -lean::cnstr_set(x_60, 2, x_59); -lean::cnstr_set(x_60, 3, x_57); -x_61 = lean::io_ref_set(x_1, x_60, x_44); -return x_61; -} -default: -{ -obj* x_62; obj* x_63; obj* x_64; -x_62 = lean::cnstr_get(x_45, 0); -lean::inc(x_62); -lean::dec(x_45); -x_63 = l_List_foldl___main___at_Lean_Parser_addBuiltinTrailingParser___spec__1(x_3, x_42, x_62); -x_64 = lean::io_ref_set(x_1, x_63, x_44); -return x_64; + x_44 = x_42; } +lean::cnstr_set(x_44, 0, x_38); +lean::cnstr_set(x_44, 1, x_39); +lean::cnstr_set(x_44, 2, x_43); +lean::cnstr_set(x_44, 3, x_41); +x_45 = lean::io_ref_set(x_1, x_44, x_33); +return x_45; } } } else { -uint8 x_65; +uint8 x_46; lean::dec(x_12); lean::dec(x_3); -x_65 = !lean::is_exclusive(x_13); -if (x_65 == 0) +x_46 = !lean::is_exclusive(x_13); +if (x_46 == 0) { return x_13; } else { -obj* x_66; obj* x_67; obj* x_68; -x_66 = lean::cnstr_get(x_13, 0); -x_67 = lean::cnstr_get(x_13, 1); -lean::inc(x_67); -lean::inc(x_66); +obj* x_47; obj* x_48; obj* x_49; +x_47 = lean::cnstr_get(x_13, 0); +x_48 = lean::cnstr_get(x_13, 1); +lean::inc(x_48); +lean::inc(x_47); lean::dec(x_13); -x_68 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_68, 0, x_66); -lean::cnstr_set(x_68, 1, x_67); -return x_68; +x_49 = lean::alloc_cnstr(1, 2, 0); +lean::cnstr_set(x_49, 0, x_47); +lean::cnstr_set(x_49, 1, x_48); +return x_49; } } } else { -obj* x_69; obj* x_70; obj* x_71; obj* x_72; -x_69 = lean::cnstr_get(x_9, 1); -lean::inc(x_69); +obj* x_50; obj* x_51; obj* x_52; obj* x_53; +x_50 = lean::cnstr_get(x_9, 1); +lean::inc(x_50); lean::dec(x_9); -x_70 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_70, 0, x_8); -lean::cnstr_set(x_70, 1, x_69); -x_71 = lean::cnstr_get(x_3, 0); -lean::inc(x_71); -lean::inc(x_71); -x_72 = l___private_init_lean_parser_parser_7__updateTokens(x_7, x_71, x_70); -if (lean::obj_tag(x_72) == 0) +x_51 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_51, 0, x_8); +lean::cnstr_set(x_51, 1, x_50); +x_52 = lean::cnstr_get(x_3, 0); +lean::inc(x_52); +lean::inc(x_52); +x_53 = l___private_init_lean_parser_parser_7__updateTokens(x_7, x_52, x_51); +if (lean::obj_tag(x_53) == 0) { -obj* x_73; obj* x_74; obj* x_75; obj* x_76; obj* x_77; -x_73 = lean::cnstr_get(x_72, 0); -lean::inc(x_73); -x_74 = lean::cnstr_get(x_72, 1); -lean::inc(x_74); -if (lean::is_exclusive(x_72)) { - lean::cnstr_release(x_72, 0); - lean::cnstr_release(x_72, 1); - x_75 = x_72; +obj* x_54; obj* x_55; obj* x_56; obj* x_57; obj* x_58; +x_54 = lean::cnstr_get(x_53, 0); +lean::inc(x_54); +x_55 = lean::cnstr_get(x_53, 1); +lean::inc(x_55); +if (lean::is_exclusive(x_53)) { + lean::cnstr_release(x_53, 0); + lean::cnstr_release(x_53, 1); + x_56 = x_53; } else { - lean::dec_ref(x_72); - x_75 = lean::box(0); + lean::dec_ref(x_53); + x_56 = lean::box(0); } -if (lean::is_scalar(x_75)) { - x_76 = lean::alloc_cnstr(0, 2, 0); +if (lean::is_scalar(x_56)) { + x_57 = lean::alloc_cnstr(0, 2, 0); } else { - x_76 = x_75; + x_57 = x_56; } -lean::cnstr_set(x_76, 0, x_8); -lean::cnstr_set(x_76, 1, x_74); -x_77 = lean::cnstr_get(x_71, 1); -lean::inc(x_77); -lean::dec(x_71); -switch (lean::obj_tag(x_77)) { -case 0: +lean::cnstr_set(x_57, 0, x_8); +lean::cnstr_set(x_57, 1, x_55); +x_58 = lean::cnstr_get(x_52, 1); +lean::inc(x_58); +lean::dec(x_52); +if (lean::obj_tag(x_58) == 2) { -obj* x_78; obj* x_79; obj* x_80; obj* x_81; obj* x_82; obj* x_83; obj* x_84; obj* x_85; -x_78 = lean::cnstr_get(x_73, 0); -lean::inc(x_78); -x_79 = lean::cnstr_get(x_73, 1); -lean::inc(x_79); -x_80 = lean::cnstr_get(x_73, 2); -lean::inc(x_80); -x_81 = lean::cnstr_get(x_73, 3); -lean::inc(x_81); -if (lean::is_exclusive(x_73)) { - lean::cnstr_release(x_73, 0); - lean::cnstr_release(x_73, 1); - lean::cnstr_release(x_73, 2); - lean::cnstr_release(x_73, 3); - x_82 = x_73; -} else { - lean::dec_ref(x_73); - x_82 = lean::box(0); +obj* x_59; obj* x_60; obj* x_61; +x_59 = lean::cnstr_get(x_58, 0); +lean::inc(x_59); +lean::dec(x_58); +x_60 = l_List_foldl___main___at_Lean_Parser_addBuiltinTrailingParser___spec__1(x_3, x_54, x_59); +x_61 = lean::io_ref_set(x_1, x_60, x_57); +return x_61; } -x_83 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_83, 0, x_3); -lean::cnstr_set(x_83, 1, x_80); -if (lean::is_scalar(x_82)) { - x_84 = lean::alloc_cnstr(0, 4, 0); -} else { - x_84 = x_82; -} -lean::cnstr_set(x_84, 0, x_78); -lean::cnstr_set(x_84, 1, x_79); -lean::cnstr_set(x_84, 2, x_83); -lean::cnstr_set(x_84, 3, x_81); -x_85 = lean::io_ref_set(x_1, x_84, x_76); -return x_85; -} -case 1: +else { -obj* x_86; obj* x_87; obj* x_88; obj* x_89; obj* x_90; obj* x_91; obj* x_92; obj* x_93; -x_86 = lean::cnstr_get(x_73, 0); -lean::inc(x_86); -x_87 = lean::cnstr_get(x_73, 1); -lean::inc(x_87); -x_88 = lean::cnstr_get(x_73, 2); -lean::inc(x_88); -x_89 = lean::cnstr_get(x_73, 3); -lean::inc(x_89); -if (lean::is_exclusive(x_73)) { - lean::cnstr_release(x_73, 0); - lean::cnstr_release(x_73, 1); - lean::cnstr_release(x_73, 2); - lean::cnstr_release(x_73, 3); - x_90 = x_73; +obj* x_62; obj* x_63; obj* x_64; obj* x_65; obj* x_66; obj* x_67; obj* x_68; obj* x_69; +lean::dec(x_58); +x_62 = lean::cnstr_get(x_54, 0); +lean::inc(x_62); +x_63 = lean::cnstr_get(x_54, 1); +lean::inc(x_63); +x_64 = lean::cnstr_get(x_54, 2); +lean::inc(x_64); +x_65 = lean::cnstr_get(x_54, 3); +lean::inc(x_65); +if (lean::is_exclusive(x_54)) { + lean::cnstr_release(x_54, 0); + lean::cnstr_release(x_54, 1); + lean::cnstr_release(x_54, 2); + lean::cnstr_release(x_54, 3); + x_66 = x_54; } else { - lean::dec_ref(x_73); - x_90 = lean::box(0); + lean::dec_ref(x_54); + x_66 = lean::box(0); } -x_91 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_91, 0, x_3); -lean::cnstr_set(x_91, 1, x_88); -if (lean::is_scalar(x_90)) { - x_92 = lean::alloc_cnstr(0, 4, 0); +x_67 = lean::alloc_cnstr(1, 2, 0); +lean::cnstr_set(x_67, 0, x_3); +lean::cnstr_set(x_67, 1, x_64); +if (lean::is_scalar(x_66)) { + x_68 = lean::alloc_cnstr(0, 4, 0); } else { - x_92 = x_90; -} -lean::cnstr_set(x_92, 0, x_86); -lean::cnstr_set(x_92, 1, x_87); -lean::cnstr_set(x_92, 2, x_91); -lean::cnstr_set(x_92, 3, x_89); -x_93 = lean::io_ref_set(x_1, x_92, x_76); -return x_93; -} -default: -{ -obj* x_94; obj* x_95; obj* x_96; -x_94 = lean::cnstr_get(x_77, 0); -lean::inc(x_94); -lean::dec(x_77); -x_95 = l_List_foldl___main___at_Lean_Parser_addBuiltinTrailingParser___spec__1(x_3, x_73, x_94); -x_96 = lean::io_ref_set(x_1, x_95, x_76); -return x_96; + x_68 = x_66; } +lean::cnstr_set(x_68, 0, x_62); +lean::cnstr_set(x_68, 1, x_63); +lean::cnstr_set(x_68, 2, x_67); +lean::cnstr_set(x_68, 3, x_65); +x_69 = lean::io_ref_set(x_1, x_68, x_57); +return x_69; } } else { -obj* x_97; obj* x_98; obj* x_99; obj* x_100; -lean::dec(x_71); +obj* x_70; obj* x_71; obj* x_72; obj* x_73; +lean::dec(x_52); lean::dec(x_3); -x_97 = lean::cnstr_get(x_72, 0); -lean::inc(x_97); -x_98 = lean::cnstr_get(x_72, 1); -lean::inc(x_98); -if (lean::is_exclusive(x_72)) { - lean::cnstr_release(x_72, 0); - lean::cnstr_release(x_72, 1); - x_99 = x_72; +x_70 = lean::cnstr_get(x_53, 0); +lean::inc(x_70); +x_71 = lean::cnstr_get(x_53, 1); +lean::inc(x_71); +if (lean::is_exclusive(x_53)) { + lean::cnstr_release(x_53, 0); + lean::cnstr_release(x_53, 1); + x_72 = x_53; } else { - lean::dec_ref(x_72); - x_99 = lean::box(0); + lean::dec_ref(x_53); + x_72 = lean::box(0); } -if (lean::is_scalar(x_99)) { - x_100 = lean::alloc_cnstr(1, 2, 0); +if (lean::is_scalar(x_72)) { + x_73 = lean::alloc_cnstr(1, 2, 0); } else { - x_100 = x_99; + x_73 = x_72; } -lean::cnstr_set(x_100, 0, x_97); -lean::cnstr_set(x_100, 1, x_98); -return x_100; +lean::cnstr_set(x_73, 0, x_70); +lean::cnstr_set(x_73, 1, x_71); +return x_73; } } } else { -uint8 x_101; +uint8 x_74; lean::dec(x_7); lean::dec(x_3); -x_101 = !lean::is_exclusive(x_9); -if (x_101 == 0) +x_74 = !lean::is_exclusive(x_9); +if (x_74 == 0) { return x_9; } else { -obj* x_102; obj* x_103; obj* x_104; -x_102 = lean::cnstr_get(x_9, 0); -x_103 = lean::cnstr_get(x_9, 1); -lean::inc(x_103); -lean::inc(x_102); +obj* x_75; obj* x_76; obj* x_77; +x_75 = lean::cnstr_get(x_9, 0); +x_76 = lean::cnstr_get(x_9, 1); +lean::inc(x_76); +lean::inc(x_75); lean::dec(x_9); -x_104 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_104, 0, x_102); -lean::cnstr_set(x_104, 1, x_103); -return x_104; +x_77 = lean::alloc_cnstr(1, 2, 0); +lean::cnstr_set(x_77, 0, x_75); +lean::cnstr_set(x_77, 1, x_76); +return x_77; } } } else { -obj* x_105; obj* x_106; obj* x_107; obj* x_108; obj* x_109; -x_105 = lean::cnstr_get(x_5, 0); -x_106 = lean::cnstr_get(x_5, 1); -lean::inc(x_106); -lean::inc(x_105); +obj* x_78; obj* x_79; obj* x_80; obj* x_81; obj* x_82; +x_78 = lean::cnstr_get(x_5, 0); +x_79 = lean::cnstr_get(x_5, 1); +lean::inc(x_79); +lean::inc(x_78); lean::dec(x_5); -x_107 = lean::box(0); -x_108 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_108, 0, x_107); -lean::cnstr_set(x_108, 1, x_106); -x_109 = lean::io_ref_reset(x_1, x_108); -if (lean::obj_tag(x_109) == 0) +x_80 = lean::box(0); +x_81 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_81, 0, x_80); +lean::cnstr_set(x_81, 1, x_79); +x_82 = lean::io_ref_reset(x_1, x_81); +if (lean::obj_tag(x_82) == 0) { -obj* x_110; obj* x_111; obj* x_112; obj* x_113; obj* x_114; -x_110 = lean::cnstr_get(x_109, 1); -lean::inc(x_110); -if (lean::is_exclusive(x_109)) { - lean::cnstr_release(x_109, 0); - lean::cnstr_release(x_109, 1); - x_111 = x_109; +obj* x_83; obj* x_84; obj* x_85; obj* x_86; obj* x_87; +x_83 = lean::cnstr_get(x_82, 1); +lean::inc(x_83); +if (lean::is_exclusive(x_82)) { + lean::cnstr_release(x_82, 0); + lean::cnstr_release(x_82, 1); + x_84 = x_82; } else { - lean::dec_ref(x_109); - x_111 = lean::box(0); + lean::dec_ref(x_82); + x_84 = lean::box(0); } -if (lean::is_scalar(x_111)) { - x_112 = lean::alloc_cnstr(0, 2, 0); +if (lean::is_scalar(x_84)) { + x_85 = lean::alloc_cnstr(0, 2, 0); } else { - x_112 = x_111; + x_85 = x_84; } -lean::cnstr_set(x_112, 0, x_107); -lean::cnstr_set(x_112, 1, x_110); -x_113 = lean::cnstr_get(x_3, 0); -lean::inc(x_113); -lean::inc(x_113); -x_114 = l___private_init_lean_parser_parser_7__updateTokens(x_105, x_113, x_112); -if (lean::obj_tag(x_114) == 0) +lean::cnstr_set(x_85, 0, x_80); +lean::cnstr_set(x_85, 1, x_83); +x_86 = lean::cnstr_get(x_3, 0); +lean::inc(x_86); +lean::inc(x_86); +x_87 = l___private_init_lean_parser_parser_7__updateTokens(x_78, x_86, x_85); +if (lean::obj_tag(x_87) == 0) { -obj* x_115; obj* x_116; obj* x_117; obj* x_118; obj* x_119; -x_115 = lean::cnstr_get(x_114, 0); -lean::inc(x_115); -x_116 = lean::cnstr_get(x_114, 1); -lean::inc(x_116); -if (lean::is_exclusive(x_114)) { - lean::cnstr_release(x_114, 0); - lean::cnstr_release(x_114, 1); - x_117 = x_114; +obj* x_88; obj* x_89; obj* x_90; obj* x_91; obj* x_92; +x_88 = lean::cnstr_get(x_87, 0); +lean::inc(x_88); +x_89 = lean::cnstr_get(x_87, 1); +lean::inc(x_89); +if (lean::is_exclusive(x_87)) { + lean::cnstr_release(x_87, 0); + lean::cnstr_release(x_87, 1); + x_90 = x_87; } else { - lean::dec_ref(x_114); - x_117 = lean::box(0); + lean::dec_ref(x_87); + x_90 = lean::box(0); } -if (lean::is_scalar(x_117)) { - x_118 = lean::alloc_cnstr(0, 2, 0); +if (lean::is_scalar(x_90)) { + x_91 = lean::alloc_cnstr(0, 2, 0); } else { - x_118 = x_117; + x_91 = x_90; } -lean::cnstr_set(x_118, 0, x_107); -lean::cnstr_set(x_118, 1, x_116); -x_119 = lean::cnstr_get(x_113, 1); -lean::inc(x_119); -lean::dec(x_113); -switch (lean::obj_tag(x_119)) { -case 0: +lean::cnstr_set(x_91, 0, x_80); +lean::cnstr_set(x_91, 1, x_89); +x_92 = lean::cnstr_get(x_86, 1); +lean::inc(x_92); +lean::dec(x_86); +if (lean::obj_tag(x_92) == 2) { -obj* x_120; obj* x_121; obj* x_122; obj* x_123; obj* x_124; obj* x_125; obj* x_126; obj* x_127; -x_120 = lean::cnstr_get(x_115, 0); -lean::inc(x_120); -x_121 = lean::cnstr_get(x_115, 1); -lean::inc(x_121); -x_122 = lean::cnstr_get(x_115, 2); -lean::inc(x_122); -x_123 = lean::cnstr_get(x_115, 3); -lean::inc(x_123); -if (lean::is_exclusive(x_115)) { - lean::cnstr_release(x_115, 0); - lean::cnstr_release(x_115, 1); - lean::cnstr_release(x_115, 2); - lean::cnstr_release(x_115, 3); - x_124 = x_115; -} else { - lean::dec_ref(x_115); - x_124 = lean::box(0); +obj* x_93; obj* x_94; obj* x_95; +x_93 = lean::cnstr_get(x_92, 0); +lean::inc(x_93); +lean::dec(x_92); +x_94 = l_List_foldl___main___at_Lean_Parser_addBuiltinTrailingParser___spec__1(x_3, x_88, x_93); +x_95 = lean::io_ref_set(x_1, x_94, x_91); +return x_95; } -x_125 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_125, 0, x_3); -lean::cnstr_set(x_125, 1, x_122); -if (lean::is_scalar(x_124)) { - x_126 = lean::alloc_cnstr(0, 4, 0); -} else { - x_126 = x_124; -} -lean::cnstr_set(x_126, 0, x_120); -lean::cnstr_set(x_126, 1, x_121); -lean::cnstr_set(x_126, 2, x_125); -lean::cnstr_set(x_126, 3, x_123); -x_127 = lean::io_ref_set(x_1, x_126, x_118); -return x_127; -} -case 1: +else { -obj* x_128; obj* x_129; obj* x_130; obj* x_131; obj* x_132; obj* x_133; obj* x_134; obj* x_135; -x_128 = lean::cnstr_get(x_115, 0); -lean::inc(x_128); -x_129 = lean::cnstr_get(x_115, 1); -lean::inc(x_129); -x_130 = lean::cnstr_get(x_115, 2); -lean::inc(x_130); -x_131 = lean::cnstr_get(x_115, 3); -lean::inc(x_131); -if (lean::is_exclusive(x_115)) { - lean::cnstr_release(x_115, 0); - lean::cnstr_release(x_115, 1); - lean::cnstr_release(x_115, 2); - lean::cnstr_release(x_115, 3); - x_132 = x_115; +obj* x_96; obj* x_97; obj* x_98; obj* x_99; obj* x_100; obj* x_101; obj* x_102; obj* x_103; +lean::dec(x_92); +x_96 = lean::cnstr_get(x_88, 0); +lean::inc(x_96); +x_97 = lean::cnstr_get(x_88, 1); +lean::inc(x_97); +x_98 = lean::cnstr_get(x_88, 2); +lean::inc(x_98); +x_99 = lean::cnstr_get(x_88, 3); +lean::inc(x_99); +if (lean::is_exclusive(x_88)) { + lean::cnstr_release(x_88, 0); + lean::cnstr_release(x_88, 1); + lean::cnstr_release(x_88, 2); + lean::cnstr_release(x_88, 3); + x_100 = x_88; } else { - lean::dec_ref(x_115); - x_132 = lean::box(0); + lean::dec_ref(x_88); + x_100 = lean::box(0); } -x_133 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_133, 0, x_3); -lean::cnstr_set(x_133, 1, x_130); -if (lean::is_scalar(x_132)) { - x_134 = lean::alloc_cnstr(0, 4, 0); +x_101 = lean::alloc_cnstr(1, 2, 0); +lean::cnstr_set(x_101, 0, x_3); +lean::cnstr_set(x_101, 1, x_98); +if (lean::is_scalar(x_100)) { + x_102 = lean::alloc_cnstr(0, 4, 0); } else { - x_134 = x_132; + x_102 = x_100; } -lean::cnstr_set(x_134, 0, x_128); -lean::cnstr_set(x_134, 1, x_129); -lean::cnstr_set(x_134, 2, x_133); -lean::cnstr_set(x_134, 3, x_131); -x_135 = lean::io_ref_set(x_1, x_134, x_118); -return x_135; +lean::cnstr_set(x_102, 0, x_96); +lean::cnstr_set(x_102, 1, x_97); +lean::cnstr_set(x_102, 2, x_101); +lean::cnstr_set(x_102, 3, x_99); +x_103 = lean::io_ref_set(x_1, x_102, x_91); +return x_103; } -default: +} +else { -obj* x_136; obj* x_137; obj* x_138; -x_136 = lean::cnstr_get(x_119, 0); -lean::inc(x_136); -lean::dec(x_119); -x_137 = l_List_foldl___main___at_Lean_Parser_addBuiltinTrailingParser___spec__1(x_3, x_115, x_136); -x_138 = lean::io_ref_set(x_1, x_137, x_118); -return x_138; +obj* x_104; obj* x_105; obj* x_106; obj* x_107; +lean::dec(x_86); +lean::dec(x_3); +x_104 = lean::cnstr_get(x_87, 0); +lean::inc(x_104); +x_105 = lean::cnstr_get(x_87, 1); +lean::inc(x_105); +if (lean::is_exclusive(x_87)) { + lean::cnstr_release(x_87, 0); + lean::cnstr_release(x_87, 1); + x_106 = x_87; +} else { + lean::dec_ref(x_87); + x_106 = lean::box(0); +} +if (lean::is_scalar(x_106)) { + x_107 = lean::alloc_cnstr(1, 2, 0); +} else { + x_107 = x_106; +} +lean::cnstr_set(x_107, 0, x_104); +lean::cnstr_set(x_107, 1, x_105); +return x_107; +} +} +else +{ +obj* x_108; obj* x_109; obj* x_110; obj* x_111; +lean::dec(x_78); +lean::dec(x_3); +x_108 = lean::cnstr_get(x_82, 0); +lean::inc(x_108); +x_109 = lean::cnstr_get(x_82, 1); +lean::inc(x_109); +if (lean::is_exclusive(x_82)) { + lean::cnstr_release(x_82, 0); + lean::cnstr_release(x_82, 1); + x_110 = x_82; +} else { + lean::dec_ref(x_82); + x_110 = lean::box(0); +} +if (lean::is_scalar(x_110)) { + x_111 = lean::alloc_cnstr(1, 2, 0); +} else { + x_111 = x_110; +} +lean::cnstr_set(x_111, 0, x_108); +lean::cnstr_set(x_111, 1, x_109); +return x_111; } } } else { -obj* x_139; obj* x_140; obj* x_141; obj* x_142; -lean::dec(x_113); +uint8 x_112; lean::dec(x_3); -x_139 = lean::cnstr_get(x_114, 0); -lean::inc(x_139); -x_140 = lean::cnstr_get(x_114, 1); -lean::inc(x_140); -if (lean::is_exclusive(x_114)) { - lean::cnstr_release(x_114, 0); - lean::cnstr_release(x_114, 1); - x_141 = x_114; -} else { - lean::dec_ref(x_114); - x_141 = lean::box(0); -} -if (lean::is_scalar(x_141)) { - x_142 = lean::alloc_cnstr(1, 2, 0); -} else { - x_142 = x_141; -} -lean::cnstr_set(x_142, 0, x_139); -lean::cnstr_set(x_142, 1, x_140); -return x_142; -} -} -else -{ -obj* x_143; obj* x_144; obj* x_145; obj* x_146; -lean::dec(x_105); -lean::dec(x_3); -x_143 = lean::cnstr_get(x_109, 0); -lean::inc(x_143); -x_144 = lean::cnstr_get(x_109, 1); -lean::inc(x_144); -if (lean::is_exclusive(x_109)) { - lean::cnstr_release(x_109, 0); - lean::cnstr_release(x_109, 1); - x_145 = x_109; -} else { - lean::dec_ref(x_109); - x_145 = lean::box(0); -} -if (lean::is_scalar(x_145)) { - x_146 = lean::alloc_cnstr(1, 2, 0); -} else { - x_146 = x_145; -} -lean::cnstr_set(x_146, 0, x_143); -lean::cnstr_set(x_146, 1, x_144); -return x_146; -} -} -} -else -{ -uint8 x_147; -lean::dec(x_3); -x_147 = !lean::is_exclusive(x_5); -if (x_147 == 0) +x_112 = !lean::is_exclusive(x_5); +if (x_112 == 0) { return x_5; } else { -obj* x_148; obj* x_149; obj* x_150; -x_148 = lean::cnstr_get(x_5, 0); -x_149 = lean::cnstr_get(x_5, 1); -lean::inc(x_149); -lean::inc(x_148); +obj* x_113; obj* x_114; obj* x_115; +x_113 = lean::cnstr_get(x_5, 0); +x_114 = lean::cnstr_get(x_5, 1); +lean::inc(x_114); +lean::inc(x_113); lean::dec(x_5); -x_150 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_150, 0, x_148); -lean::cnstr_set(x_150, 1, x_149); -return x_150; +x_115 = lean::alloc_cnstr(1, 2, 0); +lean::cnstr_set(x_115, 0, x_113); +lean::cnstr_set(x_115, 1, x_114); +return x_115; } } } diff --git a/src/stage0/init/lean/syntax.cpp b/src/stage0/init/lean/syntax.cpp index b8734288e8..96ecfb5196 100644 --- a/src/stage0/init/lean/syntax.cpp +++ b/src/stage0/init/lean/syntax.cpp @@ -701,10 +701,6 @@ obj* l_Lean_Syntax_flipScopes___main(obj* x_1) { _start: { switch (lean::obj_tag(x_1)) { -case 0: -{ -return x_1; -} case 1: { uint8 x_2; @@ -739,11 +735,7 @@ lean::cnstr_set(x_9, 2, x_8); return x_9; } } -case 2: -{ -return x_1; -} -default: +case 3: { uint8 x_10; x_10 = !lean::is_exclusive(x_1); @@ -783,6 +775,10 @@ lean::cnstr_set(x_19, 4, x_18); return x_19; } } +default: +{ +return x_1; +} } } } @@ -1453,243 +1449,234 @@ obj* l___private_init_lean_syntax_2__updateLeadingAux___main(obj* x_1, obj* x_2) _start: { switch (lean::obj_tag(x_1)) { -case 0: -{ -obj* x_3; obj* x_4; -x_3 = lean::box(0); -x_4 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_4, 0, x_3); -lean::cnstr_set(x_4, 1, x_2); -return x_4; -} -case 1: -{ -obj* x_5; obj* x_6; -lean::dec(x_1); -x_5 = lean::box(0); -x_6 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_6, 0, x_5); -lean::cnstr_set(x_6, 1, x_2); -return x_6; -} case 2: { -obj* x_7; +obj* x_3; +x_3 = lean::cnstr_get(x_1, 0); +lean::inc(x_3); +if (lean::obj_tag(x_3) == 0) +{ +obj* x_4; obj* x_5; +lean::dec(x_1); +x_4 = lean::box(0); +x_5 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_5, 0, x_4); +lean::cnstr_set(x_5, 1, x_2); +return x_5; +} +else +{ +uint8 x_6; +x_6 = !lean::is_exclusive(x_1); +if (x_6 == 0) +{ +obj* x_7; uint8 x_8; x_7 = lean::cnstr_get(x_1, 0); -lean::inc(x_7); -if (lean::obj_tag(x_7) == 0) -{ -obj* x_8; obj* x_9; -lean::dec(x_1); -x_8 = lean::box(0); -x_9 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_9, 0, x_8); -lean::cnstr_set(x_9, 1, x_2); -return x_9; -} -else -{ -uint8 x_10; -x_10 = !lean::is_exclusive(x_1); -if (x_10 == 0) -{ -obj* x_11; uint8 x_12; -x_11 = lean::cnstr_get(x_1, 0); -lean::dec(x_11); -x_12 = !lean::is_exclusive(x_7); -if (x_12 == 0) -{ -obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; -x_13 = lean::cnstr_get(x_7, 0); -x_14 = lean::cnstr_get(x_13, 2); -lean::inc(x_14); -x_15 = lean::cnstr_get(x_14, 2); -lean::inc(x_15); -lean::dec(x_14); -x_16 = l___private_init_lean_syntax_1__updateInfo___main(x_13, x_2); -lean::cnstr_set(x_7, 0, x_16); -x_17 = lean::alloc_cnstr(1, 1, 0); -lean::cnstr_set(x_17, 0, x_1); -x_18 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_18, 0, x_17); -lean::cnstr_set(x_18, 1, x_15); -return x_18; -} -else -{ -obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; -x_19 = lean::cnstr_get(x_7, 0); -lean::inc(x_19); lean::dec(x_7); -x_20 = lean::cnstr_get(x_19, 2); -lean::inc(x_20); -x_21 = lean::cnstr_get(x_20, 2); -lean::inc(x_21); -lean::dec(x_20); -x_22 = l___private_init_lean_syntax_1__updateInfo___main(x_19, x_2); -x_23 = lean::alloc_cnstr(1, 1, 0); -lean::cnstr_set(x_23, 0, x_22); -lean::cnstr_set(x_1, 0, x_23); -x_24 = lean::alloc_cnstr(1, 1, 0); -lean::cnstr_set(x_24, 0, x_1); -x_25 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_25, 0, x_24); -lean::cnstr_set(x_25, 1, x_21); -return x_25; +x_8 = !lean::is_exclusive(x_3); +if (x_8 == 0) +{ +obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; +x_9 = lean::cnstr_get(x_3, 0); +x_10 = lean::cnstr_get(x_9, 2); +lean::inc(x_10); +x_11 = lean::cnstr_get(x_10, 2); +lean::inc(x_11); +lean::dec(x_10); +x_12 = l___private_init_lean_syntax_1__updateInfo___main(x_9, x_2); +lean::cnstr_set(x_3, 0, x_12); +x_13 = lean::alloc_cnstr(1, 1, 0); +lean::cnstr_set(x_13, 0, x_1); +x_14 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_14, 0, x_13); +lean::cnstr_set(x_14, 1, x_11); +return x_14; +} +else +{ +obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; +x_15 = lean::cnstr_get(x_3, 0); +lean::inc(x_15); +lean::dec(x_3); +x_16 = lean::cnstr_get(x_15, 2); +lean::inc(x_16); +x_17 = lean::cnstr_get(x_16, 2); +lean::inc(x_17); +lean::dec(x_16); +x_18 = l___private_init_lean_syntax_1__updateInfo___main(x_15, x_2); +x_19 = lean::alloc_cnstr(1, 1, 0); +lean::cnstr_set(x_19, 0, x_18); +lean::cnstr_set(x_1, 0, x_19); +x_20 = lean::alloc_cnstr(1, 1, 0); +lean::cnstr_set(x_20, 0, x_1); +x_21 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_21, 0, x_20); +lean::cnstr_set(x_21, 1, x_17); +return x_21; } } else { -obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; obj* x_33; obj* x_34; obj* x_35; -x_26 = lean::cnstr_get(x_1, 1); -lean::inc(x_26); +obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; +x_22 = lean::cnstr_get(x_1, 1); +lean::inc(x_22); lean::dec(x_1); -x_27 = lean::cnstr_get(x_7, 0); -lean::inc(x_27); -if (lean::is_exclusive(x_7)) { - lean::cnstr_release(x_7, 0); - x_28 = x_7; +x_23 = lean::cnstr_get(x_3, 0); +lean::inc(x_23); +if (lean::is_exclusive(x_3)) { + lean::cnstr_release(x_3, 0); + x_24 = x_3; } else { - lean::dec_ref(x_7); - x_28 = lean::box(0); + lean::dec_ref(x_3); + x_24 = lean::box(0); } -x_29 = lean::cnstr_get(x_27, 2); -lean::inc(x_29); -x_30 = lean::cnstr_get(x_29, 2); -lean::inc(x_30); -lean::dec(x_29); -x_31 = l___private_init_lean_syntax_1__updateInfo___main(x_27, x_2); -if (lean::is_scalar(x_28)) { - x_32 = lean::alloc_cnstr(1, 1, 0); +x_25 = lean::cnstr_get(x_23, 2); +lean::inc(x_25); +x_26 = lean::cnstr_get(x_25, 2); +lean::inc(x_26); +lean::dec(x_25); +x_27 = l___private_init_lean_syntax_1__updateInfo___main(x_23, x_2); +if (lean::is_scalar(x_24)) { + x_28 = lean::alloc_cnstr(1, 1, 0); } else { - x_32 = x_28; + x_28 = x_24; } -lean::cnstr_set(x_32, 0, x_31); -x_33 = lean::alloc_cnstr(2, 2, 0); -lean::cnstr_set(x_33, 0, x_32); -lean::cnstr_set(x_33, 1, x_26); -x_34 = lean::alloc_cnstr(1, 1, 0); +lean::cnstr_set(x_28, 0, x_27); +x_29 = lean::alloc_cnstr(2, 2, 0); +lean::cnstr_set(x_29, 0, x_28); +lean::cnstr_set(x_29, 1, x_22); +x_30 = lean::alloc_cnstr(1, 1, 0); +lean::cnstr_set(x_30, 0, x_29); +x_31 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_31, 0, x_30); +lean::cnstr_set(x_31, 1, x_26); +return x_31; +} +} +} +case 3: +{ +obj* x_32; +x_32 = lean::cnstr_get(x_1, 0); +lean::inc(x_32); +if (lean::obj_tag(x_32) == 0) +{ +obj* x_33; obj* x_34; +lean::dec(x_1); +x_33 = lean::box(0); +x_34 = lean::alloc_cnstr(0, 2, 0); lean::cnstr_set(x_34, 0, x_33); -x_35 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_35, 0, x_34); -lean::cnstr_set(x_35, 1, x_30); -return x_35; +lean::cnstr_set(x_34, 1, x_2); +return x_34; +} +else +{ +uint8 x_35; +x_35 = !lean::is_exclusive(x_1); +if (x_35 == 0) +{ +obj* x_36; uint8 x_37; +x_36 = lean::cnstr_get(x_1, 0); +lean::dec(x_36); +x_37 = !lean::is_exclusive(x_32); +if (x_37 == 0) +{ +obj* x_38; obj* x_39; obj* x_40; obj* x_41; obj* x_42; obj* x_43; +x_38 = lean::cnstr_get(x_32, 0); +x_39 = lean::cnstr_get(x_38, 2); +lean::inc(x_39); +x_40 = lean::cnstr_get(x_39, 2); +lean::inc(x_40); +lean::dec(x_39); +x_41 = l___private_init_lean_syntax_1__updateInfo___main(x_38, x_2); +lean::cnstr_set(x_32, 0, x_41); +x_42 = lean::alloc_cnstr(1, 1, 0); +lean::cnstr_set(x_42, 0, x_1); +x_43 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_43, 0, x_42); +lean::cnstr_set(x_43, 1, x_40); +return x_43; +} +else +{ +obj* x_44; obj* x_45; obj* x_46; obj* x_47; obj* x_48; obj* x_49; obj* x_50; +x_44 = lean::cnstr_get(x_32, 0); +lean::inc(x_44); +lean::dec(x_32); +x_45 = lean::cnstr_get(x_44, 2); +lean::inc(x_45); +x_46 = lean::cnstr_get(x_45, 2); +lean::inc(x_46); +lean::dec(x_45); +x_47 = l___private_init_lean_syntax_1__updateInfo___main(x_44, x_2); +x_48 = lean::alloc_cnstr(1, 1, 0); +lean::cnstr_set(x_48, 0, x_47); +lean::cnstr_set(x_1, 0, x_48); +x_49 = lean::alloc_cnstr(1, 1, 0); +lean::cnstr_set(x_49, 0, x_1); +x_50 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_50, 0, x_49); +lean::cnstr_set(x_50, 1, x_46); +return x_50; +} +} +else +{ +obj* x_51; obj* x_52; obj* x_53; obj* x_54; obj* x_55; obj* x_56; obj* x_57; obj* x_58; obj* x_59; obj* x_60; obj* x_61; obj* x_62; obj* x_63; +x_51 = lean::cnstr_get(x_1, 1); +x_52 = lean::cnstr_get(x_1, 2); +x_53 = lean::cnstr_get(x_1, 3); +x_54 = lean::cnstr_get(x_1, 4); +lean::inc(x_54); +lean::inc(x_53); +lean::inc(x_52); +lean::inc(x_51); +lean::dec(x_1); +x_55 = lean::cnstr_get(x_32, 0); +lean::inc(x_55); +if (lean::is_exclusive(x_32)) { + lean::cnstr_release(x_32, 0); + x_56 = x_32; +} else { + lean::dec_ref(x_32); + x_56 = lean::box(0); +} +x_57 = lean::cnstr_get(x_55, 2); +lean::inc(x_57); +x_58 = lean::cnstr_get(x_57, 2); +lean::inc(x_58); +lean::dec(x_57); +x_59 = l___private_init_lean_syntax_1__updateInfo___main(x_55, x_2); +if (lean::is_scalar(x_56)) { + x_60 = lean::alloc_cnstr(1, 1, 0); +} else { + x_60 = x_56; +} +lean::cnstr_set(x_60, 0, x_59); +x_61 = lean::alloc_cnstr(3, 5, 0); +lean::cnstr_set(x_61, 0, x_60); +lean::cnstr_set(x_61, 1, x_51); +lean::cnstr_set(x_61, 2, x_52); +lean::cnstr_set(x_61, 3, x_53); +lean::cnstr_set(x_61, 4, x_54); +x_62 = lean::alloc_cnstr(1, 1, 0); +lean::cnstr_set(x_62, 0, x_61); +x_63 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_63, 0, x_62); +lean::cnstr_set(x_63, 1, x_58); +return x_63; } } } default: { -obj* x_36; -x_36 = lean::cnstr_get(x_1, 0); -lean::inc(x_36); -if (lean::obj_tag(x_36) == 0) -{ -obj* x_37; obj* x_38; +obj* x_64; obj* x_65; lean::dec(x_1); -x_37 = lean::box(0); -x_38 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_38, 0, x_37); -lean::cnstr_set(x_38, 1, x_2); -return x_38; -} -else -{ -uint8 x_39; -x_39 = !lean::is_exclusive(x_1); -if (x_39 == 0) -{ -obj* x_40; uint8 x_41; -x_40 = lean::cnstr_get(x_1, 0); -lean::dec(x_40); -x_41 = !lean::is_exclusive(x_36); -if (x_41 == 0) -{ -obj* x_42; obj* x_43; obj* x_44; obj* x_45; obj* x_46; obj* x_47; -x_42 = lean::cnstr_get(x_36, 0); -x_43 = lean::cnstr_get(x_42, 2); -lean::inc(x_43); -x_44 = lean::cnstr_get(x_43, 2); -lean::inc(x_44); -lean::dec(x_43); -x_45 = l___private_init_lean_syntax_1__updateInfo___main(x_42, x_2); -lean::cnstr_set(x_36, 0, x_45); -x_46 = lean::alloc_cnstr(1, 1, 0); -lean::cnstr_set(x_46, 0, x_1); -x_47 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_47, 0, x_46); -lean::cnstr_set(x_47, 1, x_44); -return x_47; -} -else -{ -obj* x_48; obj* x_49; obj* x_50; obj* x_51; obj* x_52; obj* x_53; obj* x_54; -x_48 = lean::cnstr_get(x_36, 0); -lean::inc(x_48); -lean::dec(x_36); -x_49 = lean::cnstr_get(x_48, 2); -lean::inc(x_49); -x_50 = lean::cnstr_get(x_49, 2); -lean::inc(x_50); -lean::dec(x_49); -x_51 = l___private_init_lean_syntax_1__updateInfo___main(x_48, x_2); -x_52 = lean::alloc_cnstr(1, 1, 0); -lean::cnstr_set(x_52, 0, x_51); -lean::cnstr_set(x_1, 0, x_52); -x_53 = lean::alloc_cnstr(1, 1, 0); -lean::cnstr_set(x_53, 0, x_1); -x_54 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_54, 0, x_53); -lean::cnstr_set(x_54, 1, x_50); -return x_54; -} -} -else -{ -obj* x_55; obj* x_56; obj* x_57; obj* x_58; obj* x_59; obj* x_60; obj* x_61; obj* x_62; obj* x_63; obj* x_64; obj* x_65; obj* x_66; obj* x_67; -x_55 = lean::cnstr_get(x_1, 1); -x_56 = lean::cnstr_get(x_1, 2); -x_57 = lean::cnstr_get(x_1, 3); -x_58 = lean::cnstr_get(x_1, 4); -lean::inc(x_58); -lean::inc(x_57); -lean::inc(x_56); -lean::inc(x_55); -lean::dec(x_1); -x_59 = lean::cnstr_get(x_36, 0); -lean::inc(x_59); -if (lean::is_exclusive(x_36)) { - lean::cnstr_release(x_36, 0); - x_60 = x_36; -} else { - lean::dec_ref(x_36); - x_60 = lean::box(0); -} -x_61 = lean::cnstr_get(x_59, 2); -lean::inc(x_61); -x_62 = lean::cnstr_get(x_61, 2); -lean::inc(x_62); -lean::dec(x_61); -x_63 = l___private_init_lean_syntax_1__updateInfo___main(x_59, x_2); -if (lean::is_scalar(x_60)) { - x_64 = lean::alloc_cnstr(1, 1, 0); -} else { - x_64 = x_60; -} -lean::cnstr_set(x_64, 0, x_63); -x_65 = lean::alloc_cnstr(3, 5, 0); +x_64 = lean::box(0); +x_65 = lean::alloc_cnstr(0, 2, 0); lean::cnstr_set(x_65, 0, x_64); -lean::cnstr_set(x_65, 1, x_55); -lean::cnstr_set(x_65, 2, x_56); -lean::cnstr_set(x_65, 3, x_57); -lean::cnstr_set(x_65, 4, x_58); -x_66 = lean::alloc_cnstr(1, 1, 0); -lean::cnstr_set(x_66, 0, x_65); -x_67 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_67, 0, x_66); -lean::cnstr_set(x_67, 1, x_62); -return x_67; -} -} +lean::cnstr_set(x_65, 1, x_2); +return x_65; } } } @@ -1698,243 +1685,234 @@ obj* l___private_init_lean_syntax_2__updateLeadingAux(obj* x_1, obj* x_2) { _start: { switch (lean::obj_tag(x_1)) { -case 0: -{ -obj* x_3; obj* x_4; -x_3 = lean::box(0); -x_4 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_4, 0, x_3); -lean::cnstr_set(x_4, 1, x_2); -return x_4; -} -case 1: -{ -obj* x_5; obj* x_6; -lean::dec(x_1); -x_5 = lean::box(0); -x_6 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_6, 0, x_5); -lean::cnstr_set(x_6, 1, x_2); -return x_6; -} case 2: { -obj* x_7; +obj* x_3; +x_3 = lean::cnstr_get(x_1, 0); +lean::inc(x_3); +if (lean::obj_tag(x_3) == 0) +{ +obj* x_4; obj* x_5; +lean::dec(x_1); +x_4 = lean::box(0); +x_5 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_5, 0, x_4); +lean::cnstr_set(x_5, 1, x_2); +return x_5; +} +else +{ +uint8 x_6; +x_6 = !lean::is_exclusive(x_1); +if (x_6 == 0) +{ +obj* x_7; uint8 x_8; x_7 = lean::cnstr_get(x_1, 0); -lean::inc(x_7); -if (lean::obj_tag(x_7) == 0) -{ -obj* x_8; obj* x_9; -lean::dec(x_1); -x_8 = lean::box(0); -x_9 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_9, 0, x_8); -lean::cnstr_set(x_9, 1, x_2); -return x_9; -} -else -{ -uint8 x_10; -x_10 = !lean::is_exclusive(x_1); -if (x_10 == 0) -{ -obj* x_11; uint8 x_12; -x_11 = lean::cnstr_get(x_1, 0); -lean::dec(x_11); -x_12 = !lean::is_exclusive(x_7); -if (x_12 == 0) -{ -obj* x_13; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; -x_13 = lean::cnstr_get(x_7, 0); -x_14 = lean::cnstr_get(x_13, 2); -lean::inc(x_14); -x_15 = lean::cnstr_get(x_14, 2); -lean::inc(x_15); -lean::dec(x_14); -x_16 = l___private_init_lean_syntax_1__updateInfo___main(x_13, x_2); -lean::cnstr_set(x_7, 0, x_16); -x_17 = lean::alloc_cnstr(1, 1, 0); -lean::cnstr_set(x_17, 0, x_1); -x_18 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_18, 0, x_17); -lean::cnstr_set(x_18, 1, x_15); -return x_18; -} -else -{ -obj* x_19; obj* x_20; obj* x_21; obj* x_22; obj* x_23; obj* x_24; obj* x_25; -x_19 = lean::cnstr_get(x_7, 0); -lean::inc(x_19); lean::dec(x_7); -x_20 = lean::cnstr_get(x_19, 2); -lean::inc(x_20); -x_21 = lean::cnstr_get(x_20, 2); -lean::inc(x_21); -lean::dec(x_20); -x_22 = l___private_init_lean_syntax_1__updateInfo___main(x_19, x_2); -x_23 = lean::alloc_cnstr(1, 1, 0); -lean::cnstr_set(x_23, 0, x_22); -lean::cnstr_set(x_1, 0, x_23); -x_24 = lean::alloc_cnstr(1, 1, 0); -lean::cnstr_set(x_24, 0, x_1); -x_25 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_25, 0, x_24); -lean::cnstr_set(x_25, 1, x_21); -return x_25; +x_8 = !lean::is_exclusive(x_3); +if (x_8 == 0) +{ +obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; +x_9 = lean::cnstr_get(x_3, 0); +x_10 = lean::cnstr_get(x_9, 2); +lean::inc(x_10); +x_11 = lean::cnstr_get(x_10, 2); +lean::inc(x_11); +lean::dec(x_10); +x_12 = l___private_init_lean_syntax_1__updateInfo___main(x_9, x_2); +lean::cnstr_set(x_3, 0, x_12); +x_13 = lean::alloc_cnstr(1, 1, 0); +lean::cnstr_set(x_13, 0, x_1); +x_14 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_14, 0, x_13); +lean::cnstr_set(x_14, 1, x_11); +return x_14; +} +else +{ +obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21; +x_15 = lean::cnstr_get(x_3, 0); +lean::inc(x_15); +lean::dec(x_3); +x_16 = lean::cnstr_get(x_15, 2); +lean::inc(x_16); +x_17 = lean::cnstr_get(x_16, 2); +lean::inc(x_17); +lean::dec(x_16); +x_18 = l___private_init_lean_syntax_1__updateInfo___main(x_15, x_2); +x_19 = lean::alloc_cnstr(1, 1, 0); +lean::cnstr_set(x_19, 0, x_18); +lean::cnstr_set(x_1, 0, x_19); +x_20 = lean::alloc_cnstr(1, 1, 0); +lean::cnstr_set(x_20, 0, x_1); +x_21 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_21, 0, x_20); +lean::cnstr_set(x_21, 1, x_17); +return x_21; } } else { -obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; obj* x_32; obj* x_33; obj* x_34; obj* x_35; -x_26 = lean::cnstr_get(x_1, 1); -lean::inc(x_26); +obj* x_22; obj* x_23; obj* x_24; obj* x_25; obj* x_26; obj* x_27; obj* x_28; obj* x_29; obj* x_30; obj* x_31; +x_22 = lean::cnstr_get(x_1, 1); +lean::inc(x_22); lean::dec(x_1); -x_27 = lean::cnstr_get(x_7, 0); -lean::inc(x_27); -if (lean::is_exclusive(x_7)) { - lean::cnstr_release(x_7, 0); - x_28 = x_7; +x_23 = lean::cnstr_get(x_3, 0); +lean::inc(x_23); +if (lean::is_exclusive(x_3)) { + lean::cnstr_release(x_3, 0); + x_24 = x_3; } else { - lean::dec_ref(x_7); - x_28 = lean::box(0); + lean::dec_ref(x_3); + x_24 = lean::box(0); } -x_29 = lean::cnstr_get(x_27, 2); -lean::inc(x_29); -x_30 = lean::cnstr_get(x_29, 2); -lean::inc(x_30); -lean::dec(x_29); -x_31 = l___private_init_lean_syntax_1__updateInfo___main(x_27, x_2); -if (lean::is_scalar(x_28)) { - x_32 = lean::alloc_cnstr(1, 1, 0); +x_25 = lean::cnstr_get(x_23, 2); +lean::inc(x_25); +x_26 = lean::cnstr_get(x_25, 2); +lean::inc(x_26); +lean::dec(x_25); +x_27 = l___private_init_lean_syntax_1__updateInfo___main(x_23, x_2); +if (lean::is_scalar(x_24)) { + x_28 = lean::alloc_cnstr(1, 1, 0); } else { - x_32 = x_28; + x_28 = x_24; } -lean::cnstr_set(x_32, 0, x_31); -x_33 = lean::alloc_cnstr(2, 2, 0); -lean::cnstr_set(x_33, 0, x_32); -lean::cnstr_set(x_33, 1, x_26); -x_34 = lean::alloc_cnstr(1, 1, 0); +lean::cnstr_set(x_28, 0, x_27); +x_29 = lean::alloc_cnstr(2, 2, 0); +lean::cnstr_set(x_29, 0, x_28); +lean::cnstr_set(x_29, 1, x_22); +x_30 = lean::alloc_cnstr(1, 1, 0); +lean::cnstr_set(x_30, 0, x_29); +x_31 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_31, 0, x_30); +lean::cnstr_set(x_31, 1, x_26); +return x_31; +} +} +} +case 3: +{ +obj* x_32; +x_32 = lean::cnstr_get(x_1, 0); +lean::inc(x_32); +if (lean::obj_tag(x_32) == 0) +{ +obj* x_33; obj* x_34; +lean::dec(x_1); +x_33 = lean::box(0); +x_34 = lean::alloc_cnstr(0, 2, 0); lean::cnstr_set(x_34, 0, x_33); -x_35 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_35, 0, x_34); -lean::cnstr_set(x_35, 1, x_30); -return x_35; +lean::cnstr_set(x_34, 1, x_2); +return x_34; +} +else +{ +uint8 x_35; +x_35 = !lean::is_exclusive(x_1); +if (x_35 == 0) +{ +obj* x_36; uint8 x_37; +x_36 = lean::cnstr_get(x_1, 0); +lean::dec(x_36); +x_37 = !lean::is_exclusive(x_32); +if (x_37 == 0) +{ +obj* x_38; obj* x_39; obj* x_40; obj* x_41; obj* x_42; obj* x_43; +x_38 = lean::cnstr_get(x_32, 0); +x_39 = lean::cnstr_get(x_38, 2); +lean::inc(x_39); +x_40 = lean::cnstr_get(x_39, 2); +lean::inc(x_40); +lean::dec(x_39); +x_41 = l___private_init_lean_syntax_1__updateInfo___main(x_38, x_2); +lean::cnstr_set(x_32, 0, x_41); +x_42 = lean::alloc_cnstr(1, 1, 0); +lean::cnstr_set(x_42, 0, x_1); +x_43 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_43, 0, x_42); +lean::cnstr_set(x_43, 1, x_40); +return x_43; +} +else +{ +obj* x_44; obj* x_45; obj* x_46; obj* x_47; obj* x_48; obj* x_49; obj* x_50; +x_44 = lean::cnstr_get(x_32, 0); +lean::inc(x_44); +lean::dec(x_32); +x_45 = lean::cnstr_get(x_44, 2); +lean::inc(x_45); +x_46 = lean::cnstr_get(x_45, 2); +lean::inc(x_46); +lean::dec(x_45); +x_47 = l___private_init_lean_syntax_1__updateInfo___main(x_44, x_2); +x_48 = lean::alloc_cnstr(1, 1, 0); +lean::cnstr_set(x_48, 0, x_47); +lean::cnstr_set(x_1, 0, x_48); +x_49 = lean::alloc_cnstr(1, 1, 0); +lean::cnstr_set(x_49, 0, x_1); +x_50 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_50, 0, x_49); +lean::cnstr_set(x_50, 1, x_46); +return x_50; +} +} +else +{ +obj* x_51; obj* x_52; obj* x_53; obj* x_54; obj* x_55; obj* x_56; obj* x_57; obj* x_58; obj* x_59; obj* x_60; obj* x_61; obj* x_62; obj* x_63; +x_51 = lean::cnstr_get(x_1, 1); +x_52 = lean::cnstr_get(x_1, 2); +x_53 = lean::cnstr_get(x_1, 3); +x_54 = lean::cnstr_get(x_1, 4); +lean::inc(x_54); +lean::inc(x_53); +lean::inc(x_52); +lean::inc(x_51); +lean::dec(x_1); +x_55 = lean::cnstr_get(x_32, 0); +lean::inc(x_55); +if (lean::is_exclusive(x_32)) { + lean::cnstr_release(x_32, 0); + x_56 = x_32; +} else { + lean::dec_ref(x_32); + x_56 = lean::box(0); +} +x_57 = lean::cnstr_get(x_55, 2); +lean::inc(x_57); +x_58 = lean::cnstr_get(x_57, 2); +lean::inc(x_58); +lean::dec(x_57); +x_59 = l___private_init_lean_syntax_1__updateInfo___main(x_55, x_2); +if (lean::is_scalar(x_56)) { + x_60 = lean::alloc_cnstr(1, 1, 0); +} else { + x_60 = x_56; +} +lean::cnstr_set(x_60, 0, x_59); +x_61 = lean::alloc_cnstr(3, 5, 0); +lean::cnstr_set(x_61, 0, x_60); +lean::cnstr_set(x_61, 1, x_51); +lean::cnstr_set(x_61, 2, x_52); +lean::cnstr_set(x_61, 3, x_53); +lean::cnstr_set(x_61, 4, x_54); +x_62 = lean::alloc_cnstr(1, 1, 0); +lean::cnstr_set(x_62, 0, x_61); +x_63 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_63, 0, x_62); +lean::cnstr_set(x_63, 1, x_58); +return x_63; } } } default: { -obj* x_36; -x_36 = lean::cnstr_get(x_1, 0); -lean::inc(x_36); -if (lean::obj_tag(x_36) == 0) -{ -obj* x_37; obj* x_38; +obj* x_64; obj* x_65; lean::dec(x_1); -x_37 = lean::box(0); -x_38 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_38, 0, x_37); -lean::cnstr_set(x_38, 1, x_2); -return x_38; -} -else -{ -uint8 x_39; -x_39 = !lean::is_exclusive(x_1); -if (x_39 == 0) -{ -obj* x_40; uint8 x_41; -x_40 = lean::cnstr_get(x_1, 0); -lean::dec(x_40); -x_41 = !lean::is_exclusive(x_36); -if (x_41 == 0) -{ -obj* x_42; obj* x_43; obj* x_44; obj* x_45; obj* x_46; obj* x_47; -x_42 = lean::cnstr_get(x_36, 0); -x_43 = lean::cnstr_get(x_42, 2); -lean::inc(x_43); -x_44 = lean::cnstr_get(x_43, 2); -lean::inc(x_44); -lean::dec(x_43); -x_45 = l___private_init_lean_syntax_1__updateInfo___main(x_42, x_2); -lean::cnstr_set(x_36, 0, x_45); -x_46 = lean::alloc_cnstr(1, 1, 0); -lean::cnstr_set(x_46, 0, x_1); -x_47 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_47, 0, x_46); -lean::cnstr_set(x_47, 1, x_44); -return x_47; -} -else -{ -obj* x_48; obj* x_49; obj* x_50; obj* x_51; obj* x_52; obj* x_53; obj* x_54; -x_48 = lean::cnstr_get(x_36, 0); -lean::inc(x_48); -lean::dec(x_36); -x_49 = lean::cnstr_get(x_48, 2); -lean::inc(x_49); -x_50 = lean::cnstr_get(x_49, 2); -lean::inc(x_50); -lean::dec(x_49); -x_51 = l___private_init_lean_syntax_1__updateInfo___main(x_48, x_2); -x_52 = lean::alloc_cnstr(1, 1, 0); -lean::cnstr_set(x_52, 0, x_51); -lean::cnstr_set(x_1, 0, x_52); -x_53 = lean::alloc_cnstr(1, 1, 0); -lean::cnstr_set(x_53, 0, x_1); -x_54 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_54, 0, x_53); -lean::cnstr_set(x_54, 1, x_50); -return x_54; -} -} -else -{ -obj* x_55; obj* x_56; obj* x_57; obj* x_58; obj* x_59; obj* x_60; obj* x_61; obj* x_62; obj* x_63; obj* x_64; obj* x_65; obj* x_66; obj* x_67; -x_55 = lean::cnstr_get(x_1, 1); -x_56 = lean::cnstr_get(x_1, 2); -x_57 = lean::cnstr_get(x_1, 3); -x_58 = lean::cnstr_get(x_1, 4); -lean::inc(x_58); -lean::inc(x_57); -lean::inc(x_56); -lean::inc(x_55); -lean::dec(x_1); -x_59 = lean::cnstr_get(x_36, 0); -lean::inc(x_59); -if (lean::is_exclusive(x_36)) { - lean::cnstr_release(x_36, 0); - x_60 = x_36; -} else { - lean::dec_ref(x_36); - x_60 = lean::box(0); -} -x_61 = lean::cnstr_get(x_59, 2); -lean::inc(x_61); -x_62 = lean::cnstr_get(x_61, 2); -lean::inc(x_62); -lean::dec(x_61); -x_63 = l___private_init_lean_syntax_1__updateInfo___main(x_59, x_2); -if (lean::is_scalar(x_60)) { - x_64 = lean::alloc_cnstr(1, 1, 0); -} else { - x_64 = x_60; -} -lean::cnstr_set(x_64, 0, x_63); -x_65 = lean::alloc_cnstr(3, 5, 0); +x_64 = lean::box(0); +x_65 = lean::alloc_cnstr(0, 2, 0); lean::cnstr_set(x_65, 0, x_64); -lean::cnstr_set(x_65, 1, x_55); -lean::cnstr_set(x_65, 2, x_56); -lean::cnstr_set(x_65, 3, x_57); -lean::cnstr_set(x_65, 4, x_58); -x_66 = lean::alloc_cnstr(1, 1, 0); -lean::cnstr_set(x_66, 0, x_65); -x_67 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_67, 0, x_66); -lean::cnstr_set(x_67, 1, x_62); -return x_67; -} -} +lean::cnstr_set(x_65, 1, x_2); +return x_65; } } } @@ -4455,38 +4433,32 @@ obj* l_Lean_Syntax_isIdOrAtom___main(obj* x_1) { _start: { switch (lean::obj_tag(x_1)) { -case 0: -{ -obj* x_2; -x_2 = lean::box(0); -return x_2; -} -case 1: -{ -obj* x_3; -x_3 = lean::box(0); -return x_3; -} case 2: { -obj* x_4; obj* x_5; +obj* x_2; obj* x_3; +x_2 = lean::cnstr_get(x_1, 1); +lean::inc(x_2); +x_3 = lean::alloc_cnstr(1, 1, 0); +lean::cnstr_set(x_3, 0, x_2); +return x_3; +} +case 3: +{ +obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_9; x_4 = lean::cnstr_get(x_1, 1); -lean::inc(x_4); -x_5 = lean::alloc_cnstr(1, 1, 0); -lean::cnstr_set(x_5, 0, x_4); -return x_5; +x_5 = lean::cnstr_get(x_4, 0); +x_6 = lean::cnstr_get(x_4, 1); +x_7 = lean::cnstr_get(x_4, 2); +x_8 = lean::string_utf8_extract(x_5, x_6, x_7); +x_9 = lean::alloc_cnstr(1, 1, 0); +lean::cnstr_set(x_9, 0, x_8); +return x_9; } default: { -obj* x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_11; -x_6 = lean::cnstr_get(x_1, 1); -x_7 = lean::cnstr_get(x_6, 0); -x_8 = lean::cnstr_get(x_6, 1); -x_9 = lean::cnstr_get(x_6, 2); -x_10 = lean::string_utf8_extract(x_7, x_8, x_9); -x_11 = lean::alloc_cnstr(1, 1, 0); -lean::cnstr_set(x_11, 0, x_10); -return x_11; +obj* x_10; +x_10 = lean::box(0); +return x_10; } } }