diff --git a/stage0/src/CMakeLists.txt b/stage0/src/CMakeLists.txt index ba3bbf1b30..f75f8adf63 100644 --- a/stage0/src/CMakeLists.txt +++ b/stage0/src/CMakeLists.txt @@ -515,6 +515,7 @@ install(DIRECTORY "${CMAKE_BINARY_DIR}/lib/" DESTINATION lib PATTERN temp EXCLUDE) # symlink source into expected installation location for go-to-definition, if file system allows it +file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/src) if(${STAGE} EQUAL 0) file(CREATE_LINK ${CMAKE_SOURCE_DIR}/../../src ${CMAKE_BINARY_DIR}/src/lean RESULT _IGNORE_RES SYMBOLIC) else() diff --git a/stage0/src/Init/System/IO.lean b/stage0/src/Init/System/IO.lean index 582ec001c7..e2a31985e3 100644 --- a/stage0/src/Init/System/IO.lean +++ b/stage0/src/Init/System/IO.lean @@ -421,7 +421,7 @@ where if (← enter p) then go p' | FS.FileType.dir => go d.path - | _ => return () + | _ => pure () end System.FilePath diff --git a/stage0/src/Lean/Elab/LetRec.lean b/stage0/src/Lean/Elab/LetRec.lean index d3d6fcab0b..5a0f539223 100644 --- a/stage0/src/Lean/Elab/LetRec.lean +++ b/stage0/src/Lean/Elab/LetRec.lean @@ -59,13 +59,13 @@ private def mkLetRecDeclView (letRec : Syntax) : TermElabM LetRecView := do else liftMacroM $ expandMatchAltsIntoMatch decl decl[3] pure { - ref := decl, - attrs := attrs, - shortDeclName := shortDeclName, - declName := declName, - binderIds := binderIds, - type := type, - mvar := mvar, + ref := declId + attrs := attrs + shortDeclName := shortDeclName + declName := declName + binderIds := binderIds + type := type + mvar := mvar valStx := valStx : LetRecDeclView } else @@ -120,7 +120,7 @@ private def registerLetRecsToLift (views : Array LetRecDeclView) (fvars : Array let view ← mkLetRecDeclView stx withAuxLocalDecls view.decls fun fvars => do for decl in view.decls, fvar in fvars do - addTermInfo (isBinder := true) decl.ref[0] fvar + addTermInfo (isBinder := true) decl.ref fvar let values ← elabLetRecDeclValues view let body ← elabTermEnsuringType view.body expectedType? registerLetRecsToLift view.decls fvars values diff --git a/stage0/stdlib/Init/System/IO.c b/stage0/stdlib/Init/System/IO.c index a42722d88c..a04b5a97e6 100644 --- a/stage0/stdlib/Init/System/IO.c +++ b/stage0/stdlib/Init/System/IO.c @@ -89,7 +89,6 @@ LEAN_EXPORT lean_object* l_Lean_instEvalIO___rarg(lean_object*, lean_object*, ui static lean_object* l_Lean_instEvalUnit___rarg___closed__1; lean_object* lean_st_ref_get(lean_object*, lean_object*); LEAN_EXPORT lean_object* l_EIO_toBaseIO(lean_object*, lean_object*); -static lean_object* l_Array_forInUnsafe_loop___at_System_FilePath_walkDir_go___spec__1___closed__2; LEAN_EXPORT lean_object* l_unsafeIO___rarg(lean_object*); LEAN_EXPORT lean_object* l_EIO_toIO_x27(lean_object*, lean_object*); uint32_t lean_uint32_shift_left(uint32_t, uint32_t); @@ -138,7 +137,6 @@ LEAN_EXPORT lean_object* l_IO_getRandomBytes___boxed(lean_object*, lean_object*) static lean_object* l___private_Init_System_IO_0__IO_FS_reprDirEntry____x40_Init_System_IO___hyg_1886____closed__12; lean_object* lean_string_utf8_byte_size(lean_object*); LEAN_EXPORT lean_object* l_Lean_instEval(lean_object*); -static lean_object* l_Array_forInUnsafe_loop___at_System_FilePath_walkDir_go___spec__1___closed__3; lean_object* lean_io_process_spawn(lean_object*, lean_object*); static uint32_t l_IO_AccessRight_flags___closed__13; LEAN_EXPORT lean_object* l_BaseIO_bindTask___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); @@ -154,7 +152,7 @@ static lean_object* l_Lean_instEvalUnit___rarg___closed__2; static lean_object* l___private_Init_System_IO_0__IO_FS_reprFileType____x40_Init_System_IO___hyg_1941____closed__13; lean_object* lean_get_set_stdout(lean_object*, lean_object*); static lean_object* l___private_Init_System_IO_0__IO_FS_reprMetadata____x40_Init_System_IO___hyg_2354____closed__1; -LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_System_FilePath_walkDir_go___spec__1(lean_object*, lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_System_FilePath_walkDir_go___spec__1(lean_object*, lean_object*, lean_object*, size_t, size_t, lean_object*, lean_object*, lean_object*); LEAN_EXPORT lean_object* l_IO_withStdin(lean_object*, lean_object*); static lean_object* l___aux__Init__System__IO______macroRules__termPrintln_x21______1___closed__35; LEAN_EXPORT lean_object* l_IO_mapTask(lean_object*, lean_object*); @@ -227,7 +225,7 @@ lean_object* lean_io_read_dir(lean_object*, lean_object*); static lean_object* l___aux__Init__System__IO______macroRules__termPrintln_x21______1___closed__10; static lean_object* l___aux__Init__System__IO______macroRules__termPrintln_x21______1___closed__32; static lean_object* l_IO_FS_instInhabitedStream___closed__3; -LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_System_FilePath_walkDir_go___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_System_FilePath_walkDir_go___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*); static uint32_t l_IO_AccessRight_flags___closed__4; static lean_object* l___private_Init_System_IO_0__IO_FS_reprFileType____x40_Init_System_IO___hyg_1941____closed__24; static lean_object* l_IO_FS_instInhabitedSystemTime___closed__2; @@ -471,7 +469,6 @@ static lean_object* l___aux__Init__System__IO______macroRules__termPrintln_x21__ LEAN_EXPORT lean_object* l_IO_FS_Mode_noConfusion___rarg___lambda__1___boxed(lean_object*); static lean_object* l___aux__Init__System__IO______macroRules__termPrintln_x21______1___closed__40; LEAN_EXPORT lean_object* l_IO_FS_instLESystemTime; -static lean_object* l_System_FilePath_walkDir_go___lambda__1___closed__1; LEAN_EXPORT lean_object* l_IO_FileRight_group___default; lean_object* lean_st_ref_set(lean_object*, lean_object*, lean_object*); static lean_object* l___private_Init_System_IO_0__IO_FS_reprSystemTime____x40_Init_System_IO___hyg_2117____closed__2; @@ -4824,460 +4821,365 @@ lean_ctor_set(x_2, 0, x_1); return x_2; } } -static lean_object* _init_l_Array_forInUnsafe_loop___at_System_FilePath_walkDir_go___spec__1___closed__2() { +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_System_FilePath_walkDir_go___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, size_t x_4, size_t x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = l_Array_forInUnsafe_loop___at_System_FilePath_walkDir_go___spec__1___closed__1; -x_2 = lean_box(0); -x_3 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_2); -return x_3; -} -} -static lean_object* _init_l_Array_forInUnsafe_loop___at_System_FilePath_walkDir_go___spec__1___closed__3() { -_start: +lean_object* x_9; lean_object* x_10; uint8_t x_18; +x_18 = lean_usize_dec_lt(x_5, x_4); +if (x_18 == 0) { -lean_object* x_1; lean_object* x_2; -x_1 = l_Array_forInUnsafe_loop___at_System_FilePath_walkDir_go___spec__1___closed__2; -x_2 = lean_alloc_ctor(0, 1, 0); -lean_ctor_set(x_2, 0, x_1); -return x_2; -} -} -LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_System_FilePath_walkDir_go___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, size_t x_5, size_t x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { -_start: -{ -lean_object* x_10; lean_object* x_11; uint8_t x_27; -x_27 = lean_usize_dec_lt(x_6, x_5); -if (x_27 == 0) -{ -lean_object* x_28; lean_object* x_29; -lean_dec(x_3); +lean_object* x_19; lean_object* x_20; lean_dec(x_2); lean_dec(x_1); -x_28 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_28, 0, x_7); -lean_ctor_set(x_28, 1, x_8); -x_29 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_29, 0, x_28); -lean_ctor_set(x_29, 1, x_9); +x_19 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_19, 0, x_6); +lean_ctor_set(x_19, 1, x_7); +x_20 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_20, 0, x_19); +lean_ctor_set(x_20, 1, x_8); +return x_20; +} +else +{ +lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; +lean_dec(x_6); +x_21 = lean_array_uget(x_3, x_5); +x_22 = l_IO_FS_DirEntry_path(x_21); +lean_inc(x_22); +x_23 = lean_array_push(x_7, x_22); +x_24 = lean_io_metadata(x_22, x_8); +if (lean_obj_tag(x_24) == 0) +{ +lean_object* x_25; uint8_t x_26; lean_object* x_27; +x_25 = lean_ctor_get(x_24, 0); +lean_inc(x_25); +x_26 = lean_ctor_get_uint8(x_25, sizeof(void*)*2 + 8); +lean_dec(x_25); +x_27 = lean_box(x_26); +switch (lean_obj_tag(x_27)) { +case 0: +{ +lean_object* x_28; lean_object* x_29; +x_28 = lean_ctor_get(x_24, 1); +lean_inc(x_28); +lean_dec(x_24); +lean_inc(x_1); +x_29 = l_System_FilePath_walkDir_go(x_1, x_22, x_23, x_28); +if (lean_obj_tag(x_29) == 0) +{ +lean_object* x_30; lean_object* x_31; uint8_t x_32; +x_30 = lean_ctor_get(x_29, 0); +lean_inc(x_30); +x_31 = lean_ctor_get(x_29, 1); +lean_inc(x_31); +lean_dec(x_29); +x_32 = !lean_is_exclusive(x_30); +if (x_32 == 0) +{ +lean_object* x_33; lean_object* x_34; +x_33 = lean_ctor_get(x_30, 0); +lean_dec(x_33); +x_34 = l_Array_forInUnsafe_loop___at_System_FilePath_walkDir_go___spec__1___closed__1; +lean_ctor_set(x_30, 0, x_34); +x_9 = x_30; +x_10 = x_31; +goto block_17; +} +else +{ +lean_object* x_35; lean_object* x_36; lean_object* x_37; +x_35 = lean_ctor_get(x_30, 1); +lean_inc(x_35); +lean_dec(x_30); +x_36 = l_Array_forInUnsafe_loop___at_System_FilePath_walkDir_go___spec__1___closed__1; +x_37 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_37, 0, x_36); +lean_ctor_set(x_37, 1, x_35); +x_9 = x_37; +x_10 = x_31; +goto block_17; +} +} +else +{ +uint8_t x_38; +lean_dec(x_2); +lean_dec(x_1); +x_38 = !lean_is_exclusive(x_29); +if (x_38 == 0) +{ return x_29; } else { -lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; -lean_dec(x_7); -x_30 = lean_array_uget(x_4, x_6); -x_31 = l_IO_FS_DirEntry_path(x_30); -lean_inc(x_31); -x_32 = lean_array_push(x_8, x_31); -x_33 = lean_io_metadata(x_31, x_9); -if (lean_obj_tag(x_33) == 0) -{ -lean_object* x_34; uint8_t x_35; lean_object* x_36; -x_34 = lean_ctor_get(x_33, 0); -lean_inc(x_34); -x_35 = lean_ctor_get_uint8(x_34, sizeof(void*)*2 + 8); -lean_dec(x_34); -x_36 = lean_box(x_35); -switch (lean_obj_tag(x_36)) { -case 0: -{ -lean_object* x_37; lean_object* x_38; -x_37 = lean_ctor_get(x_33, 1); -lean_inc(x_37); -lean_dec(x_33); -lean_inc(x_1); -x_38 = l_System_FilePath_walkDir_go(x_1, x_31, x_32, x_37); -if (lean_obj_tag(x_38) == 0) -{ -lean_object* x_39; lean_object* x_40; uint8_t x_41; -x_39 = lean_ctor_get(x_38, 0); -lean_inc(x_39); -x_40 = lean_ctor_get(x_38, 1); +lean_object* x_39; lean_object* x_40; lean_object* x_41; +x_39 = lean_ctor_get(x_29, 0); +x_40 = lean_ctor_get(x_29, 1); lean_inc(x_40); -lean_dec(x_38); -x_41 = !lean_is_exclusive(x_39); -if (x_41 == 0) -{ -lean_object* x_42; lean_object* x_43; -x_42 = lean_ctor_get(x_39, 0); -lean_dec(x_42); -lean_inc(x_3); -x_43 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_43, 0, x_3); -lean_ctor_set(x_39, 0, x_43); -x_10 = x_39; -x_11 = x_40; -goto block_26; -} -else -{ -lean_object* x_44; lean_object* x_45; lean_object* x_46; -x_44 = lean_ctor_get(x_39, 1); -lean_inc(x_44); -lean_dec(x_39); -lean_inc(x_3); -x_45 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_45, 0, x_3); -x_46 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_46, 0, x_45); -lean_ctor_set(x_46, 1, x_44); -x_10 = x_46; -x_11 = x_40; -goto block_26; -} -} -else -{ -uint8_t x_47; -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_47 = !lean_is_exclusive(x_38); -if (x_47 == 0) -{ -return x_38; -} -else -{ -lean_object* x_48; lean_object* x_49; lean_object* x_50; -x_48 = lean_ctor_get(x_38, 0); -x_49 = lean_ctor_get(x_38, 1); -lean_inc(x_49); -lean_inc(x_48); -lean_dec(x_38); -x_50 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_50, 0, x_48); -lean_ctor_set(x_50, 1, x_49); -return x_50; +lean_inc(x_39); +lean_dec(x_29); +x_41 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_41, 0, x_39); +lean_ctor_set(x_41, 1, x_40); +return x_41; } } } case 2: { -lean_object* x_51; lean_object* x_52; -x_51 = lean_ctor_get(x_33, 1); -lean_inc(x_51); -lean_dec(x_33); -x_52 = lean_io_realpath(x_31, x_51); -if (lean_obj_tag(x_52) == 0) +lean_object* x_42; lean_object* x_43; +x_42 = lean_ctor_get(x_24, 1); +lean_inc(x_42); +lean_dec(x_24); +x_43 = lean_io_realpath(x_22, x_42); +if (lean_obj_tag(x_43) == 0) { -lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; uint8_t x_57; -x_53 = lean_ctor_get(x_52, 0); -lean_inc(x_53); -x_54 = lean_ctor_get(x_52, 1); -lean_inc(x_54); -lean_dec(x_52); -x_55 = l_System_FilePath_isDir(x_53, x_54); -x_56 = lean_ctor_get(x_55, 0); -lean_inc(x_56); -x_57 = lean_unbox(x_56); -lean_dec(x_56); -if (x_57 == 0) +lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; uint8_t x_48; +x_44 = lean_ctor_get(x_43, 0); +lean_inc(x_44); +x_45 = lean_ctor_get(x_43, 1); +lean_inc(x_45); +lean_dec(x_43); +x_46 = l_System_FilePath_isDir(x_44, x_45); +x_47 = lean_ctor_get(x_46, 0); +lean_inc(x_47); +x_48 = lean_unbox(x_47); +lean_dec(x_47); +if (x_48 == 0) { -lean_object* x_58; lean_object* x_59; lean_object* x_60; -lean_dec(x_53); -x_58 = lean_ctor_get(x_55, 1); -lean_inc(x_58); -lean_dec(x_55); -lean_inc(x_3); -x_59 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_59, 0, x_3); -x_60 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_60, 0, x_59); -lean_ctor_set(x_60, 1, x_32); -x_10 = x_60; -x_11 = x_58; -goto block_26; +lean_object* x_49; lean_object* x_50; lean_object* x_51; +lean_dec(x_44); +x_49 = lean_ctor_get(x_46, 1); +lean_inc(x_49); +lean_dec(x_46); +x_50 = l_Array_forInUnsafe_loop___at_System_FilePath_walkDir_go___spec__1___closed__1; +x_51 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_51, 0, x_50); +lean_ctor_set(x_51, 1, x_23); +x_9 = x_51; +x_10 = x_49; +goto block_17; } else { -lean_object* x_61; lean_object* x_62; -x_61 = lean_ctor_get(x_55, 1); -lean_inc(x_61); -lean_dec(x_55); +lean_object* x_52; lean_object* x_53; +x_52 = lean_ctor_get(x_46, 1); +lean_inc(x_52); +lean_dec(x_46); lean_inc(x_1); lean_inc(x_2); -x_62 = lean_apply_2(x_1, x_2, x_61); -if (lean_obj_tag(x_62) == 0) +x_53 = lean_apply_2(x_1, x_2, x_52); +if (lean_obj_tag(x_53) == 0) { -lean_object* x_63; uint8_t x_64; -x_63 = lean_ctor_get(x_62, 0); -lean_inc(x_63); -x_64 = lean_unbox(x_63); -lean_dec(x_63); -if (x_64 == 0) +lean_object* x_54; uint8_t x_55; +x_54 = lean_ctor_get(x_53, 0); +lean_inc(x_54); +x_55 = lean_unbox(x_54); +lean_dec(x_54); +if (x_55 == 0) { -lean_object* x_65; lean_object* x_66; lean_object* x_67; +lean_object* x_56; lean_object* x_57; lean_object* x_58; +lean_dec(x_44); +x_56 = lean_ctor_get(x_53, 1); +lean_inc(x_56); lean_dec(x_53); -x_65 = lean_ctor_get(x_62, 1); -lean_inc(x_65); -lean_dec(x_62); -lean_inc(x_3); -x_66 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_66, 0, x_3); -x_67 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_67, 0, x_66); -lean_ctor_set(x_67, 1, x_32); -x_10 = x_67; -x_11 = x_65; -goto block_26; +x_57 = l_Array_forInUnsafe_loop___at_System_FilePath_walkDir_go___spec__1___closed__1; +x_58 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_58, 0, x_57); +lean_ctor_set(x_58, 1, x_23); +x_9 = x_58; +x_10 = x_56; +goto block_17; } else { -lean_object* x_68; lean_object* x_69; -x_68 = lean_ctor_get(x_62, 1); -lean_inc(x_68); -lean_dec(x_62); +lean_object* x_59; lean_object* x_60; +x_59 = lean_ctor_get(x_53, 1); +lean_inc(x_59); +lean_dec(x_53); lean_inc(x_1); -x_69 = l_System_FilePath_walkDir_go(x_1, x_53, x_32, x_68); -if (lean_obj_tag(x_69) == 0) +x_60 = l_System_FilePath_walkDir_go(x_1, x_44, x_23, x_59); +if (lean_obj_tag(x_60) == 0) { -lean_object* x_70; lean_object* x_71; uint8_t x_72; -x_70 = lean_ctor_get(x_69, 0); -lean_inc(x_70); -x_71 = lean_ctor_get(x_69, 1); +lean_object* x_61; lean_object* x_62; uint8_t x_63; +x_61 = lean_ctor_get(x_60, 0); +lean_inc(x_61); +x_62 = lean_ctor_get(x_60, 1); +lean_inc(x_62); +lean_dec(x_60); +x_63 = !lean_is_exclusive(x_61); +if (x_63 == 0) +{ +lean_object* x_64; lean_object* x_65; +x_64 = lean_ctor_get(x_61, 0); +lean_dec(x_64); +x_65 = l_Array_forInUnsafe_loop___at_System_FilePath_walkDir_go___spec__1___closed__1; +lean_ctor_set(x_61, 0, x_65); +x_9 = x_61; +x_10 = x_62; +goto block_17; +} +else +{ +lean_object* x_66; lean_object* x_67; lean_object* x_68; +x_66 = lean_ctor_get(x_61, 1); +lean_inc(x_66); +lean_dec(x_61); +x_67 = l_Array_forInUnsafe_loop___at_System_FilePath_walkDir_go___spec__1___closed__1; +x_68 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_68, 0, x_67); +lean_ctor_set(x_68, 1, x_66); +x_9 = x_68; +x_10 = x_62; +goto block_17; +} +} +else +{ +uint8_t x_69; +lean_dec(x_2); +lean_dec(x_1); +x_69 = !lean_is_exclusive(x_60); +if (x_69 == 0) +{ +return x_60; +} +else +{ +lean_object* x_70; lean_object* x_71; lean_object* x_72; +x_70 = lean_ctor_get(x_60, 0); +x_71 = lean_ctor_get(x_60, 1); lean_inc(x_71); -lean_dec(x_69); -x_72 = !lean_is_exclusive(x_70); -if (x_72 == 0) -{ -lean_object* x_73; lean_object* x_74; -x_73 = lean_ctor_get(x_70, 0); -lean_dec(x_73); -lean_inc(x_3); -x_74 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_74, 0, x_3); -lean_ctor_set(x_70, 0, x_74); -x_10 = x_70; -x_11 = x_71; -goto block_26; +lean_inc(x_70); +lean_dec(x_60); +x_72 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_72, 0, x_70); +lean_ctor_set(x_72, 1, x_71); +return x_72; +} +} +} } else { -lean_object* x_75; lean_object* x_76; lean_object* x_77; -x_75 = lean_ctor_get(x_70, 1); +uint8_t x_73; +lean_dec(x_44); +lean_dec(x_23); +lean_dec(x_2); +lean_dec(x_1); +x_73 = !lean_is_exclusive(x_53); +if (x_73 == 0) +{ +return x_53; +} +else +{ +lean_object* x_74; lean_object* x_75; lean_object* x_76; +x_74 = lean_ctor_get(x_53, 0); +x_75 = lean_ctor_get(x_53, 1); lean_inc(x_75); -lean_dec(x_70); -lean_inc(x_3); -x_76 = lean_alloc_ctor(1, 1, 0); -lean_ctor_set(x_76, 0, x_3); -x_77 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_77, 0, x_76); -lean_ctor_set(x_77, 1, x_75); -x_10 = x_77; -x_11 = x_71; -goto block_26; -} -} -else -{ -uint8_t x_78; -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_78 = !lean_is_exclusive(x_69); -if (x_78 == 0) -{ -return x_69; -} -else -{ -lean_object* x_79; lean_object* x_80; lean_object* x_81; -x_79 = lean_ctor_get(x_69, 0); -x_80 = lean_ctor_get(x_69, 1); -lean_inc(x_80); -lean_inc(x_79); -lean_dec(x_69); -x_81 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_81, 0, x_79); -lean_ctor_set(x_81, 1, x_80); -return x_81; -} -} -} -} -else -{ -uint8_t x_82; +lean_inc(x_74); lean_dec(x_53); -lean_dec(x_32); -lean_dec(x_3); +x_76 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_76, 0, x_74); +lean_ctor_set(x_76, 1, x_75); +return x_76; +} +} +} +} +else +{ +uint8_t x_77; +lean_dec(x_23); lean_dec(x_2); lean_dec(x_1); -x_82 = !lean_is_exclusive(x_62); -if (x_82 == 0) +x_77 = !lean_is_exclusive(x_43); +if (x_77 == 0) { -return x_62; +return x_43; } else { -lean_object* x_83; lean_object* x_84; lean_object* x_85; -x_83 = lean_ctor_get(x_62, 0); -x_84 = lean_ctor_get(x_62, 1); -lean_inc(x_84); -lean_inc(x_83); -lean_dec(x_62); -x_85 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_85, 0, x_83); -lean_ctor_set(x_85, 1, x_84); -return x_85; -} -} -} -} -else -{ -uint8_t x_86; -lean_dec(x_32); -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_86 = !lean_is_exclusive(x_52); -if (x_86 == 0) -{ -return x_52; -} -else -{ -lean_object* x_87; lean_object* x_88; lean_object* x_89; -x_87 = lean_ctor_get(x_52, 0); -x_88 = lean_ctor_get(x_52, 1); -lean_inc(x_88); -lean_inc(x_87); -lean_dec(x_52); -x_89 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_89, 0, x_87); -lean_ctor_set(x_89, 1, x_88); -return x_89; +lean_object* x_78; lean_object* x_79; lean_object* x_80; +x_78 = lean_ctor_get(x_43, 0); +x_79 = lean_ctor_get(x_43, 1); +lean_inc(x_79); +lean_inc(x_78); +lean_dec(x_43); +x_80 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_80, 0, x_78); +lean_ctor_set(x_80, 1, x_79); +return x_80; } } } default: { -lean_object* x_90; lean_object* x_91; lean_object* x_92; -lean_dec(x_36); -lean_dec(x_31); -x_90 = lean_ctor_get(x_33, 1); -lean_inc(x_90); -lean_dec(x_33); -x_91 = l_Array_forInUnsafe_loop___at_System_FilePath_walkDir_go___spec__1___closed__3; -x_92 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_92, 0, x_91); -lean_ctor_set(x_92, 1, x_32); -x_10 = x_92; -x_11 = x_90; -goto block_26; +lean_object* x_81; lean_object* x_82; lean_object* x_83; +lean_dec(x_27); +lean_dec(x_22); +x_81 = lean_ctor_get(x_24, 1); +lean_inc(x_81); +lean_dec(x_24); +x_82 = l_Array_forInUnsafe_loop___at_System_FilePath_walkDir_go___spec__1___closed__1; +x_83 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_83, 0, x_82); +lean_ctor_set(x_83, 1, x_23); +x_9 = x_83; +x_10 = x_81; +goto block_17; } } } else { -uint8_t x_93; -lean_dec(x_32); -lean_dec(x_31); -lean_dec(x_3); +uint8_t x_84; +lean_dec(x_23); +lean_dec(x_22); lean_dec(x_2); lean_dec(x_1); -x_93 = !lean_is_exclusive(x_33); -if (x_93 == 0) +x_84 = !lean_is_exclusive(x_24); +if (x_84 == 0) { -return x_33; +return x_24; } else { -lean_object* x_94; lean_object* x_95; lean_object* x_96; -x_94 = lean_ctor_get(x_33, 0); -x_95 = lean_ctor_get(x_33, 1); -lean_inc(x_95); -lean_inc(x_94); -lean_dec(x_33); -x_96 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_96, 0, x_94); -lean_ctor_set(x_96, 1, x_95); -return x_96; +lean_object* x_85; lean_object* x_86; lean_object* x_87; +x_85 = lean_ctor_get(x_24, 0); +x_86 = lean_ctor_get(x_24, 1); +lean_inc(x_86); +lean_inc(x_85); +lean_dec(x_24); +x_87 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_87, 0, x_85); +lean_ctor_set(x_87, 1, x_86); +return x_87; } } } -block_26: +block_17: { -lean_object* x_12; -x_12 = lean_ctor_get(x_10, 0); +lean_object* x_11; lean_object* x_12; lean_object* x_13; size_t x_14; size_t x_15; +x_11 = lean_ctor_get(x_9, 0); +lean_inc(x_11); +x_12 = lean_ctor_get(x_9, 1); lean_inc(x_12); -if (lean_obj_tag(x_12) == 0) -{ -uint8_t x_13; -lean_dec(x_3); -lean_dec(x_2); -lean_dec(x_1); -x_13 = !lean_is_exclusive(x_10); -if (x_13 == 0) -{ -lean_object* x_14; lean_object* x_15; lean_object* x_16; -x_14 = lean_ctor_get(x_10, 0); -lean_dec(x_14); -x_15 = lean_ctor_get(x_12, 0); -lean_inc(x_15); -lean_dec(x_12); -lean_ctor_set(x_10, 0, x_15); -x_16 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_16, 0, x_10); -lean_ctor_set(x_16, 1, x_11); -return x_16; -} -else -{ -lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; -x_17 = lean_ctor_get(x_10, 1); -lean_inc(x_17); -lean_dec(x_10); -x_18 = lean_ctor_get(x_12, 0); -lean_inc(x_18); -lean_dec(x_12); -x_19 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_19, 0, x_18); -lean_ctor_set(x_19, 1, x_17); -x_20 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_20, 0, x_19); -lean_ctor_set(x_20, 1, x_11); -return x_20; -} -} -else -{ -lean_object* x_21; lean_object* x_22; size_t x_23; size_t x_24; -x_21 = lean_ctor_get(x_10, 1); -lean_inc(x_21); -lean_dec(x_10); -x_22 = lean_ctor_get(x_12, 0); -lean_inc(x_22); -lean_dec(x_12); -x_23 = 1; -x_24 = lean_usize_add(x_6, x_23); -x_6 = x_24; -x_7 = x_22; -x_8 = x_21; -x_9 = x_11; +lean_dec(x_9); +x_13 = lean_ctor_get(x_11, 0); +lean_inc(x_13); +lean_dec(x_11); +x_14 = 1; +x_15 = lean_usize_add(x_5, x_14); +x_5 = x_15; +x_6 = x_13; +x_7 = x_12; +x_8 = x_10; goto _start; } } } -} -static lean_object* _init_l_System_FilePath_walkDir_go___lambda__1___closed__1() { -_start: -{ -lean_object* x_1; lean_object* x_2; lean_object* x_3; -x_1 = lean_box(0); -x_2 = lean_box(0); -x_3 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_3, 0, x_1); -lean_ctor_set(x_3, 1, x_2); -return x_3; -} -} LEAN_EXPORT lean_object* l_System_FilePath_walkDir_go___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { _start: { @@ -5295,198 +5197,116 @@ x_9 = lean_array_get_size(x_7); x_10 = lean_usize_of_nat(x_9); lean_dec(x_9); x_11 = 0; -x_12 = l_System_FilePath_walkDir_go___lambda__1___closed__1; -x_13 = l_Array_forInUnsafe_loop___at_System_FilePath_walkDir_go___spec__1(x_2, x_1, x_12, x_7, x_10, x_11, x_12, x_4, x_8); +x_12 = lean_box(0); +x_13 = l_Array_forInUnsafe_loop___at_System_FilePath_walkDir_go___spec__1(x_2, x_1, x_7, x_10, x_11, x_12, x_4, x_8); lean_dec(x_7); if (lean_obj_tag(x_13) == 0) { -lean_object* x_14; lean_object* x_15; lean_object* x_16; -x_14 = lean_ctor_get(x_13, 0); -lean_inc(x_14); -x_15 = lean_ctor_get(x_14, 0); -lean_inc(x_15); -x_16 = lean_ctor_get(x_15, 0); -lean_inc(x_16); +uint8_t x_14; +x_14 = !lean_is_exclusive(x_13); +if (x_14 == 0) +{ +lean_object* x_15; uint8_t x_16; +x_15 = lean_ctor_get(x_13, 0); +x_16 = !lean_is_exclusive(x_15); +if (x_16 == 0) +{ +lean_object* x_17; +x_17 = lean_ctor_get(x_15, 0); +lean_dec(x_17); +lean_ctor_set(x_15, 0, x_12); +return x_13; +} +else +{ +lean_object* x_18; lean_object* x_19; +x_18 = lean_ctor_get(x_15, 1); +lean_inc(x_18); lean_dec(x_15); -if (lean_obj_tag(x_16) == 0) -{ -uint8_t x_17; -x_17 = !lean_is_exclusive(x_13); -if (x_17 == 0) -{ -lean_object* x_18; uint8_t x_19; -x_18 = lean_ctor_get(x_13, 0); -lean_dec(x_18); -x_19 = !lean_is_exclusive(x_14); -if (x_19 == 0) -{ -lean_object* x_20; lean_object* x_21; -x_20 = lean_ctor_get(x_14, 0); -lean_dec(x_20); -x_21 = lean_box(0); -lean_ctor_set(x_14, 0, x_21); +x_19 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_19, 0, x_12); +lean_ctor_set(x_19, 1, x_18); +lean_ctor_set(x_13, 0, x_19); return x_13; } +} else { -lean_object* x_22; lean_object* x_23; lean_object* x_24; -x_22 = lean_ctor_get(x_14, 1); +lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; +x_20 = lean_ctor_get(x_13, 0); +x_21 = lean_ctor_get(x_13, 1); +lean_inc(x_21); +lean_inc(x_20); +lean_dec(x_13); +x_22 = lean_ctor_get(x_20, 1); lean_inc(x_22); -lean_dec(x_14); -x_23 = lean_box(0); -x_24 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_24, 0, x_23); +if (lean_is_exclusive(x_20)) { + lean_ctor_release(x_20, 0); + lean_ctor_release(x_20, 1); + x_23 = x_20; +} else { + lean_dec_ref(x_20); + x_23 = lean_box(0); +} +if (lean_is_scalar(x_23)) { + x_24 = lean_alloc_ctor(0, 2, 0); +} else { + x_24 = x_23; +} +lean_ctor_set(x_24, 0, x_12); lean_ctor_set(x_24, 1, x_22); -lean_ctor_set(x_13, 0, x_24); -return x_13; +x_25 = lean_alloc_ctor(0, 2, 0); +lean_ctor_set(x_25, 0, x_24); +lean_ctor_set(x_25, 1, x_21); +return x_25; } } else { -lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; -x_25 = lean_ctor_get(x_13, 1); -lean_inc(x_25); +uint8_t x_26; +x_26 = !lean_is_exclusive(x_13); +if (x_26 == 0) +{ +return x_13; +} +else +{ +lean_object* x_27; lean_object* x_28; lean_object* x_29; +x_27 = lean_ctor_get(x_13, 0); +x_28 = lean_ctor_get(x_13, 1); +lean_inc(x_28); +lean_inc(x_27); lean_dec(x_13); -x_26 = lean_ctor_get(x_14, 1); -lean_inc(x_26); -if (lean_is_exclusive(x_14)) { - lean_ctor_release(x_14, 0); - lean_ctor_release(x_14, 1); - x_27 = x_14; -} else { - lean_dec_ref(x_14); - x_27 = lean_box(0); -} -x_28 = lean_box(0); -if (lean_is_scalar(x_27)) { - x_29 = lean_alloc_ctor(0, 2, 0); -} else { - x_29 = x_27; -} -lean_ctor_set(x_29, 0, x_28); -lean_ctor_set(x_29, 1, x_26); -x_30 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_30, 0, x_29); -lean_ctor_set(x_30, 1, x_25); -return x_30; -} -} -else -{ -uint8_t x_31; -x_31 = !lean_is_exclusive(x_13); -if (x_31 == 0) -{ -lean_object* x_32; uint8_t x_33; -x_32 = lean_ctor_get(x_13, 0); -lean_dec(x_32); -x_33 = !lean_is_exclusive(x_14); -if (x_33 == 0) -{ -lean_object* x_34; lean_object* x_35; -x_34 = lean_ctor_get(x_14, 0); -lean_dec(x_34); -x_35 = lean_ctor_get(x_16, 0); -lean_inc(x_35); -lean_dec(x_16); -lean_ctor_set(x_14, 0, x_35); -return x_13; -} -else -{ -lean_object* x_36; lean_object* x_37; lean_object* x_38; -x_36 = lean_ctor_get(x_14, 1); -lean_inc(x_36); -lean_dec(x_14); -x_37 = lean_ctor_get(x_16, 0); -lean_inc(x_37); -lean_dec(x_16); -x_38 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_38, 0, x_37); -lean_ctor_set(x_38, 1, x_36); -lean_ctor_set(x_13, 0, x_38); -return x_13; -} -} -else -{ -lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; -x_39 = lean_ctor_get(x_13, 1); -lean_inc(x_39); -lean_dec(x_13); -x_40 = lean_ctor_get(x_14, 1); -lean_inc(x_40); -if (lean_is_exclusive(x_14)) { - lean_ctor_release(x_14, 0); - lean_ctor_release(x_14, 1); - x_41 = x_14; -} else { - lean_dec_ref(x_14); - x_41 = lean_box(0); -} -x_42 = lean_ctor_get(x_16, 0); -lean_inc(x_42); -lean_dec(x_16); -if (lean_is_scalar(x_41)) { - x_43 = lean_alloc_ctor(0, 2, 0); -} else { - x_43 = x_41; -} -lean_ctor_set(x_43, 0, x_42); -lean_ctor_set(x_43, 1, x_40); -x_44 = lean_alloc_ctor(0, 2, 0); -lean_ctor_set(x_44, 0, x_43); -lean_ctor_set(x_44, 1, x_39); -return x_44; +x_29 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_29, 0, x_27); +lean_ctor_set(x_29, 1, x_28); +return x_29; } } } else { -uint8_t x_45; -x_45 = !lean_is_exclusive(x_13); -if (x_45 == 0) -{ -return x_13; -} -else -{ -lean_object* x_46; lean_object* x_47; lean_object* x_48; -x_46 = lean_ctor_get(x_13, 0); -x_47 = lean_ctor_get(x_13, 1); -lean_inc(x_47); -lean_inc(x_46); -lean_dec(x_13); -x_48 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_48, 0, x_46); -lean_ctor_set(x_48, 1, x_47); -return x_48; -} -} -} -else -{ -uint8_t x_49; +uint8_t x_30; lean_dec(x_4); lean_dec(x_2); lean_dec(x_1); -x_49 = !lean_is_exclusive(x_6); -if (x_49 == 0) +x_30 = !lean_is_exclusive(x_6); +if (x_30 == 0) { return x_6; } else { -lean_object* x_50; lean_object* x_51; lean_object* x_52; -x_50 = lean_ctor_get(x_6, 0); -x_51 = lean_ctor_get(x_6, 1); -lean_inc(x_51); -lean_inc(x_50); +lean_object* x_31; lean_object* x_32; lean_object* x_33; +x_31 = lean_ctor_get(x_6, 0); +x_32 = lean_ctor_get(x_6, 1); +lean_inc(x_32); +lean_inc(x_31); lean_dec(x_6); -x_52 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_52, 0, x_50); -lean_ctor_set(x_52, 1, x_51); -return x_52; +x_33 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_33, 0, x_31); +lean_ctor_set(x_33, 1, x_32); +return x_33; } } } @@ -5577,17 +5397,17 @@ return x_22; } } } -LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_System_FilePath_walkDir_go___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8, lean_object* x_9) { +LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_System_FilePath_walkDir_go___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6, lean_object* x_7, lean_object* x_8) { _start: { -size_t x_10; size_t x_11; lean_object* x_12; +size_t x_9; size_t x_10; lean_object* x_11; +x_9 = lean_unbox_usize(x_4); +lean_dec(x_4); x_10 = lean_unbox_usize(x_5); lean_dec(x_5); -x_11 = lean_unbox_usize(x_6); -lean_dec(x_6); -x_12 = l_Array_forInUnsafe_loop___at_System_FilePath_walkDir_go___spec__1(x_1, x_2, x_3, x_4, x_10, x_11, x_7, x_8, x_9); -lean_dec(x_4); -return x_12; +x_11 = l_Array_forInUnsafe_loop___at_System_FilePath_walkDir_go___spec__1(x_1, x_2, x_3, x_9, x_10, x_6, x_7, x_8); +lean_dec(x_3); +return x_11; } } LEAN_EXPORT lean_object* l_System_FilePath_walkDir_go___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) { @@ -10945,12 +10765,6 @@ l_IO_FS_instReprMetadata = _init_l_IO_FS_instReprMetadata(); lean_mark_persistent(l_IO_FS_instReprMetadata); l_Array_forInUnsafe_loop___at_System_FilePath_walkDir_go___spec__1___closed__1 = _init_l_Array_forInUnsafe_loop___at_System_FilePath_walkDir_go___spec__1___closed__1(); lean_mark_persistent(l_Array_forInUnsafe_loop___at_System_FilePath_walkDir_go___spec__1___closed__1); -l_Array_forInUnsafe_loop___at_System_FilePath_walkDir_go___spec__1___closed__2 = _init_l_Array_forInUnsafe_loop___at_System_FilePath_walkDir_go___spec__1___closed__2(); -lean_mark_persistent(l_Array_forInUnsafe_loop___at_System_FilePath_walkDir_go___spec__1___closed__2); -l_Array_forInUnsafe_loop___at_System_FilePath_walkDir_go___spec__1___closed__3 = _init_l_Array_forInUnsafe_loop___at_System_FilePath_walkDir_go___spec__1___closed__3(); -lean_mark_persistent(l_Array_forInUnsafe_loop___at_System_FilePath_walkDir_go___spec__1___closed__3); -l_System_FilePath_walkDir_go___lambda__1___closed__1 = _init_l_System_FilePath_walkDir_go___lambda__1___closed__1(); -lean_mark_persistent(l_System_FilePath_walkDir_go___lambda__1___closed__1); l_IO_withStdin___rarg___lambda__3___closed__1 = _init_l_IO_withStdin___rarg___lambda__3___closed__1(); lean_mark_persistent(l_IO_withStdin___rarg___lambda__3___closed__1); l_IO_appDir___closed__1 = _init_l_IO_appDir___closed__1(); diff --git a/stage0/stdlib/Lean/Elab/LetRec.c b/stage0/stdlib/Lean/Elab/LetRec.c index ed2bafe810..17a44b5643 100644 --- a/stage0/stdlib/Lean/Elab/LetRec.c +++ b/stage0/stdlib/Lean/Elab/LetRec.c @@ -2573,6 +2573,7 @@ x_37 = l_Lean_Syntax_getArg(x_14, x_36); x_38 = l_Lean_Syntax_getArgs(x_37); lean_dec(x_37); x_39 = l_Lean_Syntax_getArg(x_14, x_11); +lean_inc(x_20); x_40 = l_Lean_Elab_Term_expandOptType(x_20, x_39); lean_dec(x_39); x_41 = lean_alloc_closure((void*)(l_Array_mapMUnsafe_map___at___private_Lean_Elab_LetRec_0__Lean_Elab_Term_mkLetRecDeclView___spec__20___lambda__1___boxed), 9, 1); @@ -2616,7 +2617,6 @@ x_53 = lean_unsigned_to_nat(3u); x_54 = l_Lean_Syntax_getArg(x_14, x_53); x_55 = 0; x_56 = lean_box(x_55); -lean_inc(x_14); x_57 = lean_alloc_closure((void*)(l_Lean_Elab_Term_expandMatchAltsIntoMatch___boxed), 5, 3); lean_closure_set(x_57, 0, x_14); lean_closure_set(x_57, 1, x_54); @@ -2636,7 +2636,7 @@ lean_inc(x_59); x_60 = lean_ctor_get(x_58, 1); lean_inc(x_60); lean_dec(x_58); -x_61 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_LetRec_0__Lean_Elab_Term_mkLetRecDeclView___spec__20___lambda__2(x_14, x_3, x_21, x_26, x_46, x_45, x_51, x_59, x_4, x_5, x_6, x_7, x_8, x_9, x_60); +x_61 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_LetRec_0__Lean_Elab_Term_mkLetRecDeclView___spec__20___lambda__2(x_20, x_3, x_21, x_26, x_46, x_45, x_51, x_59, x_4, x_5, x_6, x_7, x_8, x_9, x_60); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); @@ -2653,7 +2653,7 @@ lean_dec(x_46); lean_dec(x_45); lean_dec(x_26); lean_dec(x_21); -lean_dec(x_14); +lean_dec(x_20); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); @@ -2691,7 +2691,8 @@ lean_inc(x_67); lean_dec(x_50); x_68 = lean_unsigned_to_nat(4u); x_69 = l_Lean_Syntax_getArg(x_14, x_68); -x_70 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_LetRec_0__Lean_Elab_Term_mkLetRecDeclView___spec__20___lambda__2(x_14, x_3, x_21, x_26, x_46, x_45, x_66, x_69, x_4, x_5, x_6, x_7, x_8, x_9, x_67); +lean_dec(x_14); +x_70 = l_Array_mapMUnsafe_map___at___private_Lean_Elab_LetRec_0__Lean_Elab_Term_mkLetRecDeclView___spec__20___lambda__2(x_20, x_3, x_21, x_26, x_46, x_45, x_66, x_69, x_4, x_5, x_6, x_7, x_8, x_9, x_67); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); @@ -2706,6 +2707,7 @@ else uint8_t x_71; lean_dec(x_26); lean_dec(x_21); +lean_dec(x_20); lean_dec(x_14); lean_dec(x_9); lean_dec(x_8); @@ -4370,7 +4372,7 @@ uint8_t x_20; x_20 = !lean_is_exclusive(x_4); if (x_20 == 0) { -lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; uint8_t x_32; lean_object* x_33; +lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; uint8_t x_30; lean_object* x_31; x_21 = lean_ctor_get(x_4, 2); lean_dec(x_21); x_22 = lean_ctor_get(x_4, 1); @@ -4385,34 +4387,31 @@ lean_ctor_set(x_4, 1, x_26); x_27 = lean_ctor_get(x_14, 0); lean_inc(x_27); lean_dec(x_14); -x_28 = lean_unsigned_to_nat(0u); -x_29 = l_Lean_Syntax_getArg(x_27, x_28); -lean_dec(x_27); -x_30 = lean_box(0); -x_31 = lean_box(0); -x_32 = 1; +x_28 = lean_box(0); +x_29 = lean_box(0); +x_30 = 1; lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); -x_33 = l_Lean_Elab_Term_addTermInfo(x_29, x_24, x_30, x_30, x_31, x_32, x_5, x_6, x_7, x_8, x_9, x_10, x_11); -if (lean_obj_tag(x_33) == 0) +x_31 = l_Lean_Elab_Term_addTermInfo(x_27, x_24, x_28, x_28, x_29, x_30, x_5, x_6, x_7, x_8, x_9, x_10, x_11); +if (lean_obj_tag(x_31) == 0) { -lean_object* x_34; size_t x_35; size_t x_36; -x_34 = lean_ctor_get(x_33, 1); -lean_inc(x_34); -lean_dec(x_33); -x_35 = 1; -x_36 = lean_usize_add(x_3, x_35); -x_3 = x_36; -x_11 = x_34; +lean_object* x_32; size_t x_33; size_t x_34; +x_32 = lean_ctor_get(x_31, 1); +lean_inc(x_32); +lean_dec(x_31); +x_33 = 1; +x_34 = lean_usize_add(x_3, x_33); +x_3 = x_34; +x_11 = x_32; goto _start; } else { -uint8_t x_38; +uint8_t x_36; lean_dec(x_4); lean_dec(x_10); lean_dec(x_9); @@ -4420,97 +4419,94 @@ lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); -x_38 = !lean_is_exclusive(x_33); -if (x_38 == 0) +x_36 = !lean_is_exclusive(x_31); +if (x_36 == 0) { -return x_33; +return x_31; } else { -lean_object* x_39; lean_object* x_40; lean_object* x_41; -x_39 = lean_ctor_get(x_33, 0); -x_40 = lean_ctor_get(x_33, 1); -lean_inc(x_40); -lean_inc(x_39); -lean_dec(x_33); -x_41 = lean_alloc_ctor(1, 2, 0); -lean_ctor_set(x_41, 0, x_39); -lean_ctor_set(x_41, 1, x_40); -return x_41; +lean_object* x_37; lean_object* x_38; lean_object* x_39; +x_37 = lean_ctor_get(x_31, 0); +x_38 = lean_ctor_get(x_31, 1); +lean_inc(x_38); +lean_inc(x_37); +lean_dec(x_31); +x_39 = lean_alloc_ctor(1, 2, 0); +lean_ctor_set(x_39, 0, x_37); +lean_ctor_set(x_39, 1, x_38); +return x_39; } } } else { -lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; lean_object* x_50; uint8_t x_51; lean_object* x_52; +lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; uint8_t x_47; lean_object* x_48; lean_dec(x_4); -x_42 = lean_array_fget(x_15, x_16); -x_43 = lean_unsigned_to_nat(1u); -x_44 = lean_nat_add(x_16, x_43); +x_40 = lean_array_fget(x_15, x_16); +x_41 = lean_unsigned_to_nat(1u); +x_42 = lean_nat_add(x_16, x_41); lean_dec(x_16); -x_45 = lean_alloc_ctor(0, 3, 0); -lean_ctor_set(x_45, 0, x_15); -lean_ctor_set(x_45, 1, x_44); -lean_ctor_set(x_45, 2, x_17); -x_46 = lean_ctor_get(x_14, 0); -lean_inc(x_46); +x_43 = lean_alloc_ctor(0, 3, 0); +lean_ctor_set(x_43, 0, x_15); +lean_ctor_set(x_43, 1, x_42); +lean_ctor_set(x_43, 2, x_17); +x_44 = lean_ctor_get(x_14, 0); +lean_inc(x_44); lean_dec(x_14); -x_47 = lean_unsigned_to_nat(0u); -x_48 = l_Lean_Syntax_getArg(x_46, x_47); -lean_dec(x_46); -x_49 = lean_box(0); -x_50 = lean_box(0); -x_51 = 1; +x_45 = lean_box(0); +x_46 = lean_box(0); +x_47 = 1; lean_inc(x_10); lean_inc(x_9); lean_inc(x_8); lean_inc(x_7); lean_inc(x_6); lean_inc(x_5); -x_52 = l_Lean_Elab_Term_addTermInfo(x_48, x_42, x_49, x_49, x_50, x_51, x_5, x_6, x_7, x_8, x_9, x_10, x_11); -if (lean_obj_tag(x_52) == 0) +x_48 = l_Lean_Elab_Term_addTermInfo(x_44, x_40, x_45, x_45, x_46, x_47, x_5, x_6, x_7, x_8, x_9, x_10, x_11); +if (lean_obj_tag(x_48) == 0) { -lean_object* x_53; size_t x_54; size_t x_55; -x_53 = lean_ctor_get(x_52, 1); -lean_inc(x_53); -lean_dec(x_52); -x_54 = 1; -x_55 = lean_usize_add(x_3, x_54); -x_3 = x_55; -x_4 = x_45; -x_11 = x_53; +lean_object* x_49; size_t x_50; size_t x_51; +x_49 = lean_ctor_get(x_48, 1); +lean_inc(x_49); +lean_dec(x_48); +x_50 = 1; +x_51 = lean_usize_add(x_3, x_50); +x_3 = x_51; +x_4 = x_43; +x_11 = x_49; goto _start; } else { -lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; -lean_dec(x_45); +lean_object* x_53; lean_object* x_54; lean_object* x_55; lean_object* x_56; +lean_dec(x_43); lean_dec(x_10); lean_dec(x_9); lean_dec(x_8); lean_dec(x_7); lean_dec(x_6); lean_dec(x_5); -x_57 = lean_ctor_get(x_52, 0); -lean_inc(x_57); -x_58 = lean_ctor_get(x_52, 1); -lean_inc(x_58); -if (lean_is_exclusive(x_52)) { - lean_ctor_release(x_52, 0); - lean_ctor_release(x_52, 1); - x_59 = x_52; +x_53 = lean_ctor_get(x_48, 0); +lean_inc(x_53); +x_54 = lean_ctor_get(x_48, 1); +lean_inc(x_54); +if (lean_is_exclusive(x_48)) { + lean_ctor_release(x_48, 0); + lean_ctor_release(x_48, 1); + x_55 = x_48; } else { - lean_dec_ref(x_52); - x_59 = lean_box(0); + lean_dec_ref(x_48); + x_55 = lean_box(0); } -if (lean_is_scalar(x_59)) { - x_60 = lean_alloc_ctor(1, 2, 0); +if (lean_is_scalar(x_55)) { + x_56 = lean_alloc_ctor(1, 2, 0); } else { - x_60 = x_59; + x_56 = x_55; } -lean_ctor_set(x_60, 0, x_57); -lean_ctor_set(x_60, 1, x_58); -return x_60; +lean_ctor_set(x_56, 0, x_53); +lean_ctor_set(x_56, 1, x_54); +return x_56; } } }