chore(stage0): update

This commit is contained in:
Leonardo de Moura 2019-05-14 16:28:25 -07:00
parent 5fa924ff4a
commit 431c0a2525
3 changed files with 750 additions and 324 deletions

View file

@ -61,6 +61,7 @@ obj* l_Lean_EnvExtension_modifyStateUnsafe(obj*);
obj* l___private_init_lean_environment_4__getTrustLevel___boxed(obj*);
obj* l_Lean_SMap_find___main___at_Lean_Environment_find___spec__1___boxed(obj*, obj*);
uint8 l_AssocList_contains___main___at_Lean_Environment_add___spec__5(obj*, obj*);
obj* l_Array_anyMAux___main___at_Lean_registerPersistentEnvExtensionUnsafe___spec__1___rarg___boxed(obj*, obj*, obj*, obj*);
namespace lean {
obj* import_modules_core(obj*, uint32, obj*);
}
@ -124,6 +125,7 @@ obj* l_Lean_registerEnvExtensionUnsafe(obj*);
obj* l_HashMapImp_insert___at_Lean_importModules___spec__1(obj*, obj*, obj*);
obj* l_Array_miterateAux___main___at_Lean_importModules___spec__7___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*);
obj* l_beqOfEq___rarg(obj*, obj*, obj*);
uint8 l_Array_anyMAux___main___at_Lean_registerPersistentEnvExtensionUnsafe___spec__1___rarg(obj*, obj*, obj*, obj*);
obj* l_Lean_registerPersistentEnvExtension___rarg(obj*);
obj* l_Lean_Environment_Inhabited;
namespace lean {
@ -172,7 +174,7 @@ obj* set_extension_core(obj*, obj*, obj*);
obj* l___private_init_lean_environment_10__getEntriesFor___main___boxed(obj*, obj*, obj*);
obj* l_Lean_PersistentEnvExtensionState_inhabited___boxed(obj*, obj*, obj*);
obj* l_Lean_regModListExtension(obj*);
uint8 l_Array_anyMAux___main___at_Lean_registerPersistentEnvExtensionUnsafe___spec__1(obj*, obj*, obj*);
obj* l_Array_anyMAux___main___at_Lean_registerPersistentEnvExtensionUnsafe___spec__1(obj*, obj*);
obj* l_Array_miterateAux___main___at___private_init_lean_environment_7__mkInitialExtensionStates___spec__1___boxed(obj*, obj*, obj*, obj*);
obj* l___private_init_lean_environment_10__getEntriesFor___boxed(obj*, obj*, obj*);
obj* l_Lean_EnvExtension_getStateUnsafe___boxed(obj*);
@ -180,7 +182,7 @@ obj* l_Lean_registerEnvExtension(obj*, obj*);
obj* l_Lean_importModulesAux___main(obj*, obj*, obj*);
extern obj* l_unsafeIO___rarg___closed__1;
obj* l_Lean_EnvExtension_getState___rarg___boxed(obj*, obj*);
obj* l_Lean_registerPersistentEnvExtension(obj*, obj*, obj*, obj*, obj*, obj*, obj*, uint8);
obj* l_Lean_registerPersistentEnvExtension(obj*, obj*, obj*, obj*);
obj* l___private_init_lean_environment_7__mkInitialExtensionStates(obj*);
obj* l_Lean_EnvExtension_modifyStateUnsafe___boxed(obj*);
obj* l_Lean_registerPersistentEnvExtensionUnsafe(obj*, obj*);
@ -188,7 +190,7 @@ obj* l_Lean_PersistentEnvExtension_getEntries___rarg___boxed(obj*, obj*);
obj* l_Lean_mkModuleData(obj*, obj*);
obj* l___private_init_lean_environment_8__mkPersistentEnvExtensionsRef(obj*);
obj* l_Lean_PersistentEnvExtension_getState(obj*, obj*);
obj* l_Array_anyMAux___main___at_Lean_registerPersistentEnvExtensionUnsafe___spec__1___boxed(obj*, obj*, obj*);
obj* l_Array_anyMAux___main___at_Lean_registerPersistentEnvExtensionUnsafe___spec__1___boxed(obj*, obj*);
obj* l_Lean_EnvExtension_modifyState(obj*, obj*, obj*, obj*);
obj* l_Nat_foldAux___main___at_Lean_mkModuleData___spec__1___boxed(obj*, obj*, obj*, obj*, obj*);
obj* l_Array_miterateAux___main___at___private_init_lean_environment_12__mkImportedStateThunk___elambda__1___spec__2___boxed(obj*, obj*, obj*, obj*, obj*);
@ -256,7 +258,7 @@ obj* get_extension_core(obj*, obj*);
}
obj* l_Lean_mkEmptyEnvironment___boxed(obj*, obj*);
obj* l_HashMapImp_insert___at_Lean_Environment_add___spec__4(obj*, obj*, obj*);
obj* l_Lean_registerPersistentEnvExtension___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_registerPersistentEnvExtension___boxed(obj*, obj*, obj*, obj*);
obj* l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__1;
namespace lean {
uint32 uint32_of_nat(obj*);
@ -273,11 +275,11 @@ obj* l_Lean_PersistentEnvExtension_forceState___boxed(obj*, obj*);
obj* l_Lean_PersistentEnvExtension_forceStateAux___boxed(obj*, obj*);
obj* l_Lean_serializeModifications___boxed(obj*, obj*);
obj* l_Lean_PersistentEnvExtension_addEntry(obj*, obj*);
obj* l_Lean_registerPersistentEnvExtensionUnsafe___rarg___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_registerPersistentEnvExtensionUnsafe___rarg___boxed(obj*, obj*, obj*);
obj* l_Lean_addModification___closed__1;
obj* l_Lean_registerEnvExtension___rarg(obj*);
obj* l_Array_miterateAux___main___at___private_init_lean_environment_11__setImportedEntries___spec__2___boxed(obj*, obj*, obj*, obj*, obj*);
obj* l_Lean_registerPersistentEnvExtensionUnsafe___rarg(obj*, obj*, obj*, obj*, obj*, uint8, obj*);
obj* l_Lean_registerPersistentEnvExtensionUnsafe___rarg(obj*, obj*, obj*);
obj* l_Lean_registerEnvExtension___boxed(obj*, obj*);
obj* l_Array_miterateAux___main___at___private_init_lean_environment_13__finalizePersistentExtensions___spec__1(obj*, obj*, obj*, obj*);
obj* l_AssocList_find___main___at_Lean_Environment_find___spec__4(obj*, obj*);
@ -2056,28 +2058,37 @@ return x_3;
obj* l_Lean_SMap_switch___at___private_init_lean_environment_1__switch___spec__1(obj* x_0) {
_start:
{
obj* x_1; obj* x_3; obj* x_5; uint8 x_6; obj* x_7; obj* x_8;
x_1 = lean::cnstr_get(x_0, 0);
x_3 = lean::cnstr_get(x_0, 1);
uint8 x_1;
x_1 = lean::cnstr_get_scalar<uint8>(x_0, sizeof(void*)*2);
if (x_1 == 0)
{
return x_0;
}
else
{
obj* x_2; obj* x_4; obj* x_6; uint8 x_7; obj* x_8; obj* x_9;
x_2 = lean::cnstr_get(x_0, 0);
x_4 = lean::cnstr_get(x_0, 1);
if (lean::is_exclusive(x_0)) {
x_5 = x_0;
x_6 = x_0;
} else {
lean::inc(x_1);
lean::inc(x_3);
lean::inc(x_2);
lean::inc(x_4);
lean::dec(x_0);
x_5 = lean::box(0);
x_6 = lean::box(0);
}
x_6 = 0;
if (lean::is_scalar(x_5)) {
x_7 = lean::alloc_cnstr(0, 2, 1);
x_7 = 0;
if (lean::is_scalar(x_6)) {
x_8 = lean::alloc_cnstr(0, 2, 1);
} else {
x_7 = x_5;
x_8 = x_6;
}
lean::cnstr_set(x_8, 0, x_2);
lean::cnstr_set(x_8, 1, x_4);
lean::cnstr_set_scalar(x_8, sizeof(void*)*2, x_7);
x_9 = x_8;
return x_9;
}
lean::cnstr_set(x_7, 0, x_1);
lean::cnstr_set(x_7, 1, x_3);
lean::cnstr_set_scalar(x_7, sizeof(void*)*2, x_6);
x_8 = x_7;
return x_8;
}
}
namespace lean {
@ -3868,46 +3879,55 @@ x_2 = lean::io_mk_ref(x_1, x_0);
return x_2;
}
}
uint8 l_Array_anyMAux___main___at_Lean_registerPersistentEnvExtensionUnsafe___spec__1(obj* x_0, obj* x_1, obj* x_2) {
uint8 l_Array_anyMAux___main___at_Lean_registerPersistentEnvExtensionUnsafe___spec__1___rarg(obj* x_0, obj* x_1, obj* x_2, obj* x_3) {
_start:
{
obj* x_3; uint8 x_4;
x_3 = lean::array_get_size(x_1);
x_4 = lean::nat_dec_lt(x_2, x_3);
lean::dec(x_3);
if (x_4 == 0)
obj* x_4; uint8 x_5;
x_4 = lean::array_get_size(x_2);
x_5 = lean::nat_dec_lt(x_3, x_4);
lean::dec(x_4);
if (x_5 == 0)
{
uint8 x_7;
lean::dec(x_2);
x_7 = 0;
return x_7;
uint8 x_8;
lean::dec(x_3);
x_8 = 0;
return x_8;
}
else
{
obj* x_8; obj* x_9; uint8 x_12;
x_8 = lean::array_fget(x_1, x_2);
x_9 = lean::cnstr_get(x_8, 1);
lean::inc(x_9);
lean::dec(x_8);
x_12 = lean_name_dec_eq(x_9, x_0);
obj* x_9; obj* x_10; obj* x_13; uint8 x_14;
x_9 = lean::array_fget(x_2, x_3);
x_10 = lean::cnstr_get(x_9, 1);
lean::inc(x_10);
lean::dec(x_9);
if (x_12 == 0)
x_13 = lean::cnstr_get(x_1, 0);
x_14 = lean_name_dec_eq(x_10, x_13);
lean::dec(x_10);
if (x_14 == 0)
{
obj* x_14; obj* x_15;
x_14 = lean::mk_nat_obj(1ul);
x_15 = lean::nat_add(x_2, x_14);
lean::dec(x_2);
x_2 = x_15;
obj* x_16; obj* x_17;
x_16 = lean::mk_nat_obj(1ul);
x_17 = lean::nat_add(x_3, x_16);
lean::dec(x_3);
x_3 = x_17;
goto _start;
}
else
{
lean::dec(x_2);
return x_12;
lean::dec(x_3);
return x_14;
}
}
}
}
obj* l_Array_anyMAux___main___at_Lean_registerPersistentEnvExtensionUnsafe___spec__1(obj* x_0, obj* x_1) {
_start:
{
obj* x_2;
x_2 = lean::alloc_closure(reinterpret_cast<void*>(l_Array_anyMAux___main___at_Lean_registerPersistentEnvExtensionUnsafe___spec__1___rarg___boxed), 4, 0);
return x_2;
}
}
obj* _init_l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__1() {
_start:
{
@ -3934,185 +3954,172 @@ x_0 = lean::mk_string("' has already been used");
return x_0;
}
}
obj* l_Lean_registerPersistentEnvExtensionUnsafe___rarg(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, uint8 x_5, obj* x_6) {
obj* l_Lean_registerPersistentEnvExtensionUnsafe___rarg(obj* x_0, obj* x_1, obj* x_2) {
_start:
{
obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14;
lean::inc(x_1);
x_8 = lean::thunk_pure(x_1);
x_9 = lean::box(0);
x_10 = lean::alloc_cnstr(1, 1, 0);
lean::cnstr_set(x_10, 0, x_1);
x_11 = l_Array_empty___closed__1;
x_12 = lean::alloc_cnstr(0, 4, 0);
lean::cnstr_set(x_12, 0, x_11);
lean::cnstr_set(x_12, 1, x_8);
lean::cnstr_set(x_12, 2, x_9);
lean::cnstr_set(x_12, 3, x_10);
x_13 = l___private_init_lean_environment_9__persistentEnvExtensionsRef;
x_14 = lean::io_ref_get(x_13, x_6);
if (lean::obj_tag(x_14) == 0)
obj* x_3; obj* x_5; obj* x_7; obj* x_9; obj* x_11; uint8 x_13; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20; obj* x_21;
x_3 = lean::cnstr_get(x_1, 0);
lean::inc(x_3);
x_5 = lean::cnstr_get(x_1, 1);
lean::inc(x_5);
x_7 = lean::cnstr_get(x_1, 2);
lean::inc(x_7);
x_9 = lean::cnstr_get(x_1, 3);
lean::inc(x_9);
x_11 = lean::cnstr_get(x_1, 4);
lean::inc(x_11);
x_13 = lean::cnstr_get_scalar<uint8>(x_1, sizeof(void*)*5);
lean::inc(x_5);
x_15 = lean::thunk_pure(x_5);
x_16 = lean::box(0);
x_17 = lean::alloc_cnstr(1, 1, 0);
lean::cnstr_set(x_17, 0, x_5);
x_18 = l_Array_empty___closed__1;
x_19 = lean::alloc_cnstr(0, 4, 0);
lean::cnstr_set(x_19, 0, x_18);
lean::cnstr_set(x_19, 1, x_15);
lean::cnstr_set(x_19, 2, x_16);
lean::cnstr_set(x_19, 3, x_17);
x_20 = l___private_init_lean_environment_9__persistentEnvExtensionsRef;
x_21 = lean::io_ref_get(x_20, x_2);
if (lean::obj_tag(x_21) == 0)
{
obj* x_15; obj* x_17; obj* x_19; obj* x_20; uint8 x_21;
x_15 = lean::cnstr_get(x_14, 0);
x_17 = lean::cnstr_get(x_14, 1);
if (lean::is_exclusive(x_14)) {
lean::cnstr_set(x_14, 0, lean::box(0));
lean::cnstr_set(x_14, 1, lean::box(0));
x_19 = x_14;
obj* x_22; obj* x_24; obj* x_26; obj* x_27; uint8 x_28;
x_22 = lean::cnstr_get(x_21, 0);
x_24 = lean::cnstr_get(x_21, 1);
if (lean::is_exclusive(x_21)) {
lean::cnstr_set(x_21, 0, lean::box(0));
lean::cnstr_set(x_21, 1, lean::box(0));
x_26 = x_21;
} else {
lean::inc(x_15);
lean::inc(x_17);
lean::dec(x_14);
x_19 = lean::box(0);
lean::inc(x_22);
lean::inc(x_24);
lean::dec(x_21);
x_26 = lean::box(0);
}
x_20 = lean::mk_nat_obj(0ul);
x_21 = l_Array_anyMAux___main___at_Lean_registerPersistentEnvExtensionUnsafe___spec__1(x_0, x_15, x_20);
lean::dec(x_15);
if (x_21 == 0)
x_27 = lean::mk_nat_obj(0ul);
x_28 = l_Array_anyMAux___main___at_Lean_registerPersistentEnvExtensionUnsafe___spec__1___rarg(x_0, x_1, x_22, x_27);
lean::dec(x_22);
lean::dec(x_1);
if (x_28 == 0)
{
obj* x_23; obj* x_24; obj* x_25;
x_23 = lean::box(0);
if (lean::is_scalar(x_19)) {
x_24 = lean::alloc_cnstr(0, 2, 0);
obj* x_31; obj* x_32; obj* x_33;
x_31 = lean::box(0);
if (lean::is_scalar(x_26)) {
x_32 = lean::alloc_cnstr(0, 2, 0);
} else {
x_24 = x_19;
x_32 = x_26;
}
lean::cnstr_set(x_24, 0, x_23);
lean::cnstr_set(x_24, 1, x_17);
x_25 = l_Lean_registerEnvExtensionUnsafe___rarg(x_12, x_24);
if (lean::obj_tag(x_25) == 0)
lean::cnstr_set(x_32, 0, x_31);
lean::cnstr_set(x_32, 1, x_24);
x_33 = l_Lean_registerEnvExtensionUnsafe___rarg(x_19, x_32);
if (lean::obj_tag(x_33) == 0)
{
obj* x_26; obj* x_28; obj* x_30; obj* x_31; obj* x_32; obj* x_33; obj* x_34;
x_26 = lean::cnstr_get(x_25, 0);
x_28 = lean::cnstr_get(x_25, 1);
if (lean::is_exclusive(x_25)) {
x_30 = x_25;
obj* x_34; obj* x_36; obj* x_38; obj* x_39; obj* x_40; obj* x_41; obj* x_42;
x_34 = lean::cnstr_get(x_33, 0);
x_36 = lean::cnstr_get(x_33, 1);
if (lean::is_exclusive(x_33)) {
x_38 = x_33;
} else {
lean::inc(x_26);
lean::inc(x_28);
lean::dec(x_25);
x_30 = lean::box(0);
lean::inc(x_34);
lean::inc(x_36);
lean::dec(x_33);
x_38 = lean::box(0);
}
if (lean::is_scalar(x_30)) {
x_31 = lean::alloc_cnstr(0, 2, 0);
if (lean::is_scalar(x_38)) {
x_39 = lean::alloc_cnstr(0, 2, 0);
} else {
x_31 = x_30;
x_39 = x_38;
}
lean::cnstr_set(x_31, 0, x_23);
lean::cnstr_set(x_31, 1, x_28);
x_32 = lean::alloc_cnstr(0, 5, 1);
lean::cnstr_set(x_32, 0, x_26);
lean::cnstr_set(x_32, 1, x_0);
lean::cnstr_set(x_32, 2, x_2);
lean::cnstr_set(x_32, 3, x_3);
lean::cnstr_set(x_32, 4, x_4);
lean::cnstr_set_scalar(x_32, sizeof(void*)*5, x_5);
x_33 = x_32;
x_34 = lean::io_ref_get(x_13, x_31);
if (lean::obj_tag(x_34) == 0)
lean::cnstr_set(x_39, 0, x_31);
lean::cnstr_set(x_39, 1, x_36);
x_40 = lean::alloc_cnstr(0, 5, 1);
lean::cnstr_set(x_40, 0, x_34);
lean::cnstr_set(x_40, 1, x_3);
lean::cnstr_set(x_40, 2, x_7);
lean::cnstr_set(x_40, 3, x_9);
lean::cnstr_set(x_40, 4, x_11);
lean::cnstr_set_scalar(x_40, sizeof(void*)*5, x_13);
x_41 = x_40;
x_42 = lean::io_ref_get(x_20, x_39);
if (lean::obj_tag(x_42) == 0)
{
obj* x_35; obj* x_37; obj* x_39; obj* x_40; obj* x_41;
x_35 = lean::cnstr_get(x_34, 0);
x_37 = lean::cnstr_get(x_34, 1);
if (lean::is_exclusive(x_34)) {
x_39 = x_34;
obj* x_43; obj* x_45; obj* x_47; obj* x_48; obj* x_49;
x_43 = lean::cnstr_get(x_42, 0);
x_45 = lean::cnstr_get(x_42, 1);
if (lean::is_exclusive(x_42)) {
x_47 = x_42;
} else {
lean::inc(x_35);
lean::inc(x_37);
lean::dec(x_34);
x_39 = lean::box(0);
lean::inc(x_43);
lean::inc(x_45);
lean::dec(x_42);
x_47 = lean::box(0);
}
if (lean::is_scalar(x_39)) {
x_40 = lean::alloc_cnstr(0, 2, 0);
if (lean::is_scalar(x_47)) {
x_48 = lean::alloc_cnstr(0, 2, 0);
} else {
x_40 = x_39;
x_48 = x_47;
}
lean::cnstr_set(x_40, 0, x_23);
lean::cnstr_set(x_40, 1, x_37);
x_41 = lean::io_ref_reset(x_13, x_40);
if (lean::obj_tag(x_41) == 0)
lean::cnstr_set(x_48, 0, x_31);
lean::cnstr_set(x_48, 1, x_45);
x_49 = lean::io_ref_reset(x_20, x_48);
if (lean::obj_tag(x_49) == 0)
{
obj* x_42; obj* x_44; obj* x_45; obj* x_46; obj* x_48; obj* x_49; obj* x_50;
x_42 = lean::cnstr_get(x_41, 1);
if (lean::is_exclusive(x_41)) {
lean::cnstr_release(x_41, 0);
x_44 = x_41;
obj* x_50; obj* x_52; obj* x_53; obj* x_54; obj* x_56; obj* x_57; obj* x_58;
x_50 = lean::cnstr_get(x_49, 1);
if (lean::is_exclusive(x_49)) {
lean::cnstr_release(x_49, 0);
x_52 = x_49;
} else {
lean::inc(x_42);
lean::dec(x_41);
x_44 = lean::box(0);
lean::inc(x_50);
lean::dec(x_49);
x_52 = lean::box(0);
}
if (lean::is_scalar(x_44)) {
x_45 = lean::alloc_cnstr(0, 2, 0);
if (lean::is_scalar(x_52)) {
x_53 = lean::alloc_cnstr(0, 2, 0);
} else {
x_45 = x_44;
x_53 = x_52;
}
lean::cnstr_set(x_45, 0, x_23);
lean::cnstr_set(x_45, 1, x_42);
x_46 = l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__1;
lean::inc(x_33);
x_48 = x_33;
x_49 = lean::array_push(x_35, x_48);
x_50 = lean::io_ref_set(x_13, x_49, x_45);
if (lean::obj_tag(x_50) == 0)
lean::cnstr_set(x_53, 0, x_31);
lean::cnstr_set(x_53, 1, x_50);
x_54 = l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__1;
lean::inc(x_41);
x_56 = x_41;
x_57 = lean::array_push(x_43, x_56);
x_58 = lean::io_ref_set(x_20, x_57, x_53);
if (lean::obj_tag(x_58) == 0)
{
obj* x_51; obj* x_53; obj* x_54;
x_51 = lean::cnstr_get(x_50, 1);
if (lean::is_exclusive(x_50)) {
lean::cnstr_release(x_50, 0);
x_53 = x_50;
obj* x_59; obj* x_61; obj* x_62;
x_59 = lean::cnstr_get(x_58, 1);
if (lean::is_exclusive(x_58)) {
lean::cnstr_release(x_58, 0);
x_61 = x_58;
} else {
lean::inc(x_51);
lean::dec(x_50);
x_53 = lean::box(0);
lean::inc(x_59);
lean::dec(x_58);
x_61 = lean::box(0);
}
if (lean::is_scalar(x_53)) {
x_54 = lean::alloc_cnstr(0, 2, 0);
if (lean::is_scalar(x_61)) {
x_62 = lean::alloc_cnstr(0, 2, 0);
} else {
x_54 = x_53;
}
lean::cnstr_set(x_54, 0, x_33);
lean::cnstr_set(x_54, 1, x_51);
return x_54;
}
else
{
obj* x_56; obj* x_58; obj* x_60; obj* x_61;
lean::dec(x_33);
x_56 = lean::cnstr_get(x_50, 0);
x_58 = lean::cnstr_get(x_50, 1);
if (lean::is_exclusive(x_50)) {
x_60 = x_50;
} else {
lean::inc(x_56);
lean::inc(x_58);
lean::dec(x_50);
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_56);
lean::cnstr_set(x_61, 1, x_58);
return x_61;
x_62 = x_61;
}
lean::cnstr_set(x_62, 0, x_41);
lean::cnstr_set(x_62, 1, x_59);
return x_62;
}
else
{
obj* x_64; obj* x_66; obj* x_68; obj* x_69;
lean::dec(x_33);
lean::dec(x_35);
x_64 = lean::cnstr_get(x_41, 0);
x_66 = lean::cnstr_get(x_41, 1);
if (lean::is_exclusive(x_41)) {
x_68 = x_41;
lean::dec(x_41);
x_64 = lean::cnstr_get(x_58, 0);
x_66 = lean::cnstr_get(x_58, 1);
if (lean::is_exclusive(x_58)) {
x_68 = x_58;
} else {
lean::inc(x_64);
lean::inc(x_66);
lean::dec(x_41);
lean::dec(x_58);
x_68 = lean::box(0);
}
if (lean::is_scalar(x_68)) {
@ -4127,106 +4134,132 @@ return x_69;
}
else
{
obj* x_71; obj* x_73; obj* x_75; obj* x_76;
lean::dec(x_33);
x_71 = lean::cnstr_get(x_34, 0);
x_73 = lean::cnstr_get(x_34, 1);
if (lean::is_exclusive(x_34)) {
x_75 = x_34;
obj* x_72; obj* x_74; obj* x_76; obj* x_77;
lean::dec(x_41);
lean::dec(x_43);
x_72 = lean::cnstr_get(x_49, 0);
x_74 = lean::cnstr_get(x_49, 1);
if (lean::is_exclusive(x_49)) {
x_76 = x_49;
} else {
lean::inc(x_71);
lean::inc(x_73);
lean::dec(x_34);
x_75 = lean::box(0);
lean::inc(x_72);
lean::inc(x_74);
lean::dec(x_49);
x_76 = lean::box(0);
}
if (lean::is_scalar(x_75)) {
x_76 = lean::alloc_cnstr(1, 2, 0);
if (lean::is_scalar(x_76)) {
x_77 = lean::alloc_cnstr(1, 2, 0);
} else {
x_76 = x_75;
x_77 = x_76;
}
lean::cnstr_set(x_76, 0, x_71);
lean::cnstr_set(x_76, 1, x_73);
return x_76;
lean::cnstr_set(x_77, 0, x_72);
lean::cnstr_set(x_77, 1, x_74);
return x_77;
}
}
else
{
obj* x_81; obj* x_83; obj* x_85; obj* x_86;
lean::dec(x_4);
lean::dec(x_3);
lean::dec(x_0);
lean::dec(x_2);
x_81 = lean::cnstr_get(x_25, 0);
x_83 = lean::cnstr_get(x_25, 1);
if (lean::is_exclusive(x_25)) {
x_85 = x_25;
obj* x_79; obj* x_81; obj* x_83; obj* x_84;
lean::dec(x_41);
x_79 = lean::cnstr_get(x_42, 0);
x_81 = lean::cnstr_get(x_42, 1);
if (lean::is_exclusive(x_42)) {
x_83 = x_42;
} else {
lean::inc(x_79);
lean::inc(x_81);
lean::inc(x_83);
lean::dec(x_25);
x_85 = lean::box(0);
lean::dec(x_42);
x_83 = lean::box(0);
}
if (lean::is_scalar(x_85)) {
x_86 = lean::alloc_cnstr(1, 2, 0);
if (lean::is_scalar(x_83)) {
x_84 = lean::alloc_cnstr(1, 2, 0);
} else {
x_86 = x_85;
x_84 = x_83;
}
lean::cnstr_set(x_86, 0, x_81);
lean::cnstr_set(x_86, 1, x_83);
return x_86;
lean::cnstr_set(x_84, 0, x_79);
lean::cnstr_set(x_84, 1, x_81);
return x_84;
}
}
else
{
obj* x_91; obj* x_92; obj* x_93; obj* x_94; obj* x_96; obj* x_97; obj* x_98;
lean::dec(x_12);
lean::dec(x_4);
obj* x_89; obj* x_91; obj* x_93; obj* x_94;
lean::dec(x_7);
lean::dec(x_11);
lean::dec(x_9);
lean::dec(x_3);
lean::dec(x_2);
x_91 = l_Lean_Name_toString___closed__1;
x_92 = l_Lean_Name_toStringWithSep___main(x_91, x_0);
x_93 = l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__2;
x_94 = lean::string_append(x_93, x_92);
lean::dec(x_92);
x_96 = l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__3;
x_97 = lean::string_append(x_94, x_96);
if (lean::is_scalar(x_19)) {
x_98 = lean::alloc_cnstr(1, 2, 0);
x_89 = lean::cnstr_get(x_33, 0);
x_91 = lean::cnstr_get(x_33, 1);
if (lean::is_exclusive(x_33)) {
x_93 = x_33;
} else {
x_98 = x_19;
lean::cnstr_set_tag(x_19, 1);
lean::inc(x_89);
lean::inc(x_91);
lean::dec(x_33);
x_93 = lean::box(0);
}
lean::cnstr_set(x_98, 0, x_97);
lean::cnstr_set(x_98, 1, x_17);
return x_98;
if (lean::is_scalar(x_93)) {
x_94 = lean::alloc_cnstr(1, 2, 0);
} else {
x_94 = x_93;
}
lean::cnstr_set(x_94, 0, x_89);
lean::cnstr_set(x_94, 1, x_91);
return x_94;
}
}
else
{
obj* x_104; obj* x_106; obj* x_108; obj* x_109;
lean::dec(x_12);
lean::dec(x_4);
obj* x_99; obj* x_100; obj* x_101; obj* x_102; obj* x_104; obj* x_105; obj* x_106;
lean::dec(x_7);
lean::dec(x_11);
lean::dec(x_9);
lean::dec(x_19);
x_99 = l_Lean_Name_toString___closed__1;
x_100 = l_Lean_Name_toStringWithSep___main(x_99, x_3);
x_101 = l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__2;
x_102 = lean::string_append(x_101, x_100);
lean::dec(x_100);
x_104 = l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__3;
x_105 = lean::string_append(x_102, x_104);
if (lean::is_scalar(x_26)) {
x_106 = lean::alloc_cnstr(1, 2, 0);
} else {
x_106 = x_26;
lean::cnstr_set_tag(x_26, 1);
}
lean::cnstr_set(x_106, 0, x_105);
lean::cnstr_set(x_106, 1, x_24);
return x_106;
}
}
else
{
obj* x_113; obj* x_115; obj* x_117; obj* x_118;
lean::dec(x_7);
lean::dec(x_11);
lean::dec(x_1);
lean::dec(x_9);
lean::dec(x_3);
lean::dec(x_0);
lean::dec(x_2);
x_104 = lean::cnstr_get(x_14, 0);
x_106 = lean::cnstr_get(x_14, 1);
if (lean::is_exclusive(x_14)) {
x_108 = x_14;
lean::dec(x_19);
x_113 = lean::cnstr_get(x_21, 0);
x_115 = lean::cnstr_get(x_21, 1);
if (lean::is_exclusive(x_21)) {
x_117 = x_21;
} else {
lean::inc(x_104);
lean::inc(x_106);
lean::dec(x_14);
x_108 = lean::box(0);
lean::inc(x_113);
lean::inc(x_115);
lean::dec(x_21);
x_117 = lean::box(0);
}
if (lean::is_scalar(x_108)) {
x_109 = lean::alloc_cnstr(1, 2, 0);
if (lean::is_scalar(x_117)) {
x_118 = lean::alloc_cnstr(1, 2, 0);
} else {
x_109 = x_108;
x_118 = x_117;
}
lean::cnstr_set(x_109, 0, x_104);
lean::cnstr_set(x_109, 1, x_106);
return x_109;
lean::cnstr_set(x_118, 0, x_113);
lean::cnstr_set(x_118, 1, x_115);
return x_118;
}
}
}
@ -4234,28 +4267,39 @@ obj* l_Lean_registerPersistentEnvExtensionUnsafe(obj* x_0, obj* x_1) {
_start:
{
obj* x_2;
x_2 = lean::alloc_closure(reinterpret_cast<void*>(l_Lean_registerPersistentEnvExtensionUnsafe___rarg___boxed), 7, 0);
x_2 = lean::alloc_closure(reinterpret_cast<void*>(l_Lean_registerPersistentEnvExtensionUnsafe___rarg___boxed), 3, 0);
return x_2;
}
}
obj* l_Array_anyMAux___main___at_Lean_registerPersistentEnvExtensionUnsafe___spec__1___boxed(obj* x_0, obj* x_1, obj* x_2) {
obj* l_Array_anyMAux___main___at_Lean_registerPersistentEnvExtensionUnsafe___spec__1___rarg___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3) {
_start:
{
uint8 x_3; obj* x_4;
x_3 = l_Array_anyMAux___main___at_Lean_registerPersistentEnvExtensionUnsafe___spec__1(x_0, x_1, x_2);
x_4 = lean::box(x_3);
uint8 x_4; obj* x_5;
x_4 = l_Array_anyMAux___main___at_Lean_registerPersistentEnvExtensionUnsafe___spec__1___rarg(x_0, x_1, x_2, x_3);
x_5 = lean::box(x_4);
lean::dec(x_0);
lean::dec(x_1);
return x_4;
lean::dec(x_2);
return x_5;
}
}
obj* l_Lean_registerPersistentEnvExtensionUnsafe___rarg___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6) {
obj* l_Array_anyMAux___main___at_Lean_registerPersistentEnvExtensionUnsafe___spec__1___boxed(obj* x_0, obj* x_1) {
_start:
{
uint8 x_7; obj* x_8;
x_7 = lean::unbox(x_5);
x_8 = l_Lean_registerPersistentEnvExtensionUnsafe___rarg(x_0, x_1, x_2, x_3, x_4, x_7, x_6);
return x_8;
obj* x_2;
x_2 = l_Array_anyMAux___main___at_Lean_registerPersistentEnvExtensionUnsafe___spec__1(x_0, x_1);
lean::dec(x_0);
lean::dec(x_1);
return x_2;
}
}
obj* l_Lean_registerPersistentEnvExtensionUnsafe___rarg___boxed(obj* x_0, obj* x_1, obj* x_2) {
_start:
{
obj* x_3;
x_3 = l_Lean_registerPersistentEnvExtensionUnsafe___rarg(x_0, x_1, x_2);
lean::dec(x_0);
return x_3;
}
}
obj* l_Lean_registerPersistentEnvExtensionUnsafe___boxed(obj* x_0, obj* x_1) {
@ -4293,28 +4337,24 @@ lean::cnstr_set(x_5, 1, x_1);
return x_5;
}
}
obj* l_Lean_registerPersistentEnvExtension(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, uint8 x_7) {
obj* l_Lean_registerPersistentEnvExtension(obj* x_0, obj* x_1, obj* x_2, obj* x_3) {
_start:
{
obj* x_8;
x_8 = lean::alloc_closure(reinterpret_cast<void*>(l_Lean_registerPersistentEnvExtension___rarg), 1, 0);
return x_8;
obj* x_4;
x_4 = lean::alloc_closure(reinterpret_cast<void*>(l_Lean_registerPersistentEnvExtension___rarg), 1, 0);
return x_4;
}
}
obj* l_Lean_registerPersistentEnvExtension___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7) {
obj* l_Lean_registerPersistentEnvExtension___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3) {
_start:
{
uint8 x_8; obj* x_9;
x_8 = lean::unbox(x_7);
x_9 = l_Lean_registerPersistentEnvExtension(x_0, x_1, x_2, x_3, x_4, x_5, x_6, x_8);
obj* x_4;
x_4 = l_Lean_registerPersistentEnvExtension(x_0, x_1, x_2, x_3);
lean::dec(x_0);
lean::dec(x_1);
lean::dec(x_2);
lean::dec(x_3);
lean::dec(x_4);
lean::dec(x_5);
lean::dec(x_6);
return x_9;
return x_4;
}
}
obj* _init_l_Lean_CPPExtensionState_Inhabited() {

View file

@ -14,22 +14,39 @@ typedef lean::uint32 uint32; typedef lean::uint64 uint64;
#pragma GCC diagnostic ignored "-Wunused-label"
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#endif
extern obj* l_Lean_PersistentEnvExtension_inhabited___rarg___closed__2;
extern "C" uint8 lean_name_dec_eq(obj*, obj*);
uint8 l_Array_anyMAux___main___at_Lean_mkProtectedExtension___spec__2(obj*, obj*, obj*);
extern obj* l_Array_empty___closed__1;
extern obj* l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__2;
namespace lean {
obj* add_protected_core(obj*, obj*);
}
obj* l_List_toArrayAux___main___rarg(obj*, obj*);
obj* l_Lean_mkProtectedExtension___lambda__1(uint8, obj*, obj*);
obj* l_Lean_Name_toStringWithSep___main(obj*, obj*);
obj* l_List_redLength___main___rarg(obj*);
obj* l_Lean_isProtected___boxed(obj*, obj*);
obj* l_Lean_mkProtectedExtension___closed__2;
obj* l_Lean_PersistentEnvExtension_inhabited___rarg___lambda__2(obj*);
obj* l_Lean_protectedExt___elambda__1(obj*);
extern obj* l___private_init_lean_environment_9__persistentEnvExtensionsRef;
uint8 l_Lean_NameSet_contains(obj*, obj*);
obj* l_RBNode_insert___at_Lean_NameSet_insert___spec__1(obj*, obj*, obj*);
obj* l_Lean_registerEnvExtensionUnsafe___rarg(obj*, obj*);
extern obj* l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__3;
obj* l_Lean_PersistentEnvExtension_getState___rarg(obj*, obj*);
obj* l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_mkProtectedExtension___spec__1(obj*, obj*);
namespace lean {
obj* string_append(obj*, obj*);
}
obj* l_Lean_mkProtectedExtension___closed__1;
namespace lean {
uint8 nat_dec_lt(obj*, obj*);
}
extern "C" obj* lean_name_mk_string(obj*, obj*);
obj* l_Lean_protectedExt;
namespace lean {
obj* nat_add(obj*, obj*);
}
obj* l_Lean_mkProtectedExtension___lambda__1___boxed(obj*, obj*, obj*);
obj* l_Lean_protectedExt___elambda__2___rarg(obj*, obj*);
obj* l_Lean_protectedExt___elambda__2(uint8);
@ -37,10 +54,362 @@ obj* l_Lean_PersistentEnvExtension_addEntry___rarg(obj*, obj*, obj*);
namespace lean {
uint8 is_protected_core(obj*, obj*);
}
obj* l_Array_anyMAux___main___at_Lean_mkProtectedExtension___spec__2___boxed(obj*, obj*, obj*);
extern obj* l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__1;
extern obj* l_Lean_Name_toString___closed__1;
obj* l_Lean_mkProtectedExtension(obj*);
obj* l_Lean_registerPersistentEnvExtensionUnsafe___rarg(obj*, obj*, obj*, obj*, obj*, uint8, obj*);
obj* l_Lean_protectedExt___elambda__2___boxed(obj*);
obj* l_Lean_protectedExt___elambda__2___rarg___boxed(obj*, obj*);
uint8 l_Array_anyMAux___main___at_Lean_mkProtectedExtension___spec__2(obj* x_0, obj* x_1, obj* x_2) {
_start:
{
obj* x_3; uint8 x_4;
x_3 = lean::array_get_size(x_1);
x_4 = lean::nat_dec_lt(x_2, x_3);
lean::dec(x_3);
if (x_4 == 0)
{
uint8 x_7;
lean::dec(x_2);
x_7 = 0;
return x_7;
}
else
{
obj* x_8; obj* x_9; obj* x_12; uint8 x_13;
x_8 = lean::array_fget(x_1, x_2);
x_9 = lean::cnstr_get(x_8, 1);
lean::inc(x_9);
lean::dec(x_8);
x_12 = lean::cnstr_get(x_0, 0);
x_13 = lean_name_dec_eq(x_9, x_12);
lean::dec(x_9);
if (x_13 == 0)
{
obj* x_15; obj* x_16;
x_15 = lean::mk_nat_obj(1ul);
x_16 = lean::nat_add(x_2, x_15);
lean::dec(x_2);
x_2 = x_16;
goto _start;
}
else
{
lean::dec(x_2);
return x_13;
}
}
}
}
obj* l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_mkProtectedExtension___spec__1(obj* x_0, obj* x_1) {
_start:
{
obj* x_2; obj* x_4; obj* x_6; obj* x_8; obj* x_10; uint8 x_12; obj* x_14; obj* x_15; obj* x_16; obj* x_17; obj* x_18; obj* x_19; obj* x_20;
x_2 = lean::cnstr_get(x_0, 0);
lean::inc(x_2);
x_4 = lean::cnstr_get(x_0, 1);
lean::inc(x_4);
x_6 = lean::cnstr_get(x_0, 2);
lean::inc(x_6);
x_8 = lean::cnstr_get(x_0, 3);
lean::inc(x_8);
x_10 = lean::cnstr_get(x_0, 4);
lean::inc(x_10);
x_12 = lean::cnstr_get_scalar<uint8>(x_0, sizeof(void*)*5);
lean::inc(x_4);
x_14 = lean::thunk_pure(x_4);
x_15 = lean::box(0);
x_16 = lean::alloc_cnstr(1, 1, 0);
lean::cnstr_set(x_16, 0, x_4);
x_17 = l_Array_empty___closed__1;
x_18 = lean::alloc_cnstr(0, 4, 0);
lean::cnstr_set(x_18, 0, x_17);
lean::cnstr_set(x_18, 1, x_14);
lean::cnstr_set(x_18, 2, x_15);
lean::cnstr_set(x_18, 3, x_16);
x_19 = l___private_init_lean_environment_9__persistentEnvExtensionsRef;
x_20 = lean::io_ref_get(x_19, x_1);
if (lean::obj_tag(x_20) == 0)
{
obj* x_21; obj* x_23; obj* x_25; obj* x_26; uint8 x_27;
x_21 = lean::cnstr_get(x_20, 0);
x_23 = lean::cnstr_get(x_20, 1);
if (lean::is_exclusive(x_20)) {
lean::cnstr_set(x_20, 0, lean::box(0));
lean::cnstr_set(x_20, 1, lean::box(0));
x_25 = x_20;
} else {
lean::inc(x_21);
lean::inc(x_23);
lean::dec(x_20);
x_25 = lean::box(0);
}
x_26 = lean::mk_nat_obj(0ul);
x_27 = l_Array_anyMAux___main___at_Lean_mkProtectedExtension___spec__2(x_0, x_21, x_26);
lean::dec(x_21);
lean::dec(x_0);
if (x_27 == 0)
{
obj* x_30; obj* x_31; obj* x_32;
x_30 = lean::box(0);
if (lean::is_scalar(x_25)) {
x_31 = lean::alloc_cnstr(0, 2, 0);
} else {
x_31 = x_25;
}
lean::cnstr_set(x_31, 0, x_30);
lean::cnstr_set(x_31, 1, x_23);
x_32 = l_Lean_registerEnvExtensionUnsafe___rarg(x_18, x_31);
if (lean::obj_tag(x_32) == 0)
{
obj* x_33; obj* x_35; obj* x_37; obj* x_38; obj* x_39; obj* x_40; obj* x_41;
x_33 = lean::cnstr_get(x_32, 0);
x_35 = lean::cnstr_get(x_32, 1);
if (lean::is_exclusive(x_32)) {
x_37 = x_32;
} else {
lean::inc(x_33);
lean::inc(x_35);
lean::dec(x_32);
x_37 = lean::box(0);
}
if (lean::is_scalar(x_37)) {
x_38 = lean::alloc_cnstr(0, 2, 0);
} else {
x_38 = x_37;
}
lean::cnstr_set(x_38, 0, x_30);
lean::cnstr_set(x_38, 1, x_35);
x_39 = lean::alloc_cnstr(0, 5, 1);
lean::cnstr_set(x_39, 0, x_33);
lean::cnstr_set(x_39, 1, x_2);
lean::cnstr_set(x_39, 2, x_6);
lean::cnstr_set(x_39, 3, x_8);
lean::cnstr_set(x_39, 4, x_10);
lean::cnstr_set_scalar(x_39, sizeof(void*)*5, x_12);
x_40 = x_39;
x_41 = lean::io_ref_get(x_19, x_38);
if (lean::obj_tag(x_41) == 0)
{
obj* x_42; obj* x_44; obj* x_46; obj* x_47; obj* x_48;
x_42 = lean::cnstr_get(x_41, 0);
x_44 = lean::cnstr_get(x_41, 1);
if (lean::is_exclusive(x_41)) {
x_46 = x_41;
} else {
lean::inc(x_42);
lean::inc(x_44);
lean::dec(x_41);
x_46 = lean::box(0);
}
if (lean::is_scalar(x_46)) {
x_47 = lean::alloc_cnstr(0, 2, 0);
} else {
x_47 = x_46;
}
lean::cnstr_set(x_47, 0, x_30);
lean::cnstr_set(x_47, 1, x_44);
x_48 = lean::io_ref_reset(x_19, x_47);
if (lean::obj_tag(x_48) == 0)
{
obj* x_49; obj* x_51; obj* x_52; obj* x_53; obj* x_55; obj* x_56; obj* x_57;
x_49 = lean::cnstr_get(x_48, 1);
if (lean::is_exclusive(x_48)) {
lean::cnstr_release(x_48, 0);
x_51 = x_48;
} else {
lean::inc(x_49);
lean::dec(x_48);
x_51 = lean::box(0);
}
if (lean::is_scalar(x_51)) {
x_52 = lean::alloc_cnstr(0, 2, 0);
} else {
x_52 = x_51;
}
lean::cnstr_set(x_52, 0, x_30);
lean::cnstr_set(x_52, 1, x_49);
x_53 = l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__1;
lean::inc(x_40);
x_55 = x_40;
x_56 = lean::array_push(x_42, x_55);
x_57 = lean::io_ref_set(x_19, x_56, x_52);
if (lean::obj_tag(x_57) == 0)
{
obj* x_58; obj* x_60; obj* x_61;
x_58 = lean::cnstr_get(x_57, 1);
if (lean::is_exclusive(x_57)) {
lean::cnstr_release(x_57, 0);
x_60 = x_57;
} else {
lean::inc(x_58);
lean::dec(x_57);
x_60 = lean::box(0);
}
if (lean::is_scalar(x_60)) {
x_61 = lean::alloc_cnstr(0, 2, 0);
} else {
x_61 = x_60;
}
lean::cnstr_set(x_61, 0, x_40);
lean::cnstr_set(x_61, 1, x_58);
return x_61;
}
else
{
obj* x_63; obj* x_65; obj* x_67; obj* x_68;
lean::dec(x_40);
x_63 = lean::cnstr_get(x_57, 0);
x_65 = lean::cnstr_get(x_57, 1);
if (lean::is_exclusive(x_57)) {
x_67 = x_57;
} else {
lean::inc(x_63);
lean::inc(x_65);
lean::dec(x_57);
x_67 = lean::box(0);
}
if (lean::is_scalar(x_67)) {
x_68 = lean::alloc_cnstr(1, 2, 0);
} else {
x_68 = x_67;
}
lean::cnstr_set(x_68, 0, x_63);
lean::cnstr_set(x_68, 1, x_65);
return x_68;
}
}
else
{
obj* x_71; obj* x_73; obj* x_75; obj* x_76;
lean::dec(x_40);
lean::dec(x_42);
x_71 = lean::cnstr_get(x_48, 0);
x_73 = lean::cnstr_get(x_48, 1);
if (lean::is_exclusive(x_48)) {
x_75 = x_48;
} else {
lean::inc(x_71);
lean::inc(x_73);
lean::dec(x_48);
x_75 = lean::box(0);
}
if (lean::is_scalar(x_75)) {
x_76 = lean::alloc_cnstr(1, 2, 0);
} else {
x_76 = x_75;
}
lean::cnstr_set(x_76, 0, x_71);
lean::cnstr_set(x_76, 1, x_73);
return x_76;
}
}
else
{
obj* x_78; obj* x_80; obj* x_82; obj* x_83;
lean::dec(x_40);
x_78 = lean::cnstr_get(x_41, 0);
x_80 = lean::cnstr_get(x_41, 1);
if (lean::is_exclusive(x_41)) {
x_82 = x_41;
} else {
lean::inc(x_78);
lean::inc(x_80);
lean::dec(x_41);
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_78);
lean::cnstr_set(x_83, 1, x_80);
return x_83;
}
}
else
{
obj* x_88; obj* x_90; obj* x_92; obj* x_93;
lean::dec(x_8);
lean::dec(x_6);
lean::dec(x_10);
lean::dec(x_2);
x_88 = lean::cnstr_get(x_32, 0);
x_90 = lean::cnstr_get(x_32, 1);
if (lean::is_exclusive(x_32)) {
x_92 = x_32;
} else {
lean::inc(x_88);
lean::inc(x_90);
lean::dec(x_32);
x_92 = lean::box(0);
}
if (lean::is_scalar(x_92)) {
x_93 = lean::alloc_cnstr(1, 2, 0);
} else {
x_93 = x_92;
}
lean::cnstr_set(x_93, 0, x_88);
lean::cnstr_set(x_93, 1, x_90);
return x_93;
}
}
else
{
obj* x_98; obj* x_99; obj* x_100; obj* x_101; obj* x_103; obj* x_104; obj* x_105;
lean::dec(x_8);
lean::dec(x_6);
lean::dec(x_10);
lean::dec(x_18);
x_98 = l_Lean_Name_toString___closed__1;
x_99 = l_Lean_Name_toStringWithSep___main(x_98, x_2);
x_100 = l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__2;
x_101 = lean::string_append(x_100, x_99);
lean::dec(x_99);
x_103 = l_Lean_registerPersistentEnvExtensionUnsafe___rarg___closed__3;
x_104 = lean::string_append(x_101, x_103);
if (lean::is_scalar(x_25)) {
x_105 = lean::alloc_cnstr(1, 2, 0);
} else {
x_105 = x_25;
lean::cnstr_set_tag(x_25, 1);
}
lean::cnstr_set(x_105, 0, x_104);
lean::cnstr_set(x_105, 1, x_23);
return x_105;
}
}
else
{
obj* x_112; obj* x_114; obj* x_116; obj* x_117;
lean::dec(x_8);
lean::dec(x_6);
lean::dec(x_10);
lean::dec(x_0);
lean::dec(x_18);
lean::dec(x_2);
x_112 = lean::cnstr_get(x_20, 0);
x_114 = lean::cnstr_get(x_20, 1);
if (lean::is_exclusive(x_20)) {
x_116 = x_20;
} else {
lean::inc(x_112);
lean::inc(x_114);
lean::dec(x_20);
x_116 = lean::box(0);
}
if (lean::is_scalar(x_116)) {
x_117 = lean::alloc_cnstr(1, 2, 0);
} else {
x_117 = x_116;
}
lean::cnstr_set(x_117, 0, x_112);
lean::cnstr_set(x_117, 1, x_114);
return x_117;
}
}
}
obj* l_Lean_mkProtectedExtension___lambda__1(uint8 x_0, obj* x_1, obj* x_2) {
_start:
{
@ -53,33 +422,43 @@ return x_4;
obj* _init_l_Lean_mkProtectedExtension___closed__1() {
_start:
{
obj* x_0; obj* x_1; obj* x_2;
obj* x_0; obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; uint8 x_6; obj* x_7; obj* x_8;
x_0 = lean::box(0);
x_1 = lean::mk_string("protected");
x_2 = lean_name_mk_string(x_0, x_1);
return x_2;
}
}
obj* _init_l_Lean_mkProtectedExtension___closed__2() {
_start:
{
obj* x_0;
x_0 = lean::alloc_closure(reinterpret_cast<void*>(l_Lean_mkProtectedExtension___lambda__1___boxed), 3, 0);
return x_0;
x_3 = lean::box(0);
x_4 = lean::alloc_closure(reinterpret_cast<void*>(l_Lean_mkProtectedExtension___lambda__1___boxed), 3, 0);
x_5 = lean::alloc_closure(reinterpret_cast<void*>(l_Lean_PersistentEnvExtension_inhabited___rarg___lambda__2), 1, 0);
x_6 = 0;
x_7 = lean::alloc_cnstr(0, 5, 1);
lean::cnstr_set(x_7, 0, x_2);
lean::cnstr_set(x_7, 1, x_3);
lean::cnstr_set(x_7, 2, x_0);
lean::cnstr_set(x_7, 3, x_4);
lean::cnstr_set(x_7, 4, x_5);
lean::cnstr_set_scalar(x_7, sizeof(void*)*5, x_6);
x_8 = x_7;
return x_8;
}
}
obj* l_Lean_mkProtectedExtension(obj* x_0) {
_start:
{
obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; uint8 x_6; obj* x_7;
x_1 = lean::box(0);
x_2 = l_Lean_mkProtectedExtension___closed__1;
x_3 = lean::box(0);
x_4 = l_Lean_mkProtectedExtension___closed__2;
x_5 = l_Lean_PersistentEnvExtension_inhabited___rarg___closed__2;
x_6 = 0;
x_7 = l_Lean_registerPersistentEnvExtensionUnsafe___rarg(x_2, x_1, x_3, x_4, x_5, x_6, x_0);
return x_7;
obj* x_1; obj* x_2;
x_1 = l_Lean_mkProtectedExtension___closed__1;
x_2 = l_Lean_registerPersistentEnvExtensionUnsafe___at_Lean_mkProtectedExtension___spec__1(x_1, x_0);
return x_2;
}
}
obj* l_Array_anyMAux___main___at_Lean_mkProtectedExtension___spec__2___boxed(obj* x_0, obj* x_1, obj* x_2) {
_start:
{
uint8 x_3; obj* x_4;
x_3 = l_Array_anyMAux___main___at_Lean_mkProtectedExtension___spec__2(x_0, x_1, x_2);
x_4 = lean::box(x_3);
lean::dec(x_0);
lean::dec(x_1);
return x_4;
}
}
obj* l_Lean_mkProtectedExtension___lambda__1___boxed(obj* x_0, obj* x_1, obj* x_2) {
@ -180,8 +559,6 @@ w = initialize_init_lean_environment(w);
if (io_result_is_error(w)) return w;
l_Lean_mkProtectedExtension___closed__1 = _init_l_Lean_mkProtectedExtension___closed__1();
lean::mark_persistent(l_Lean_mkProtectedExtension___closed__1);
l_Lean_mkProtectedExtension___closed__2 = _init_l_Lean_mkProtectedExtension___closed__2();
lean::mark_persistent(l_Lean_mkProtectedExtension___closed__2);
w = l_Lean_mkProtectedExtension(w);
if (io_result_is_error(w)) return w;
l_Lean_protectedExt = io_result_get_value(w);

View file

@ -441,28 +441,37 @@ return x_2;
obj* l_Lean_SMap_switch___rarg(obj* x_0, obj* x_1, obj* x_2, obj* x_3) {
_start:
{
obj* x_4; obj* x_6; obj* x_8; uint8 x_9; obj* x_10; obj* x_11;
x_4 = lean::cnstr_get(x_3, 0);
x_6 = lean::cnstr_get(x_3, 1);
uint8 x_4;
x_4 = lean::cnstr_get_scalar<uint8>(x_3, sizeof(void*)*2);
if (x_4 == 0)
{
return x_3;
}
else
{
obj* x_5; obj* x_7; obj* x_9; uint8 x_10; obj* x_11; obj* x_12;
x_5 = lean::cnstr_get(x_3, 0);
x_7 = lean::cnstr_get(x_3, 1);
if (lean::is_exclusive(x_3)) {
x_8 = x_3;
x_9 = x_3;
} else {
lean::inc(x_4);
lean::inc(x_6);
lean::inc(x_5);
lean::inc(x_7);
lean::dec(x_3);
x_8 = lean::box(0);
x_9 = lean::box(0);
}
x_9 = 0;
if (lean::is_scalar(x_8)) {
x_10 = lean::alloc_cnstr(0, 2, 1);
x_10 = 0;
if (lean::is_scalar(x_9)) {
x_11 = lean::alloc_cnstr(0, 2, 1);
} else {
x_10 = x_8;
x_11 = x_9;
}
lean::cnstr_set(x_11, 0, x_5);
lean::cnstr_set(x_11, 1, x_7);
lean::cnstr_set_scalar(x_11, sizeof(void*)*2, x_10);
x_12 = x_11;
return x_12;
}
lean::cnstr_set(x_10, 0, x_4);
lean::cnstr_set(x_10, 1, x_6);
lean::cnstr_set_scalar(x_10, sizeof(void*)*2, x_9);
x_11 = x_10;
return x_11;
}
}
obj* l_Lean_SMap_switch(obj* x_0, obj* x_1) {