From 4b83585103afbea38dca30570959552a00284a5d Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Tue, 26 Mar 2019 15:51:13 -0700 Subject: [PATCH] chore(stage0, runtime): update stage0 and remove old String API --- src/runtime/object.cpp | 6 - src/runtime/object.h | 8 - src/stage0/init/data/hashable.cpp | 28 +- src/stage0/init/data/int/basic.cpp | 169 +- src/stage0/init/data/repr.cpp | 10 +- src/stage0/init/data/string/basic.cpp | 4784 ++++++++++--------- src/stage0/init/data/tostring.cpp | 10 +- src/stage0/init/lean/extern.cpp | 16 +- src/stage0/init/lean/name_mangling.cpp | 96 +- src/stage0/init/lean/parser/basic.cpp | 27 +- src/stage0/init/lean/parser/declaration.cpp | 99 +- src/stage0/init/lean/parser/level.cpp | 415 +- src/stage0/init/lean/parser/module.cpp | 35 +- src/stage0/init/lean/parser/notation.cpp | 99 +- src/stage0/init/lean/parser/parsec.cpp | 417 +- src/stage0/init/lean/parser/pratt.cpp | 41 +- src/stage0/init/lean/parser/syntax.cpp | 49 +- src/stage0/init/lean/parser/term.cpp | 513 +- src/stage0/init/lean/parser/token.cpp | 215 +- src/stage0/init/lean/parser/trie.cpp | 27 +- src/stage0/init/lean/position.cpp | 21 +- 21 files changed, 3519 insertions(+), 3566 deletions(-) diff --git a/src/runtime/object.cpp b/src/runtime/object.cpp index 35c97c0717..7d4343a61b 100644 --- a/src/runtime/object.cpp +++ b/src/runtime/object.cpp @@ -1697,12 +1697,6 @@ obj_res string_utf8_set(obj_arg s, b_obj_arg i0, uint32 c) { return mk_string(new_s); } -uint32 string_utf8_get_old(b_obj_arg s, usize i) { return string_utf8_get(s, box(i)); } -usize string_utf8_next_old(b_obj_arg s, usize i) { return unbox(string_utf8_next(s, box(i))); } -usize string_utf8_prev_old(b_obj_arg s, usize i) { return unbox(string_utf8_prev(s, box(i))); } -obj_res string_utf8_set_old(obj_arg s, usize i, uint32 c) { return string_utf8_set(s, box(i), c); } -obj_res string_utf8_extract_old(b_obj_arg s, usize b, usize e) { return string_utf8_extract(s, box(b), box(e)); } - // ======================================= // array functions for generated code diff --git a/src/runtime/object.h b/src/runtime/object.h index 55654db4c8..feabebe8ae 100644 --- a/src/runtime/object.h +++ b/src/runtime/object.h @@ -1196,14 +1196,6 @@ inline uint8 string_utf8_at_end(b_obj_arg s, b_obj_arg i) { return !is_scalar(i) obj_res string_utf8_extract(b_obj_arg s, b_obj_arg b, b_obj_arg e); inline obj_res string_utf8_byte_size(b_obj_arg s) { return mk_nat_obj(string_size(s) - 1); } -uint32 string_utf8_get_old(b_obj_arg s, usize i); -usize string_utf8_next_old(b_obj_arg s, usize i); -usize string_utf8_prev_old(b_obj_arg s, usize i); -obj_res string_utf8_set_old(obj_arg s, usize i, uint32 c); -inline uint8 string_utf8_at_end_old(b_obj_arg s, usize i) { return i >= string_size(s) - 1; } -obj_res string_utf8_extract_old(b_obj_arg s, usize b, usize e); -inline usize string_utf8_byte_size_old(b_obj_arg s) { return string_size(s) - 1; } - inline bool string_eq(b_obj_arg s1, b_obj_arg s2) { return s1 == s2 || (string_size(s1) == string_size(s2) && std::memcmp(string_cstr(s1), string_cstr(s2), string_size(s1)) == 0); } bool string_eq(b_obj_arg s1, char const * s2); inline bool string_ne(b_obj_arg s1, b_obj_arg s2) { return !string_eq(s1, s2); } diff --git a/src/stage0/init/data/hashable.cpp b/src/stage0/init/data/hashable.cpp index 2808714930..bc742d2883 100644 --- a/src/stage0/init/data/hashable.cpp +++ b/src/stage0/init/data/hashable.cpp @@ -14,9 +14,9 @@ typedef lean::uint32 uint32; typedef lean::uint64 uint64; #pragma GCC diagnostic ignored "-Wunused-label" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #endif -extern usize l_String_toSubstring___closed__1; obj* l_String_Hashable; usize l_Nat_hash(obj*); +obj* l_mixHash___closed__1___boxed; usize l_String_hash(obj*); obj* l_String_hash___boxed(obj*); obj* l_Nat_Hashable; @@ -26,14 +26,33 @@ namespace lean { usize usize_of_nat(obj*); } obj* l_Nat_hash___boxed(obj*); +usize l_mixHash___closed__1; +usize _init_l_mixHash___closed__1() { +_start: +{ +obj* x_0; usize x_1; +x_0 = lean::mk_nat_obj(0ul); +x_1 = lean::usize_of_nat(x_0); +return x_1; +} +} usize l_mixHash(usize x_0, usize x_1) { _start: { usize x_2; -x_2 = l_String_toSubstring___closed__1; +x_2 = l_mixHash___closed__1; return x_2; } } +obj* _init_l_mixHash___closed__1___boxed() { +_start: +{ +usize x_0; obj* x_1; +x_0 = l_mixHash___closed__1; +x_1 = lean::box_size_t(x_0); +return x_1; +} +} obj* l_mixHash___boxed(obj* x_0, obj* x_1) { _start: { @@ -49,7 +68,7 @@ usize l_String_hash(obj* x_0) { _start: { usize x_1; -x_1 = l_String_toSubstring___closed__1; +x_1 = l_mixHash___closed__1; return x_1; } } @@ -107,6 +126,9 @@ if (io_result_is_error(w)) return w; w = initialize_init_data_uint(w); if (io_result_is_error(w)) return w; w = initialize_init_data_string_default(w); + l_mixHash___closed__1 = _init_l_mixHash___closed__1(); + l_mixHash___closed__1___boxed = _init_l_mixHash___closed__1___boxed(); +lean::mark_persistent(l_mixHash___closed__1___boxed); l_String_Hashable = _init_l_String_Hashable(); lean::mark_persistent(l_String_Hashable); l_Nat_Hashable = _init_l_Nat_Hashable(); diff --git a/src/stage0/init/data/int/basic.cpp b/src/stage0/init/data/int/basic.cpp index a7967e029c..06f4e47716 100644 --- a/src/stage0/init/data/int/basic.cpp +++ b/src/stage0/init/data/int/basic.cpp @@ -29,7 +29,6 @@ obj* nat2int(obj*); namespace lean { obj* int_sub(obj*, obj*); } -extern usize l_String_toSubstring___closed__1; obj* l_Int_HasDiv; namespace lean { obj* int_neg_succ_of_nat(obj*); @@ -60,7 +59,7 @@ obj* l_Int_HasZero; obj* l_Int_HasOne; obj* l_Nat_repr(obj*); obj* l_Int_HasMod; -usize l_String_toInt___closed__1; +obj* l_String_toInt___closed__1; namespace lean { obj* string_append(obj*, obj*); } @@ -83,10 +82,9 @@ obj* l_Int_HasSub; obj* l_Int_sign___main(obj*); uint8 l_String_isInt___closed__1; namespace lean { -uint32 string_utf8_get_old(obj*, usize); +uint32 string_utf8_get(obj*, obj*); } obj* l_String_isInt___closed__1___boxed; -obj* l_String_toInt___closed__2; obj* l_Int_decLt___boxed(obj*, obj*); obj* l_Int_repr___main___closed__1; obj* l_Int_HasNeg; @@ -107,13 +105,13 @@ namespace lean { obj* nat_abs(obj*); } namespace lean { -usize usize_of_nat(obj*); +uint8 nat_dec_le(obj*, obj*); } obj* l_Int_subNatNat___boxed(obj*, obj*); obj* l_Int_negOfNat(obj*); obj* l_Int_sign___main___closed__1; namespace lean { -usize string_utf8_byte_size_old(obj*); +obj* string_utf8_byte_size(obj*); } obj* l_Int_decEq___boxed(obj*, obj*); obj* l_Int_repr___main___boxed(obj*); @@ -126,7 +124,6 @@ namespace lean { uint8 int_dec_le(obj*, obj*); } obj* l_Int_natMod___boxed(obj*, obj*); -obj* l_String_toInt___closed__1___boxed; obj* l_Int_sub___boxed(obj*, obj*); namespace lean { uint8 int_dec_lt(obj*, obj*); @@ -674,46 +671,30 @@ lean::dec(x_1); return x_2; } } -usize _init_l_String_toInt___closed__1() { +obj* _init_l_String_toInt___closed__1() { _start: { -obj* x_0; usize x_1; obj* x_2; usize x_3; usize x_4; -x_0 = lean::mk_nat_obj(0ul); -x_1 = lean::usize_of_nat(x_0); -x_2 = lean::mk_nat_obj(1ul); -x_3 = lean::usize_of_nat(x_2); -x_4 = x_1 + x_3; -return x_4; -} -} -obj* _init_l_String_toInt___closed__2() { -_start: -{ -obj* x_0; usize x_1; obj* x_2; usize x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_9; obj* x_10; -x_0 = lean::mk_nat_obj(0ul); -x_1 = lean::usize_of_nat(x_0); -x_2 = lean::mk_string(""); -x_3 = lean::string_utf8_byte_size_old(x_2); -x_4 = lean::alloc_cnstr(0, 1, sizeof(size_t)*2); -lean::cnstr_set(x_4, 0, x_2); -lean::cnstr_set_scalar(x_4, sizeof(void*)*1, x_1); -x_5 = x_4; -lean::cnstr_set_scalar(x_5, sizeof(void*)*2, x_3); -x_6 = x_5; -x_7 = l_Substring_toNat(x_6); -lean::dec(x_6); -x_9 = lean::nat2int(x_7); -x_10 = lean::int_neg(x_9); -lean::dec(x_9); -return x_10; +obj* x_0; obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; +x_0 = lean::mk_string(""); +x_1 = lean::string_utf8_byte_size(x_0); +x_2 = lean::mk_nat_obj(0ul); +x_3 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_3, 0, x_0); +lean::cnstr_set(x_3, 1, x_2); +lean::cnstr_set(x_3, 2, x_1); +x_4 = l_Substring_toNat(x_3); +x_5 = lean::nat2int(x_4); +x_6 = lean::int_neg(x_5); +lean::dec(x_5); +return x_6; } } obj* l_String_toInt(obj* x_0) { _start: { -usize x_1; uint32 x_2; uint32 x_3; uint8 x_4; -x_1 = l_String_toSubstring___closed__1; -x_2 = lean::string_utf8_get_old(x_0, x_1); +obj* x_1; uint32 x_2; uint32 x_3; uint8 x_4; +x_1 = lean::mk_nat_obj(0ul); +x_2 = lean::string_utf8_get(x_0, x_1); x_3 = 45; x_4 = x_2 == x_3; if (x_4 == 0) @@ -726,70 +707,55 @@ return x_7; } else { -usize x_8; usize x_9; uint8 x_10; -x_8 = lean::string_utf8_byte_size_old(x_0); -x_9 = l_String_toInt___closed__1; -x_10 = x_8 <= x_9; +obj* x_8; obj* x_9; uint8 x_10; +x_8 = lean::string_utf8_byte_size(x_0); +x_9 = lean::mk_nat_obj(1ul); +x_10 = lean::nat_dec_le(x_8, x_9); if (x_10 == 0) { -obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_16; obj* x_17; -x_11 = lean::alloc_cnstr(0, 1, sizeof(size_t)*2); +obj* x_11; obj* x_12; obj* x_13; obj* x_14; +x_11 = lean::alloc_cnstr(0, 3, 0); lean::cnstr_set(x_11, 0, x_0); -lean::cnstr_set_scalar(x_11, sizeof(void*)*1, x_9); -x_12 = x_11; -lean::cnstr_set_scalar(x_12, sizeof(void*)*2, x_8); -x_13 = x_12; -x_14 = l_Substring_toNat(x_13); +lean::cnstr_set(x_11, 1, x_9); +lean::cnstr_set(x_11, 2, x_8); +x_12 = l_Substring_toNat(x_11); +x_13 = lean::nat2int(x_12); +x_14 = lean::int_neg(x_13); lean::dec(x_13); -x_16 = lean::nat2int(x_14); -x_17 = lean::int_neg(x_16); -lean::dec(x_16); -return x_17; +return x_14; } else { -obj* x_20; +obj* x_18; lean::dec(x_0); -x_20 = l_String_toInt___closed__2; -return x_20; +lean::dec(x_8); +x_18 = l_String_toInt___closed__1; +return x_18; } } } } -obj* _init_l_String_toInt___closed__1___boxed() { -_start: -{ -usize x_0; obj* x_1; -x_0 = l_String_toInt___closed__1; -x_1 = lean::box_size_t(x_0); -return x_1; -} -} uint8 _init_l_String_isInt___closed__1() { _start: { -obj* x_0; usize x_1; obj* x_2; usize x_3; obj* x_4; obj* x_5; obj* x_6; uint8 x_7; -x_0 = lean::mk_nat_obj(0ul); -x_1 = lean::usize_of_nat(x_0); -x_2 = lean::mk_string(""); -x_3 = lean::string_utf8_byte_size_old(x_2); -x_4 = lean::alloc_cnstr(0, 1, sizeof(size_t)*2); -lean::cnstr_set(x_4, 0, x_2); -lean::cnstr_set_scalar(x_4, sizeof(void*)*1, x_1); -x_5 = x_4; -lean::cnstr_set_scalar(x_5, sizeof(void*)*2, x_3); -x_6 = x_5; -x_7 = l_Substring_isNat(x_6); -lean::dec(x_6); -return x_7; +obj* x_0; obj* x_1; obj* x_2; obj* x_3; uint8 x_4; +x_0 = lean::mk_string(""); +x_1 = lean::string_utf8_byte_size(x_0); +x_2 = lean::mk_nat_obj(0ul); +x_3 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_3, 0, x_0); +lean::cnstr_set(x_3, 1, x_2); +lean::cnstr_set(x_3, 2, x_1); +x_4 = l_Substring_isNat(x_3); +return x_4; } } uint8 l_String_isInt(obj* x_0) { _start: { -usize x_1; uint32 x_2; uint32 x_3; uint8 x_4; -x_1 = l_String_toSubstring___closed__1; -x_2 = lean::string_utf8_get_old(x_0, x_1); +obj* x_1; uint32 x_2; uint32 x_3; uint8 x_4; +x_1 = lean::mk_nat_obj(0ul); +x_2 = lean::string_utf8_get(x_0, x_1); x_3 = 45; x_4 = x_2 == x_3; if (x_4 == 0) @@ -801,29 +767,27 @@ return x_5; } else { -usize x_7; usize x_8; uint8 x_9; -x_7 = lean::string_utf8_byte_size_old(x_0); -x_8 = l_String_toInt___closed__1; -x_9 = x_7 <= x_8; +obj* x_7; obj* x_8; uint8 x_9; +x_7 = lean::string_utf8_byte_size(x_0); +x_8 = lean::mk_nat_obj(1ul); +x_9 = lean::nat_dec_le(x_7, x_8); if (x_9 == 0) { -obj* x_10; obj* x_11; obj* x_12; uint8 x_13; -x_10 = lean::alloc_cnstr(0, 1, sizeof(size_t)*2); +obj* x_10; uint8 x_11; +x_10 = lean::alloc_cnstr(0, 3, 0); lean::cnstr_set(x_10, 0, x_0); -lean::cnstr_set_scalar(x_10, sizeof(void*)*1, x_8); -x_11 = x_10; -lean::cnstr_set_scalar(x_11, sizeof(void*)*2, x_7); -x_12 = x_11; -x_13 = l_Substring_isNat(x_12); -lean::dec(x_12); -return x_13; +lean::cnstr_set(x_10, 1, x_8); +lean::cnstr_set(x_10, 2, x_7); +x_11 = l_Substring_isNat(x_10); +return x_11; } else { -uint8 x_16; +uint8 x_14; +lean::dec(x_7); lean::dec(x_0); -x_16 = l_String_isInt___closed__1; -return x_16; +x_14 = l_String_isInt___closed__1; +return x_14; } } } @@ -902,10 +866,7 @@ lean::mark_persistent(l_Int_HasDiv); l_Int_HasMod = _init_l_Int_HasMod(); lean::mark_persistent(l_Int_HasMod); l_String_toInt___closed__1 = _init_l_String_toInt___closed__1(); - l_String_toInt___closed__2 = _init_l_String_toInt___closed__2(); -lean::mark_persistent(l_String_toInt___closed__2); - l_String_toInt___closed__1___boxed = _init_l_String_toInt___closed__1___boxed(); -lean::mark_persistent(l_String_toInt___closed__1___boxed); +lean::mark_persistent(l_String_toInt___closed__1); l_String_isInt___closed__1 = _init_l_String_isInt___closed__1(); l_String_isInt___closed__1___boxed = _init_l_String_isInt___closed__1___boxed(); lean::mark_persistent(l_String_isInt___closed__1___boxed); diff --git a/src/stage0/init/data/repr.cpp b/src/stage0/init/data/repr.cpp index ca309e770d..5cffe39e6a 100644 --- a/src/stage0/init/data/repr.cpp +++ b/src/stage0/init/data/repr.cpp @@ -137,7 +137,7 @@ namespace lean { uint8 nat_dec_le(obj*, obj*); } namespace lean { -obj* string_utf8_extract_old(obj*, usize, usize); +obj* string_utf8_extract(obj*, obj*, obj*); } namespace lean { obj* string_mk(obj*); @@ -1477,11 +1477,11 @@ return x_0; obj* l_Substring_HasRepr(obj* x_0) { _start: { -obj* x_1; usize x_2; usize x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; x_1 = lean::cnstr_get(x_0, 0); -x_2 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_3 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); -x_4 = lean::string_utf8_extract_old(x_1, x_2, x_3); +x_2 = lean::cnstr_get(x_0, 1); +x_3 = lean::cnstr_get(x_0, 2); +x_4 = lean::string_utf8_extract(x_1, x_2, x_3); x_5 = l_String_quote(x_4); x_6 = l_Substring_HasRepr___closed__1; x_7 = lean::string_append(x_5, x_6); diff --git a/src/stage0/init/data/string/basic.cpp b/src/stage0/init/data/string/basic.cpp index 3d2e13823e..17d73f55d4 100644 --- a/src/stage0/init/data/string/basic.cpp +++ b/src/stage0/init/data/string/basic.cpp @@ -14,31 +14,31 @@ typedef lean::uint32 uint32; typedef lean::uint64 uint64; #pragma GCC diagnostic ignored "-Wunused-label" #pragma GCC diagnostic ignored "-Wunused-but-set-variable" #endif -usize l_String_posOf(obj*, uint32); +obj* l_String_posOf(obj*, uint32); uint8 l_String_all(obj*, obj*); obj* l_String_utf8ByteSize___boxed(obj*); uint32 l_String_Iterator_curr___main(obj*); obj* l_String_Iterator_extract(obj*, obj*); -usize l_String_posOfAux___main(obj*, uint32, usize, obj*, usize); +obj* l_String_posOfAux___main(obj*, uint32, obj*, obj*, obj*); obj* l_String_prev___boxed(obj*, obj*); obj* l_Substring_dropRight___boxed(obj*, obj*); obj* l_String_mkIterator(obj*); obj* l___private_init_data_string_basic_2__utf8ByteSizeAux___main___boxed(obj*, obj*); -obj* l___private_init_data_string_basic_4__utf8SetAux(uint32, obj*, usize, usize); +obj* l___private_init_data_string_basic_4__utf8SetAux(uint32, obj*, obj*, obj*); obj* l_String_posOf___boxed(obj*, obj*); -usize l_Substring_takeWhileAux(obj*, usize, obj*, obj*, usize); +obj* l_Substring_takeWhileAux(obj*, obj*, obj*, obj*, obj*); obj* l_String_foldlAux___main___at_String_toNat___spec__1___closed__1; uint8 l_Substring_all(obj*, obj*); obj* l_String_Iterator_hasPrev___main___boxed(obj*); obj* l_List_asString(obj*); obj* l_Substring_next___boxed(obj*, obj*); -uint32 l_Substring_get___main(obj*, usize); +uint32 l_Substring_get___main(obj*, obj*); uint32 l_Substring_front(obj*); obj* l_List_foldl___main___at_String_join___spec__1___boxed(obj*, obj*); obj* l___private_init_data_string_basic_4__utf8SetAux___main___boxed(obj*, obj*, obj*, obj*); obj* l_String_singleton___boxed(obj*); obj* l_Substring_atEnd___boxed(obj*, obj*); -obj* l_String_foldlAux___rarg(obj*, obj*, usize, obj*, usize, obj*); +obj* l_String_foldlAux___rarg(obj*, obj*, obj*, obj*, obj*, obj*); obj* l_String_front___boxed(obj*); obj* l_String_Iterator_prevn(obj*, obj*); obj* l_String_Iterator_extract___main___boxed(obj*, obj*); @@ -47,37 +47,35 @@ obj* l_String_join___boxed(obj*); obj* l_String_takeRight(obj*, obj*); obj* l_Substring_takeRightWhileAux___main___at_Substring_trim___main___spec__2___boxed(obj*, obj*, obj*, obj*); obj* l_String_Iterator_remainingToString___main(obj*); -obj* l_Substring_extract___main(obj*, usize, usize); +obj* l_Substring_extract___main(obj*, obj*, obj*); obj* l_String_Iterator_setCurr___main___boxed(obj*, obj*); -obj* l_String_mapAux___main(obj*, obj*, usize, obj*); +obj* l_String_mapAux___main(obj*, obj*, obj*, obj*); namespace lean { obj* nat_sub(obj*, obj*); } obj* l_String_toNat(obj*); obj* l_String_map(obj*, obj*); obj* l_Substring_takeRightWhile(obj*, obj*); -usize l_Substring_prev___main(obj*, usize); +obj* l_Substring_prev___main(obj*, obj*); obj* l_String_foldrAux___main(obj*); namespace lean { -usize string_utf8_prev_old(obj*, usize); +obj* string_utf8_prev(obj*, obj*); } obj* l_String_foldlAux___main___boxed(obj*); obj* l_Substring_next___main___boxed(obj*, obj*); uint8 l_String_isEmpty(obj*); obj* l_String_trim___boxed(obj*); -usize l_String_toSubstring___closed__1; -obj* l_Substring_toNat___boxed(obj*); obj* l_String_foldrAux(obj*); obj* l_String_intercalate(obj*, obj*); obj* l___private_init_data_string_basic_8__lineColumnAux___boxed(obj*, obj*, obj*, obj*); -obj* l_String_lineColumn(obj*, usize); +obj* l_String_lineColumn(obj*, obj*); obj* l_Substring_dropRight___main(obj*, obj*); -usize l_Substring_prev(obj*, usize); +obj* l_Substring_prev(obj*, obj*); obj* l_String_Iterator_hasPrev___boxed(obj*); obj* l_Substring_isNat___boxed(obj*); obj* l_String_Iterator_extract___main(obj*, obj*); obj* l_Substring_any___boxed(obj*, obj*); -usize l_String_Iterator_pos(obj*); +obj* l_String_Iterator_pos(obj*); obj* l_Substring_takeWhile___main(obj*, obj*); obj* l_String_drop___boxed(obj*, obj*); obj* l_String_foldr___boxed(obj*); @@ -87,27 +85,27 @@ uint8 l_String_Iterator_hasPrev___main(obj*); obj* l_Char_toString___boxed(obj*); obj* l_String_push___boxed(obj*, obj*); obj* l_Substring_takeRightWhileAux___main___boxed(obj*, obj*, obj*, obj*, obj*); -obj* l_String_foldrAux___rarg(obj*, obj*, obj*, usize, obj*, usize); -usize l_Substring_takeRightWhileAux___main___at_Substring_trim___main___spec__2(obj*, usize, obj*, usize); +obj* l_String_foldrAux___rarg(obj*, obj*, obj*, obj*, obj*, obj*); +obj* l_Substring_takeRightWhileAux___main___at_Substring_trim___main___spec__2(obj*, obj*, obj*, obj*); obj* l_String_dropRight___boxed(obj*, obj*); -obj* l___private_init_data_string_basic_4__utf8SetAux___main(uint32, obj*, usize, usize); -obj* l___private_init_data_string_basic_7__utf8ExtractAux_u_2081(obj*, usize, usize, usize); -obj* l___private_init_data_string_basic_6__utf8ExtractAux_u_2082(obj*, usize, usize); +obj* l___private_init_data_string_basic_4__utf8SetAux___main(uint32, obj*, obj*, obj*); +obj* l___private_init_data_string_basic_7__utf8ExtractAux_u_2081(obj*, obj*, obj*, obj*); +obj* l___private_init_data_string_basic_6__utf8ExtractAux_u_2082(obj*, obj*, obj*); obj* l_String_split___boxed(obj*, obj*); obj* l_Substring_dropWhile(obj*, obj*); obj* l_List_reverse___rarg(obj*); obj* l_String_Iterator_isPrefixOfRemaining___boxed(obj*, obj*); obj* l_String_Iterator_remainingBytes___main(obj*); obj* l_String_Iterator_pos___boxed(obj*); -uint8 l_String_anyAux___main___at_String_isNat___spec__1(obj*, usize, obj*, usize); -usize l_Substring_takeRightWhileAux___main___at_Substring_trimRight___spec__1(obj*, usize, obj*, usize); +uint8 l_String_anyAux___main___at_String_isNat___spec__1(obj*, obj*, obj*, obj*); +obj* l_Substring_takeRightWhileAux___main___at_Substring_trimRight___spec__1(obj*, obj*, obj*, obj*); obj* l_String_foldl___rarg(obj*, obj*, obj*); obj* l_String_pushn___boxed(obj*, obj*, obj*); obj* l_String_get___boxed(obj*, obj*); obj* l___private_init_data_string_basic_2__utf8ByteSizeAux___boxed(obj*, obj*); uint8 l_String_Iterator_hasNext(obj*); obj* l_Substring_foldl___boxed(obj*); -obj* l_String_offsetOfPos(obj*, usize); +obj* l_String_offsetOfPos(obj*, obj*); obj* l_String_HasAppend; obj* l_String_HasLess; obj* l_Substring_contains___boxed(obj*, obj*); @@ -117,49 +115,49 @@ uint8 l_String_contains(obj*, uint32); obj* l_Substring_takeRightWhileAux___main___at_Substring_trim___spec__2___boxed(obj*, obj*, obj*, obj*); obj* l_String_Iterator_prev___main(obj*); obj* l_String_dropWhile___boxed(obj*, obj*); -usize l_Substring_takeWhileAux___main(obj*, usize, obj*, obj*, usize); +obj* l_Substring_takeWhileAux___main(obj*, obj*, obj*, obj*, obj*); obj* l_Substring_takeRight___main___boxed(obj*, obj*); -usize l_Substring_takeWhileAux___main___at_String_trimLeft___spec__1(obj*, usize, obj*, usize); +obj* l_Substring_takeWhileAux___main___at_String_trimLeft___spec__1(obj*, obj*, obj*, obj*); obj* l_String_Iterator_forward___main(obj*, obj*); uint8 l_String_Iterator_isPrefixOfRemaining(obj*, obj*); -obj* l_String_splitAux(obj*, obj*, obj*, usize, usize, usize, obj*); +obj* l_String_splitAux(obj*, obj*, obj*, obj*, obj*, obj*, obj*); obj* l_Substring_takeRight(obj*, obj*); -uint8 l_String_anyAux___main___at_Substring_isNat___spec__1(obj*, usize, obj*, usize); +uint8 l_String_anyAux___main___at_Substring_isNat___spec__1(obj*, obj*, obj*, obj*); obj* l_Substring_toString(obj*); uint8 l_String_any(obj*, obj*); obj* l_Substring_takeRightWhileAux___main___at_Substring_trimRight___spec__1___boxed(obj*, obj*, obj*, obj*); obj* l_String_Inhabited; obj* l_String_toFuel(obj*); -obj* l___private_init_data_string_basic_8__lineColumnAux(obj*, obj*, usize, obj*); -usize l_Substring_next(obj*, usize); -obj* l___private_init_data_string_basic_8__lineColumnAux___main(obj*, obj*, usize, obj*); +obj* l___private_init_data_string_basic_8__lineColumnAux(obj*, obj*, obj*, obj*); +obj* l_Substring_next(obj*, obj*); +obj* l___private_init_data_string_basic_8__lineColumnAux___main(obj*, obj*, obj*, obj*); obj* l_Substring_trimRight(obj*); obj* l_Substring_toIterator___main(obj*); obj* l_String_anyAux___main___at_Substring_contains___spec__1___boxed(obj*, obj*, obj*, obj*, obj*); -obj* l_Substring_extract(obj*, usize, usize); -usize l___private_init_data_string_basic_1__csize(uint32); +obj* l_Substring_extract(obj*, obj*, obj*); +obj* l___private_init_data_string_basic_1__csize(uint32); obj* l_String_Iterator_prevn___main(obj*, obj*); obj* l___private_init_data_string_basic_4__utf8SetAux___boxed(obj*, obj*, obj*, obj*); obj* l_Substring_extract___main___closed__1; obj* l_Substring_extract___main___boxed(obj*, obj*, obj*); obj* l_String_back___boxed(obj*); -obj* l_String_foldlAux___main___at_String_toNat___spec__1(obj*, usize, obj*, usize, obj*); +obj* l_String_foldlAux___main___at_String_toNat___spec__1(obj*, obj*, obj*, obj*, obj*); obj* l_String_Iterator_hasNext___main___boxed(obj*); namespace lean { obj* string_push(obj*, uint32); } obj* l_Substring_take___boxed(obj*, obj*); obj* l_String_takeRight___boxed(obj*, obj*); -usize l_Substring_takeRightWhileAux___main___at_Substring_trim___spec__2(obj*, usize, obj*, usize); +obj* l_Substring_takeRightWhileAux___main___at_Substring_trim___spec__2(obj*, obj*, obj*, obj*); obj* l_Substring_drop___main(obj*, obj*); -usize l_Substring_takeWhileAux___main___at_String_trim___spec__1(obj*, usize, obj*, usize); +obj* l_Substring_takeWhileAux___main___at_String_trim___spec__1(obj*, obj*, obj*, obj*); obj* l_String_Iterator_toString(obj*); obj* l_Substring_drop(obj*, obj*); -obj* l___private_init_data_string_basic_6__utf8ExtractAux_u_2082___main(obj*, usize, usize); -usize l_Substring_takeWhileAux___main___at_Substring_trim___main___spec__1(obj*, usize, obj*, usize); +obj* l___private_init_data_string_basic_6__utf8ExtractAux_u_2082___main(obj*, obj*, obj*); +obj* l_Substring_takeWhileAux___main___at_Substring_trim___main___spec__1(obj*, obj*, obj*, obj*); obj* l_Substring_trim___main(obj*); obj* l_Char_toString(uint32); -obj* l_String_offsetOfPosAux___main(obj*, usize, obj*, usize, obj*); +obj* l_String_offsetOfPosAux___main(obj*, obj*, obj*, obj*, obj*); obj* l_String_Iterator_next(obj*); obj* l_Substring_splitAux___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*); obj* l_String_Iterator_hasNext___boxed(obj*); @@ -169,21 +167,21 @@ obj* l_Substring_dropRightWhile___main(obj*, obj*); obj* l_String_foldl(obj*); obj* l_String_any___boxed(obj*, obj*); obj* l_String_anyAux___main___at_Substring_isNat___spec__1___boxed(obj*, obj*, obj*, obj*); -usize l___private_init_data_string_basic_5__utf8PrevAux(obj*, usize, usize); +obj* l___private_init_data_string_basic_5__utf8PrevAux(obj*, obj*, obj*); obj* l_String_contains___boxed(obj*, obj*); -usize l___private_init_data_string_basic_5__utf8PrevAux___main(obj*, usize, usize); -usize l_Substring_posOf(obj*, uint32); -uint8 l_String_anyAux___main___at_Substring_contains___spec__1(uint32, obj*, usize, obj*, usize); +obj* l___private_init_data_string_basic_5__utf8PrevAux___main(obj*, obj*, obj*); +obj* l_Substring_posOf(obj*, uint32); +uint8 l_String_anyAux___main___at_Substring_contains___spec__1(uint32, obj*, obj*, obj*, obj*); obj* l_String_offsetOfPosAux___main___boxed(obj*, obj*, obj*, obj*, obj*); -obj* l_String_offsetOfPosAux(obj*, usize, obj*, usize, obj*); +obj* l_String_offsetOfPosAux(obj*, obj*, obj*, obj*, obj*); obj* l_String_Iterator_next___main(obj*); obj* l_Substring_takeRightWhileAux___boxed(obj*, obj*, obj*, obj*, obj*); -obj* l___private_init_data_string_basic_7__utf8ExtractAux_u_2081___main(obj*, usize, usize, usize); +obj* l___private_init_data_string_basic_7__utf8ExtractAux_u_2081___main(obj*, obj*, obj*, obj*); obj* l_String_all___boxed(obj*, obj*); namespace lean { obj* string_append(obj*, obj*); } -uint32 l_Substring_get(obj*, usize); +uint32 l_Substring_get(obj*, obj*); obj* l_Substring_foldr___rarg___boxed(obj*, obj*, obj*); obj* l_Substring_foldr(obj*); namespace lean { @@ -195,7 +193,7 @@ obj* l_String_offsetOfPos___boxed(obj*, obj*); obj* l_String_drop___closed__1; obj* l_String_take(obj*, obj*); namespace lean { -uint8 string_utf8_at_end_old(obj*, usize); +uint8 string_utf8_at_end(obj*, obj*); } obj* l_String_decEq___boxed(obj*, obj*); obj* l_String_anyAux___main___at_String_contains___spec__1___boxed(obj*, obj*, obj*, obj*, obj*); @@ -203,15 +201,17 @@ obj* l_String_Iterator_prev(obj*); obj* l_String_foldrAux___rarg___boxed(obj*, obj*, obj*, obj*, obj*, obj*); obj* l_String_offsetOfPosAux___boxed(obj*, obj*, obj*, obj*, obj*); obj* l_String_toSubstring(obj*); +namespace lean { +uint8 nat_dec_lt(obj*, obj*); +} obj* l_Substring_takeWhileAux___main___at_String_trim___spec__1___boxed(obj*, obj*, obj*, obj*); obj* l_String_str(obj*, uint32); obj* l_Substring_drop___main___boxed(obj*, obj*); obj* l_Substring_split(obj*, obj*); obj* l_String_drop(obj*, obj*); -obj* l_String_mapAux___boxed(obj*, obj*, obj*, obj*); obj* l_Substring_drop___main___closed__1; obj* l_Substring_posOf___boxed(obj*, obj*); -usize l_String_bsize(obj*); +obj* l_String_bsize(obj*); obj* l_String_anyAux___main___at_Substring_all___spec__1___boxed(obj*, obj*, obj*, obj*, obj*); obj* l_String_Iterator_remainingToString___boxed(obj*); obj* l_Substring_dropRight(obj*, obj*); @@ -219,11 +219,10 @@ obj* l_String_Iterator_nextn(obj*, obj*); obj* l_String_foldrAux___main___rarg___boxed(obj*, obj*, obj*, obj*, obj*, obj*); obj* l_Substring_takeWhileAux___main___at_String_trimLeft___spec__1___boxed(obj*, obj*, obj*, obj*); obj* l_Substring_takeRightWhileAux___main___at_String_trim___spec__2___boxed(obj*, obj*, obj*, obj*); -obj* l_String_toSubstring___closed__1___boxed; obj* l_String_toNat___boxed(obj*); obj* l_String_Iterator_curr___main___boxed(obj*); obj* l_String_Iterator_toString___boxed(obj*); -uint8 l_String_anyAux___main___at_Substring_all___spec__1(obj*, obj*, usize, obj*, usize); +uint8 l_String_anyAux___main___at_Substring_all___spec__1(obj*, obj*, obj*, obj*, obj*); obj* l_String_foldlAux___main___at_Substring_toNat___spec__1___boxed(obj*, obj*, obj*, obj*, obj*); obj* l_String_foldlAux(obj*); obj* l_String_set___boxed(obj*, obj*, obj*); @@ -232,10 +231,10 @@ obj* l_Substring_front___boxed(obj*); namespace lean { obj* nat_add(obj*, obj*); } -usize l_Substring_takeRightWhileAux___main___at_String_trim___spec__2(obj*, usize, obj*, usize); +obj* l_Substring_takeRightWhileAux___main___at_String_trim___spec__2(obj*, obj*, obj*, obj*); obj* l_String_anyAux___boxed(obj*, obj*, obj*, obj*, obj*); obj* l_Substring_takeRight___main(obj*, obj*); -usize l_Substring_takeRightWhileAux___main(obj*, usize, obj*, obj*, usize); +obj* l_Substring_takeRightWhileAux___main(obj*, obj*, obj*, obj*, obj*); obj* l_String_join(obj*); obj* l_String_Iterator_remainingBytes___main___boxed(obj*); namespace lean { @@ -257,12 +256,12 @@ obj* l_Substring_takeWhileAux___boxed(obj*, obj*, obj*, obj*, obj*); obj* l_String_atEnd___boxed(obj*, obj*); obj* l_Substring_takeWhile(obj*, obj*); namespace lean { -uint32 string_utf8_get_old(obj*, usize); +uint32 string_utf8_get(obj*, obj*); } obj* l_Substring_drop___boxed(obj*, obj*); obj* l_String_trimRight___boxed(obj*); obj* l_Substring_foldr___boxed(obj*); -obj* l_Substring_splitAux(obj*, obj*, usize, obj*, usize, usize, usize, obj*); +obj* l_Substring_splitAux(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*); obj* l_String_singleton(uint32); obj* l___private_init_data_string_basic_8__lineColumnAux___main___boxed(obj*, obj*, obj*, obj*); namespace lean { @@ -270,19 +269,18 @@ uint8 string_dec_eq(obj*, obj*); } obj* l_String_anyAux___main___at_String_all___spec__1___boxed(obj*, obj*, obj*, obj*, obj*); obj* l_Substring_extract___boxed(obj*, obj*, obj*); -obj* l_Substring_splitAux___main(obj*, obj*, usize, obj*, usize, usize, usize, obj*); -obj* l_String_foldrAux___main___rarg(obj*, obj*, obj*, usize, obj*, usize); +obj* l_Substring_splitAux___main(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*); +obj* l_String_foldrAux___main___rarg(obj*, obj*, obj*, obj*, obj*, obj*); obj* l_Substring_dropRightWhile(obj*, obj*); obj* l_Substring_takeWhileAux___main___boxed(obj*, obj*, obj*, obj*, obj*); obj* l_Substring_toIterator(obj*); -uint8 l_Substring_atEnd(obj*, usize); -obj* l_String_mapAux___main___boxed(obj*, obj*, obj*, obj*); -usize l_Substring_next___main(obj*, usize); +uint8 l_Substring_atEnd(obj*, obj*); +obj* l_Substring_next___main(obj*, obj*); obj* l_Substring_take___main(obj*, obj*); uint8 l_Char_isDigit(uint32); obj* l_String_dropRight(obj*, obj*); obj* l_Substring_all___boxed(obj*, obj*); -usize l_Substring_takeWhileAux___main___at_Substring_trimLeft___spec__1(obj*, usize, obj*, usize); +obj* l_Substring_takeWhileAux___main___at_Substring_trimLeft___spec__1(obj*, obj*, obj*, obj*); obj* l_Substring_splitAux___main___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*); obj* l_String_Iterator_forward(obj*, obj*); obj* l_Substring_atEnd___main___boxed(obj*, obj*); @@ -293,65 +291,64 @@ obj* l_String_DecidableEq; obj* l_String_trim(obj*); obj* l___private_init_data_string_basic_6__utf8ExtractAux_u_2082___boxed(obj*, obj*, obj*); obj* l_String_foldr___rarg(obj*, obj*, obj*); -obj* l_String_foldlAux___main___at_Substring_toNat___spec__1(obj*, usize, obj*, usize, obj*); +obj* l_String_foldlAux___main___at_Substring_toNat___spec__1(obj*, obj*, obj*, obj*, obj*); obj* l_Substring_split___boxed(obj*, obj*); obj* l_String_split(obj*, obj*); obj* l_String_foldr(obj*); obj* l_String_posOfAux___boxed(obj*, obj*, obj*, obj*, obj*); -obj* l_String_mapAux(obj*, obj*, usize, obj*); +obj* l_String_mapAux(obj*, obj*, obj*, obj*); obj* l___private_init_data_string_basic_1__csize___boxed(obj*); namespace lean { obj* string_data(obj*); } obj* l_String_extract___boxed(obj*, obj*, obj*); uint8 l_Substring_any(obj*, obj*); -usize l_Substring_takeRightWhileAux(obj*, usize, obj*, obj*, usize); +obj* l_Substring_takeRightWhileAux(obj*, obj*, obj*, obj*, obj*); uint8 l_String_isNat(obj*); obj* l_Substring_takeRightWhileAux___main___at_String_trimRight___spec__1___boxed(obj*, obj*, obj*, obj*); -usize l_String_Iterator_pos___main(obj*); +obj* l_String_Iterator_pos___main(obj*); obj* l_Substring_trimLeft(obj*); uint32 l_String_Iterator_curr(obj*); obj* l_String_pushn(obj*, uint32, obj*); -obj* l_String_splitAux___main(obj*, obj*, obj*, usize, usize, usize, obj*); +obj* l_String_splitAux___main(obj*, obj*, obj*, obj*, obj*, obj*, obj*); obj* l___private_init_data_string_basic_3__utf8GetAux___boxed(obj*, obj*, obj*); uint8 l_Char_isWhitespace(uint32); obj* l_String_Iterator_remainingBytes___boxed(obj*); -usize l_String_posOfAux(obj*, uint32, usize, obj*, usize); -uint32 l___private_init_data_string_basic_3__utf8GetAux(obj*, usize, usize); +obj* l_String_posOfAux(obj*, uint32, obj*, obj*, obj*); +uint32 l___private_init_data_string_basic_3__utf8GetAux(obj*, obj*, obj*); obj* l_Substring_toString___boxed(obj*); obj* l_String_HasSizeof; uint32 l_String_front(obj*); obj* l_String_toFuel___boxed(obj*); -uint8 l_String_anyAux___main___at_String_all___spec__1(obj*, obj*, usize, obj*, usize); +uint8 l_String_anyAux___main___at_String_all___spec__1(obj*, obj*, obj*, obj*, obj*); obj* l_Substring_get___main___boxed(obj*, obj*); obj* l_String_anyAux___main___boxed(obj*, obj*, obj*, obj*, obj*); -uint32 l___private_init_data_string_basic_3__utf8GetAux___main(obj*, usize, usize); +uint32 l___private_init_data_string_basic_3__utf8GetAux___main(obj*, obj*, obj*); obj* l_Substring_prev___main___boxed(obj*, obj*); obj* l_List_intercalate___rarg(obj*, obj*); -usize l___private_init_data_string_basic_2__utf8ByteSizeAux___main(obj*, usize); +obj* l___private_init_data_string_basic_2__utf8ByteSizeAux___main(obj*, obj*); obj* l___private_init_data_string_basic_6__utf8ExtractAux_u_2082___main___boxed(obj*, obj*, obj*); obj* l_Substring_dropWhile___main(obj*, obj*); uint32 l_Char_utf8Size(uint32); obj* l_String_Iterator_toEnd___main(obj*); obj* l_Substring_toNat(obj*); -obj* l_Substring_foldl___rarg___boxed(obj*, obj*, obj*); namespace lean { -usize string_utf8_next_old(obj*, usize); +obj* string_utf8_next(obj*, obj*); } obj* l_String_splitAux___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*); obj* l___private_init_data_string_basic_3__utf8GetAux___main___boxed(obj*, obj*, obj*); obj* l_String_Iterator_extract___boxed(obj*, obj*); -uint8 l_Substring_atEnd___main(obj*, usize); +uint8 l_Substring_atEnd___main(obj*, obj*); obj* l___private_init_data_string_basic_7__utf8ExtractAux_u_2081___main___boxed(obj*, obj*, obj*, obj*); namespace lean { uint32 uint32_of_nat(obj*); } uint8 l_String_Iterator_hasNext___main(obj*); namespace lean { -obj* string_utf8_extract_old(obj*, usize, usize); +uint8 nat_dec_le(obj*, obj*); } namespace lean { -usize usize_of_nat(obj*); +obj* string_utf8_extract(obj*, obj*, obj*); } namespace lean { obj* string_mk(obj*); @@ -361,9 +358,9 @@ obj* l_String_foldrAux___boxed(obj*); obj* l_String_Iterator_curr___boxed(obj*); obj* l_Substring_toString___main___boxed(obj*); obj* l_String_dropWhile(obj*, obj*); -usize l_Substring_takeRightWhileAux___main___at_String_trimRight___spec__1(obj*, usize, obj*, usize); +obj* l_Substring_takeRightWhileAux___main___at_String_trimRight___spec__1(obj*, obj*, obj*, obj*); namespace lean { -usize string_utf8_byte_size_old(obj*); +obj* string_utf8_byte_size(obj*); } obj* l_String_foldr___rarg___boxed(obj*, obj*, obj*); obj* l_String_foldl___boxed(obj*); @@ -379,16 +376,13 @@ obj* l_String_trimLeft___boxed(obj*); obj* l_String_take___boxed(obj*, obj*); obj* l_String_foldlAux___boxed(obj*); uint8 l_String_Iterator_hasPrev(obj*); -usize l_Substring_takeWhileAux___main___at_Substring_trim___spec__1(obj*, usize, obj*, usize); +obj* l_Substring_takeWhileAux___main___at_Substring_trim___spec__1(obj*, obj*, obj*, obj*); obj* l_List_foldl___main___at_String_join___spec__1(obj*, obj*); uint8 l_Substring_isNat(obj*); obj* l_String_Iterator_setCurr(obj*, uint32); obj* l_Nat_repeatCore___main___at_String_pushn___spec__1___boxed(obj*, obj*, obj*, obj*); obj* l_String_foldlAux___main___rarg___boxed(obj*, obj*, obj*, obj*, obj*, obj*); obj* l_Substring_toString___main(obj*); -namespace lean { -obj* usize_to_nat(usize); -} obj* l_String_Iterator_toEnd(obj*); obj* l_String_bsize___boxed(obj*); namespace lean { @@ -404,14 +398,14 @@ obj* l_String_takeWhile___boxed(obj*, obj*); obj* l_String_foldlAux___main___at_String_toNat___spec__1___boxed(obj*, obj*, obj*, obj*, obj*); obj* l_String_next___boxed(obj*, obj*); obj* l_String_trimLeft(obj*); -usize l___private_init_data_string_basic_2__utf8ByteSizeAux(obj*, usize); -uint8 l_String_anyAux___main___at_String_contains___spec__1(uint32, obj*, usize, obj*, usize); +obj* l___private_init_data_string_basic_2__utf8ByteSizeAux(obj*, obj*); +uint8 l_String_anyAux___main___at_String_contains___spec__1(uint32, obj*, obj*, obj*, obj*); obj* l_String_length___boxed(obj*); obj* l_String_anyAux___main___at_String_isNat___spec__1___boxed(obj*, obj*, obj*, obj*); -uint8 l_String_anyAux(obj*, usize, obj*, obj*, usize); +uint8 l_String_anyAux(obj*, obj*, obj*, obj*, obj*); obj* l_Substring_prev___boxed(obj*, obj*); obj* l_Substring_take(obj*, obj*); -uint8 l_String_anyAux___main(obj*, usize, obj*, obj*, usize); +uint8 l_String_anyAux___main(obj*, obj*, obj*, obj*, obj*); obj* l_Substring_foldr___rarg(obj*, obj*, obj*); obj* l_String_lineColumn___closed__1; obj* l_String_trimRight(obj*); @@ -419,11 +413,11 @@ obj* l_Substring_takeRight___boxed(obj*, obj*); uint32 l_String_back(obj*); obj* l_Substring_takeWhileAux___main___at_Substring_trim___main___spec__1___boxed(obj*, obj*, obj*, obj*); obj* l_String_Iterator_remainingBytes(obj*); -obj* l_String_foldlAux___main___rarg(obj*, obj*, usize, obj*, usize, obj*); +obj* l_String_foldlAux___main___rarg(obj*, obj*, obj*, obj*, obj*, obj*); obj* l_String_Iterator_remainingToString(obj*); obj* l_String_splitAux___main___closed__1; namespace lean { -obj* string_utf8_set_old(obj*, usize, uint32); +obj* string_utf8_set(obj*, obj*, uint32); } namespace lean { obj* string_length(obj*); @@ -510,26 +504,25 @@ x_1 = lean::string_data(x_0); return x_1; } } -usize l___private_init_data_string_basic_1__csize(uint32 x_0) { +obj* l___private_init_data_string_basic_1__csize(uint32 x_0) { _start: { -uint32 x_1; usize x_2; +uint32 x_1; obj* x_2; x_1 = l_Char_utf8Size(x_0); -x_2 = x_1; +x_2 = lean::uint32_to_nat(x_1); return x_2; } } obj* l___private_init_data_string_basic_1__csize___boxed(obj* x_0) { _start: { -uint32 x_1; usize x_2; obj* x_3; +uint32 x_1; obj* x_2; x_1 = lean::unbox_uint32(x_0); x_2 = l___private_init_data_string_basic_1__csize(x_1); -x_3 = lean::box_size_t(x_2); -return x_3; +return x_2; } } -usize l___private_init_data_string_basic_2__utf8ByteSizeAux___main(obj* x_0, usize x_1) { +obj* l___private_init_data_string_basic_2__utf8ByteSizeAux___main(obj* x_0, obj* x_1) { _start: { if (lean::obj_tag(x_0) == 0) @@ -538,12 +531,14 @@ return x_1; } else { -obj* x_2; obj* x_3; uint32 x_4; usize x_5; usize x_6; +obj* x_2; obj* x_3; uint32 x_4; obj* x_5; obj* x_6; x_2 = lean::cnstr_get(x_0, 0); x_3 = lean::cnstr_get(x_0, 1); x_4 = lean::unbox_uint32(x_2); x_5 = l___private_init_data_string_basic_1__csize(x_4); -x_6 = x_1 + x_5; +x_6 = lean::nat_add(x_1, x_5); +lean::dec(x_5); +lean::dec(x_1); x_0 = x_3; x_1 = x_6; goto _start; @@ -553,18 +548,16 @@ goto _start; obj* l___private_init_data_string_basic_2__utf8ByteSizeAux___main___boxed(obj* x_0, obj* x_1) { _start: { -usize x_2; usize x_3; obj* x_4; -x_2 = lean::unbox_size_t(x_1); -x_3 = l___private_init_data_string_basic_2__utf8ByteSizeAux___main(x_0, x_2); -x_4 = lean::box_size_t(x_3); +obj* x_2; +x_2 = l___private_init_data_string_basic_2__utf8ByteSizeAux___main(x_0, x_1); lean::dec(x_0); -return x_4; +return x_2; } } -usize l___private_init_data_string_basic_2__utf8ByteSizeAux(obj* x_0, usize x_1) { +obj* l___private_init_data_string_basic_2__utf8ByteSizeAux(obj* x_0, obj* x_1) { _start: { -usize x_2; +obj* x_2; x_2 = l___private_init_data_string_basic_2__utf8ByteSizeAux___main(x_0, x_1); return x_2; } @@ -572,52 +565,47 @@ return x_2; obj* l___private_init_data_string_basic_2__utf8ByteSizeAux___boxed(obj* x_0, obj* x_1) { _start: { -usize x_2; usize x_3; obj* x_4; -x_2 = lean::unbox_size_t(x_1); -x_3 = l___private_init_data_string_basic_2__utf8ByteSizeAux(x_0, x_2); -x_4 = lean::box_size_t(x_3); +obj* x_2; +x_2 = l___private_init_data_string_basic_2__utf8ByteSizeAux(x_0, x_1); lean::dec(x_0); -return x_4; +return x_2; } } obj* l_String_utf8ByteSize___boxed(obj* x_0) { _start: { -usize x_1; obj* x_2; -x_1 = lean::string_utf8_byte_size_old(x_0); -x_2 = lean::box_size_t(x_1); +obj* x_1; +x_1 = lean::string_utf8_byte_size(x_0); lean::dec(x_0); -return x_2; +return x_1; } } -usize l_String_bsize(obj* x_0) { +obj* l_String_bsize(obj* x_0) { _start: { -usize x_1; -x_1 = lean::string_utf8_byte_size_old(x_0); +obj* x_1; +x_1 = lean::string_utf8_byte_size(x_0); return x_1; } } obj* l_String_bsize___boxed(obj* x_0) { _start: { -usize x_1; obj* x_2; +obj* x_1; x_1 = l_String_bsize(x_0); -x_2 = lean::box_size_t(x_1); lean::dec(x_0); -return x_2; +return x_1; } } obj* l_String_toFuel(obj* x_0) { _start: { -usize x_1; obj* x_2; obj* x_3; obj* x_4; -x_1 = lean::string_utf8_byte_size_old(x_0); -x_2 = lean::usize_to_nat(x_1); -x_3 = lean::mk_nat_obj(1ul); -x_4 = lean::nat_add(x_2, x_3); -lean::dec(x_2); -return x_4; +obj* x_1; obj* x_2; obj* x_3; +x_1 = lean::string_utf8_byte_size(x_0); +x_2 = lean::mk_nat_obj(1ul); +x_3 = lean::nat_add(x_1, x_2); +lean::dec(x_1); +return x_3; } } obj* l_String_toFuel___boxed(obj* x_0) { @@ -629,69 +617,53 @@ lean::dec(x_0); return x_1; } } -usize _init_l_String_toSubstring___closed__1() { -_start: -{ -obj* x_0; usize x_1; -x_0 = lean::mk_nat_obj(0ul); -x_1 = lean::usize_of_nat(x_0); -return x_1; -} -} obj* l_String_toSubstring(obj* x_0) { _start: { -usize x_1; usize x_2; obj* x_3; obj* x_4; obj* x_5; -x_1 = lean::string_utf8_byte_size_old(x_0); -x_2 = l_String_toSubstring___closed__1; -x_3 = lean::alloc_cnstr(0, 1, sizeof(size_t)*2); +obj* x_1; obj* x_2; obj* x_3; +x_1 = lean::string_utf8_byte_size(x_0); +x_2 = lean::mk_nat_obj(0ul); +x_3 = lean::alloc_cnstr(0, 3, 0); lean::cnstr_set(x_3, 0, x_0); -lean::cnstr_set_scalar(x_3, sizeof(void*)*1, x_2); -x_4 = x_3; -lean::cnstr_set_scalar(x_4, sizeof(void*)*2, x_1); -x_5 = x_4; -return x_5; +lean::cnstr_set(x_3, 1, x_2); +lean::cnstr_set(x_3, 2, x_1); +return x_3; } } -obj* _init_l_String_toSubstring___closed__1___boxed() { -_start: -{ -usize x_0; obj* x_1; -x_0 = l_String_toSubstring___closed__1; -x_1 = lean::box_size_t(x_0); -return x_1; -} -} -uint32 l___private_init_data_string_basic_3__utf8GetAux___main(obj* x_0, usize x_1, usize x_2) { +uint32 l___private_init_data_string_basic_3__utf8GetAux___main(obj* x_0, obj* x_1, obj* x_2) { _start: { if (lean::obj_tag(x_0) == 0) { -uint32 x_3; -x_3 = 65; -return x_3; +uint32 x_4; +lean::dec(x_1); +x_4 = 65; +return x_4; } else { -obj* x_4; obj* x_5; uint8 x_6; -x_4 = lean::cnstr_get(x_0, 0); -x_5 = lean::cnstr_get(x_0, 1); -x_6 = x_1 == x_2; -if (x_6 == 0) +obj* x_5; obj* x_6; uint8 x_7; +x_5 = lean::cnstr_get(x_0, 0); +x_6 = lean::cnstr_get(x_0, 1); +x_7 = lean::nat_dec_eq(x_1, x_2); +if (x_7 == 0) { -uint32 x_7; usize x_8; usize x_9; -x_7 = lean::unbox_uint32(x_4); -x_8 = l___private_init_data_string_basic_1__csize(x_7); -x_9 = x_1 + x_8; -x_0 = x_5; -x_1 = x_9; +uint32 x_8; obj* x_9; obj* x_10; +x_8 = lean::unbox_uint32(x_5); +x_9 = l___private_init_data_string_basic_1__csize(x_8); +x_10 = lean::nat_add(x_1, x_9); +lean::dec(x_9); +lean::dec(x_1); +x_0 = x_6; +x_1 = x_10; goto _start; } else { -uint32 x_11; -x_11 = lean::unbox_uint32(x_4); -return x_11; +uint32 x_15; +lean::dec(x_1); +x_15 = lean::unbox_uint32(x_5); +return x_15; } } } @@ -699,16 +671,15 @@ return x_11; obj* l___private_init_data_string_basic_3__utf8GetAux___main___boxed(obj* x_0, obj* x_1, obj* x_2) { _start: { -usize x_3; usize x_4; uint32 x_5; obj* x_6; -x_3 = lean::unbox_size_t(x_1); -x_4 = lean::unbox_size_t(x_2); -x_5 = l___private_init_data_string_basic_3__utf8GetAux___main(x_0, x_3, x_4); -x_6 = lean::box_uint32(x_5); +uint32 x_3; obj* x_4; +x_3 = l___private_init_data_string_basic_3__utf8GetAux___main(x_0, x_1, x_2); +x_4 = lean::box_uint32(x_3); lean::dec(x_0); -return x_6; +lean::dec(x_2); +return x_4; } } -uint32 l___private_init_data_string_basic_3__utf8GetAux(obj* x_0, usize x_1, usize x_2) { +uint32 l___private_init_data_string_basic_3__utf8GetAux(obj* x_0, obj* x_1, obj* x_2) { _start: { uint32 x_3; @@ -719,27 +690,26 @@ return x_3; obj* l___private_init_data_string_basic_3__utf8GetAux___boxed(obj* x_0, obj* x_1, obj* x_2) { _start: { -usize x_3; usize x_4; uint32 x_5; obj* x_6; -x_3 = lean::unbox_size_t(x_1); -x_4 = lean::unbox_size_t(x_2); -x_5 = l___private_init_data_string_basic_3__utf8GetAux(x_0, x_3, x_4); -x_6 = lean::box_uint32(x_5); +uint32 x_3; obj* x_4; +x_3 = l___private_init_data_string_basic_3__utf8GetAux(x_0, x_1, x_2); +x_4 = lean::box_uint32(x_3); lean::dec(x_0); -return x_6; +lean::dec(x_2); +return x_4; } } obj* l_String_get___boxed(obj* x_0, obj* x_1) { _start: { -usize x_2; uint32 x_3; obj* x_4; -x_2 = lean::unbox_size_t(x_1); -x_3 = lean::string_utf8_get_old(x_0, x_2); -x_4 = lean::box_uint32(x_3); +uint32 x_2; obj* x_3; +x_2 = lean::string_utf8_get(x_0, x_1); +x_3 = lean::box_uint32(x_2); lean::dec(x_0); -return x_4; +lean::dec(x_1); +return x_3; } } -obj* l___private_init_data_string_basic_4__utf8SetAux___main(uint32 x_0, obj* x_1, usize x_2, usize x_3) { +obj* l___private_init_data_string_basic_4__utf8SetAux___main(uint32 x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { if (lean::obj_tag(x_1) == 0) @@ -761,36 +731,38 @@ if (lean::is_exclusive(x_1)) { lean::dec(x_1); x_8 = lean::box(0); } -x_9 = x_2 == x_3; +x_9 = lean::nat_dec_eq(x_2, x_3); if (x_9 == 0) { -uint32 x_10; usize x_11; usize x_12; obj* x_13; obj* x_14; +uint32 x_10; obj* x_11; obj* x_12; obj* x_14; obj* x_16; x_10 = lean::unbox_uint32(x_4); x_11 = l___private_init_data_string_basic_1__csize(x_10); -x_12 = x_2 + x_11; -x_13 = l___private_init_data_string_basic_4__utf8SetAux___main(x_0, x_6, x_12, x_3); +x_12 = lean::nat_add(x_2, x_11); +lean::dec(x_11); +x_14 = l___private_init_data_string_basic_4__utf8SetAux___main(x_0, x_6, x_12, x_3); +lean::dec(x_12); if (lean::is_scalar(x_8)) { - x_14 = lean::alloc_cnstr(1, 2, 0); + x_16 = lean::alloc_cnstr(1, 2, 0); } else { - x_14 = x_8; + x_16 = x_8; } -lean::cnstr_set(x_14, 0, x_4); -lean::cnstr_set(x_14, 1, x_13); -return x_14; +lean::cnstr_set(x_16, 0, x_4); +lean::cnstr_set(x_16, 1, x_14); +return x_16; } else { -obj* x_16; obj* x_17; +obj* x_18; obj* x_19; lean::dec(x_4); -x_16 = lean::box_uint32(x_0); +x_18 = lean::box_uint32(x_0); if (lean::is_scalar(x_8)) { - x_17 = lean::alloc_cnstr(1, 2, 0); + x_19 = lean::alloc_cnstr(1, 2, 0); } else { - x_17 = x_8; + x_19 = x_8; } -lean::cnstr_set(x_17, 0, x_16); -lean::cnstr_set(x_17, 1, x_6); -return x_17; +lean::cnstr_set(x_19, 0, x_18); +lean::cnstr_set(x_19, 1, x_6); +return x_19; } } } @@ -798,15 +770,15 @@ return x_17; obj* l___private_init_data_string_basic_4__utf8SetAux___main___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { -uint32 x_4; usize x_5; usize x_6; obj* x_7; +uint32 x_4; obj* x_5; x_4 = lean::unbox_uint32(x_0); -x_5 = lean::unbox_size_t(x_2); -x_6 = lean::unbox_size_t(x_3); -x_7 = l___private_init_data_string_basic_4__utf8SetAux___main(x_4, x_1, x_5, x_6); -return x_7; +x_5 = l___private_init_data_string_basic_4__utf8SetAux___main(x_4, x_1, x_2, x_3); +lean::dec(x_2); +lean::dec(x_3); +return x_5; } } -obj* l___private_init_data_string_basic_4__utf8SetAux(uint32 x_0, obj* x_1, usize x_2, usize x_3) { +obj* l___private_init_data_string_basic_4__utf8SetAux(uint32 x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { obj* x_4; @@ -817,61 +789,64 @@ return x_4; obj* l___private_init_data_string_basic_4__utf8SetAux___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { -uint32 x_4; usize x_5; usize x_6; obj* x_7; +uint32 x_4; obj* x_5; x_4 = lean::unbox_uint32(x_0); -x_5 = lean::unbox_size_t(x_2); -x_6 = lean::unbox_size_t(x_3); -x_7 = l___private_init_data_string_basic_4__utf8SetAux(x_4, x_1, x_5, x_6); -return x_7; +x_5 = l___private_init_data_string_basic_4__utf8SetAux(x_4, x_1, x_2, x_3); +lean::dec(x_2); +lean::dec(x_3); +return x_5; } } obj* l_String_set___boxed(obj* x_0, obj* x_1, obj* x_2) { _start: { -usize x_3; uint32 x_4; obj* x_5; -x_3 = lean::unbox_size_t(x_1); -x_4 = lean::unbox_uint32(x_2); -x_5 = lean::string_utf8_set_old(x_0, x_3, x_4); -return x_5; +uint32 x_3; obj* x_4; +x_3 = lean::unbox_uint32(x_2); +x_4 = lean::string_utf8_set(x_0, x_1, x_3); +lean::dec(x_1); +return x_4; } } obj* l_String_next___boxed(obj* x_0, obj* x_1) { _start: { -usize x_2; usize x_3; obj* x_4; -x_2 = lean::unbox_size_t(x_1); -x_3 = lean::string_utf8_next_old(x_0, x_2); -x_4 = lean::box_size_t(x_3); +obj* x_2; +x_2 = lean::string_utf8_next(x_0, x_1); lean::dec(x_0); -return x_4; +lean::dec(x_1); +return x_2; } } -usize l___private_init_data_string_basic_5__utf8PrevAux___main(obj* x_0, usize x_1, usize x_2) { +obj* l___private_init_data_string_basic_5__utf8PrevAux___main(obj* x_0, obj* x_1, obj* x_2) { _start: { if (lean::obj_tag(x_0) == 0) { -usize x_3; -x_3 = l_String_toSubstring___closed__1; -return x_3; +obj* x_4; +lean::dec(x_1); +x_4 = lean::mk_nat_obj(0ul); +return x_4; } else { -obj* x_4; obj* x_5; uint32 x_6; usize x_7; usize x_8; uint8 x_9; -x_4 = lean::cnstr_get(x_0, 0); -x_5 = lean::cnstr_get(x_0, 1); -x_6 = lean::unbox_uint32(x_4); -x_7 = l___private_init_data_string_basic_1__csize(x_6); -x_8 = x_1 + x_7; -x_9 = x_8 == x_2; -if (x_9 == 0) +obj* x_5; obj* x_6; uint32 x_7; obj* x_8; obj* x_9; uint8 x_11; +x_5 = lean::cnstr_get(x_0, 0); +x_6 = lean::cnstr_get(x_0, 1); +x_7 = lean::unbox_uint32(x_5); +x_8 = l___private_init_data_string_basic_1__csize(x_7); +x_9 = lean::nat_add(x_1, x_8); +lean::dec(x_8); +x_11 = lean::nat_dec_eq(x_9, x_2); +if (x_11 == 0) { -x_0 = x_5; -x_1 = x_8; +lean::dec(x_1); +x_0 = x_6; +x_1 = x_9; goto _start; } else { +lean::dec(x_9); return x_1; } } @@ -880,19 +855,17 @@ return x_1; obj* l___private_init_data_string_basic_5__utf8PrevAux___main___boxed(obj* x_0, obj* x_1, obj* x_2) { _start: { -usize x_3; usize x_4; usize x_5; obj* x_6; -x_3 = lean::unbox_size_t(x_1); -x_4 = lean::unbox_size_t(x_2); -x_5 = l___private_init_data_string_basic_5__utf8PrevAux___main(x_0, x_3, x_4); -x_6 = lean::box_size_t(x_5); +obj* x_3; +x_3 = l___private_init_data_string_basic_5__utf8PrevAux___main(x_0, x_1, x_2); lean::dec(x_0); -return x_6; +lean::dec(x_2); +return x_3; } } -usize l___private_init_data_string_basic_5__utf8PrevAux(obj* x_0, usize x_1, usize x_2) { +obj* l___private_init_data_string_basic_5__utf8PrevAux(obj* x_0, obj* x_1, obj* x_2) { _start: { -usize x_3; +obj* x_3; x_3 = l___private_init_data_string_basic_5__utf8PrevAux___main(x_0, x_1, x_2); return x_3; } @@ -900,32 +873,29 @@ return x_3; obj* l___private_init_data_string_basic_5__utf8PrevAux___boxed(obj* x_0, obj* x_1, obj* x_2) { _start: { -usize x_3; usize x_4; usize x_5; obj* x_6; -x_3 = lean::unbox_size_t(x_1); -x_4 = lean::unbox_size_t(x_2); -x_5 = l___private_init_data_string_basic_5__utf8PrevAux(x_0, x_3, x_4); -x_6 = lean::box_size_t(x_5); +obj* x_3; +x_3 = l___private_init_data_string_basic_5__utf8PrevAux(x_0, x_1, x_2); lean::dec(x_0); -return x_6; +lean::dec(x_2); +return x_3; } } obj* l_String_prev___boxed(obj* x_0, obj* x_1) { _start: { -usize x_2; usize x_3; obj* x_4; -x_2 = lean::unbox_size_t(x_1); -x_3 = lean::string_utf8_prev_old(x_0, x_2); -x_4 = lean::box_size_t(x_3); +obj* x_2; +x_2 = lean::string_utf8_prev(x_0, x_1); lean::dec(x_0); -return x_4; +lean::dec(x_1); +return x_2; } } uint32 l_String_front(obj* x_0) { _start: { -usize x_1; uint32 x_2; -x_1 = l_String_toSubstring___closed__1; -x_2 = lean::string_utf8_get_old(x_0, x_1); +obj* x_1; uint32 x_2; +x_1 = lean::mk_nat_obj(0ul); +x_2 = lean::string_utf8_get(x_0, x_1); return x_2; } } @@ -942,11 +912,13 @@ return x_2; uint32 l_String_back(obj* x_0) { _start: { -usize x_1; usize x_2; uint32 x_3; -x_1 = lean::string_utf8_byte_size_old(x_0); -x_2 = lean::string_utf8_prev_old(x_0, x_1); -x_3 = lean::string_utf8_get_old(x_0, x_2); -return x_3; +obj* x_1; obj* x_2; uint32 x_4; +x_1 = lean::string_utf8_byte_size(x_0); +x_2 = lean::string_utf8_prev(x_0, x_1); +lean::dec(x_1); +x_4 = lean::string_utf8_get(x_0, x_2); +lean::dec(x_2); +return x_4; } } obj* l_String_back___boxed(obj* x_0) { @@ -962,15 +934,15 @@ return x_2; obj* l_String_atEnd___boxed(obj* x_0, obj* x_1) { _start: { -usize x_2; uint8 x_3; obj* x_4; -x_2 = lean::unbox_size_t(x_1); -x_3 = lean::string_utf8_at_end_old(x_0, x_2); -x_4 = lean::box(x_3); +uint8 x_2; obj* x_3; +x_2 = lean::string_utf8_at_end(x_0, x_1); +x_3 = lean::box(x_2); lean::dec(x_0); -return x_4; +lean::dec(x_1); +return x_3; } } -usize l_String_posOfAux___main(obj* x_0, uint32 x_1, usize x_2, obj* x_3, usize x_4) { +obj* l_String_posOfAux___main(obj* x_0, uint32 x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { obj* x_5; uint8 x_6; @@ -979,19 +951,20 @@ x_6 = lean::nat_dec_eq(x_3, x_5); if (x_6 == 0) { uint8 x_7; -x_7 = x_4 == x_2; +x_7 = lean::nat_dec_eq(x_4, x_2); if (x_7 == 0) { uint32 x_8; uint8 x_9; -x_8 = lean::string_utf8_get_old(x_0, x_4); +x_8 = lean::string_utf8_get(x_0, x_4); x_9 = x_8 == x_1; if (x_9 == 0) { -obj* x_10; obj* x_11; usize x_13; +obj* x_10; obj* x_11; obj* x_13; x_10 = lean::mk_nat_obj(1ul); x_11 = lean::nat_sub(x_3, x_10); lean::dec(x_3); -x_13 = lean::string_utf8_next_old(x_0, x_4); +x_13 = lean::string_utf8_next(x_0, x_4); +lean::dec(x_4); x_3 = x_11; x_4 = x_13; goto _start; @@ -1018,20 +991,18 @@ return x_4; obj* l_String_posOfAux___main___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { -uint32 x_5; usize x_6; usize x_7; usize x_8; obj* x_9; +uint32 x_5; obj* x_6; x_5 = lean::unbox_uint32(x_1); -x_6 = lean::unbox_size_t(x_2); -x_7 = lean::unbox_size_t(x_4); -x_8 = l_String_posOfAux___main(x_0, x_5, x_6, x_3, x_7); -x_9 = lean::box_size_t(x_8); +x_6 = l_String_posOfAux___main(x_0, x_5, x_2, x_3, x_4); lean::dec(x_0); -return x_9; +lean::dec(x_2); +return x_6; } } -usize l_String_posOfAux(obj* x_0, uint32 x_1, usize x_2, obj* x_3, usize x_4) { +obj* l_String_posOfAux(obj* x_0, uint32 x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { -usize x_5; +obj* x_5; x_5 = l_String_posOfAux___main(x_0, x_1, x_2, x_3, x_4); return x_5; } @@ -1039,42 +1010,38 @@ return x_5; obj* l_String_posOfAux___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { -uint32 x_5; usize x_6; usize x_7; usize x_8; obj* x_9; +uint32 x_5; obj* x_6; x_5 = lean::unbox_uint32(x_1); -x_6 = lean::unbox_size_t(x_2); -x_7 = lean::unbox_size_t(x_4); -x_8 = l_String_posOfAux(x_0, x_5, x_6, x_3, x_7); -x_9 = lean::box_size_t(x_8); +x_6 = l_String_posOfAux(x_0, x_5, x_2, x_3, x_4); lean::dec(x_0); -return x_9; +lean::dec(x_2); +return x_6; } } -usize l_String_posOf(obj* x_0, uint32 x_1) { +obj* l_String_posOf(obj* x_0, uint32 x_1) { _start: { -usize x_2; obj* x_3; obj* x_4; obj* x_5; usize x_7; usize x_8; -x_2 = lean::string_utf8_byte_size_old(x_0); -x_3 = lean::usize_to_nat(x_2); -x_4 = lean::mk_nat_obj(1ul); -x_5 = lean::nat_add(x_3, x_4); -lean::dec(x_3); -x_7 = l_String_toSubstring___closed__1; -x_8 = l_String_posOfAux___main(x_0, x_1, x_2, x_5, x_7); -return x_8; +obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; +x_2 = lean::string_utf8_byte_size(x_0); +x_3 = lean::mk_nat_obj(1ul); +x_4 = lean::nat_add(x_2, x_3); +x_5 = lean::mk_nat_obj(0ul); +x_6 = l_String_posOfAux___main(x_0, x_1, x_2, x_4, x_5); +lean::dec(x_2); +return x_6; } } obj* l_String_posOf___boxed(obj* x_0, obj* x_1) { _start: { -uint32 x_2; usize x_3; obj* x_4; +uint32 x_2; obj* x_3; x_2 = lean::unbox_uint32(x_1); x_3 = l_String_posOf(x_0, x_2); -x_4 = lean::box_size_t(x_3); lean::dec(x_0); -return x_4; +return x_3; } } -obj* l___private_init_data_string_basic_6__utf8ExtractAux_u_2082___main(obj* x_0, usize x_1, usize x_2) { +obj* l___private_init_data_string_basic_6__utf8ExtractAux_u_2082___main(obj* x_0, obj* x_1, obj* x_2) { _start: { if (lean::obj_tag(x_0) == 0) @@ -1096,31 +1063,33 @@ if (lean::is_exclusive(x_0)) { lean::dec(x_0); x_7 = lean::box(0); } -x_8 = x_1 == x_2; +x_8 = lean::nat_dec_eq(x_1, x_2); if (x_8 == 0) { -uint32 x_9; usize x_10; usize x_11; obj* x_12; obj* x_13; +uint32 x_9; obj* x_10; obj* x_11; obj* x_13; obj* x_15; x_9 = lean::unbox_uint32(x_3); x_10 = l___private_init_data_string_basic_1__csize(x_9); -x_11 = x_1 + x_10; -x_12 = l___private_init_data_string_basic_6__utf8ExtractAux_u_2082___main(x_5, x_11, x_2); +x_11 = lean::nat_add(x_1, x_10); +lean::dec(x_10); +x_13 = l___private_init_data_string_basic_6__utf8ExtractAux_u_2082___main(x_5, x_11, x_2); +lean::dec(x_11); if (lean::is_scalar(x_7)) { - x_13 = lean::alloc_cnstr(1, 2, 0); + x_15 = lean::alloc_cnstr(1, 2, 0); } else { - x_13 = x_7; + x_15 = x_7; } -lean::cnstr_set(x_13, 0, x_3); -lean::cnstr_set(x_13, 1, x_12); -return x_13; +lean::cnstr_set(x_15, 0, x_3); +lean::cnstr_set(x_15, 1, x_13); +return x_15; } else { -obj* x_17; +obj* x_19; lean::dec(x_7); lean::dec(x_5); lean::dec(x_3); -x_17 = lean::box(0); -return x_17; +x_19 = lean::box(0); +return x_19; } } } @@ -1128,14 +1097,14 @@ return x_17; obj* l___private_init_data_string_basic_6__utf8ExtractAux_u_2082___main___boxed(obj* x_0, obj* x_1, obj* x_2) { _start: { -usize x_3; usize x_4; obj* x_5; -x_3 = lean::unbox_size_t(x_1); -x_4 = lean::unbox_size_t(x_2); -x_5 = l___private_init_data_string_basic_6__utf8ExtractAux_u_2082___main(x_0, x_3, x_4); -return x_5; +obj* x_3; +x_3 = l___private_init_data_string_basic_6__utf8ExtractAux_u_2082___main(x_0, x_1, x_2); +lean::dec(x_1); +lean::dec(x_2); +return x_3; } } -obj* l___private_init_data_string_basic_6__utf8ExtractAux_u_2082(obj* x_0, usize x_1, usize x_2) { +obj* l___private_init_data_string_basic_6__utf8ExtractAux_u_2082(obj* x_0, obj* x_1, obj* x_2) { _start: { obj* x_3; @@ -1146,46 +1115,50 @@ return x_3; obj* l___private_init_data_string_basic_6__utf8ExtractAux_u_2082___boxed(obj* x_0, obj* x_1, obj* x_2) { _start: { -usize x_3; usize x_4; obj* x_5; -x_3 = lean::unbox_size_t(x_1); -x_4 = lean::unbox_size_t(x_2); -x_5 = l___private_init_data_string_basic_6__utf8ExtractAux_u_2082(x_0, x_3, x_4); -return x_5; +obj* x_3; +x_3 = l___private_init_data_string_basic_6__utf8ExtractAux_u_2082(x_0, x_1, x_2); +lean::dec(x_1); +lean::dec(x_2); +return x_3; } } -obj* l___private_init_data_string_basic_7__utf8ExtractAux_u_2081___main(obj* x_0, usize x_1, usize x_2, usize x_3) { +obj* l___private_init_data_string_basic_7__utf8ExtractAux_u_2081___main(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { if (lean::obj_tag(x_0) == 0) { +lean::dec(x_1); return x_0; } else { -obj* x_4; obj* x_6; uint8 x_8; -x_4 = lean::cnstr_get(x_0, 0); -lean::inc(x_4); -x_6 = lean::cnstr_get(x_0, 1); -lean::inc(x_6); -x_8 = x_1 == x_2; -if (x_8 == 0) +obj* x_5; obj* x_7; uint8 x_9; +x_5 = lean::cnstr_get(x_0, 0); +lean::inc(x_5); +x_7 = lean::cnstr_get(x_0, 1); +lean::inc(x_7); +x_9 = lean::nat_dec_eq(x_1, x_2); +if (x_9 == 0) { -uint32 x_10; usize x_11; usize x_12; +uint32 x_11; obj* x_12; obj* x_13; lean::dec(x_0); -x_10 = lean::unbox_uint32(x_4); -x_11 = l___private_init_data_string_basic_1__csize(x_10); -x_12 = x_1 + x_11; -x_0 = x_6; -x_1 = x_12; +x_11 = lean::unbox_uint32(x_5); +x_12 = l___private_init_data_string_basic_1__csize(x_11); +x_13 = lean::nat_add(x_1, x_12); +lean::dec(x_12); +lean::dec(x_1); +x_0 = x_7; +x_1 = x_13; goto _start; } else { -obj* x_16; -lean::dec(x_6); -lean::dec(x_4); -x_16 = l___private_init_data_string_basic_6__utf8ExtractAux_u_2082___main(x_0, x_1, x_3); -return x_16; +obj* x_19; +lean::dec(x_7); +lean::dec(x_5); +x_19 = l___private_init_data_string_basic_6__utf8ExtractAux_u_2082___main(x_0, x_1, x_3); +lean::dec(x_1); +return x_19; } } } @@ -1193,15 +1166,14 @@ return x_16; obj* l___private_init_data_string_basic_7__utf8ExtractAux_u_2081___main___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { -usize x_4; usize x_5; usize x_6; obj* x_7; -x_4 = lean::unbox_size_t(x_1); -x_5 = lean::unbox_size_t(x_2); -x_6 = lean::unbox_size_t(x_3); -x_7 = l___private_init_data_string_basic_7__utf8ExtractAux_u_2081___main(x_0, x_4, x_5, x_6); -return x_7; +obj* x_4; +x_4 = l___private_init_data_string_basic_7__utf8ExtractAux_u_2081___main(x_0, x_1, x_2, x_3); +lean::dec(x_2); +lean::dec(x_3); +return x_4; } } -obj* l___private_init_data_string_basic_7__utf8ExtractAux_u_2081(obj* x_0, usize x_1, usize x_2, usize x_3) { +obj* l___private_init_data_string_basic_7__utf8ExtractAux_u_2081(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { obj* x_4; @@ -1212,23 +1184,22 @@ return x_4; obj* l___private_init_data_string_basic_7__utf8ExtractAux_u_2081___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { -usize x_4; usize x_5; usize x_6; obj* x_7; -x_4 = lean::unbox_size_t(x_1); -x_5 = lean::unbox_size_t(x_2); -x_6 = lean::unbox_size_t(x_3); -x_7 = l___private_init_data_string_basic_7__utf8ExtractAux_u_2081(x_0, x_4, x_5, x_6); -return x_7; +obj* x_4; +x_4 = l___private_init_data_string_basic_7__utf8ExtractAux_u_2081(x_0, x_1, x_2, x_3); +lean::dec(x_2); +lean::dec(x_3); +return x_4; } } obj* l_String_extract___boxed(obj* x_0, obj* x_1, obj* x_2) { _start: { -usize x_3; usize x_4; obj* x_5; -x_3 = lean::unbox_size_t(x_1); -x_4 = lean::unbox_size_t(x_2); -x_5 = lean::string_utf8_extract_old(x_0, x_3, x_4); +obj* x_3; +x_3 = lean::string_utf8_extract(x_0, x_1, x_2); lean::dec(x_0); -return x_5; +lean::dec(x_1); +lean::dec(x_2); +return x_3; } } obj* _init_l_String_splitAux___main___closed__1() { @@ -1239,7 +1210,7 @@ x_0 = lean::mk_string(""); return x_0; } } -obj* l_String_splitAux___main(obj* x_0, obj* x_1, obj* x_2, usize x_3, usize x_4, usize x_5, obj* x_6) { +obj* l_String_splitAux___main(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6) { _start: { obj* x_7; uint8 x_8; @@ -1248,113 +1219,126 @@ x_8 = lean::nat_dec_eq(x_2, x_7); if (x_8 == 0) { uint8 x_9; -x_9 = lean::string_utf8_at_end_old(x_0, x_4); +x_9 = lean::string_utf8_at_end(x_0, x_4); if (x_9 == 0) { obj* x_10; obj* x_11; uint32 x_13; uint32 x_14; uint8 x_15; x_10 = lean::mk_nat_obj(1ul); x_11 = lean::nat_sub(x_2, x_10); lean::dec(x_2); -x_13 = lean::string_utf8_get_old(x_0, x_4); -x_14 = lean::string_utf8_get_old(x_1, x_5); +x_13 = lean::string_utf8_get(x_0, x_4); +x_14 = lean::string_utf8_get(x_1, x_5); x_15 = x_13 == x_14; if (x_15 == 0) { -usize x_16; usize x_17; -x_16 = lean::string_utf8_next_old(x_0, x_4); -x_17 = l_String_toSubstring___closed__1; +obj* x_17; +lean::dec(x_5); +x_17 = lean::string_utf8_next(x_0, x_4); +lean::dec(x_4); x_2 = x_11; -x_4 = x_16; -x_5 = x_17; +x_4 = x_17; +x_5 = x_7; goto _start; } else { -usize x_19; usize x_20; uint8 x_21; -x_19 = lean::string_utf8_next_old(x_0, x_4); -x_20 = lean::string_utf8_next_old(x_1, x_5); -x_21 = lean::string_utf8_at_end_old(x_1, x_20); -if (x_21 == 0) +obj* x_20; obj* x_22; uint8 x_24; +x_20 = lean::string_utf8_next(x_0, x_4); +lean::dec(x_4); +x_22 = lean::string_utf8_next(x_1, x_5); +lean::dec(x_5); +x_24 = lean::string_utf8_at_end(x_1, x_22); +if (x_24 == 0) { x_2 = x_11; -x_4 = x_19; -x_5 = x_20; +x_4 = x_20; +x_5 = x_22; goto _start; } else { -usize x_23; obj* x_24; obj* x_25; usize x_26; -x_23 = x_19 - x_20; -x_24 = lean::string_utf8_extract_old(x_0, x_3, x_23); -x_25 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_25, 0, x_24); -lean::cnstr_set(x_25, 1, x_6); -x_26 = l_String_toSubstring___closed__1; -x_2 = x_11; -x_3 = x_19; -x_4 = x_19; -x_5 = x_26; -x_6 = x_25; -goto _start; -} -} -} -else -{ -uint8 x_29; -lean::dec(x_2); -x_29 = lean::string_utf8_at_end_old(x_1, x_5); -if (x_29 == 0) -{ -obj* x_30; obj* x_31; obj* x_32; -x_30 = lean::string_utf8_extract_old(x_0, x_3, x_4); +obj* x_26; obj* x_28; obj* x_31; +x_26 = lean::nat_sub(x_20, x_22); +lean::dec(x_22); +x_28 = lean::string_utf8_extract(x_0, x_3, x_26); +lean::dec(x_26); +lean::dec(x_3); x_31 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_31, 0, x_30); +lean::cnstr_set(x_31, 0, x_28); lean::cnstr_set(x_31, 1, x_6); -x_32 = l_List_reverse___rarg(x_31); -return x_32; -} -else -{ -usize x_33; obj* x_34; obj* x_35; obj* x_36; obj* x_37; obj* x_38; -x_33 = x_4 - x_5; -x_34 = lean::string_utf8_extract_old(x_0, x_3, x_33); -x_35 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_35, 0, x_34); -lean::cnstr_set(x_35, 1, x_6); -x_36 = l_String_splitAux___main___closed__1; -x_37 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_37, 0, x_36); -lean::cnstr_set(x_37, 1, x_35); -x_38 = l_List_reverse___rarg(x_37); -return x_38; +lean::inc(x_20); +x_2 = x_11; +x_3 = x_20; +x_4 = x_20; +x_5 = x_7; +x_6 = x_31; +goto _start; } } } else { -obj* x_41; -lean::dec(x_6); +uint8 x_35; lean::dec(x_2); -x_41 = lean::box(0); +x_35 = lean::string_utf8_at_end(x_1, x_5); +if (x_35 == 0) +{ +obj* x_37; obj* x_40; obj* x_41; +lean::dec(x_5); +x_37 = lean::string_utf8_extract(x_0, x_3, x_4); +lean::dec(x_4); +lean::dec(x_3); +x_40 = lean::alloc_cnstr(1, 2, 0); +lean::cnstr_set(x_40, 0, x_37); +lean::cnstr_set(x_40, 1, x_6); +x_41 = l_List_reverse___rarg(x_40); return x_41; } +else +{ +obj* x_42; obj* x_45; obj* x_48; obj* x_49; obj* x_50; obj* x_51; +x_42 = lean::nat_sub(x_4, x_5); +lean::dec(x_5); +lean::dec(x_4); +x_45 = lean::string_utf8_extract(x_0, x_3, x_42); +lean::dec(x_42); +lean::dec(x_3); +x_48 = lean::alloc_cnstr(1, 2, 0); +lean::cnstr_set(x_48, 0, x_45); +lean::cnstr_set(x_48, 1, x_6); +x_49 = l_String_splitAux___main___closed__1; +x_50 = lean::alloc_cnstr(1, 2, 0); +lean::cnstr_set(x_50, 0, x_49); +lean::cnstr_set(x_50, 1, x_48); +x_51 = l_List_reverse___rarg(x_50); +return x_51; +} +} +} +else +{ +obj* x_57; +lean::dec(x_5); +lean::dec(x_4); +lean::dec(x_6); +lean::dec(x_3); +lean::dec(x_2); +x_57 = lean::box(0); +return x_57; +} } } obj* l_String_splitAux___main___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6) { _start: { -usize x_7; usize x_8; usize x_9; obj* x_10; -x_7 = lean::unbox_size_t(x_3); -x_8 = lean::unbox_size_t(x_4); -x_9 = lean::unbox_size_t(x_5); -x_10 = l_String_splitAux___main(x_0, x_1, x_2, x_7, x_8, x_9, x_6); +obj* x_7; +x_7 = l_String_splitAux___main(x_0, x_1, x_2, x_3, x_4, x_5, x_6); lean::dec(x_0); lean::dec(x_1); -return x_10; +return x_7; } } -obj* l_String_splitAux(obj* x_0, obj* x_1, obj* x_2, usize x_3, usize x_4, usize x_5, obj* x_6) { +obj* l_String_splitAux(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6) { _start: { obj* x_7; @@ -1365,14 +1349,11 @@ return x_7; obj* l_String_splitAux___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6) { _start: { -usize x_7; usize x_8; usize x_9; obj* x_10; -x_7 = lean::unbox_size_t(x_3); -x_8 = lean::unbox_size_t(x_4); -x_9 = lean::unbox_size_t(x_5); -x_10 = l_String_splitAux(x_0, x_1, x_2, x_7, x_8, x_9, x_6); +obj* x_7; +x_7 = l_String_splitAux(x_0, x_1, x_2, x_3, x_4, x_5, x_6); lean::dec(x_0); lean::dec(x_1); -return x_10; +return x_7; } } obj* l_String_split(obj* x_0, obj* x_1) { @@ -1383,26 +1364,25 @@ x_2 = l_String_splitAux___main___closed__1; x_3 = lean::string_dec_eq(x_1, x_2); if (x_3 == 0) { -usize x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_9; usize x_10; obj* x_11; -x_4 = lean::string_utf8_byte_size_old(x_0); -x_5 = lean::usize_to_nat(x_4); -x_6 = lean::mk_nat_obj(1ul); -x_7 = lean::nat_add(x_5, x_6); -lean::dec(x_5); -x_9 = lean::box(0); -x_10 = l_String_toSubstring___closed__1; -x_11 = l_String_splitAux___main(x_0, x_1, x_7, x_10, x_10, x_10, x_9); +obj* x_4; obj* x_5; obj* x_6; obj* x_8; obj* x_9; obj* x_10; +x_4 = lean::string_utf8_byte_size(x_0); +x_5 = lean::mk_nat_obj(1ul); +x_6 = lean::nat_add(x_4, x_5); +lean::dec(x_4); +x_8 = lean::box(0); +x_9 = lean::mk_nat_obj(0ul); +x_10 = l_String_splitAux___main(x_0, x_1, x_6, x_9, x_9, x_9, x_8); lean::dec(x_0); -return x_11; +return x_10; } else { -obj* x_13; obj* x_14; -x_13 = lean::box(0); -x_14 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_14, 0, x_0); -lean::cnstr_set(x_14, 1, x_13); -return x_14; +obj* x_12; obj* x_13; +x_12 = lean::box(0); +x_13 = lean::alloc_cnstr(1, 2, 0); +lean::cnstr_set(x_13, 0, x_0); +lean::cnstr_set(x_13, 1, x_12); +return x_13; } } } @@ -1512,21 +1492,22 @@ return x_4; uint8 l_String_isEmpty(obj* x_0) { _start: { -usize x_1; usize x_2; uint8 x_3; -x_1 = lean::string_utf8_byte_size_old(x_0); -x_2 = l_String_toSubstring___closed__1; -x_3 = x_1 == x_2; +obj* x_1; obj* x_2; uint8 x_3; +x_1 = lean::string_utf8_byte_size(x_0); +x_2 = lean::mk_nat_obj(0ul); +x_3 = lean::nat_dec_eq(x_1, x_2); +lean::dec(x_1); if (x_3 == 0) { -uint8 x_4; -x_4 = 0; -return x_4; +uint8 x_5; +x_5 = 0; +return x_5; } else { -uint8 x_5; -x_5 = 1; -return x_5; +uint8 x_6; +x_6 = 1; +return x_6; } } } @@ -1653,13 +1634,12 @@ return x_5; obj* l_String_mkIterator(obj* x_0) { _start: { -usize x_1; obj* x_2; obj* x_3; -x_1 = l_String_toSubstring___closed__1; -x_2 = lean::alloc_cnstr(0, 1, sizeof(size_t)*1); +obj* x_1; obj* x_2; +x_1 = lean::mk_nat_obj(0ul); +x_2 = lean::alloc_cnstr(0, 2, 0); lean::cnstr_set(x_2, 0, x_0); -lean::cnstr_set_scalar(x_2, sizeof(void*)*1, x_1); -x_3 = x_2; -return x_3; +lean::cnstr_set(x_2, 1, x_1); +return x_2; } } obj* l_String_Iterator_toString___main(obj* x_0) { @@ -1700,13 +1680,13 @@ return x_1; obj* l_String_Iterator_remainingBytes___main(obj* x_0) { _start: { -obj* x_1; usize x_2; usize x_3; usize x_4; obj* x_5; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; x_1 = lean::cnstr_get(x_0, 0); -x_2 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_3 = lean::string_utf8_byte_size_old(x_1); -x_4 = x_3 - x_2; -x_5 = lean::usize_to_nat(x_4); -return x_5; +x_2 = lean::cnstr_get(x_0, 1); +x_3 = lean::string_utf8_byte_size(x_1); +x_4 = lean::nat_sub(x_3, x_2); +lean::dec(x_3); +return x_4; } } obj* l_String_Iterator_remainingBytes___main___boxed(obj* x_0) { @@ -1735,28 +1715,28 @@ lean::dec(x_0); return x_1; } } -usize l_String_Iterator_pos___main(obj* x_0) { +obj* l_String_Iterator_pos___main(obj* x_0) { _start: { -usize x_1; -x_1 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); +obj* x_1; +x_1 = lean::cnstr_get(x_0, 1); +lean::inc(x_1); return x_1; } } obj* l_String_Iterator_pos___main___boxed(obj* x_0) { _start: { -usize x_1; obj* x_2; +obj* x_1; x_1 = l_String_Iterator_pos___main(x_0); -x_2 = lean::box_size_t(x_1); lean::dec(x_0); -return x_2; +return x_1; } } -usize l_String_Iterator_pos(obj* x_0) { +obj* l_String_Iterator_pos(obj* x_0) { _start: { -usize x_1; +obj* x_1; x_1 = l_String_Iterator_pos___main(x_0); return x_1; } @@ -1764,20 +1744,19 @@ return x_1; obj* l_String_Iterator_pos___boxed(obj* x_0) { _start: { -usize x_1; obj* x_2; +obj* x_1; x_1 = l_String_Iterator_pos(x_0); -x_2 = lean::box_size_t(x_1); lean::dec(x_0); -return x_2; +return x_1; } } uint32 l_String_Iterator_curr___main(obj* x_0) { _start: { -obj* x_1; usize x_2; uint32 x_3; +obj* x_1; obj* x_2; uint32 x_3; x_1 = lean::cnstr_get(x_0, 0); -x_2 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_3 = lean::string_utf8_get_old(x_1, x_2); +x_2 = lean::cnstr_get(x_0, 1); +x_3 = lean::string_utf8_get(x_1, x_2); return x_3; } } @@ -1812,26 +1791,27 @@ return x_2; obj* l_String_Iterator_next___main(obj* x_0) { _start: { -obj* x_1; usize x_3; obj* x_4; usize x_5; obj* x_6; obj* x_7; +obj* x_1; obj* x_3; obj* x_5; obj* x_6; obj* x_8; x_1 = lean::cnstr_get(x_0, 0); -x_3 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); +x_3 = lean::cnstr_get(x_0, 1); if (lean::is_exclusive(x_0)) { - x_4 = x_0; + x_5 = x_0; } else { lean::inc(x_1); + lean::inc(x_3); lean::dec(x_0); - x_4 = lean::box(0); + x_5 = lean::box(0); } -x_5 = lean::string_utf8_next_old(x_1, x_3); -if (lean::is_scalar(x_4)) { - x_6 = lean::alloc_cnstr(0, 1, sizeof(size_t)*1); +x_6 = lean::string_utf8_next(x_1, x_3); +lean::dec(x_3); +if (lean::is_scalar(x_5)) { + x_8 = lean::alloc_cnstr(0, 2, 0); } else { - x_6 = x_4; + x_8 = x_5; } -lean::cnstr_set(x_6, 0, x_1); -lean::cnstr_set_scalar(x_6, sizeof(void*)*1, x_5); -x_7 = x_6; -return x_7; +lean::cnstr_set(x_8, 0, x_1); +lean::cnstr_set(x_8, 1, x_6); +return x_8; } } obj* l_String_Iterator_next(obj* x_0) { @@ -1845,26 +1825,27 @@ return x_1; obj* l_String_Iterator_prev___main(obj* x_0) { _start: { -obj* x_1; usize x_3; obj* x_4; usize x_5; obj* x_6; obj* x_7; +obj* x_1; obj* x_3; obj* x_5; obj* x_6; obj* x_8; x_1 = lean::cnstr_get(x_0, 0); -x_3 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); +x_3 = lean::cnstr_get(x_0, 1); if (lean::is_exclusive(x_0)) { - x_4 = x_0; + x_5 = x_0; } else { lean::inc(x_1); + lean::inc(x_3); lean::dec(x_0); - x_4 = lean::box(0); + x_5 = lean::box(0); } -x_5 = lean::string_utf8_prev_old(x_1, x_3); -if (lean::is_scalar(x_4)) { - x_6 = lean::alloc_cnstr(0, 1, sizeof(size_t)*1); +x_6 = lean::string_utf8_prev(x_1, x_3); +lean::dec(x_3); +if (lean::is_scalar(x_5)) { + x_8 = lean::alloc_cnstr(0, 2, 0); } else { - x_6 = x_4; + x_8 = x_5; } -lean::cnstr_set(x_6, 0, x_1); -lean::cnstr_set_scalar(x_6, sizeof(void*)*1, x_5); -x_7 = x_6; -return x_7; +lean::cnstr_set(x_8, 0, x_1); +lean::cnstr_set(x_8, 1, x_6); +return x_8; } } obj* l_String_Iterator_prev(obj* x_0) { @@ -1878,11 +1859,12 @@ return x_1; uint8 l_String_Iterator_hasNext___main(obj* x_0) { _start: { -obj* x_1; usize x_2; usize x_3; uint8 x_4; +obj* x_1; obj* x_2; obj* x_3; uint8 x_4; x_1 = lean::cnstr_get(x_0, 0); -x_2 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_3 = lean::string_utf8_byte_size_old(x_1); -x_4 = x_2 < x_3; +x_2 = lean::cnstr_get(x_0, 1); +x_3 = lean::string_utf8_byte_size(x_1); +x_4 = lean::nat_dec_lt(x_2, x_3); +lean::dec(x_3); return x_4; } } @@ -1917,10 +1899,10 @@ return x_2; uint8 l_String_Iterator_hasPrev___main(obj* x_0) { _start: { -usize x_1; usize x_2; uint8 x_3; -x_1 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_2 = l_String_toSubstring___closed__1; -x_3 = x_2 < x_1; +obj* x_1; obj* x_2; uint8 x_3; +x_1 = lean::cnstr_get(x_0, 1); +x_2 = lean::mk_nat_obj(0ul); +x_3 = lean::nat_dec_lt(x_2, x_1); return x_3; } } @@ -1955,25 +1937,25 @@ return x_2; obj* l_String_Iterator_setCurr___main(obj* x_0, uint32 x_1) { _start: { -obj* x_2; usize x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; +obj* x_2; obj* x_4; obj* x_6; obj* x_7; obj* x_8; x_2 = lean::cnstr_get(x_0, 0); -x_4 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); +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_2); + lean::inc(x_4); lean::dec(x_0); - x_5 = lean::box(0); + x_6 = lean::box(0); } -x_6 = lean::string_utf8_set_old(x_2, x_4, x_1); -if (lean::is_scalar(x_5)) { - x_7 = lean::alloc_cnstr(0, 1, sizeof(size_t)*1); +x_7 = lean::string_utf8_set(x_2, x_4, x_1); +if (lean::is_scalar(x_6)) { + x_8 = lean::alloc_cnstr(0, 2, 0); } else { - x_7 = x_5; + x_8 = x_6; } -lean::cnstr_set(x_7, 0, x_6); -lean::cnstr_set_scalar(x_7, sizeof(void*)*1, x_4); -x_8 = x_7; +lean::cnstr_set(x_8, 0, x_7); +lean::cnstr_set(x_8, 1, x_4); return x_8; } } @@ -2006,25 +1988,25 @@ return x_3; obj* l_String_Iterator_toEnd___main(obj* x_0) { _start: { -obj* x_1; obj* x_3; usize x_4; obj* x_5; obj* x_6; +obj* x_1; obj* x_3; obj* x_4; obj* x_5; x_1 = lean::cnstr_get(x_0, 0); if (lean::is_exclusive(x_0)) { + lean::cnstr_release(x_0, 1); x_3 = x_0; } else { lean::inc(x_1); lean::dec(x_0); x_3 = lean::box(0); } -x_4 = lean::string_utf8_byte_size_old(x_1); +x_4 = lean::string_utf8_byte_size(x_1); if (lean::is_scalar(x_3)) { - x_5 = lean::alloc_cnstr(0, 1, sizeof(size_t)*1); + x_5 = lean::alloc_cnstr(0, 2, 0); } else { x_5 = x_3; } lean::cnstr_set(x_5, 0, x_1); -lean::cnstr_set_scalar(x_5, sizeof(void*)*1, x_4); -x_6 = x_5; -return x_6; +lean::cnstr_set(x_5, 1, x_4); +return x_5; } } obj* l_String_Iterator_toEnd(obj* x_0) { @@ -2038,12 +2020,12 @@ return x_1; obj* l_String_Iterator_extract___main(obj* x_0, obj* x_1) { _start: { -usize x_2; obj* x_3; obj* x_4; usize x_5; uint8 x_6; -x_2 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_3 = lean::cnstr_get(x_0, 0); +obj* x_2; obj* x_3; obj* x_4; obj* x_5; uint8 x_6; +x_2 = lean::cnstr_get(x_0, 0); +x_3 = lean::cnstr_get(x_0, 1); x_4 = lean::cnstr_get(x_1, 0); -x_5 = lean::cnstr_get_scalar(x_1, sizeof(void*)*1); -x_6 = lean::string_dec_eq(x_3, x_4); +x_5 = lean::cnstr_get(x_1, 1); +x_6 = lean::string_dec_eq(x_2, x_4); if (x_6 == 0) { obj* x_7; @@ -2053,11 +2035,11 @@ return x_7; else { uint8 x_8; -x_8 = x_5 < x_2; +x_8 = lean::nat_dec_lt(x_5, x_3); if (x_8 == 0) { obj* x_9; -x_9 = lean::string_utf8_extract_old(x_3, x_2, x_5); +x_9 = lean::string_utf8_extract(x_2, x_3, x_5); return x_9; } else @@ -2132,11 +2114,12 @@ return x_2; obj* l_String_Iterator_remainingToString___main(obj* x_0) { _start: { -obj* x_1; usize x_2; usize x_3; obj* x_4; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; x_1 = lean::cnstr_get(x_0, 0); -x_2 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_3 = lean::string_utf8_byte_size_old(x_1); -x_4 = lean::string_utf8_extract_old(x_1, x_2, x_3); +x_2 = lean::cnstr_get(x_0, 1); +x_3 = lean::string_utf8_byte_size(x_1); +x_4 = lean::string_utf8_extract(x_1, x_2, x_3); +lean::dec(x_3); return x_4; } } @@ -2169,20 +2152,23 @@ return x_1; uint8 l_String_Iterator_isPrefixOfRemaining___main(obj* x_0, obj* x_1) { _start: { -usize x_2; obj* x_3; obj* x_4; usize x_5; usize x_6; obj* x_7; usize x_8; usize x_9; obj* x_10; uint8 x_11; -x_2 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_3 = lean::cnstr_get(x_0, 0); +obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_10; obj* x_12; uint8 x_14; +x_2 = lean::cnstr_get(x_0, 0); +x_3 = lean::cnstr_get(x_0, 1); x_4 = lean::cnstr_get(x_1, 0); -x_5 = lean::cnstr_get_scalar(x_1, sizeof(void*)*1); -x_6 = lean::string_utf8_byte_size_old(x_3); -x_7 = lean::string_utf8_extract_old(x_3, x_2, x_6); -x_8 = x_6 - x_2; -x_9 = x_5 + x_8; -x_10 = lean::string_utf8_extract_old(x_4, x_5, x_9); -x_11 = lean::string_dec_eq(x_7, x_10); +x_5 = lean::cnstr_get(x_1, 1); +x_6 = lean::string_utf8_byte_size(x_2); +x_7 = lean::string_utf8_extract(x_2, x_3, x_6); +x_8 = lean::nat_sub(x_6, x_3); +lean::dec(x_6); +x_10 = lean::nat_add(x_5, x_8); +lean::dec(x_8); +x_12 = lean::string_utf8_extract(x_4, x_5, x_10); lean::dec(x_10); +x_14 = lean::string_dec_eq(x_7, x_12); +lean::dec(x_12); lean::dec(x_7); -return x_11; +return x_14; } } obj* l_String_Iterator_isPrefixOfRemaining___main___boxed(obj* x_0, obj* x_1) { @@ -2279,7 +2265,7 @@ x_2 = l_String_Iterator_prevn___main(x_0, x_1); return x_2; } } -obj* l___private_init_data_string_basic_8__lineColumnAux___main(obj* x_0, obj* x_1, usize x_2, obj* x_3) { +obj* l___private_init_data_string_basic_8__lineColumnAux___main(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { obj* x_4; uint8 x_5; @@ -2292,7 +2278,7 @@ x_6 = lean::cnstr_get(x_3, 0); lean::inc(x_6); x_8 = lean::cnstr_get(x_3, 1); lean::inc(x_8); -x_10 = lean::string_utf8_at_end_old(x_0, x_2); +x_10 = lean::string_utf8_at_end(x_0, x_2); if (x_10 == 0) { obj* x_11; obj* x_12; obj* x_13; uint32 x_15; uint32 x_16; uint8 x_17; @@ -2307,44 +2293,46 @@ if (lean::is_exclusive(x_3)) { x_12 = lean::mk_nat_obj(1ul); x_13 = lean::nat_sub(x_1, x_12); lean::dec(x_1); -x_15 = lean::string_utf8_get_old(x_0, x_2); +x_15 = lean::string_utf8_get(x_0, x_2); x_16 = 10; x_17 = x_15 == x_16; if (x_17 == 0) { -usize x_18; obj* x_19; obj* x_21; -x_18 = lean::string_utf8_next_old(x_0, x_2); -x_19 = lean::nat_add(x_8, x_12); +obj* x_18; obj* x_20; obj* x_22; +x_18 = lean::string_utf8_next(x_0, x_2); +lean::dec(x_2); +x_20 = lean::nat_add(x_8, x_12); lean::dec(x_8); if (lean::is_scalar(x_11)) { - x_21 = lean::alloc_cnstr(0, 2, 0); + x_22 = lean::alloc_cnstr(0, 2, 0); } else { - x_21 = x_11; + x_22 = x_11; } -lean::cnstr_set(x_21, 0, x_6); -lean::cnstr_set(x_21, 1, x_19); +lean::cnstr_set(x_22, 0, x_6); +lean::cnstr_set(x_22, 1, x_20); x_1 = x_13; x_2 = x_18; -x_3 = x_21; +x_3 = x_22; goto _start; } else { -usize x_24; obj* x_25; obj* x_27; +obj* x_25; obj* x_27; obj* x_29; lean::dec(x_8); -x_24 = lean::string_utf8_next_old(x_0, x_2); -x_25 = lean::nat_add(x_6, x_12); +x_25 = lean::string_utf8_next(x_0, x_2); +lean::dec(x_2); +x_27 = lean::nat_add(x_6, x_12); lean::dec(x_6); if (lean::is_scalar(x_11)) { - x_27 = lean::alloc_cnstr(0, 2, 0); + x_29 = lean::alloc_cnstr(0, 2, 0); } else { - x_27 = x_11; + x_29 = x_11; } -lean::cnstr_set(x_27, 0, x_25); -lean::cnstr_set(x_27, 1, x_4); +lean::cnstr_set(x_29, 0, x_27); +lean::cnstr_set(x_29, 1, x_4); x_1 = x_13; -x_2 = x_24; -x_3 = x_27; +x_2 = x_25; +x_3 = x_29; goto _start; } } @@ -2353,12 +2341,14 @@ else lean::dec(x_8); lean::dec(x_6); lean::dec(x_1); +lean::dec(x_2); return x_3; } } else { lean::dec(x_1); +lean::dec(x_2); return x_3; } } @@ -2366,14 +2356,13 @@ return x_3; obj* l___private_init_data_string_basic_8__lineColumnAux___main___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { -usize x_4; obj* x_5; -x_4 = lean::unbox_size_t(x_2); -x_5 = l___private_init_data_string_basic_8__lineColumnAux___main(x_0, x_1, x_4, x_3); +obj* x_4; +x_4 = l___private_init_data_string_basic_8__lineColumnAux___main(x_0, x_1, x_2, x_3); lean::dec(x_0); -return x_5; +return x_4; } } -obj* l___private_init_data_string_basic_8__lineColumnAux(obj* x_0, obj* x_1, usize x_2, obj* x_3) { +obj* l___private_init_data_string_basic_8__lineColumnAux(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { obj* x_4; @@ -2384,11 +2373,10 @@ return x_4; obj* l___private_init_data_string_basic_8__lineColumnAux___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { -usize x_4; obj* x_5; -x_4 = lean::unbox_size_t(x_2); -x_5 = l___private_init_data_string_basic_8__lineColumnAux(x_0, x_1, x_4, x_3); +obj* x_4; +x_4 = l___private_init_data_string_basic_8__lineColumnAux(x_0, x_1, x_2, x_3); lean::dec(x_0); -return x_5; +return x_4; } } obj* _init_l_String_lineColumn___closed__1() { @@ -2403,32 +2391,31 @@ lean::cnstr_set(x_2, 1, x_1); return x_2; } } -obj* l_String_lineColumn(obj* x_0, usize x_1) { +obj* l_String_lineColumn(obj* x_0, obj* x_1) { _start: { -usize x_2; obj* x_3; obj* x_4; obj* x_5; usize x_7; obj* x_8; obj* x_9; -x_2 = lean::string_utf8_byte_size_old(x_0); -x_3 = lean::usize_to_nat(x_2); -x_4 = lean::mk_nat_obj(1ul); -x_5 = lean::nat_add(x_3, x_4); -lean::dec(x_3); -x_7 = l_String_toSubstring___closed__1; -x_8 = l_String_lineColumn___closed__1; -x_9 = l___private_init_data_string_basic_8__lineColumnAux___main(x_0, x_5, x_7, x_8); -return x_9; +obj* x_2; obj* x_3; obj* x_4; obj* x_6; obj* x_7; obj* x_8; +x_2 = lean::string_utf8_byte_size(x_0); +x_3 = lean::mk_nat_obj(1ul); +x_4 = lean::nat_add(x_2, x_3); +lean::dec(x_2); +x_6 = lean::mk_nat_obj(0ul); +x_7 = l_String_lineColumn___closed__1; +x_8 = l___private_init_data_string_basic_8__lineColumnAux___main(x_0, x_4, x_6, x_7); +return x_8; } } obj* l_String_lineColumn___boxed(obj* x_0, obj* x_1) { _start: { -usize x_2; obj* x_3; -x_2 = lean::unbox_size_t(x_1); -x_3 = l_String_lineColumn(x_0, x_2); +obj* x_2; +x_2 = l_String_lineColumn(x_0, x_1); lean::dec(x_0); -return x_3; +lean::dec(x_1); +return x_2; } } -obj* l_String_offsetOfPosAux___main(obj* x_0, usize x_1, obj* x_2, usize x_3, obj* x_4) { +obj* l_String_offsetOfPosAux___main(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { obj* x_5; uint8 x_6; @@ -2437,39 +2424,43 @@ x_6 = lean::nat_dec_eq(x_2, x_5); if (x_6 == 0) { uint8 x_7; -x_7 = x_3 == x_1; +x_7 = lean::nat_dec_eq(x_3, x_1); if (x_7 == 0) { uint8 x_8; -x_8 = lean::string_utf8_at_end_old(x_0, x_3); +x_8 = lean::string_utf8_at_end(x_0, x_3); if (x_8 == 0) { -obj* x_9; obj* x_10; usize x_12; obj* x_13; +obj* x_9; obj* x_10; obj* x_12; obj* x_14; x_9 = lean::mk_nat_obj(1ul); x_10 = lean::nat_sub(x_2, x_9); lean::dec(x_2); -x_12 = lean::string_utf8_next_old(x_0, x_3); -x_13 = lean::nat_add(x_4, x_9); +x_12 = lean::string_utf8_next(x_0, x_3); +lean::dec(x_3); +x_14 = lean::nat_add(x_4, x_9); lean::dec(x_4); x_2 = x_10; x_3 = x_12; -x_4 = x_13; +x_4 = x_14; goto _start; } else { +lean::dec(x_3); lean::dec(x_2); return x_4; } } else { +lean::dec(x_3); lean::dec(x_2); return x_4; } } else { +lean::dec(x_3); lean::dec(x_2); return x_4; } @@ -2478,15 +2469,14 @@ return x_4; obj* l_String_offsetOfPosAux___main___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { -usize x_5; usize x_6; obj* x_7; -x_5 = lean::unbox_size_t(x_1); -x_6 = lean::unbox_size_t(x_3); -x_7 = l_String_offsetOfPosAux___main(x_0, x_5, x_2, x_6, x_4); +obj* x_5; +x_5 = l_String_offsetOfPosAux___main(x_0, x_1, x_2, x_3, x_4); lean::dec(x_0); -return x_7; +lean::dec(x_1); +return x_5; } } -obj* l_String_offsetOfPosAux(obj* x_0, usize x_1, obj* x_2, usize x_3, obj* x_4) { +obj* l_String_offsetOfPosAux(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { obj* x_5; @@ -2497,40 +2487,37 @@ return x_5; obj* l_String_offsetOfPosAux___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { -usize x_5; usize x_6; obj* x_7; -x_5 = lean::unbox_size_t(x_1); -x_6 = lean::unbox_size_t(x_3); -x_7 = l_String_offsetOfPosAux(x_0, x_5, x_2, x_6, x_4); +obj* x_5; +x_5 = l_String_offsetOfPosAux(x_0, x_1, x_2, x_3, x_4); lean::dec(x_0); -return x_7; +lean::dec(x_1); +return x_5; } } -obj* l_String_offsetOfPos(obj* x_0, usize x_1) { +obj* l_String_offsetOfPos(obj* x_0, obj* x_1) { _start: { -usize x_2; obj* x_3; obj* x_4; obj* x_5; usize x_7; obj* x_8; obj* x_9; -x_2 = lean::string_utf8_byte_size_old(x_0); -x_3 = lean::usize_to_nat(x_2); -x_4 = lean::mk_nat_obj(1ul); -x_5 = lean::nat_add(x_3, x_4); -lean::dec(x_3); -x_7 = l_String_toSubstring___closed__1; -x_8 = lean::mk_nat_obj(0ul); -x_9 = l_String_offsetOfPosAux___main(x_0, x_1, x_5, x_7, x_8); -return x_9; +obj* x_2; obj* x_3; obj* x_4; obj* x_6; obj* x_7; +x_2 = lean::string_utf8_byte_size(x_0); +x_3 = lean::mk_nat_obj(1ul); +x_4 = lean::nat_add(x_2, x_3); +lean::dec(x_2); +x_6 = lean::mk_nat_obj(0ul); +x_7 = l_String_offsetOfPosAux___main(x_0, x_1, x_4, x_6, x_6); +return x_7; } } obj* l_String_offsetOfPos___boxed(obj* x_0, obj* x_1) { _start: { -usize x_2; obj* x_3; -x_2 = lean::unbox_size_t(x_1); -x_3 = l_String_offsetOfPos(x_0, x_2); +obj* x_2; +x_2 = l_String_offsetOfPos(x_0, x_1); lean::dec(x_0); -return x_3; +lean::dec(x_1); +return x_2; } } -obj* l_String_foldlAux___main___rarg(obj* x_0, obj* x_1, usize x_2, obj* x_3, usize x_4, obj* x_5) { +obj* l_String_foldlAux___main___rarg(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { _start: { obj* x_6; uint8 x_7; @@ -2539,25 +2526,27 @@ x_7 = lean::nat_dec_eq(x_3, x_6); if (x_7 == 0) { uint8 x_8; -x_8 = x_4 == x_2; +x_8 = lean::nat_dec_eq(x_4, x_2); if (x_8 == 0) { -obj* x_9; obj* x_10; usize x_12; uint32 x_13; obj* x_14; obj* x_16; +obj* x_9; obj* x_10; obj* x_12; uint32 x_13; obj* x_15; obj* x_17; x_9 = lean::mk_nat_obj(1ul); x_10 = lean::nat_sub(x_3, x_9); lean::dec(x_3); -x_12 = lean::string_utf8_next_old(x_1, x_4); -x_13 = lean::string_utf8_get_old(x_1, x_4); -x_14 = lean::box_uint32(x_13); +x_12 = lean::string_utf8_next(x_1, x_4); +x_13 = lean::string_utf8_get(x_1, x_4); +lean::dec(x_4); +x_15 = lean::box_uint32(x_13); lean::inc(x_0); -x_16 = lean::apply_2(x_0, x_5, x_14); +x_17 = lean::apply_2(x_0, x_5, x_15); x_3 = x_10; x_4 = x_12; -x_5 = x_16; +x_5 = x_17; goto _start; } else { +lean::dec(x_4); lean::dec(x_3); lean::dec(x_0); return x_5; @@ -2565,6 +2554,7 @@ return x_5; } else { +lean::dec(x_4); lean::dec(x_3); lean::dec(x_0); return x_5; @@ -2582,12 +2572,11 @@ return x_1; obj* l_String_foldlAux___main___rarg___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { _start: { -usize x_6; usize x_7; obj* x_8; -x_6 = lean::unbox_size_t(x_2); -x_7 = lean::unbox_size_t(x_4); -x_8 = l_String_foldlAux___main___rarg(x_0, x_1, x_6, x_3, x_7, x_5); +obj* x_6; +x_6 = l_String_foldlAux___main___rarg(x_0, x_1, x_2, x_3, x_4, x_5); lean::dec(x_1); -return x_8; +lean::dec(x_2); +return x_6; } } obj* l_String_foldlAux___main___boxed(obj* x_0) { @@ -2599,7 +2588,7 @@ lean::dec(x_0); return x_1; } } -obj* l_String_foldlAux___rarg(obj* x_0, obj* x_1, usize x_2, obj* x_3, usize x_4, obj* x_5) { +obj* l_String_foldlAux___rarg(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { _start: { obj* x_6; @@ -2618,12 +2607,11 @@ return x_1; obj* l_String_foldlAux___rarg___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { _start: { -usize x_6; usize x_7; obj* x_8; -x_6 = lean::unbox_size_t(x_2); -x_7 = lean::unbox_size_t(x_4); -x_8 = l_String_foldlAux___rarg(x_0, x_1, x_6, x_3, x_7, x_5); +obj* x_6; +x_6 = l_String_foldlAux___rarg(x_0, x_1, x_2, x_3, x_4, x_5); lean::dec(x_1); -return x_8; +lean::dec(x_2); +return x_6; } } obj* l_String_foldlAux___boxed(obj* x_0) { @@ -2638,15 +2626,14 @@ return x_1; obj* l_String_foldl___rarg(obj* x_0, obj* x_1, obj* x_2) { _start: { -usize x_3; obj* x_4; obj* x_5; obj* x_6; usize x_8; obj* x_9; -x_3 = lean::string_utf8_byte_size_old(x_2); -x_4 = lean::usize_to_nat(x_3); -x_5 = lean::mk_nat_obj(1ul); -x_6 = lean::nat_add(x_4, x_5); -lean::dec(x_4); -x_8 = l_String_toSubstring___closed__1; -x_9 = l_String_foldlAux___main___rarg(x_0, x_2, x_3, x_6, x_8, x_1); -return x_9; +obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; +x_3 = lean::string_utf8_byte_size(x_2); +x_4 = lean::mk_nat_obj(1ul); +x_5 = lean::nat_add(x_3, x_4); +x_6 = lean::mk_nat_obj(0ul); +x_7 = l_String_foldlAux___main___rarg(x_0, x_2, x_3, x_5, x_6, x_1); +lean::dec(x_3); +return x_7; } } obj* l_String_foldl(obj* x_0) { @@ -2675,7 +2662,7 @@ lean::dec(x_0); return x_1; } } -obj* l_String_foldrAux___main___rarg(obj* x_0, obj* x_1, obj* x_2, usize x_3, obj* x_4, usize x_5) { +obj* l_String_foldrAux___main___rarg(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { _start: { obj* x_6; uint8 x_7; @@ -2684,20 +2671,21 @@ x_7 = lean::nat_dec_eq(x_4, x_6); if (x_7 == 0) { uint8 x_8; -x_8 = x_5 == x_3; +x_8 = lean::nat_dec_eq(x_5, x_3); if (x_8 == 0) { -obj* x_9; obj* x_10; uint32 x_11; usize x_12; obj* x_14; obj* x_16; obj* x_17; +obj* x_9; obj* x_10; uint32 x_11; obj* x_12; obj* x_14; obj* x_17; obj* x_18; x_9 = lean::mk_nat_obj(1ul); x_10 = lean::nat_sub(x_4, x_9); -x_11 = lean::string_utf8_get_old(x_2, x_5); -x_12 = lean::string_utf8_next_old(x_2, x_5); +x_11 = lean::string_utf8_get(x_2, x_5); +x_12 = lean::string_utf8_next(x_2, x_5); lean::inc(x_0); x_14 = l_String_foldrAux___main___rarg(x_0, x_1, x_2, x_3, x_10, x_12); +lean::dec(x_12); lean::dec(x_10); -x_16 = lean::box_uint32(x_11); -x_17 = lean::apply_2(x_0, x_16, x_14); -return x_17; +x_17 = lean::box_uint32(x_11); +x_18 = lean::apply_2(x_0, x_17, x_14); +return x_18; } else { @@ -2725,14 +2713,14 @@ return x_1; obj* l_String_foldrAux___main___rarg___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { _start: { -usize x_6; usize x_7; obj* x_8; -x_6 = lean::unbox_size_t(x_3); -x_7 = lean::unbox_size_t(x_5); -x_8 = l_String_foldrAux___main___rarg(x_0, x_1, x_2, x_6, x_4, x_7); +obj* x_6; +x_6 = l_String_foldrAux___main___rarg(x_0, x_1, x_2, x_3, x_4, x_5); lean::dec(x_1); lean::dec(x_2); +lean::dec(x_3); lean::dec(x_4); -return x_8; +lean::dec(x_5); +return x_6; } } obj* l_String_foldrAux___main___boxed(obj* x_0) { @@ -2744,7 +2732,7 @@ lean::dec(x_0); return x_1; } } -obj* l_String_foldrAux___rarg(obj* x_0, obj* x_1, obj* x_2, usize x_3, obj* x_4, usize x_5) { +obj* l_String_foldrAux___rarg(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { _start: { obj* x_6; @@ -2763,14 +2751,14 @@ return x_1; obj* l_String_foldrAux___rarg___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { _start: { -usize x_6; usize x_7; obj* x_8; -x_6 = lean::unbox_size_t(x_3); -x_7 = lean::unbox_size_t(x_5); -x_8 = l_String_foldrAux___rarg(x_0, x_1, x_2, x_6, x_4, x_7); +obj* x_6; +x_6 = l_String_foldrAux___rarg(x_0, x_1, x_2, x_3, x_4, x_5); lean::dec(x_1); lean::dec(x_2); +lean::dec(x_3); lean::dec(x_4); -return x_8; +lean::dec(x_5); +return x_6; } } obj* l_String_foldrAux___boxed(obj* x_0) { @@ -2785,16 +2773,15 @@ return x_1; obj* l_String_foldr___rarg(obj* x_0, obj* x_1, obj* x_2) { _start: { -usize x_3; obj* x_4; obj* x_5; obj* x_6; usize x_8; obj* x_9; -x_3 = lean::string_utf8_byte_size_old(x_2); -x_4 = lean::usize_to_nat(x_3); -x_5 = lean::mk_nat_obj(1ul); -x_6 = lean::nat_add(x_4, x_5); -lean::dec(x_4); -x_8 = l_String_toSubstring___closed__1; -x_9 = l_String_foldrAux___main___rarg(x_0, x_1, x_2, x_3, x_6, x_8); -lean::dec(x_6); -return x_9; +obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; +x_3 = lean::string_utf8_byte_size(x_2); +x_4 = lean::mk_nat_obj(1ul); +x_5 = lean::nat_add(x_3, x_4); +x_6 = lean::mk_nat_obj(0ul); +x_7 = l_String_foldrAux___main___rarg(x_0, x_1, x_2, x_3, x_5, x_6); +lean::dec(x_5); +lean::dec(x_3); +return x_7; } } obj* l_String_foldr(obj* x_0) { @@ -2824,7 +2811,7 @@ lean::dec(x_0); return x_1; } } -uint8 l_String_anyAux___main(obj* x_0, usize x_1, obj* x_2, obj* x_3, usize x_4) { +uint8 l_String_anyAux___main(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { obj* x_5; uint8 x_6; @@ -2833,67 +2820,70 @@ x_6 = lean::nat_dec_eq(x_3, x_5); if (x_6 == 0) { uint8 x_7; -x_7 = x_4 == x_1; +x_7 = lean::nat_dec_eq(x_4, x_1); if (x_7 == 0) { uint32 x_8; obj* x_9; obj* x_11; uint8 x_12; -x_8 = lean::string_utf8_get_old(x_0, x_4); +x_8 = lean::string_utf8_get(x_0, x_4); x_9 = lean::box_uint32(x_8); lean::inc(x_2); x_11 = lean::apply_1(x_2, x_9); x_12 = lean::unbox(x_11); if (x_12 == 0) { -obj* x_13; obj* x_14; usize x_16; +obj* x_13; obj* x_14; obj* x_16; x_13 = lean::mk_nat_obj(1ul); x_14 = lean::nat_sub(x_3, x_13); lean::dec(x_3); -x_16 = lean::string_utf8_next_old(x_0, x_4); +x_16 = lean::string_utf8_next(x_0, x_4); +lean::dec(x_4); x_3 = x_14; x_4 = x_16; goto _start; } else { -uint8 x_20; +uint8 x_22; +lean::dec(x_4); lean::dec(x_3); lean::dec(x_2); -x_20 = 1; -return x_20; -} -} -else -{ -uint8 x_23; -lean::dec(x_3); -lean::dec(x_2); -x_23 = 0; -return x_23; +x_22 = 1; +return x_22; } } else { uint8 x_26; +lean::dec(x_4); lean::dec(x_3); lean::dec(x_2); x_26 = 0; return x_26; } } +else +{ +uint8 x_30; +lean::dec(x_4); +lean::dec(x_3); +lean::dec(x_2); +x_30 = 0; +return x_30; +} +} } obj* l_String_anyAux___main___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { -usize x_5; usize x_6; uint8 x_7; obj* x_8; -x_5 = lean::unbox_size_t(x_1); -x_6 = lean::unbox_size_t(x_4); -x_7 = l_String_anyAux___main(x_0, x_5, x_2, x_3, x_6); -x_8 = lean::box(x_7); +uint8 x_5; obj* x_6; +x_5 = l_String_anyAux___main(x_0, x_1, x_2, x_3, x_4); +x_6 = lean::box(x_5); lean::dec(x_0); -return x_8; +lean::dec(x_1); +return x_6; } } -uint8 l_String_anyAux(obj* x_0, usize x_1, obj* x_2, obj* x_3, usize x_4) { +uint8 l_String_anyAux(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { uint8 x_5; @@ -2904,27 +2894,25 @@ return x_5; obj* l_String_anyAux___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { -usize x_5; usize x_6; uint8 x_7; obj* x_8; -x_5 = lean::unbox_size_t(x_1); -x_6 = lean::unbox_size_t(x_4); -x_7 = l_String_anyAux(x_0, x_5, x_2, x_3, x_6); -x_8 = lean::box(x_7); +uint8 x_5; obj* x_6; +x_5 = l_String_anyAux(x_0, x_1, x_2, x_3, x_4); +x_6 = lean::box(x_5); lean::dec(x_0); -return x_8; +lean::dec(x_1); +return x_6; } } uint8 l_String_any(obj* x_0, obj* x_1) { _start: { -usize x_2; obj* x_3; obj* x_4; obj* x_5; usize x_7; uint8 x_8; -x_2 = lean::string_utf8_byte_size_old(x_0); -x_3 = lean::usize_to_nat(x_2); -x_4 = lean::mk_nat_obj(1ul); -x_5 = lean::nat_add(x_3, x_4); -lean::dec(x_3); -x_7 = l_String_toSubstring___closed__1; -x_8 = l_String_anyAux___main(x_0, x_2, x_1, x_5, x_7); -return x_8; +obj* x_2; obj* x_3; obj* x_4; obj* x_5; uint8 x_6; +x_2 = lean::string_utf8_byte_size(x_0); +x_3 = lean::mk_nat_obj(1ul); +x_4 = lean::nat_add(x_2, x_3); +x_5 = lean::mk_nat_obj(0ul); +x_6 = l_String_anyAux___main(x_0, x_2, x_1, x_4, x_5); +lean::dec(x_2); +return x_6; } } obj* l_String_any___boxed(obj* x_0, obj* x_1) { @@ -2937,7 +2925,7 @@ lean::dec(x_0); return x_3; } } -uint8 l_String_anyAux___main___at_String_all___spec__1(obj* x_0, obj* x_1, usize x_2, obj* x_3, usize x_4) { +uint8 l_String_anyAux___main___at_String_all___spec__1(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { obj* x_5; uint8 x_6; @@ -2946,427 +2934,70 @@ x_6 = lean::nat_dec_eq(x_3, x_5); if (x_6 == 0) { uint8 x_7; -x_7 = x_4 == x_2; +x_7 = lean::nat_dec_eq(x_4, x_2); if (x_7 == 0) { uint32 x_8; obj* x_9; obj* x_11; uint8 x_12; -x_8 = lean::string_utf8_get_old(x_1, x_4); +x_8 = lean::string_utf8_get(x_1, x_4); x_9 = lean::box_uint32(x_8); lean::inc(x_0); x_11 = lean::apply_1(x_0, x_9); x_12 = lean::unbox(x_11); if (x_12 == 0) { -uint8 x_15; +uint8 x_16; +lean::dec(x_4); lean::dec(x_3); lean::dec(x_0); -x_15 = 1; -return x_15; +x_16 = 1; +return x_16; } else { -obj* x_16; obj* x_17; usize x_19; -x_16 = lean::mk_nat_obj(1ul); -x_17 = lean::nat_sub(x_3, x_16); +obj* x_17; obj* x_18; obj* x_20; +x_17 = lean::mk_nat_obj(1ul); +x_18 = lean::nat_sub(x_3, x_17); lean::dec(x_3); -x_19 = lean::string_utf8_next_old(x_1, x_4); -x_3 = x_17; -x_4 = x_19; +x_20 = lean::string_utf8_next(x_1, x_4); +lean::dec(x_4); +x_3 = x_18; +x_4 = x_20; goto _start; } } else { -uint8 x_23; -lean::dec(x_3); -lean::dec(x_0); -x_23 = 0; -return x_23; -} -} -else -{ uint8 x_26; +lean::dec(x_4); lean::dec(x_3); lean::dec(x_0); x_26 = 0; return x_26; } } +else +{ +uint8 x_30; +lean::dec(x_4); +lean::dec(x_3); +lean::dec(x_0); +x_30 = 0; +return x_30; +} +} } uint8 l_String_all(obj* x_0, obj* x_1) { _start: { -usize x_2; obj* x_3; obj* x_4; obj* x_5; usize x_7; uint8 x_8; -x_2 = lean::string_utf8_byte_size_old(x_0); -x_3 = lean::usize_to_nat(x_2); -x_4 = lean::mk_nat_obj(1ul); -x_5 = lean::nat_add(x_3, x_4); -lean::dec(x_3); -x_7 = l_String_toSubstring___closed__1; -x_8 = l_String_anyAux___main___at_String_all___spec__1(x_1, x_0, x_2, x_5, x_7); -if (x_8 == 0) -{ -uint8 x_9; -x_9 = 1; -return x_9; -} -else -{ -uint8 x_10; -x_10 = 0; -return x_10; -} -} -} -obj* l_String_anyAux___main___at_String_all___spec__1___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { -_start: -{ -usize x_5; usize x_6; uint8 x_7; obj* x_8; -x_5 = lean::unbox_size_t(x_2); -x_6 = lean::unbox_size_t(x_4); -x_7 = l_String_anyAux___main___at_String_all___spec__1(x_0, x_1, x_5, x_3, x_6); -x_8 = lean::box(x_7); -lean::dec(x_1); -return x_8; -} -} -obj* l_String_all___boxed(obj* x_0, obj* x_1) { -_start: -{ -uint8 x_2; obj* x_3; -x_2 = l_String_all(x_0, x_1); -x_3 = lean::box(x_2); -lean::dec(x_0); -return x_3; -} -} -uint8 l_String_anyAux___main___at_String_contains___spec__1(uint32 x_0, obj* x_1, usize x_2, obj* x_3, usize x_4) { -_start: -{ -obj* x_5; uint8 x_6; -x_5 = lean::mk_nat_obj(0ul); -x_6 = lean::nat_dec_eq(x_3, x_5); -if (x_6 == 0) -{ -uint8 x_7; -x_7 = x_4 == x_2; -if (x_7 == 0) -{ -uint32 x_8; uint8 x_9; -x_8 = lean::string_utf8_get_old(x_1, x_4); -x_9 = x_8 == x_0; -if (x_9 == 0) -{ -obj* x_10; obj* x_11; usize x_13; -x_10 = lean::mk_nat_obj(1ul); -x_11 = lean::nat_sub(x_3, x_10); -lean::dec(x_3); -x_13 = lean::string_utf8_next_old(x_1, x_4); -x_3 = x_11; -x_4 = x_13; -goto _start; -} -else -{ -uint8 x_16; -lean::dec(x_3); -x_16 = 1; -return x_16; -} -} -else -{ -uint8 x_18; -lean::dec(x_3); -x_18 = 0; -return x_18; -} -} -else -{ -uint8 x_20; -lean::dec(x_3); -x_20 = 0; -return x_20; -} -} -} -uint8 l_String_contains(obj* x_0, uint32 x_1) { -_start: -{ -usize x_2; obj* x_3; obj* x_4; obj* x_5; usize x_7; uint8 x_8; -x_2 = lean::string_utf8_byte_size_old(x_0); -x_3 = lean::usize_to_nat(x_2); -x_4 = lean::mk_nat_obj(1ul); -x_5 = lean::nat_add(x_3, x_4); -lean::dec(x_3); -x_7 = l_String_toSubstring___closed__1; -x_8 = l_String_anyAux___main___at_String_contains___spec__1(x_1, x_0, x_2, x_5, x_7); -return x_8; -} -} -obj* l_String_anyAux___main___at_String_contains___spec__1___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { -_start: -{ -uint32 x_5; usize x_6; usize x_7; uint8 x_8; obj* x_9; -x_5 = lean::unbox_uint32(x_0); -x_6 = lean::unbox_size_t(x_2); -x_7 = lean::unbox_size_t(x_4); -x_8 = l_String_anyAux___main___at_String_contains___spec__1(x_5, x_1, x_6, x_3, x_7); -x_9 = lean::box(x_8); -lean::dec(x_1); -return x_9; -} -} -obj* l_String_contains___boxed(obj* x_0, obj* x_1) { -_start: -{ -uint32 x_2; uint8 x_3; obj* x_4; -x_2 = lean::unbox_uint32(x_1); -x_3 = l_String_contains(x_0, x_2); -x_4 = lean::box(x_3); -lean::dec(x_0); -return x_4; -} -} -obj* l_String_mapAux___main(obj* x_0, obj* x_1, usize x_2, obj* x_3) { -_start: -{ -obj* x_4; uint8 x_5; -x_4 = lean::mk_nat_obj(0ul); -x_5 = lean::nat_dec_eq(x_1, x_4); -if (x_5 == 0) -{ -uint8 x_6; -x_6 = lean::string_utf8_at_end_old(x_3, x_2); -if (x_6 == 0) -{ -obj* x_7; obj* x_8; uint32 x_10; obj* x_11; obj* x_13; uint32 x_14; obj* x_15; usize x_16; -x_7 = lean::mk_nat_obj(1ul); -x_8 = lean::nat_sub(x_1, x_7); -lean::dec(x_1); -x_10 = lean::string_utf8_get_old(x_3, x_2); -x_11 = lean::box_uint32(x_10); -lean::inc(x_0); -x_13 = lean::apply_1(x_0, x_11); -x_14 = lean::unbox_uint32(x_13); -x_15 = lean::string_utf8_set_old(x_3, x_2, x_14); -x_16 = lean::string_utf8_next_old(x_15, x_2); -x_1 = x_8; -x_2 = x_16; -x_3 = x_15; -goto _start; -} -else -{ -lean::dec(x_1); -lean::dec(x_0); -return x_3; -} -} -else -{ -lean::dec(x_1); -lean::dec(x_0); -return x_3; -} -} -} -obj* l_String_mapAux___main___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { -_start: -{ -usize x_4; obj* x_5; -x_4 = lean::unbox_size_t(x_2); -x_5 = l_String_mapAux___main(x_0, x_1, x_4, x_3); -return x_5; -} -} -obj* l_String_mapAux(obj* x_0, obj* x_1, usize x_2, obj* x_3) { -_start: -{ -obj* x_4; -x_4 = l_String_mapAux___main(x_0, x_1, x_2, x_3); -return x_4; -} -} -obj* l_String_mapAux___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { -_start: -{ -usize x_4; obj* x_5; -x_4 = lean::unbox_size_t(x_2); -x_5 = l_String_mapAux(x_0, x_1, x_4, x_3); -return x_5; -} -} -obj* l_String_map(obj* x_0, obj* x_1) { -_start: -{ -usize x_2; obj* x_3; obj* x_4; obj* x_5; usize x_7; obj* x_8; -x_2 = lean::string_utf8_byte_size_old(x_1); -x_3 = lean::usize_to_nat(x_2); -x_4 = lean::mk_nat_obj(1ul); -x_5 = lean::nat_add(x_3, x_4); -lean::dec(x_3); -x_7 = l_String_toSubstring___closed__1; -x_8 = l_String_mapAux___main(x_0, x_5, x_7, x_1); -return x_8; -} -} -obj* _init_l_String_foldlAux___main___at_String_toNat___spec__1___closed__1() { -_start: -{ -uint32 x_0; obj* x_1; -x_0 = 48; -x_1 = lean::uint32_to_nat(x_0); -return x_1; -} -} -obj* l_String_foldlAux___main___at_String_toNat___spec__1(obj* x_0, usize x_1, obj* x_2, usize x_3, obj* x_4) { -_start: -{ -obj* x_5; uint8 x_6; -x_5 = lean::mk_nat_obj(0ul); -x_6 = lean::nat_dec_eq(x_2, x_5); -if (x_6 == 0) -{ -uint8 x_7; -x_7 = x_3 == x_1; -if (x_7 == 0) -{ -obj* x_8; obj* x_9; usize x_11; uint32 x_12; obj* x_13; obj* x_14; obj* x_16; obj* x_17; obj* x_18; obj* x_20; -x_8 = lean::mk_nat_obj(1ul); -x_9 = lean::nat_sub(x_2, x_8); -lean::dec(x_2); -x_11 = lean::string_utf8_next_old(x_0, x_3); -x_12 = lean::string_utf8_get_old(x_0, x_3); -x_13 = lean::mk_nat_obj(10ul); -x_14 = lean::nat_mul(x_4, x_13); -lean::dec(x_4); -x_16 = lean::uint32_to_nat(x_12); -x_17 = l_String_foldlAux___main___at_String_toNat___spec__1___closed__1; -x_18 = lean::nat_sub(x_16, x_17); -lean::dec(x_16); -x_20 = lean::nat_add(x_14, x_18); -lean::dec(x_18); -lean::dec(x_14); -x_2 = x_9; -x_3 = x_11; -x_4 = x_20; -goto _start; -} -else -{ -lean::dec(x_2); -return x_4; -} -} -else -{ -lean::dec(x_2); -return x_4; -} -} -} -obj* l_String_toNat(obj* x_0) { -_start: -{ -usize x_1; obj* x_2; obj* x_3; obj* x_4; usize x_6; obj* x_7; obj* x_8; -x_1 = lean::string_utf8_byte_size_old(x_0); -x_2 = lean::usize_to_nat(x_1); +obj* x_2; obj* x_3; obj* x_4; obj* x_5; uint8 x_6; +x_2 = lean::string_utf8_byte_size(x_0); x_3 = lean::mk_nat_obj(1ul); x_4 = lean::nat_add(x_2, x_3); +x_5 = lean::mk_nat_obj(0ul); +x_6 = l_String_anyAux___main___at_String_all___spec__1(x_1, x_0, x_2, x_4, x_5); lean::dec(x_2); -x_6 = l_String_toSubstring___closed__1; -x_7 = lean::mk_nat_obj(0ul); -x_8 = l_String_foldlAux___main___at_String_toNat___spec__1(x_0, x_1, x_4, x_6, x_7); -return x_8; -} -} -obj* l_String_foldlAux___main___at_String_toNat___spec__1___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { -_start: -{ -usize x_5; usize x_6; obj* x_7; -x_5 = lean::unbox_size_t(x_1); -x_6 = lean::unbox_size_t(x_3); -x_7 = l_String_foldlAux___main___at_String_toNat___spec__1(x_0, x_5, x_2, x_6, x_4); -lean::dec(x_0); -return x_7; -} -} -obj* l_String_toNat___boxed(obj* x_0) { -_start: -{ -obj* x_1; -x_1 = l_String_toNat(x_0); -lean::dec(x_0); -return x_1; -} -} -uint8 l_String_anyAux___main___at_String_isNat___spec__1(obj* x_0, usize x_1, obj* x_2, usize x_3) { -_start: -{ -obj* x_4; uint8 x_5; -x_4 = lean::mk_nat_obj(0ul); -x_5 = lean::nat_dec_eq(x_2, x_4); -if (x_5 == 0) -{ -uint8 x_6; -x_6 = x_3 == x_1; if (x_6 == 0) { -uint32 x_7; uint8 x_8; -x_7 = lean::string_utf8_get_old(x_0, x_3); -x_8 = l_Char_isDigit(x_7); -if (x_8 == 0) -{ -uint8 x_10; -lean::dec(x_2); -x_10 = 1; -return x_10; -} -else -{ -obj* x_11; obj* x_12; usize x_14; -x_11 = lean::mk_nat_obj(1ul); -x_12 = lean::nat_sub(x_2, x_11); -lean::dec(x_2); -x_14 = lean::string_utf8_next_old(x_0, x_3); -x_2 = x_12; -x_3 = x_14; -goto _start; -} -} -else -{ -uint8 x_17; -lean::dec(x_2); -x_17 = 0; -return x_17; -} -} -else -{ -uint8 x_19; -lean::dec(x_2); -x_19 = 0; -return x_19; -} -} -} -uint8 l_String_isNat(obj* x_0) { -_start: -{ -usize x_1; obj* x_2; obj* x_3; obj* x_4; usize x_6; uint8 x_7; -x_1 = lean::string_utf8_byte_size_old(x_0); -x_2 = lean::usize_to_nat(x_1); -x_3 = lean::mk_nat_obj(1ul); -x_4 = lean::nat_add(x_2, x_3); -lean::dec(x_2); -x_6 = l_String_toSubstring___closed__1; -x_7 = l_String_anyAux___main___at_String_isNat___spec__1(x_0, x_1, x_4, x_6); -if (x_7 == 0) -{ uint8 x_8; x_8 = 1; return x_8; @@ -3379,16 +3010,363 @@ return x_9; } } } +obj* l_String_anyAux___main___at_String_all___spec__1___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { +_start: +{ +uint8 x_5; obj* x_6; +x_5 = l_String_anyAux___main___at_String_all___spec__1(x_0, x_1, x_2, x_3, x_4); +x_6 = lean::box(x_5); +lean::dec(x_1); +lean::dec(x_2); +return x_6; +} +} +obj* l_String_all___boxed(obj* x_0, obj* x_1) { +_start: +{ +uint8 x_2; obj* x_3; +x_2 = l_String_all(x_0, x_1); +x_3 = lean::box(x_2); +lean::dec(x_0); +return x_3; +} +} +uint8 l_String_anyAux___main___at_String_contains___spec__1(uint32 x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { +_start: +{ +obj* x_5; uint8 x_6; +x_5 = lean::mk_nat_obj(0ul); +x_6 = lean::nat_dec_eq(x_3, x_5); +if (x_6 == 0) +{ +uint8 x_7; +x_7 = lean::nat_dec_eq(x_4, x_2); +if (x_7 == 0) +{ +uint32 x_8; uint8 x_9; +x_8 = lean::string_utf8_get(x_1, x_4); +x_9 = x_8 == x_0; +if (x_9 == 0) +{ +obj* x_10; obj* x_11; obj* x_13; +x_10 = lean::mk_nat_obj(1ul); +x_11 = lean::nat_sub(x_3, x_10); +lean::dec(x_3); +x_13 = lean::string_utf8_next(x_1, x_4); +lean::dec(x_4); +x_3 = x_11; +x_4 = x_13; +goto _start; +} +else +{ +uint8 x_18; +lean::dec(x_4); +lean::dec(x_3); +x_18 = 1; +return x_18; +} +} +else +{ +uint8 x_21; +lean::dec(x_4); +lean::dec(x_3); +x_21 = 0; +return x_21; +} +} +else +{ +uint8 x_24; +lean::dec(x_4); +lean::dec(x_3); +x_24 = 0; +return x_24; +} +} +} +uint8 l_String_contains(obj* x_0, uint32 x_1) { +_start: +{ +obj* x_2; obj* x_3; obj* x_4; obj* x_5; uint8 x_6; +x_2 = lean::string_utf8_byte_size(x_0); +x_3 = lean::mk_nat_obj(1ul); +x_4 = lean::nat_add(x_2, x_3); +x_5 = lean::mk_nat_obj(0ul); +x_6 = l_String_anyAux___main___at_String_contains___spec__1(x_1, x_0, x_2, x_4, x_5); +lean::dec(x_2); +return x_6; +} +} +obj* l_String_anyAux___main___at_String_contains___spec__1___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { +_start: +{ +uint32 x_5; uint8 x_6; obj* x_7; +x_5 = lean::unbox_uint32(x_0); +x_6 = l_String_anyAux___main___at_String_contains___spec__1(x_5, x_1, x_2, x_3, x_4); +x_7 = lean::box(x_6); +lean::dec(x_1); +lean::dec(x_2); +return x_7; +} +} +obj* l_String_contains___boxed(obj* x_0, obj* x_1) { +_start: +{ +uint32 x_2; uint8 x_3; obj* x_4; +x_2 = lean::unbox_uint32(x_1); +x_3 = l_String_contains(x_0, x_2); +x_4 = lean::box(x_3); +lean::dec(x_0); +return x_4; +} +} +obj* l_String_mapAux___main(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { +_start: +{ +obj* x_4; uint8 x_5; +x_4 = lean::mk_nat_obj(0ul); +x_5 = lean::nat_dec_eq(x_1, x_4); +if (x_5 == 0) +{ +uint8 x_6; +x_6 = lean::string_utf8_at_end(x_3, x_2); +if (x_6 == 0) +{ +obj* x_7; obj* x_8; uint32 x_10; obj* x_11; obj* x_13; uint32 x_14; obj* x_15; obj* x_16; +x_7 = lean::mk_nat_obj(1ul); +x_8 = lean::nat_sub(x_1, x_7); +lean::dec(x_1); +x_10 = lean::string_utf8_get(x_3, x_2); +x_11 = lean::box_uint32(x_10); +lean::inc(x_0); +x_13 = lean::apply_1(x_0, x_11); +x_14 = lean::unbox_uint32(x_13); +x_15 = lean::string_utf8_set(x_3, x_2, x_14); +x_16 = lean::string_utf8_next(x_15, x_2); +lean::dec(x_2); +x_1 = x_8; +x_2 = x_16; +x_3 = x_15; +goto _start; +} +else +{ +lean::dec(x_1); +lean::dec(x_0); +lean::dec(x_2); +return x_3; +} +} +else +{ +lean::dec(x_1); +lean::dec(x_0); +lean::dec(x_2); +return x_3; +} +} +} +obj* l_String_mapAux(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { +_start: +{ +obj* x_4; +x_4 = l_String_mapAux___main(x_0, x_1, x_2, x_3); +return x_4; +} +} +obj* l_String_map(obj* x_0, obj* x_1) { +_start: +{ +obj* x_2; obj* x_3; obj* x_4; obj* x_6; obj* x_7; +x_2 = lean::string_utf8_byte_size(x_1); +x_3 = lean::mk_nat_obj(1ul); +x_4 = lean::nat_add(x_2, x_3); +lean::dec(x_2); +x_6 = lean::mk_nat_obj(0ul); +x_7 = l_String_mapAux___main(x_0, x_4, x_6, x_1); +return x_7; +} +} +obj* _init_l_String_foldlAux___main___at_String_toNat___spec__1___closed__1() { +_start: +{ +uint32 x_0; obj* x_1; +x_0 = 48; +x_1 = lean::uint32_to_nat(x_0); +return x_1; +} +} +obj* l_String_foldlAux___main___at_String_toNat___spec__1(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { +_start: +{ +obj* x_5; uint8 x_6; +x_5 = lean::mk_nat_obj(0ul); +x_6 = lean::nat_dec_eq(x_2, x_5); +if (x_6 == 0) +{ +uint8 x_7; +x_7 = lean::nat_dec_eq(x_3, x_1); +if (x_7 == 0) +{ +obj* x_8; obj* x_9; obj* x_11; uint32 x_12; obj* x_14; obj* x_15; obj* x_17; obj* x_18; obj* x_19; obj* x_21; +x_8 = lean::mk_nat_obj(1ul); +x_9 = lean::nat_sub(x_2, x_8); +lean::dec(x_2); +x_11 = lean::string_utf8_next(x_0, x_3); +x_12 = lean::string_utf8_get(x_0, x_3); +lean::dec(x_3); +x_14 = lean::mk_nat_obj(10ul); +x_15 = lean::nat_mul(x_4, x_14); +lean::dec(x_4); +x_17 = lean::uint32_to_nat(x_12); +x_18 = l_String_foldlAux___main___at_String_toNat___spec__1___closed__1; +x_19 = lean::nat_sub(x_17, x_18); +lean::dec(x_17); +x_21 = lean::nat_add(x_15, x_19); +lean::dec(x_19); +lean::dec(x_15); +x_2 = x_9; +x_3 = x_11; +x_4 = x_21; +goto _start; +} +else +{ +lean::dec(x_3); +lean::dec(x_2); +return x_4; +} +} +else +{ +lean::dec(x_3); +lean::dec(x_2); +return x_4; +} +} +} +obj* l_String_toNat(obj* x_0) { +_start: +{ +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; +x_1 = lean::string_utf8_byte_size(x_0); +x_2 = lean::mk_nat_obj(1ul); +x_3 = lean::nat_add(x_1, x_2); +x_4 = lean::mk_nat_obj(0ul); +x_5 = l_String_foldlAux___main___at_String_toNat___spec__1(x_0, x_1, x_3, x_4, x_4); +lean::dec(x_1); +return x_5; +} +} +obj* l_String_foldlAux___main___at_String_toNat___spec__1___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { +_start: +{ +obj* x_5; +x_5 = l_String_foldlAux___main___at_String_toNat___spec__1(x_0, x_1, x_2, x_3, x_4); +lean::dec(x_0); +lean::dec(x_1); +return x_5; +} +} +obj* l_String_toNat___boxed(obj* x_0) { +_start: +{ +obj* x_1; +x_1 = l_String_toNat(x_0); +lean::dec(x_0); +return x_1; +} +} +uint8 l_String_anyAux___main___at_String_isNat___spec__1(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { +_start: +{ +obj* x_4; uint8 x_5; +x_4 = lean::mk_nat_obj(0ul); +x_5 = lean::nat_dec_eq(x_2, x_4); +if (x_5 == 0) +{ +uint8 x_6; +x_6 = lean::nat_dec_eq(x_3, x_1); +if (x_6 == 0) +{ +uint32 x_7; uint8 x_8; +x_7 = lean::string_utf8_get(x_0, x_3); +x_8 = l_Char_isDigit(x_7); +if (x_8 == 0) +{ +uint8 x_11; +lean::dec(x_3); +lean::dec(x_2); +x_11 = 1; +return x_11; +} +else +{ +obj* x_12; obj* x_13; obj* x_15; +x_12 = lean::mk_nat_obj(1ul); +x_13 = lean::nat_sub(x_2, x_12); +lean::dec(x_2); +x_15 = lean::string_utf8_next(x_0, x_3); +lean::dec(x_3); +x_2 = x_13; +x_3 = x_15; +goto _start; +} +} +else +{ +uint8 x_20; +lean::dec(x_3); +lean::dec(x_2); +x_20 = 0; +return x_20; +} +} +else +{ +uint8 x_23; +lean::dec(x_3); +lean::dec(x_2); +x_23 = 0; +return x_23; +} +} +} +uint8 l_String_isNat(obj* x_0) { +_start: +{ +obj* x_1; obj* x_2; obj* x_3; obj* x_4; uint8 x_5; +x_1 = lean::string_utf8_byte_size(x_0); +x_2 = lean::mk_nat_obj(1ul); +x_3 = lean::nat_add(x_1, x_2); +x_4 = lean::mk_nat_obj(0ul); +x_5 = l_String_anyAux___main___at_String_isNat___spec__1(x_0, x_1, x_3, x_4); +lean::dec(x_1); +if (x_5 == 0) +{ +uint8 x_7; +x_7 = 1; +return x_7; +} +else +{ +uint8 x_8; +x_8 = 0; +return x_8; +} +} +} obj* l_String_anyAux___main___at_String_isNat___spec__1___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { -usize x_4; usize x_5; uint8 x_6; obj* x_7; -x_4 = lean::unbox_size_t(x_1); -x_5 = lean::unbox_size_t(x_3); -x_6 = l_String_anyAux___main___at_String_isNat___spec__1(x_0, x_4, x_2, x_5); -x_7 = lean::box(x_6); +uint8 x_4; obj* x_5; +x_4 = l_String_anyAux___main___at_String_isNat___spec__1(x_0, x_1, x_2, x_3); +x_5 = lean::box(x_4); lean::dec(x_0); -return x_7; +lean::dec(x_1); +return x_5; } } obj* l_String_isNat___boxed(obj* x_0) { @@ -3404,11 +3382,11 @@ return x_2; obj* l_Substring_toString___main(obj* x_0) { _start: { -obj* x_1; usize x_2; usize x_3; obj* x_4; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; x_1 = lean::cnstr_get(x_0, 0); -x_2 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_3 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); -x_4 = lean::string_utf8_extract_old(x_1, x_2, x_3); +x_2 = lean::cnstr_get(x_0, 1); +x_3 = lean::cnstr_get(x_0, 2); +x_4 = lean::string_utf8_extract(x_1, x_2, x_3); return x_4; } } @@ -3424,11 +3402,11 @@ return x_1; obj* l_Substring_toString(obj* x_0) { _start: { -obj* x_1; usize x_2; usize x_3; obj* x_4; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; x_1 = lean::cnstr_get(x_0, 0); -x_2 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_3 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); -x_4 = lean::string_utf8_extract_old(x_1, x_2, x_3); +x_2 = lean::cnstr_get(x_0, 1); +x_3 = lean::cnstr_get(x_0, 2); +x_4 = lean::string_utf8_extract(x_1, x_2, x_3); return x_4; } } @@ -3444,164 +3422,173 @@ return x_1; obj* l_Substring_toIterator___main(obj* x_0) { _start: { -obj* x_1; usize x_3; obj* x_5; obj* x_6; +obj* x_1; obj* x_3; obj* x_6; x_1 = lean::cnstr_get(x_0, 0); lean::inc(x_1); -x_3 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); +x_3 = lean::cnstr_get(x_0, 1); +lean::inc(x_3); lean::dec(x_0); -x_5 = lean::alloc_cnstr(0, 1, sizeof(size_t)*1); -lean::cnstr_set(x_5, 0, x_1); -lean::cnstr_set_scalar(x_5, sizeof(void*)*1, x_3); -x_6 = x_5; +x_6 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_6, 0, x_1); +lean::cnstr_set(x_6, 1, x_3); return x_6; } } obj* l_Substring_toIterator(obj* x_0) { _start: { -obj* x_1; usize x_3; obj* x_5; obj* x_6; +obj* x_1; obj* x_3; obj* x_6; x_1 = lean::cnstr_get(x_0, 0); lean::inc(x_1); -x_3 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); +x_3 = lean::cnstr_get(x_0, 1); +lean::inc(x_3); lean::dec(x_0); -x_5 = lean::alloc_cnstr(0, 1, sizeof(size_t)*1); -lean::cnstr_set(x_5, 0, x_1); -lean::cnstr_set_scalar(x_5, sizeof(void*)*1, x_3); -x_6 = x_5; +x_6 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_6, 0, x_1); +lean::cnstr_set(x_6, 1, x_3); return x_6; } } -uint32 l_Substring_get___main(obj* x_0, usize x_1) { +uint32 l_Substring_get___main(obj* x_0, obj* x_1) { _start: { -obj* x_2; usize x_3; usize x_4; uint32 x_5; +obj* x_2; obj* x_3; obj* x_4; uint32 x_5; x_2 = lean::cnstr_get(x_0, 0); -x_3 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_4 = x_3 + x_1; -x_5 = lean::string_utf8_get_old(x_2, x_4); +x_3 = lean::cnstr_get(x_0, 1); +x_4 = lean::nat_add(x_3, x_1); +x_5 = lean::string_utf8_get(x_2, x_4); +lean::dec(x_4); return x_5; } } obj* l_Substring_get___main___boxed(obj* x_0, obj* x_1) { _start: { -usize x_2; uint32 x_3; obj* x_4; -x_2 = lean::unbox_size_t(x_1); -x_3 = l_Substring_get___main(x_0, x_2); -x_4 = lean::box_uint32(x_3); +uint32 x_2; obj* x_3; +x_2 = l_Substring_get___main(x_0, x_1); +x_3 = lean::box_uint32(x_2); lean::dec(x_0); -return x_4; +lean::dec(x_1); +return x_3; } } -uint32 l_Substring_get(obj* x_0, usize x_1) { +uint32 l_Substring_get(obj* x_0, obj* x_1) { _start: { -obj* x_2; usize x_3; usize x_4; uint32 x_5; +obj* x_2; obj* x_3; obj* x_4; uint32 x_5; x_2 = lean::cnstr_get(x_0, 0); -x_3 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_4 = x_3 + x_1; -x_5 = lean::string_utf8_get_old(x_2, x_4); +x_3 = lean::cnstr_get(x_0, 1); +x_4 = lean::nat_add(x_3, x_1); +x_5 = lean::string_utf8_get(x_2, x_4); +lean::dec(x_4); return x_5; } } obj* l_Substring_get___boxed(obj* x_0, obj* x_1) { _start: { -usize x_2; uint32 x_3; obj* x_4; -x_2 = lean::unbox_size_t(x_1); -x_3 = l_Substring_get(x_0, x_2); -x_4 = lean::box_uint32(x_3); +uint32 x_2; obj* x_3; +x_2 = l_Substring_get(x_0, x_1); +x_3 = lean::box_uint32(x_2); lean::dec(x_0); -return x_4; +lean::dec(x_1); +return x_3; } } -usize l_Substring_next___main(obj* x_0, usize x_1) { +obj* l_Substring_next___main(obj* x_0, obj* x_1) { _start: { -obj* x_2; usize x_3; usize x_4; usize x_5; usize x_6; uint8 x_7; +obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; uint8 x_8; x_2 = lean::cnstr_get(x_0, 0); -x_3 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_4 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); -x_5 = x_3 + x_1; -x_6 = lean::string_utf8_next_old(x_2, x_5); -x_7 = x_4 < x_6; -if (x_7 == 0) +x_3 = lean::cnstr_get(x_0, 1); +x_4 = lean::cnstr_get(x_0, 2); +x_5 = lean::nat_add(x_3, x_1); +x_6 = lean::string_utf8_next(x_2, x_5); +lean::dec(x_5); +x_8 = lean::nat_dec_lt(x_4, x_6); +if (x_8 == 0) { -usize x_8; -x_8 = x_6 - x_3; -return x_8; +obj* x_9; +x_9 = lean::nat_sub(x_6, x_3); +lean::dec(x_6); +return x_9; } else { -usize x_9; -x_9 = x_4 - x_3; -return x_9; +obj* x_12; +lean::dec(x_6); +x_12 = lean::nat_sub(x_4, x_3); +return x_12; } } } obj* l_Substring_next___main___boxed(obj* x_0, obj* x_1) { _start: { -usize x_2; usize x_3; obj* x_4; -x_2 = lean::unbox_size_t(x_1); -x_3 = l_Substring_next___main(x_0, x_2); -x_4 = lean::box_size_t(x_3); +obj* x_2; +x_2 = l_Substring_next___main(x_0, x_1); lean::dec(x_0); -return x_4; +lean::dec(x_1); +return x_2; } } -usize l_Substring_next(obj* x_0, usize x_1) { +obj* l_Substring_next(obj* x_0, obj* x_1) { _start: { -obj* x_2; usize x_3; usize x_4; usize x_5; usize x_6; uint8 x_7; +obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; uint8 x_8; x_2 = lean::cnstr_get(x_0, 0); -x_3 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_4 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); -x_5 = x_3 + x_1; -x_6 = lean::string_utf8_next_old(x_2, x_5); -x_7 = x_4 < x_6; -if (x_7 == 0) +x_3 = lean::cnstr_get(x_0, 1); +x_4 = lean::cnstr_get(x_0, 2); +x_5 = lean::nat_add(x_3, x_1); +x_6 = lean::string_utf8_next(x_2, x_5); +lean::dec(x_5); +x_8 = lean::nat_dec_lt(x_4, x_6); +if (x_8 == 0) { -usize x_8; -x_8 = x_6 - x_3; -return x_8; +obj* x_9; +x_9 = lean::nat_sub(x_6, x_3); +lean::dec(x_6); +return x_9; } else { -usize x_9; -x_9 = x_4 - x_3; -return x_9; +obj* x_12; +lean::dec(x_6); +x_12 = lean::nat_sub(x_4, x_3); +return x_12; } } } obj* l_Substring_next___boxed(obj* x_0, obj* x_1) { _start: { -usize x_2; usize x_3; obj* x_4; -x_2 = lean::unbox_size_t(x_1); -x_3 = l_Substring_next(x_0, x_2); -x_4 = lean::box_size_t(x_3); +obj* x_2; +x_2 = l_Substring_next(x_0, x_1); lean::dec(x_0); -return x_4; +lean::dec(x_1); +return x_2; } } -usize l_Substring_prev___main(obj* x_0, usize x_1) { +obj* l_Substring_prev___main(obj* x_0, obj* x_1) { _start: { -obj* x_2; usize x_3; uint8 x_4; +obj* x_2; obj* x_3; uint8 x_4; x_2 = lean::cnstr_get(x_0, 0); -x_3 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_4 = x_1 == x_3; +x_3 = lean::cnstr_get(x_0, 1); +x_4 = lean::nat_dec_eq(x_1, x_3); if (x_4 == 0) { -usize x_5; usize x_6; usize x_7; -x_5 = x_3 + x_1; -x_6 = lean::string_utf8_prev_old(x_2, x_5); -x_7 = x_6 - x_3; -return x_7; +obj* x_5; obj* x_6; obj* x_8; +x_5 = lean::nat_add(x_3, x_1); +x_6 = lean::string_utf8_prev(x_2, x_5); +lean::dec(x_5); +x_8 = lean::nat_sub(x_6, x_3); +lean::dec(x_6); +return x_8; } else { +lean::inc(x_1); return x_1; } } @@ -3609,31 +3596,33 @@ return x_1; obj* l_Substring_prev___main___boxed(obj* x_0, obj* x_1) { _start: { -usize x_2; usize x_3; obj* x_4; -x_2 = lean::unbox_size_t(x_1); -x_3 = l_Substring_prev___main(x_0, x_2); -x_4 = lean::box_size_t(x_3); +obj* x_2; +x_2 = l_Substring_prev___main(x_0, x_1); lean::dec(x_0); -return x_4; +lean::dec(x_1); +return x_2; } } -usize l_Substring_prev(obj* x_0, usize x_1) { +obj* l_Substring_prev(obj* x_0, obj* x_1) { _start: { -obj* x_2; usize x_3; uint8 x_4; +obj* x_2; obj* x_3; uint8 x_4; x_2 = lean::cnstr_get(x_0, 0); -x_3 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_4 = x_1 == x_3; +x_3 = lean::cnstr_get(x_0, 1); +x_4 = lean::nat_dec_eq(x_1, x_3); if (x_4 == 0) { -usize x_5; usize x_6; usize x_7; -x_5 = x_3 + x_1; -x_6 = lean::string_utf8_prev_old(x_2, x_5); -x_7 = x_6 - x_3; -return x_7; +obj* x_5; obj* x_6; obj* x_8; +x_5 = lean::nat_add(x_3, x_1); +x_6 = lean::string_utf8_prev(x_2, x_5); +lean::dec(x_5); +x_8 = lean::nat_sub(x_6, x_3); +lean::dec(x_6); +return x_8; } else { +lean::inc(x_1); return x_1; } } @@ -3641,23 +3630,23 @@ return x_1; obj* l_Substring_prev___boxed(obj* x_0, obj* x_1) { _start: { -usize x_2; usize x_3; obj* x_4; -x_2 = lean::unbox_size_t(x_1); -x_3 = l_Substring_prev(x_0, x_2); -x_4 = lean::box_size_t(x_3); +obj* x_2; +x_2 = l_Substring_prev(x_0, x_1); lean::dec(x_0); -return x_4; +lean::dec(x_1); +return x_2; } } uint32 l_Substring_front(obj* x_0) { _start: { -obj* x_1; usize x_2; usize x_3; usize x_4; uint32 x_5; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; uint32 x_5; x_1 = lean::cnstr_get(x_0, 0); -x_2 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_3 = l_String_toSubstring___closed__1; -x_4 = x_2 + x_3; -x_5 = lean::string_utf8_get_old(x_1, x_4); +x_2 = lean::cnstr_get(x_0, 1); +x_3 = lean::mk_nat_obj(0ul); +x_4 = lean::nat_add(x_2, x_3); +x_5 = lean::string_utf8_get(x_1, x_4); +lean::dec(x_4); return x_5; } } @@ -3671,91 +3660,98 @@ lean::dec(x_0); return x_2; } } -usize l_Substring_posOf(obj* x_0, uint32 x_1) { +obj* l_Substring_posOf(obj* x_0, uint32 x_1) { _start: { -obj* x_2; usize x_3; usize x_4; usize x_5; obj* x_6; obj* x_7; obj* x_8; usize x_10; usize x_11; +obj* x_2; obj* x_4; obj* x_6; obj* x_9; obj* x_10; obj* x_11; obj* x_14; obj* x_17; x_2 = lean::cnstr_get(x_0, 0); -x_3 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_4 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); -x_5 = lean::string_utf8_byte_size_old(x_2); -x_6 = lean::usize_to_nat(x_5); -x_7 = lean::mk_nat_obj(1ul); -x_8 = lean::nat_add(x_6, x_7); +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); +lean::dec(x_0); +x_9 = lean::string_utf8_byte_size(x_2); +x_10 = lean::mk_nat_obj(1ul); +x_11 = lean::nat_add(x_9, x_10); +lean::dec(x_9); +lean::inc(x_4); +x_14 = l_String_posOfAux___main(x_2, x_1, x_6, x_11, x_4); lean::dec(x_6); -x_10 = l_String_posOfAux___main(x_2, x_1, x_4, x_8, x_3); -x_11 = x_10 - x_3; -return x_11; +lean::dec(x_2); +x_17 = lean::nat_sub(x_14, x_4); +lean::dec(x_4); +lean::dec(x_14); +return x_17; } } obj* l_Substring_posOf___boxed(obj* x_0, obj* x_1) { _start: { -uint32 x_2; usize x_3; obj* x_4; +uint32 x_2; obj* x_3; x_2 = lean::unbox_uint32(x_1); x_3 = l_Substring_posOf(x_0, x_2); -x_4 = lean::box_size_t(x_3); -lean::dec(x_0); -return x_4; +return x_3; } } obj* _init_l_Substring_drop___main___closed__1() { _start: { -obj* x_0; usize x_1; obj* x_2; usize x_3; obj* x_4; obj* x_5; obj* x_6; -x_0 = lean::mk_nat_obj(0ul); -x_1 = lean::usize_of_nat(x_0); -x_2 = lean::mk_string(""); -x_3 = lean::string_utf8_byte_size_old(x_2); -x_4 = lean::alloc_cnstr(0, 1, sizeof(size_t)*2); -lean::cnstr_set(x_4, 0, x_2); -lean::cnstr_set_scalar(x_4, sizeof(void*)*1, x_1); -x_5 = x_4; -lean::cnstr_set_scalar(x_5, sizeof(void*)*2, x_3); -x_6 = x_5; -return x_6; +obj* x_0; obj* x_1; obj* x_2; obj* x_3; +x_0 = lean::mk_string(""); +x_1 = lean::string_utf8_byte_size(x_0); +x_2 = lean::mk_nat_obj(0ul); +x_3 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_3, 0, x_0); +lean::cnstr_set(x_3, 1, x_2); +lean::cnstr_set(x_3, 2, x_1); +return x_3; } } obj* l_Substring_drop___main(obj* x_0, obj* x_1) { _start: { -obj* x_2; usize x_4; usize x_5; obj* x_6; usize x_7; usize x_8; uint8 x_9; +obj* x_2; obj* x_4; obj* x_6; obj* x_8; obj* x_9; uint8 x_11; x_2 = lean::cnstr_get(x_0, 0); -x_4 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_5 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); +x_4 = lean::cnstr_get(x_0, 1); +x_6 = lean::cnstr_get(x_0, 2); if (lean::is_exclusive(x_0)) { lean::cnstr_set(x_0, 0, lean::box(0)); - x_6 = x_0; + lean::cnstr_set(x_0, 1, lean::box(0)); + lean::cnstr_set(x_0, 2, lean::box(0)); + x_8 = x_0; } else { lean::inc(x_2); + lean::inc(x_4); + lean::inc(x_6); lean::dec(x_0); - x_6 = lean::box(0); + x_8 = lean::box(0); } -x_7 = lean::usize_of_nat(x_1); -x_8 = x_4 + x_7; -x_9 = x_5 <= x_8; -if (x_9 == 0) +x_9 = lean::nat_add(x_4, x_1); +lean::dec(x_4); +x_11 = lean::nat_dec_le(x_6, x_9); +if (x_11 == 0) { -obj* x_10; obj* x_11; obj* x_12; -if (lean::is_scalar(x_6)) { - x_10 = lean::alloc_cnstr(0, 1, sizeof(size_t)*2); +obj* x_12; +if (lean::is_scalar(x_8)) { + x_12 = lean::alloc_cnstr(0, 3, 0); } else { - x_10 = x_6; + x_12 = x_8; } -lean::cnstr_set(x_10, 0, x_2); -lean::cnstr_set_scalar(x_10, sizeof(void*)*1, x_8); -x_11 = x_10; -lean::cnstr_set_scalar(x_11, sizeof(void*)*2, x_5); -x_12 = x_11; +lean::cnstr_set(x_12, 0, x_2); +lean::cnstr_set(x_12, 1, x_9); +lean::cnstr_set(x_12, 2, x_6); return x_12; } else { -obj* x_15; +obj* x_17; +lean::dec(x_8); lean::dec(x_6); +lean::dec(x_9); lean::dec(x_2); -x_15 = l_Substring_drop___main___closed__1; -return x_15; +x_17 = l_Substring_drop___main___closed__1; +return x_17; } } } @@ -3771,43 +3767,47 @@ return x_2; obj* l_Substring_drop(obj* x_0, obj* x_1) { _start: { -obj* x_2; usize x_4; usize x_5; obj* x_6; usize x_7; usize x_8; uint8 x_9; +obj* x_2; obj* x_4; obj* x_6; obj* x_8; obj* x_9; uint8 x_11; x_2 = lean::cnstr_get(x_0, 0); -x_4 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_5 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); +x_4 = lean::cnstr_get(x_0, 1); +x_6 = lean::cnstr_get(x_0, 2); if (lean::is_exclusive(x_0)) { lean::cnstr_set(x_0, 0, lean::box(0)); - x_6 = x_0; + lean::cnstr_set(x_0, 1, lean::box(0)); + lean::cnstr_set(x_0, 2, lean::box(0)); + x_8 = x_0; } else { lean::inc(x_2); + lean::inc(x_4); + lean::inc(x_6); lean::dec(x_0); - x_6 = lean::box(0); + x_8 = lean::box(0); } -x_7 = lean::usize_of_nat(x_1); -x_8 = x_4 + x_7; -x_9 = x_5 <= x_8; -if (x_9 == 0) +x_9 = lean::nat_add(x_4, x_1); +lean::dec(x_4); +x_11 = lean::nat_dec_le(x_6, x_9); +if (x_11 == 0) { -obj* x_10; obj* x_11; obj* x_12; -if (lean::is_scalar(x_6)) { - x_10 = lean::alloc_cnstr(0, 1, sizeof(size_t)*2); +obj* x_12; +if (lean::is_scalar(x_8)) { + x_12 = lean::alloc_cnstr(0, 3, 0); } else { - x_10 = x_6; + x_12 = x_8; } -lean::cnstr_set(x_10, 0, x_2); -lean::cnstr_set_scalar(x_10, sizeof(void*)*1, x_8); -x_11 = x_10; -lean::cnstr_set_scalar(x_11, sizeof(void*)*2, x_5); -x_12 = x_11; +lean::cnstr_set(x_12, 0, x_2); +lean::cnstr_set(x_12, 1, x_9); +lean::cnstr_set(x_12, 2, x_6); return x_12; } else { -obj* x_15; +obj* x_17; +lean::dec(x_8); lean::dec(x_6); +lean::dec(x_9); lean::dec(x_2); -x_15 = l_Substring_drop___main___closed__1; -return x_15; +x_17 = l_Substring_drop___main___closed__1; +return x_17; } } } @@ -3823,43 +3823,47 @@ return x_2; obj* l_Substring_dropRight___main(obj* x_0, obj* x_1) { _start: { -obj* x_2; usize x_4; usize x_5; obj* x_6; usize x_7; usize x_8; uint8 x_9; +obj* x_2; obj* x_4; obj* x_6; obj* x_8; obj* x_9; uint8 x_10; x_2 = lean::cnstr_get(x_0, 0); -x_4 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_5 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); +x_4 = lean::cnstr_get(x_0, 1); +x_6 = lean::cnstr_get(x_0, 2); if (lean::is_exclusive(x_0)) { lean::cnstr_set(x_0, 0, lean::box(0)); - x_6 = x_0; + lean::cnstr_set(x_0, 1, lean::box(0)); + lean::cnstr_set(x_0, 2, lean::box(0)); + x_8 = x_0; } else { lean::inc(x_2); + lean::inc(x_4); + lean::inc(x_6); lean::dec(x_0); - x_6 = lean::box(0); + x_8 = lean::box(0); } -x_7 = lean::usize_of_nat(x_1); -x_8 = x_5 - x_7; -x_9 = x_8 <= x_5; -if (x_9 == 0) +x_9 = lean::nat_sub(x_6, x_1); +x_10 = lean::nat_dec_le(x_9, x_6); +lean::dec(x_6); +if (x_10 == 0) { -obj* x_10; obj* x_11; obj* x_12; -if (lean::is_scalar(x_6)) { - x_10 = lean::alloc_cnstr(0, 1, sizeof(size_t)*2); +obj* x_12; +if (lean::is_scalar(x_8)) { + x_12 = lean::alloc_cnstr(0, 3, 0); } else { - x_10 = x_6; + x_12 = x_8; } -lean::cnstr_set(x_10, 0, x_2); -lean::cnstr_set_scalar(x_10, sizeof(void*)*1, x_4); -x_11 = x_10; -lean::cnstr_set_scalar(x_11, sizeof(void*)*2, x_8); -x_12 = x_11; +lean::cnstr_set(x_12, 0, x_2); +lean::cnstr_set(x_12, 1, x_4); +lean::cnstr_set(x_12, 2, x_9); return x_12; } else { -obj* x_15; -lean::dec(x_6); +obj* x_17; +lean::dec(x_8); +lean::dec(x_9); +lean::dec(x_4); lean::dec(x_2); -x_15 = l_Substring_drop___main___closed__1; -return x_15; +x_17 = l_Substring_drop___main___closed__1; +return x_17; } } } @@ -3875,43 +3879,47 @@ return x_2; obj* l_Substring_dropRight(obj* x_0, obj* x_1) { _start: { -obj* x_2; usize x_4; usize x_5; obj* x_6; usize x_7; usize x_8; uint8 x_9; +obj* x_2; obj* x_4; obj* x_6; obj* x_8; obj* x_9; uint8 x_10; x_2 = lean::cnstr_get(x_0, 0); -x_4 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_5 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); +x_4 = lean::cnstr_get(x_0, 1); +x_6 = lean::cnstr_get(x_0, 2); if (lean::is_exclusive(x_0)) { lean::cnstr_set(x_0, 0, lean::box(0)); - x_6 = x_0; + lean::cnstr_set(x_0, 1, lean::box(0)); + lean::cnstr_set(x_0, 2, lean::box(0)); + x_8 = x_0; } else { lean::inc(x_2); + lean::inc(x_4); + lean::inc(x_6); lean::dec(x_0); - x_6 = lean::box(0); + x_8 = lean::box(0); } -x_7 = lean::usize_of_nat(x_1); -x_8 = x_5 - x_7; -x_9 = x_8 <= x_5; -if (x_9 == 0) +x_9 = lean::nat_sub(x_6, x_1); +x_10 = lean::nat_dec_le(x_9, x_6); +lean::dec(x_6); +if (x_10 == 0) { -obj* x_10; obj* x_11; obj* x_12; -if (lean::is_scalar(x_6)) { - x_10 = lean::alloc_cnstr(0, 1, sizeof(size_t)*2); +obj* x_12; +if (lean::is_scalar(x_8)) { + x_12 = lean::alloc_cnstr(0, 3, 0); } else { - x_10 = x_6; + x_12 = x_8; } -lean::cnstr_set(x_10, 0, x_2); -lean::cnstr_set_scalar(x_10, sizeof(void*)*1, x_4); -x_11 = x_10; -lean::cnstr_set_scalar(x_11, sizeof(void*)*2, x_8); -x_12 = x_11; +lean::cnstr_set(x_12, 0, x_2); +lean::cnstr_set(x_12, 1, x_4); +lean::cnstr_set(x_12, 2, x_9); return x_12; } else { -obj* x_15; -lean::dec(x_6); +obj* x_17; +lean::dec(x_8); +lean::dec(x_9); +lean::dec(x_4); lean::dec(x_2); -x_15 = l_Substring_drop___main___closed__1; -return x_15; +x_17 = l_Substring_drop___main___closed__1; +return x_17; } } } @@ -3927,50 +3935,51 @@ return x_2; obj* l_Substring_take___main(obj* x_0, obj* x_1) { _start: { -obj* x_2; usize x_4; usize x_5; obj* x_6; usize x_7; usize x_8; uint8 x_9; +obj* x_2; obj* x_4; obj* x_6; obj* x_8; obj* x_9; uint8 x_10; x_2 = lean::cnstr_get(x_0, 0); -x_4 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_5 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); +x_4 = lean::cnstr_get(x_0, 1); +x_6 = lean::cnstr_get(x_0, 2); if (lean::is_exclusive(x_0)) { lean::cnstr_set(x_0, 0, lean::box(0)); - x_6 = x_0; + lean::cnstr_set(x_0, 1, lean::box(0)); + lean::cnstr_set(x_0, 2, lean::box(0)); + x_8 = x_0; } else { lean::inc(x_2); + lean::inc(x_4); + lean::inc(x_6); lean::dec(x_0); - x_6 = lean::box(0); + x_8 = lean::box(0); } -x_7 = lean::usize_of_nat(x_1); -x_8 = x_4 + x_7; -x_9 = x_5 <= x_8; -if (x_9 == 0) +x_9 = lean::nat_add(x_4, x_1); +x_10 = lean::nat_dec_le(x_6, x_9); +if (x_10 == 0) { -obj* x_10; obj* x_11; obj* x_12; -if (lean::is_scalar(x_6)) { - x_10 = lean::alloc_cnstr(0, 1, sizeof(size_t)*2); +obj* x_12; +lean::dec(x_6); +if (lean::is_scalar(x_8)) { + x_12 = lean::alloc_cnstr(0, 3, 0); } else { - x_10 = x_6; + x_12 = x_8; } -lean::cnstr_set(x_10, 0, x_2); -lean::cnstr_set_scalar(x_10, sizeof(void*)*1, x_4); -x_11 = x_10; -lean::cnstr_set_scalar(x_11, sizeof(void*)*2, x_8); -x_12 = x_11; +lean::cnstr_set(x_12, 0, x_2); +lean::cnstr_set(x_12, 1, x_4); +lean::cnstr_set(x_12, 2, x_9); return x_12; } else { -obj* x_13; obj* x_14; obj* x_15; -if (lean::is_scalar(x_6)) { - x_13 = lean::alloc_cnstr(0, 1, sizeof(size_t)*2); +obj* x_14; +lean::dec(x_9); +if (lean::is_scalar(x_8)) { + x_14 = lean::alloc_cnstr(0, 3, 0); } else { - x_13 = x_6; + x_14 = x_8; } -lean::cnstr_set(x_13, 0, x_2); -lean::cnstr_set_scalar(x_13, sizeof(void*)*1, x_4); -x_14 = x_13; -lean::cnstr_set_scalar(x_14, sizeof(void*)*2, x_5); -x_15 = x_14; -return x_15; +lean::cnstr_set(x_14, 0, x_2); +lean::cnstr_set(x_14, 1, x_4); +lean::cnstr_set(x_14, 2, x_6); +return x_14; } } } @@ -3986,50 +3995,51 @@ return x_2; obj* l_Substring_take(obj* x_0, obj* x_1) { _start: { -obj* x_2; usize x_4; usize x_5; obj* x_6; usize x_7; usize x_8; uint8 x_9; +obj* x_2; obj* x_4; obj* x_6; obj* x_8; obj* x_9; uint8 x_10; x_2 = lean::cnstr_get(x_0, 0); -x_4 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_5 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); +x_4 = lean::cnstr_get(x_0, 1); +x_6 = lean::cnstr_get(x_0, 2); if (lean::is_exclusive(x_0)) { lean::cnstr_set(x_0, 0, lean::box(0)); - x_6 = x_0; + lean::cnstr_set(x_0, 1, lean::box(0)); + lean::cnstr_set(x_0, 2, lean::box(0)); + x_8 = x_0; } else { lean::inc(x_2); + lean::inc(x_4); + lean::inc(x_6); lean::dec(x_0); - x_6 = lean::box(0); + x_8 = lean::box(0); } -x_7 = lean::usize_of_nat(x_1); -x_8 = x_4 + x_7; -x_9 = x_5 <= x_8; -if (x_9 == 0) +x_9 = lean::nat_add(x_4, x_1); +x_10 = lean::nat_dec_le(x_6, x_9); +if (x_10 == 0) { -obj* x_10; obj* x_11; obj* x_12; -if (lean::is_scalar(x_6)) { - x_10 = lean::alloc_cnstr(0, 1, sizeof(size_t)*2); +obj* x_12; +lean::dec(x_6); +if (lean::is_scalar(x_8)) { + x_12 = lean::alloc_cnstr(0, 3, 0); } else { - x_10 = x_6; + x_12 = x_8; } -lean::cnstr_set(x_10, 0, x_2); -lean::cnstr_set_scalar(x_10, sizeof(void*)*1, x_4); -x_11 = x_10; -lean::cnstr_set_scalar(x_11, sizeof(void*)*2, x_8); -x_12 = x_11; +lean::cnstr_set(x_12, 0, x_2); +lean::cnstr_set(x_12, 1, x_4); +lean::cnstr_set(x_12, 2, x_9); return x_12; } else { -obj* x_13; obj* x_14; obj* x_15; -if (lean::is_scalar(x_6)) { - x_13 = lean::alloc_cnstr(0, 1, sizeof(size_t)*2); +obj* x_14; +lean::dec(x_9); +if (lean::is_scalar(x_8)) { + x_14 = lean::alloc_cnstr(0, 3, 0); } else { - x_13 = x_6; + x_14 = x_8; } -lean::cnstr_set(x_13, 0, x_2); -lean::cnstr_set_scalar(x_13, sizeof(void*)*1, x_4); -x_14 = x_13; -lean::cnstr_set_scalar(x_14, sizeof(void*)*2, x_5); -x_15 = x_14; -return x_15; +lean::cnstr_set(x_14, 0, x_2); +lean::cnstr_set(x_14, 1, x_4); +lean::cnstr_set(x_14, 2, x_6); +return x_14; } } } @@ -4045,50 +4055,51 @@ return x_2; obj* l_Substring_takeRight___main(obj* x_0, obj* x_1) { _start: { -obj* x_2; usize x_4; usize x_5; obj* x_6; usize x_7; usize x_8; uint8 x_9; +obj* x_2; obj* x_4; obj* x_6; obj* x_8; obj* x_9; uint8 x_10; x_2 = lean::cnstr_get(x_0, 0); -x_4 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_5 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); +x_4 = lean::cnstr_get(x_0, 1); +x_6 = lean::cnstr_get(x_0, 2); if (lean::is_exclusive(x_0)) { lean::cnstr_set(x_0, 0, lean::box(0)); - x_6 = x_0; + lean::cnstr_set(x_0, 1, lean::box(0)); + lean::cnstr_set(x_0, 2, lean::box(0)); + x_8 = x_0; } else { lean::inc(x_2); + lean::inc(x_4); + lean::inc(x_6); lean::dec(x_0); - x_6 = lean::box(0); + x_8 = lean::box(0); } -x_7 = lean::usize_of_nat(x_1); -x_8 = x_5 - x_7; -x_9 = x_8 <= x_4; -if (x_9 == 0) +x_9 = lean::nat_sub(x_6, x_1); +x_10 = lean::nat_dec_le(x_9, x_4); +if (x_10 == 0) { -obj* x_10; obj* x_11; obj* x_12; -if (lean::is_scalar(x_6)) { - x_10 = lean::alloc_cnstr(0, 1, sizeof(size_t)*2); +obj* x_12; +lean::dec(x_4); +if (lean::is_scalar(x_8)) { + x_12 = lean::alloc_cnstr(0, 3, 0); } else { - x_10 = x_6; + x_12 = x_8; } -lean::cnstr_set(x_10, 0, x_2); -lean::cnstr_set_scalar(x_10, sizeof(void*)*1, x_8); -x_11 = x_10; -lean::cnstr_set_scalar(x_11, sizeof(void*)*2, x_5); -x_12 = x_11; +lean::cnstr_set(x_12, 0, x_2); +lean::cnstr_set(x_12, 1, x_9); +lean::cnstr_set(x_12, 2, x_6); return x_12; } else { -obj* x_13; obj* x_14; obj* x_15; -if (lean::is_scalar(x_6)) { - x_13 = lean::alloc_cnstr(0, 1, sizeof(size_t)*2); +obj* x_14; +lean::dec(x_9); +if (lean::is_scalar(x_8)) { + x_14 = lean::alloc_cnstr(0, 3, 0); } else { - x_13 = x_6; + x_14 = x_8; } -lean::cnstr_set(x_13, 0, x_2); -lean::cnstr_set_scalar(x_13, sizeof(void*)*1, x_4); -x_14 = x_13; -lean::cnstr_set_scalar(x_14, sizeof(void*)*2, x_5); -x_15 = x_14; -return x_15; +lean::cnstr_set(x_14, 0, x_2); +lean::cnstr_set(x_14, 1, x_4); +lean::cnstr_set(x_14, 2, x_6); +return x_14; } } } @@ -4104,50 +4115,51 @@ return x_2; obj* l_Substring_takeRight(obj* x_0, obj* x_1) { _start: { -obj* x_2; usize x_4; usize x_5; obj* x_6; usize x_7; usize x_8; uint8 x_9; +obj* x_2; obj* x_4; obj* x_6; obj* x_8; obj* x_9; uint8 x_10; x_2 = lean::cnstr_get(x_0, 0); -x_4 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_5 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); +x_4 = lean::cnstr_get(x_0, 1); +x_6 = lean::cnstr_get(x_0, 2); if (lean::is_exclusive(x_0)) { lean::cnstr_set(x_0, 0, lean::box(0)); - x_6 = x_0; + lean::cnstr_set(x_0, 1, lean::box(0)); + lean::cnstr_set(x_0, 2, lean::box(0)); + x_8 = x_0; } else { lean::inc(x_2); + lean::inc(x_4); + lean::inc(x_6); lean::dec(x_0); - x_6 = lean::box(0); + x_8 = lean::box(0); } -x_7 = lean::usize_of_nat(x_1); -x_8 = x_5 - x_7; -x_9 = x_8 <= x_4; -if (x_9 == 0) +x_9 = lean::nat_sub(x_6, x_1); +x_10 = lean::nat_dec_le(x_9, x_4); +if (x_10 == 0) { -obj* x_10; obj* x_11; obj* x_12; -if (lean::is_scalar(x_6)) { - x_10 = lean::alloc_cnstr(0, 1, sizeof(size_t)*2); +obj* x_12; +lean::dec(x_4); +if (lean::is_scalar(x_8)) { + x_12 = lean::alloc_cnstr(0, 3, 0); } else { - x_10 = x_6; + x_12 = x_8; } -lean::cnstr_set(x_10, 0, x_2); -lean::cnstr_set_scalar(x_10, sizeof(void*)*1, x_8); -x_11 = x_10; -lean::cnstr_set_scalar(x_11, sizeof(void*)*2, x_5); -x_12 = x_11; +lean::cnstr_set(x_12, 0, x_2); +lean::cnstr_set(x_12, 1, x_9); +lean::cnstr_set(x_12, 2, x_6); return x_12; } else { -obj* x_13; obj* x_14; obj* x_15; -if (lean::is_scalar(x_6)) { - x_13 = lean::alloc_cnstr(0, 1, sizeof(size_t)*2); +obj* x_14; +lean::dec(x_9); +if (lean::is_scalar(x_8)) { + x_14 = lean::alloc_cnstr(0, 3, 0); } else { - x_13 = x_6; + x_14 = x_8; } -lean::cnstr_set(x_13, 0, x_2); -lean::cnstr_set_scalar(x_13, sizeof(void*)*1, x_4); -x_14 = x_13; -lean::cnstr_set_scalar(x_14, sizeof(void*)*2, x_5); -x_15 = x_14; -return x_15; +lean::cnstr_set(x_14, 0, x_2); +lean::cnstr_set(x_14, 1, x_4); +lean::cnstr_set(x_14, 2, x_6); +return x_14; } } } @@ -4160,173 +4172,177 @@ lean::dec(x_1); return x_2; } } -uint8 l_Substring_atEnd___main(obj* x_0, usize x_1) { +uint8 l_Substring_atEnd___main(obj* x_0, obj* x_1) { _start: { -usize x_2; usize x_3; usize x_4; uint8 x_5; -x_2 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_3 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); -x_4 = x_2 + x_1; -x_5 = x_4 == x_3; +obj* x_2; obj* x_3; obj* x_4; uint8 x_5; +x_2 = lean::cnstr_get(x_0, 1); +x_3 = lean::cnstr_get(x_0, 2); +x_4 = lean::nat_add(x_2, x_1); +x_5 = lean::nat_dec_eq(x_4, x_3); +lean::dec(x_4); return x_5; } } obj* l_Substring_atEnd___main___boxed(obj* x_0, obj* x_1) { _start: { -usize x_2; uint8 x_3; obj* x_4; -x_2 = lean::unbox_size_t(x_1); -x_3 = l_Substring_atEnd___main(x_0, x_2); -x_4 = lean::box(x_3); +uint8 x_2; obj* x_3; +x_2 = l_Substring_atEnd___main(x_0, x_1); +x_3 = lean::box(x_2); lean::dec(x_0); -return x_4; +lean::dec(x_1); +return x_3; } } -uint8 l_Substring_atEnd(obj* x_0, usize x_1) { +uint8 l_Substring_atEnd(obj* x_0, obj* x_1) { _start: { -usize x_2; usize x_3; usize x_4; uint8 x_5; -x_2 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_3 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); -x_4 = x_2 + x_1; -x_5 = x_4 == x_3; +obj* x_2; obj* x_3; obj* x_4; uint8 x_5; +x_2 = lean::cnstr_get(x_0, 1); +x_3 = lean::cnstr_get(x_0, 2); +x_4 = lean::nat_add(x_2, x_1); +x_5 = lean::nat_dec_eq(x_4, x_3); +lean::dec(x_4); return x_5; } } obj* l_Substring_atEnd___boxed(obj* x_0, obj* x_1) { _start: { -usize x_2; uint8 x_3; obj* x_4; -x_2 = lean::unbox_size_t(x_1); -x_3 = l_Substring_atEnd(x_0, x_2); -x_4 = lean::box(x_3); +uint8 x_2; obj* x_3; +x_2 = l_Substring_atEnd(x_0, x_1); +x_3 = lean::box(x_2); lean::dec(x_0); -return x_4; +lean::dec(x_1); +return x_3; } } obj* _init_l_Substring_extract___main___closed__1() { _start: { -obj* x_0; usize x_1; obj* x_2; usize x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; -x_0 = lean::mk_nat_obj(0ul); -x_1 = lean::usize_of_nat(x_0); +obj* x_0; obj* x_1; obj* x_2; obj* x_3; +x_0 = lean::mk_string(""); +x_1 = lean::mk_nat_obj(0ul); x_2 = lean::mk_nat_obj(1ul); -x_3 = lean::usize_of_nat(x_2); -x_4 = lean::mk_string(""); -x_5 = lean::alloc_cnstr(0, 1, sizeof(size_t)*2); -lean::cnstr_set(x_5, 0, x_4); -lean::cnstr_set_scalar(x_5, sizeof(void*)*1, x_1); -x_6 = x_5; -lean::cnstr_set_scalar(x_6, sizeof(void*)*2, x_3); -x_7 = x_6; -return x_7; +x_3 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_3, 0, x_0); +lean::cnstr_set(x_3, 1, x_1); +lean::cnstr_set(x_3, 2, x_2); +return x_3; } } -obj* l_Substring_extract___main(obj* x_0, usize x_1, usize x_2) { +obj* l_Substring_extract___main(obj* x_0, obj* x_1, obj* x_2) { _start: { -obj* x_3; usize x_5; obj* x_6; uint8 x_7; +obj* x_3; obj* x_5; obj* x_7; uint8 x_8; x_3 = lean::cnstr_get(x_0, 0); -x_5 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); +x_5 = lean::cnstr_get(x_0, 1); if (lean::is_exclusive(x_0)) { lean::cnstr_set(x_0, 0, lean::box(0)); - x_6 = x_0; + lean::cnstr_set(x_0, 1, lean::box(0)); + lean::cnstr_release(x_0, 2); + x_7 = x_0; } else { lean::inc(x_3); + lean::inc(x_5); lean::dec(x_0); - x_6 = lean::box(0); + x_7 = lean::box(0); } -x_7 = x_2 <= x_1; -if (x_7 == 0) +x_8 = lean::nat_dec_le(x_2, x_1); +if (x_8 == 0) { -usize x_8; usize x_9; obj* x_10; obj* x_11; obj* x_12; -x_8 = x_5 + x_1; -x_9 = x_5 + x_2; -if (lean::is_scalar(x_6)) { - x_10 = lean::alloc_cnstr(0, 1, sizeof(size_t)*2); +obj* x_9; obj* x_10; obj* x_12; +x_9 = lean::nat_add(x_5, x_1); +x_10 = lean::nat_add(x_5, x_2); +lean::dec(x_5); +if (lean::is_scalar(x_7)) { + x_12 = lean::alloc_cnstr(0, 3, 0); } else { - x_10 = x_6; + x_12 = x_7; } -lean::cnstr_set(x_10, 0, x_3); -lean::cnstr_set_scalar(x_10, sizeof(void*)*1, x_8); -x_11 = x_10; -lean::cnstr_set_scalar(x_11, sizeof(void*)*2, x_9); -x_12 = x_11; +lean::cnstr_set(x_12, 0, x_3); +lean::cnstr_set(x_12, 1, x_9); +lean::cnstr_set(x_12, 2, x_10); return x_12; } else { -obj* x_15; -lean::dec(x_6); +obj* x_16; +lean::dec(x_7); +lean::dec(x_5); lean::dec(x_3); -x_15 = l_Substring_extract___main___closed__1; -return x_15; +x_16 = l_Substring_extract___main___closed__1; +return x_16; } } } obj* l_Substring_extract___main___boxed(obj* x_0, obj* x_1, obj* x_2) { _start: { -usize x_3; usize x_4; obj* x_5; -x_3 = lean::unbox_size_t(x_1); -x_4 = lean::unbox_size_t(x_2); -x_5 = l_Substring_extract___main(x_0, x_3, x_4); -return x_5; +obj* x_3; +x_3 = l_Substring_extract___main(x_0, x_1, x_2); +lean::dec(x_1); +lean::dec(x_2); +return x_3; } } -obj* l_Substring_extract(obj* x_0, usize x_1, usize x_2) { +obj* l_Substring_extract(obj* x_0, obj* x_1, obj* x_2) { _start: { -obj* x_3; usize x_5; obj* x_6; uint8 x_7; +obj* x_3; obj* x_5; obj* x_7; uint8 x_8; x_3 = lean::cnstr_get(x_0, 0); -x_5 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); +x_5 = lean::cnstr_get(x_0, 1); if (lean::is_exclusive(x_0)) { lean::cnstr_set(x_0, 0, lean::box(0)); - x_6 = x_0; + lean::cnstr_set(x_0, 1, lean::box(0)); + lean::cnstr_release(x_0, 2); + x_7 = x_0; } else { lean::inc(x_3); + lean::inc(x_5); lean::dec(x_0); - x_6 = lean::box(0); + x_7 = lean::box(0); } -x_7 = x_2 <= x_1; -if (x_7 == 0) +x_8 = lean::nat_dec_le(x_2, x_1); +if (x_8 == 0) { -usize x_8; usize x_9; obj* x_10; obj* x_11; obj* x_12; -x_8 = x_5 + x_1; -x_9 = x_5 + x_2; -if (lean::is_scalar(x_6)) { - x_10 = lean::alloc_cnstr(0, 1, sizeof(size_t)*2); +obj* x_9; obj* x_10; obj* x_12; +x_9 = lean::nat_add(x_5, x_1); +x_10 = lean::nat_add(x_5, x_2); +lean::dec(x_5); +if (lean::is_scalar(x_7)) { + x_12 = lean::alloc_cnstr(0, 3, 0); } else { - x_10 = x_6; + x_12 = x_7; } -lean::cnstr_set(x_10, 0, x_3); -lean::cnstr_set_scalar(x_10, sizeof(void*)*1, x_8); -x_11 = x_10; -lean::cnstr_set_scalar(x_11, sizeof(void*)*2, x_9); -x_12 = x_11; +lean::cnstr_set(x_12, 0, x_3); +lean::cnstr_set(x_12, 1, x_9); +lean::cnstr_set(x_12, 2, x_10); return x_12; } else { -obj* x_15; -lean::dec(x_6); +obj* x_16; +lean::dec(x_7); +lean::dec(x_5); lean::dec(x_3); -x_15 = l_Substring_extract___main___closed__1; -return x_15; +x_16 = l_Substring_extract___main___closed__1; +return x_16; } } } obj* l_Substring_extract___boxed(obj* x_0, obj* x_1, obj* x_2) { _start: { -usize x_3; usize x_4; obj* x_5; -x_3 = lean::unbox_size_t(x_1); -x_4 = lean::unbox_size_t(x_2); -x_5 = l_Substring_extract(x_0, x_3, x_4); -return x_5; +obj* x_3; +x_3 = l_Substring_extract(x_0, x_1, x_2); +lean::dec(x_1); +lean::dec(x_2); +return x_3; } } -obj* l_Substring_splitAux___main(obj* x_0, obj* x_1, usize x_2, obj* x_3, usize x_4, usize x_5, usize x_6, obj* x_7) { +obj* l_Substring_splitAux___main(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7) { _start: { obj* x_8; uint8 x_9; @@ -4335,130 +4351,131 @@ x_9 = lean::nat_dec_eq(x_3, x_8); if (x_9 == 0) { uint8 x_10; -x_10 = x_5 == x_2; +x_10 = lean::nat_dec_eq(x_5, x_2); if (x_10 == 0) { obj* x_11; obj* x_12; uint32 x_14; uint32 x_15; uint8 x_16; x_11 = lean::mk_nat_obj(1ul); x_12 = lean::nat_sub(x_3, x_11); lean::dec(x_3); -x_14 = lean::string_utf8_get_old(x_0, x_5); -x_15 = lean::string_utf8_get_old(x_1, x_6); +x_14 = lean::string_utf8_get(x_0, x_5); +x_15 = lean::string_utf8_get(x_1, x_6); x_16 = x_14 == x_15; if (x_16 == 0) { -usize x_17; usize x_18; -x_17 = lean::string_utf8_next_old(x_0, x_5); -x_18 = l_String_toSubstring___closed__1; +obj* x_18; +lean::dec(x_6); +x_18 = lean::string_utf8_next(x_0, x_5); +lean::dec(x_5); x_3 = x_12; -x_5 = x_17; -x_6 = x_18; +x_5 = x_18; +x_6 = x_8; goto _start; } else { -usize x_20; usize x_21; uint8 x_22; -x_20 = lean::string_utf8_next_old(x_0, x_5); -x_21 = lean::string_utf8_next_old(x_1, x_6); -x_22 = lean::string_utf8_at_end_old(x_1, x_21); -if (x_22 == 0) +obj* x_21; obj* x_23; uint8 x_25; +x_21 = lean::string_utf8_next(x_0, x_5); +lean::dec(x_5); +x_23 = lean::string_utf8_next(x_1, x_6); +lean::dec(x_6); +x_25 = lean::string_utf8_at_end(x_1, x_23); +if (x_25 == 0) { x_3 = x_12; -x_5 = x_20; -x_6 = x_21; +x_5 = x_21; +x_6 = x_23; goto _start; } else { -usize x_24; obj* x_26; obj* x_27; obj* x_28; obj* x_29; usize x_30; -x_24 = x_20 - x_21; +obj* x_27; obj* x_30; obj* x_31; +x_27 = lean::nat_sub(x_21, x_23); +lean::dec(x_23); lean::inc(x_0); -x_26 = lean::alloc_cnstr(0, 1, sizeof(size_t)*2); -lean::cnstr_set(x_26, 0, x_0); -lean::cnstr_set_scalar(x_26, sizeof(void*)*1, x_4); -x_27 = x_26; -lean::cnstr_set_scalar(x_27, sizeof(void*)*2, x_24); -x_28 = x_27; -x_29 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_29, 0, x_28); -lean::cnstr_set(x_29, 1, x_7); -x_30 = l_String_toSubstring___closed__1; +x_30 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_30, 0, x_0); +lean::cnstr_set(x_30, 1, x_4); +lean::cnstr_set(x_30, 2, x_27); +x_31 = lean::alloc_cnstr(1, 2, 0); +lean::cnstr_set(x_31, 0, x_30); +lean::cnstr_set(x_31, 1, x_7); +lean::inc(x_21); x_3 = x_12; -x_4 = x_20; -x_5 = x_20; -x_6 = x_30; -x_7 = x_29; +x_4 = x_21; +x_5 = x_21; +x_6 = x_8; +x_7 = x_31; goto _start; } } } else { -uint8 x_33; +uint8 x_35; lean::dec(x_3); -x_33 = lean::string_utf8_at_end_old(x_1, x_6); -if (x_33 == 0) +x_35 = lean::string_utf8_at_end(x_1, x_6); +if (x_35 == 0) { -obj* x_34; obj* x_35; obj* x_36; obj* x_37; obj* x_38; -x_34 = lean::alloc_cnstr(0, 1, sizeof(size_t)*2); -lean::cnstr_set(x_34, 0, x_0); -lean::cnstr_set_scalar(x_34, sizeof(void*)*1, x_4); -x_35 = x_34; -lean::cnstr_set_scalar(x_35, sizeof(void*)*2, x_5); -x_36 = x_35; -x_37 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_37, 0, x_36); -lean::cnstr_set(x_37, 1, x_7); -x_38 = l_List_reverse___rarg(x_37); -return x_38; +obj* x_37; obj* x_38; obj* x_39; +lean::dec(x_6); +x_37 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_37, 0, x_0); +lean::cnstr_set(x_37, 1, x_4); +lean::cnstr_set(x_37, 2, x_5); +x_38 = lean::alloc_cnstr(1, 2, 0); +lean::cnstr_set(x_38, 0, x_37); +lean::cnstr_set(x_38, 1, x_7); +x_39 = l_List_reverse___rarg(x_38); +return x_39; } else { -usize 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 = x_5 - x_6; -x_40 = lean::alloc_cnstr(0, 1, sizeof(size_t)*2); -lean::cnstr_set(x_40, 0, x_0); -lean::cnstr_set_scalar(x_40, sizeof(void*)*1, x_4); -x_41 = x_40; -lean::cnstr_set_scalar(x_41, sizeof(void*)*2, x_39); -x_42 = x_41; -x_43 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_43, 0, x_42); -lean::cnstr_set(x_43, 1, x_7); -x_44 = l_Substring_drop___main___closed__1; -x_45 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_45, 0, x_44); -lean::cnstr_set(x_45, 1, x_43); -x_46 = l_List_reverse___rarg(x_45); -return x_46; +obj* x_40; obj* x_43; obj* x_44; obj* x_45; obj* x_46; obj* x_47; +x_40 = lean::nat_sub(x_5, x_6); +lean::dec(x_6); +lean::dec(x_5); +x_43 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_43, 0, x_0); +lean::cnstr_set(x_43, 1, x_4); +lean::cnstr_set(x_43, 2, x_40); +x_44 = lean::alloc_cnstr(1, 2, 0); +lean::cnstr_set(x_44, 0, x_43); +lean::cnstr_set(x_44, 1, x_7); +x_45 = l_Substring_drop___main___closed__1; +x_46 = lean::alloc_cnstr(1, 2, 0); +lean::cnstr_set(x_46, 0, x_45); +lean::cnstr_set(x_46, 1, x_44); +x_47 = l_List_reverse___rarg(x_46); +return x_47; } } } else { -obj* x_50; +obj* x_54; +lean::dec(x_5); lean::dec(x_7); +lean::dec(x_4); +lean::dec(x_6); lean::dec(x_3); lean::dec(x_0); -x_50 = lean::box(0); -return x_50; +x_54 = lean::box(0); +return x_54; } } } obj* l_Substring_splitAux___main___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) { _start: { -usize x_8; usize x_9; usize x_10; usize x_11; obj* x_12; -x_8 = lean::unbox_size_t(x_2); -x_9 = lean::unbox_size_t(x_4); -x_10 = lean::unbox_size_t(x_5); -x_11 = lean::unbox_size_t(x_6); -x_12 = l_Substring_splitAux___main(x_0, x_1, x_8, x_3, x_9, x_10, x_11, x_7); +obj* x_8; +x_8 = l_Substring_splitAux___main(x_0, x_1, x_2, x_3, x_4, x_5, x_6, x_7); lean::dec(x_1); -return x_12; +lean::dec(x_2); +return x_8; } } -obj* l_Substring_splitAux(obj* x_0, obj* x_1, usize x_2, obj* x_3, usize x_4, usize x_5, usize x_6, obj* x_7) { +obj* l_Substring_splitAux(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6, obj* x_7) { _start: { obj* x_8; @@ -4469,14 +4486,11 @@ return x_8; obj* l_Substring_splitAux___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) { _start: { -usize x_8; usize x_9; usize x_10; usize x_11; obj* x_12; -x_8 = lean::unbox_size_t(x_2); -x_9 = lean::unbox_size_t(x_4); -x_10 = lean::unbox_size_t(x_5); -x_11 = lean::unbox_size_t(x_6); -x_12 = l_Substring_splitAux(x_0, x_1, x_8, x_3, x_9, x_10, x_11, x_7); +obj* x_8; +x_8 = l_Substring_splitAux(x_0, x_1, x_2, x_3, x_4, x_5, x_6, x_7); lean::dec(x_1); -return x_12; +lean::dec(x_2); +return x_8; } } obj* l_Substring_split(obj* x_0, obj* x_1) { @@ -4487,30 +4501,33 @@ x_2 = l_String_splitAux___main___closed__1; x_3 = lean::string_dec_eq(x_1, x_2); if (x_3 == 0) { -obj* x_4; usize x_6; usize x_7; obj* x_8; obj* x_9; obj* x_10; usize x_12; obj* x_14; usize x_15; obj* x_16; +obj* x_4; obj* x_6; obj* x_8; obj* x_9; obj* x_10; obj* x_12; obj* x_15; obj* x_16; obj* x_18; x_4 = lean::cnstr_get(x_0, 0); lean::inc(x_4); -x_6 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); -x_7 = lean::string_utf8_byte_size_old(x_4); -x_8 = lean::usize_to_nat(x_7); +x_6 = lean::cnstr_get(x_0, 2); +lean::inc(x_6); +x_8 = lean::string_utf8_byte_size(x_4); x_9 = lean::mk_nat_obj(1ul); x_10 = lean::nat_add(x_8, x_9); lean::dec(x_8); -x_12 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); +x_12 = lean::cnstr_get(x_0, 1); +lean::inc(x_12); lean::dec(x_0); -x_14 = lean::box(0); -x_15 = l_String_toSubstring___closed__1; -x_16 = l_Substring_splitAux___main(x_4, x_1, x_6, x_10, x_12, x_12, x_15, x_14); -return x_16; +x_15 = lean::box(0); +x_16 = lean::mk_nat_obj(0ul); +lean::inc(x_12); +x_18 = l_Substring_splitAux___main(x_4, x_1, x_6, x_10, x_12, x_12, x_16, x_15); +lean::dec(x_6); +return x_18; } else { -obj* x_17; obj* x_18; -x_17 = lean::box(0); -x_18 = lean::alloc_cnstr(1, 2, 0); -lean::cnstr_set(x_18, 0, x_0); -lean::cnstr_set(x_18, 1, x_17); -return x_18; +obj* x_20; obj* x_21; +x_20 = lean::box(0); +x_21 = lean::alloc_cnstr(1, 2, 0); +lean::cnstr_set(x_21, 0, x_0); +lean::cnstr_set(x_21, 1, x_20); +return x_21; } } } @@ -4526,36 +4543,32 @@ return x_2; obj* l_Substring_foldl___rarg(obj* x_0, obj* x_1, obj* x_2) { _start: { -obj* x_3; usize x_4; usize x_5; usize x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_11; +obj* x_3; obj* x_5; obj* x_7; obj* x_10; obj* x_11; obj* x_12; obj* x_14; x_3 = lean::cnstr_get(x_2, 0); -x_4 = lean::cnstr_get_scalar(x_2, sizeof(void*)*1); -x_5 = lean::cnstr_get_scalar(x_2, sizeof(void*)*2); -x_6 = lean::string_utf8_byte_size_old(x_3); -x_7 = lean::usize_to_nat(x_6); -x_8 = lean::mk_nat_obj(1ul); -x_9 = lean::nat_add(x_7, x_8); +lean::inc(x_3); +x_5 = lean::cnstr_get(x_2, 1); +lean::inc(x_5); +x_7 = lean::cnstr_get(x_2, 2); +lean::inc(x_7); +lean::dec(x_2); +x_10 = lean::string_utf8_byte_size(x_3); +x_11 = lean::mk_nat_obj(1ul); +x_12 = lean::nat_add(x_10, x_11); +lean::dec(x_10); +x_14 = l_String_foldlAux___main___rarg(x_0, x_3, x_7, x_12, x_5, x_1); lean::dec(x_7); -x_11 = l_String_foldlAux___main___rarg(x_0, x_3, x_5, x_9, x_4, x_1); -return x_11; +lean::dec(x_3); +return x_14; } } obj* l_Substring_foldl(obj* x_0) { _start: { obj* x_1; -x_1 = lean::alloc_closure(reinterpret_cast(l_Substring_foldl___rarg___boxed), 3, 0); +x_1 = lean::alloc_closure(reinterpret_cast(l_Substring_foldl___rarg), 3, 0); return x_1; } } -obj* l_Substring_foldl___rarg___boxed(obj* x_0, obj* x_1, obj* x_2) { -_start: -{ -obj* x_3; -x_3 = l_Substring_foldl___rarg(x_0, x_1, x_2); -lean::dec(x_2); -return x_3; -} -} obj* l_Substring_foldl___boxed(obj* x_0) { _start: { @@ -4568,18 +4581,17 @@ return x_1; obj* l_Substring_foldr___rarg(obj* x_0, obj* x_1, obj* x_2) { _start: { -obj* x_3; usize x_4; usize x_5; usize x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_11; +obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_10; x_3 = lean::cnstr_get(x_2, 0); -x_4 = lean::cnstr_get_scalar(x_2, sizeof(void*)*1); -x_5 = lean::cnstr_get_scalar(x_2, sizeof(void*)*2); -x_6 = lean::string_utf8_byte_size_old(x_3); -x_7 = lean::usize_to_nat(x_6); -x_8 = lean::mk_nat_obj(1ul); -x_9 = lean::nat_add(x_7, x_8); -lean::dec(x_7); -x_11 = l_String_foldrAux___main___rarg(x_0, x_1, x_3, x_5, x_9, x_4); -lean::dec(x_9); -return x_11; +x_4 = lean::cnstr_get(x_2, 1); +x_5 = lean::cnstr_get(x_2, 2); +x_6 = lean::string_utf8_byte_size(x_3); +x_7 = lean::mk_nat_obj(1ul); +x_8 = lean::nat_add(x_6, x_7); +lean::dec(x_6); +x_10 = l_String_foldrAux___main___rarg(x_0, x_1, x_3, x_5, x_8, x_4); +lean::dec(x_8); +return x_10; } } obj* l_Substring_foldr(obj* x_0) { @@ -4612,17 +4624,22 @@ return x_1; uint8 l_Substring_any(obj* x_0, obj* x_1) { _start: { -obj* x_2; usize x_3; usize x_4; usize x_5; obj* x_6; obj* x_7; obj* x_8; uint8 x_10; +obj* x_2; obj* x_4; obj* x_6; obj* x_9; obj* x_10; obj* x_11; uint8 x_13; x_2 = lean::cnstr_get(x_0, 0); -x_3 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_4 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); -x_5 = lean::string_utf8_byte_size_old(x_2); -x_6 = lean::usize_to_nat(x_5); -x_7 = lean::mk_nat_obj(1ul); -x_8 = lean::nat_add(x_6, x_7); +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); +lean::dec(x_0); +x_9 = lean::string_utf8_byte_size(x_2); +x_10 = lean::mk_nat_obj(1ul); +x_11 = lean::nat_add(x_9, x_10); +lean::dec(x_9); +x_13 = l_String_anyAux___main(x_2, x_6, x_1, x_11, x_4); lean::dec(x_6); -x_10 = l_String_anyAux___main(x_2, x_4, x_1, x_8, x_3); -return x_10; +lean::dec(x_2); +return x_13; } } obj* l_Substring_any___boxed(obj* x_0, obj* x_1) { @@ -4631,11 +4648,10 @@ _start: uint8 x_2; obj* x_3; x_2 = l_Substring_any(x_0, x_1); x_3 = lean::box(x_2); -lean::dec(x_0); return x_3; } } -uint8 l_String_anyAux___main___at_Substring_all___spec__1(obj* x_0, obj* x_1, usize x_2, obj* x_3, usize x_4) { +uint8 l_String_anyAux___main___at_Substring_all___spec__1(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { obj* x_5; uint8 x_6; @@ -4644,91 +4660,99 @@ x_6 = lean::nat_dec_eq(x_3, x_5); if (x_6 == 0) { uint8 x_7; -x_7 = x_4 == x_2; +x_7 = lean::nat_dec_eq(x_4, x_2); if (x_7 == 0) { uint32 x_8; obj* x_9; obj* x_11; uint8 x_12; -x_8 = lean::string_utf8_get_old(x_1, x_4); +x_8 = lean::string_utf8_get(x_1, x_4); x_9 = lean::box_uint32(x_8); lean::inc(x_0); x_11 = lean::apply_1(x_0, x_9); x_12 = lean::unbox(x_11); if (x_12 == 0) { -uint8 x_15; +uint8 x_16; +lean::dec(x_4); lean::dec(x_3); lean::dec(x_0); -x_15 = 1; -return x_15; +x_16 = 1; +return x_16; } else { -obj* x_16; obj* x_17; usize x_19; -x_16 = lean::mk_nat_obj(1ul); -x_17 = lean::nat_sub(x_3, x_16); +obj* x_17; obj* x_18; obj* x_20; +x_17 = lean::mk_nat_obj(1ul); +x_18 = lean::nat_sub(x_3, x_17); lean::dec(x_3); -x_19 = lean::string_utf8_next_old(x_1, x_4); -x_3 = x_17; -x_4 = x_19; +x_20 = lean::string_utf8_next(x_1, x_4); +lean::dec(x_4); +x_3 = x_18; +x_4 = x_20; goto _start; } } else { -uint8 x_23; -lean::dec(x_3); -lean::dec(x_0); -x_23 = 0; -return x_23; -} -} -else -{ uint8 x_26; +lean::dec(x_4); lean::dec(x_3); lean::dec(x_0); x_26 = 0; return x_26; } } +else +{ +uint8 x_30; +lean::dec(x_4); +lean::dec(x_3); +lean::dec(x_0); +x_30 = 0; +return x_30; +} +} } uint8 l_Substring_all(obj* x_0, obj* x_1) { _start: { -obj* x_2; usize x_3; usize x_4; usize x_5; obj* x_6; obj* x_7; obj* x_8; uint8 x_10; +obj* x_2; obj* x_4; obj* x_6; obj* x_9; obj* x_10; obj* x_11; uint8 x_13; x_2 = lean::cnstr_get(x_0, 0); -x_3 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_4 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); -x_5 = lean::string_utf8_byte_size_old(x_2); -x_6 = lean::usize_to_nat(x_5); -x_7 = lean::mk_nat_obj(1ul); -x_8 = lean::nat_add(x_6, x_7); +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); +lean::dec(x_0); +x_9 = lean::string_utf8_byte_size(x_2); +x_10 = lean::mk_nat_obj(1ul); +x_11 = lean::nat_add(x_9, x_10); +lean::dec(x_9); +x_13 = l_String_anyAux___main___at_Substring_all___spec__1(x_1, x_2, x_6, x_11, x_4); lean::dec(x_6); -x_10 = l_String_anyAux___main___at_Substring_all___spec__1(x_1, x_2, x_4, x_8, x_3); -if (x_10 == 0) +lean::dec(x_2); +if (x_13 == 0) { -uint8 x_11; -x_11 = 1; -return x_11; +uint8 x_16; +x_16 = 1; +return x_16; } else { -uint8 x_12; -x_12 = 0; -return x_12; +uint8 x_17; +x_17 = 0; +return x_17; } } } obj* l_String_anyAux___main___at_Substring_all___spec__1___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { -usize x_5; usize x_6; uint8 x_7; obj* x_8; -x_5 = lean::unbox_size_t(x_2); -x_6 = lean::unbox_size_t(x_4); -x_7 = l_String_anyAux___main___at_Substring_all___spec__1(x_0, x_1, x_5, x_3, x_6); -x_8 = lean::box(x_7); +uint8 x_5; obj* x_6; +x_5 = l_String_anyAux___main___at_Substring_all___spec__1(x_0, x_1, x_2, x_3, x_4); +x_6 = lean::box(x_5); lean::dec(x_1); -return x_8; +lean::dec(x_2); +return x_6; } } obj* l_Substring_all___boxed(obj* x_0, obj* x_1) { @@ -4737,11 +4761,10 @@ _start: uint8 x_2; obj* x_3; x_2 = l_Substring_all(x_0, x_1); x_3 = lean::box(x_2); -lean::dec(x_0); return x_3; } } -uint8 l_String_anyAux___main___at_Substring_contains___spec__1(uint32 x_0, obj* x_1, usize x_2, obj* x_3, usize x_4) { +uint8 l_String_anyAux___main___at_Substring_contains___spec__1(uint32 x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { obj* x_5; uint8 x_6; @@ -4750,75 +4773,83 @@ x_6 = lean::nat_dec_eq(x_3, x_5); if (x_6 == 0) { uint8 x_7; -x_7 = x_4 == x_2; +x_7 = lean::nat_dec_eq(x_4, x_2); if (x_7 == 0) { uint32 x_8; uint8 x_9; -x_8 = lean::string_utf8_get_old(x_1, x_4); +x_8 = lean::string_utf8_get(x_1, x_4); x_9 = x_8 == x_0; if (x_9 == 0) { -obj* x_10; obj* x_11; usize x_13; +obj* x_10; obj* x_11; obj* x_13; x_10 = lean::mk_nat_obj(1ul); x_11 = lean::nat_sub(x_3, x_10); lean::dec(x_3); -x_13 = lean::string_utf8_next_old(x_1, x_4); +x_13 = lean::string_utf8_next(x_1, x_4); +lean::dec(x_4); x_3 = x_11; x_4 = x_13; goto _start; } else { -uint8 x_16; -lean::dec(x_3); -x_16 = 1; -return x_16; -} -} -else -{ uint8 x_18; +lean::dec(x_4); lean::dec(x_3); -x_18 = 0; +x_18 = 1; return x_18; } } else { -uint8 x_20; +uint8 x_21; +lean::dec(x_4); lean::dec(x_3); -x_20 = 0; -return x_20; +x_21 = 0; +return x_21; +} +} +else +{ +uint8 x_24; +lean::dec(x_4); +lean::dec(x_3); +x_24 = 0; +return x_24; } } } uint8 l_Substring_contains(obj* x_0, uint32 x_1) { _start: { -obj* x_2; usize x_3; usize x_4; usize x_5; obj* x_6; obj* x_7; obj* x_8; uint8 x_10; +obj* x_2; obj* x_4; obj* x_6; obj* x_9; obj* x_10; obj* x_11; uint8 x_13; x_2 = lean::cnstr_get(x_0, 0); -x_3 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_4 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); -x_5 = lean::string_utf8_byte_size_old(x_2); -x_6 = lean::usize_to_nat(x_5); -x_7 = lean::mk_nat_obj(1ul); -x_8 = lean::nat_add(x_6, x_7); +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); +lean::dec(x_0); +x_9 = lean::string_utf8_byte_size(x_2); +x_10 = lean::mk_nat_obj(1ul); +x_11 = lean::nat_add(x_9, x_10); +lean::dec(x_9); +x_13 = l_String_anyAux___main___at_Substring_contains___spec__1(x_1, x_2, x_6, x_11, x_4); lean::dec(x_6); -x_10 = l_String_anyAux___main___at_Substring_contains___spec__1(x_1, x_2, x_4, x_8, x_3); -return x_10; +lean::dec(x_2); +return x_13; } } obj* l_String_anyAux___main___at_Substring_contains___spec__1___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { -uint32 x_5; usize x_6; usize x_7; uint8 x_8; obj* x_9; +uint32 x_5; uint8 x_6; obj* x_7; x_5 = lean::unbox_uint32(x_0); -x_6 = lean::unbox_size_t(x_2); -x_7 = lean::unbox_size_t(x_4); -x_8 = l_String_anyAux___main___at_Substring_contains___spec__1(x_5, x_1, x_6, x_3, x_7); -x_9 = lean::box(x_8); +x_6 = l_String_anyAux___main___at_Substring_contains___spec__1(x_5, x_1, x_2, x_3, x_4); +x_7 = lean::box(x_6); lean::dec(x_1); -return x_9; +lean::dec(x_2); +return x_7; } } obj* l_Substring_contains___boxed(obj* x_0, obj* x_1) { @@ -4828,11 +4859,10 @@ uint32 x_2; uint8 x_3; obj* x_4; x_2 = lean::unbox_uint32(x_1); x_3 = l_Substring_contains(x_0, x_2); x_4 = lean::box(x_3); -lean::dec(x_0); return x_4; } } -usize l_Substring_takeWhileAux___main(obj* x_0, usize x_1, obj* x_2, obj* x_3, usize x_4) { +obj* l_Substring_takeWhileAux___main(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { obj* x_5; uint8 x_6; @@ -4841,11 +4871,11 @@ x_6 = lean::nat_dec_eq(x_3, x_5); if (x_6 == 0) { uint8 x_7; -x_7 = x_4 == x_1; +x_7 = lean::nat_dec_eq(x_4, x_1); if (x_7 == 0) { uint32 x_8; obj* x_9; obj* x_11; uint8 x_12; -x_8 = lean::string_utf8_get_old(x_0, x_4); +x_8 = lean::string_utf8_get(x_0, x_4); x_9 = lean::box_uint32(x_8); lean::inc(x_2); x_11 = lean::apply_1(x_2, x_9); @@ -4858,11 +4888,12 @@ return x_4; } else { -obj* x_15; obj* x_16; usize x_18; +obj* x_15; obj* x_16; obj* x_18; x_15 = lean::mk_nat_obj(1ul); x_16 = lean::nat_sub(x_3, x_15); lean::dec(x_3); -x_18 = lean::string_utf8_next_old(x_0, x_4); +x_18 = lean::string_utf8_next(x_0, x_4); +lean::dec(x_4); x_3 = x_16; x_4 = x_18; goto _start; @@ -4886,19 +4917,17 @@ return x_4; obj* l_Substring_takeWhileAux___main___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { -usize x_5; usize x_6; usize x_7; obj* x_8; -x_5 = lean::unbox_size_t(x_1); -x_6 = lean::unbox_size_t(x_4); -x_7 = l_Substring_takeWhileAux___main(x_0, x_5, x_2, x_3, x_6); -x_8 = lean::box_size_t(x_7); +obj* x_5; +x_5 = l_Substring_takeWhileAux___main(x_0, x_1, x_2, x_3, x_4); lean::dec(x_0); -return x_8; +lean::dec(x_1); +return x_5; } } -usize l_Substring_takeWhileAux(obj* x_0, usize x_1, obj* x_2, obj* x_3, usize x_4) { +obj* l_Substring_takeWhileAux(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { -usize x_5; +obj* x_5; x_5 = l_Substring_takeWhileAux___main(x_0, x_1, x_2, x_3, x_4); return x_5; } @@ -4906,148 +4935,146 @@ return x_5; obj* l_Substring_takeWhileAux___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { -usize x_5; usize x_6; usize x_7; obj* x_8; -x_5 = lean::unbox_size_t(x_1); -x_6 = lean::unbox_size_t(x_4); -x_7 = l_Substring_takeWhileAux(x_0, x_5, x_2, x_3, x_6); -x_8 = lean::box_size_t(x_7); +obj* x_5; +x_5 = l_Substring_takeWhileAux(x_0, x_1, x_2, x_3, x_4); lean::dec(x_0); -return x_8; +lean::dec(x_1); +return x_5; } } obj* l_Substring_takeWhile___main(obj* x_0, obj* x_1) { _start: { -obj* x_2; usize x_4; usize x_5; obj* x_6; usize x_7; obj* x_8; obj* x_9; obj* x_10; usize x_12; obj* x_13; obj* x_14; obj* x_15; +obj* x_2; obj* x_4; obj* x_6; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_14; obj* x_16; x_2 = lean::cnstr_get(x_0, 0); -x_4 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_5 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); +x_4 = lean::cnstr_get(x_0, 1); +x_6 = lean::cnstr_get(x_0, 2); if (lean::is_exclusive(x_0)) { - x_6 = x_0; + x_8 = x_0; } else { lean::inc(x_2); + lean::inc(x_4); + lean::inc(x_6); lean::dec(x_0); - x_6 = lean::box(0); + x_8 = lean::box(0); } -x_7 = lean::string_utf8_byte_size_old(x_2); -x_8 = lean::usize_to_nat(x_7); -x_9 = lean::mk_nat_obj(1ul); -x_10 = lean::nat_add(x_8, x_9); -lean::dec(x_8); -x_12 = l_Substring_takeWhileAux___main(x_2, x_5, x_1, x_10, x_4); -if (lean::is_scalar(x_6)) { - x_13 = lean::alloc_cnstr(0, 1, sizeof(size_t)*2); +x_9 = lean::string_utf8_byte_size(x_2); +x_10 = lean::mk_nat_obj(1ul); +x_11 = lean::nat_add(x_9, x_10); +lean::dec(x_9); +lean::inc(x_4); +x_14 = l_Substring_takeWhileAux___main(x_2, x_6, x_1, x_11, x_4); +lean::dec(x_6); +if (lean::is_scalar(x_8)) { + x_16 = lean::alloc_cnstr(0, 3, 0); } else { - x_13 = x_6; + x_16 = x_8; } -lean::cnstr_set(x_13, 0, x_2); -lean::cnstr_set_scalar(x_13, sizeof(void*)*1, x_4); -x_14 = x_13; -lean::cnstr_set_scalar(x_14, sizeof(void*)*2, x_12); -x_15 = x_14; -return x_15; +lean::cnstr_set(x_16, 0, x_2); +lean::cnstr_set(x_16, 1, x_4); +lean::cnstr_set(x_16, 2, x_14); +return x_16; } } obj* l_Substring_takeWhile(obj* x_0, obj* x_1) { _start: { -obj* x_2; usize x_4; usize x_5; obj* x_6; usize x_7; obj* x_8; obj* x_9; obj* x_10; usize x_12; obj* x_13; obj* x_14; obj* x_15; +obj* x_2; obj* x_4; obj* x_6; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_14; obj* x_16; x_2 = lean::cnstr_get(x_0, 0); -x_4 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_5 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); +x_4 = lean::cnstr_get(x_0, 1); +x_6 = lean::cnstr_get(x_0, 2); if (lean::is_exclusive(x_0)) { - x_6 = x_0; + x_8 = x_0; } else { lean::inc(x_2); + lean::inc(x_4); + lean::inc(x_6); lean::dec(x_0); - x_6 = lean::box(0); + x_8 = lean::box(0); } -x_7 = lean::string_utf8_byte_size_old(x_2); -x_8 = lean::usize_to_nat(x_7); -x_9 = lean::mk_nat_obj(1ul); -x_10 = lean::nat_add(x_8, x_9); -lean::dec(x_8); -x_12 = l_Substring_takeWhileAux___main(x_2, x_5, x_1, x_10, x_4); -if (lean::is_scalar(x_6)) { - x_13 = lean::alloc_cnstr(0, 1, sizeof(size_t)*2); +x_9 = lean::string_utf8_byte_size(x_2); +x_10 = lean::mk_nat_obj(1ul); +x_11 = lean::nat_add(x_9, x_10); +lean::dec(x_9); +lean::inc(x_4); +x_14 = l_Substring_takeWhileAux___main(x_2, x_6, x_1, x_11, x_4); +lean::dec(x_6); +if (lean::is_scalar(x_8)) { + x_16 = lean::alloc_cnstr(0, 3, 0); } else { - x_13 = x_6; + x_16 = x_8; } -lean::cnstr_set(x_13, 0, x_2); -lean::cnstr_set_scalar(x_13, sizeof(void*)*1, x_4); -x_14 = x_13; -lean::cnstr_set_scalar(x_14, sizeof(void*)*2, x_12); -x_15 = x_14; -return x_15; +lean::cnstr_set(x_16, 0, x_2); +lean::cnstr_set(x_16, 1, x_4); +lean::cnstr_set(x_16, 2, x_14); +return x_16; } } obj* l_Substring_dropWhile___main(obj* x_0, obj* x_1) { _start: { -obj* x_2; usize x_4; usize x_5; obj* x_6; usize x_7; obj* x_8; obj* x_9; obj* x_10; usize x_12; obj* x_13; obj* x_14; obj* x_15; +obj* x_2; obj* x_4; obj* x_6; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_13; obj* x_14; x_2 = lean::cnstr_get(x_0, 0); -x_4 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_5 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); +x_4 = lean::cnstr_get(x_0, 1); +x_6 = lean::cnstr_get(x_0, 2); if (lean::is_exclusive(x_0)) { - x_6 = x_0; + x_8 = x_0; } else { lean::inc(x_2); + lean::inc(x_4); + lean::inc(x_6); lean::dec(x_0); - x_6 = lean::box(0); + x_8 = lean::box(0); } -x_7 = lean::string_utf8_byte_size_old(x_2); -x_8 = lean::usize_to_nat(x_7); -x_9 = lean::mk_nat_obj(1ul); -x_10 = lean::nat_add(x_8, x_9); -lean::dec(x_8); -x_12 = l_Substring_takeWhileAux___main(x_2, x_5, x_1, x_10, x_4); -if (lean::is_scalar(x_6)) { - x_13 = lean::alloc_cnstr(0, 1, sizeof(size_t)*2); +x_9 = lean::string_utf8_byte_size(x_2); +x_10 = lean::mk_nat_obj(1ul); +x_11 = lean::nat_add(x_9, x_10); +lean::dec(x_9); +x_13 = l_Substring_takeWhileAux___main(x_2, x_6, x_1, x_11, x_4); +if (lean::is_scalar(x_8)) { + x_14 = lean::alloc_cnstr(0, 3, 0); } else { - x_13 = x_6; + x_14 = x_8; } -lean::cnstr_set(x_13, 0, x_2); -lean::cnstr_set_scalar(x_13, sizeof(void*)*1, x_12); -x_14 = x_13; -lean::cnstr_set_scalar(x_14, sizeof(void*)*2, x_5); -x_15 = x_14; -return x_15; +lean::cnstr_set(x_14, 0, x_2); +lean::cnstr_set(x_14, 1, x_13); +lean::cnstr_set(x_14, 2, x_6); +return x_14; } } obj* l_Substring_dropWhile(obj* x_0, obj* x_1) { _start: { -obj* x_2; usize x_4; usize x_5; obj* x_6; usize x_7; obj* x_8; obj* x_9; obj* x_10; usize x_12; obj* x_13; obj* x_14; obj* x_15; +obj* x_2; obj* x_4; obj* x_6; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_13; obj* x_14; x_2 = lean::cnstr_get(x_0, 0); -x_4 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_5 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); +x_4 = lean::cnstr_get(x_0, 1); +x_6 = lean::cnstr_get(x_0, 2); if (lean::is_exclusive(x_0)) { - x_6 = x_0; + x_8 = x_0; } else { lean::inc(x_2); + lean::inc(x_4); + lean::inc(x_6); lean::dec(x_0); - x_6 = lean::box(0); + x_8 = lean::box(0); } -x_7 = lean::string_utf8_byte_size_old(x_2); -x_8 = lean::usize_to_nat(x_7); -x_9 = lean::mk_nat_obj(1ul); -x_10 = lean::nat_add(x_8, x_9); -lean::dec(x_8); -x_12 = l_Substring_takeWhileAux___main(x_2, x_5, x_1, x_10, x_4); -if (lean::is_scalar(x_6)) { - x_13 = lean::alloc_cnstr(0, 1, sizeof(size_t)*2); +x_9 = lean::string_utf8_byte_size(x_2); +x_10 = lean::mk_nat_obj(1ul); +x_11 = lean::nat_add(x_9, x_10); +lean::dec(x_9); +x_13 = l_Substring_takeWhileAux___main(x_2, x_6, x_1, x_11, x_4); +if (lean::is_scalar(x_8)) { + x_14 = lean::alloc_cnstr(0, 3, 0); } else { - x_13 = x_6; + x_14 = x_8; } -lean::cnstr_set(x_13, 0, x_2); -lean::cnstr_set_scalar(x_13, sizeof(void*)*1, x_12); -x_14 = x_13; -lean::cnstr_set_scalar(x_14, sizeof(void*)*2, x_5); -x_15 = x_14; -return x_15; +lean::cnstr_set(x_14, 0, x_2); +lean::cnstr_set(x_14, 1, x_13); +lean::cnstr_set(x_14, 2, x_6); +return x_14; } } -usize l_Substring_takeRightWhileAux___main(obj* x_0, usize x_1, obj* x_2, obj* x_3, usize x_4) { +obj* l_Substring_takeRightWhileAux___main(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { obj* x_5; uint8 x_6; @@ -5056,29 +5083,31 @@ x_6 = lean::nat_dec_eq(x_3, x_5); if (x_6 == 0) { uint8 x_7; -x_7 = x_4 == x_1; +x_7 = lean::nat_dec_eq(x_4, x_1); if (x_7 == 0) { -usize x_8; uint32 x_9; obj* x_10; obj* x_12; uint8 x_13; -x_8 = lean::string_utf8_prev_old(x_0, x_4); -x_9 = lean::string_utf8_get_old(x_0, x_8); +obj* x_8; uint32 x_9; obj* x_10; obj* x_12; uint8 x_13; +x_8 = lean::string_utf8_prev(x_0, x_4); +x_9 = lean::string_utf8_get(x_0, x_8); x_10 = lean::box_uint32(x_9); lean::inc(x_2); x_12 = lean::apply_1(x_2, x_10); x_13 = lean::unbox(x_12); if (x_13 == 0) { +lean::dec(x_8); lean::dec(x_3); lean::dec(x_2); return x_4; } else { -obj* x_16; obj* x_17; -x_16 = lean::mk_nat_obj(1ul); -x_17 = lean::nat_sub(x_3, x_16); +obj* x_18; obj* x_19; +lean::dec(x_4); +x_18 = lean::mk_nat_obj(1ul); +x_19 = lean::nat_sub(x_3, x_18); lean::dec(x_3); -x_3 = x_17; +x_3 = x_19; x_4 = x_8; goto _start; } @@ -5092,8 +5121,10 @@ return x_4; } else { +lean::dec(x_4); lean::dec(x_3); lean::dec(x_2); +lean::inc(x_1); return x_1; } } @@ -5101,19 +5132,17 @@ return x_1; obj* l_Substring_takeRightWhileAux___main___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { -usize x_5; usize x_6; usize x_7; obj* x_8; -x_5 = lean::unbox_size_t(x_1); -x_6 = lean::unbox_size_t(x_4); -x_7 = l_Substring_takeRightWhileAux___main(x_0, x_5, x_2, x_3, x_6); -x_8 = lean::box_size_t(x_7); +obj* x_5; +x_5 = l_Substring_takeRightWhileAux___main(x_0, x_1, x_2, x_3, x_4); lean::dec(x_0); -return x_8; +lean::dec(x_1); +return x_5; } } -usize l_Substring_takeRightWhileAux(obj* x_0, usize x_1, obj* x_2, obj* x_3, usize x_4) { +obj* l_Substring_takeRightWhileAux(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { -usize x_5; +obj* x_5; x_5 = l_Substring_takeRightWhileAux___main(x_0, x_1, x_2, x_3, x_4); return x_5; } @@ -5121,148 +5150,146 @@ return x_5; obj* l_Substring_takeRightWhileAux___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { -usize x_5; usize x_6; usize x_7; obj* x_8; -x_5 = lean::unbox_size_t(x_1); -x_6 = lean::unbox_size_t(x_4); -x_7 = l_Substring_takeRightWhileAux(x_0, x_5, x_2, x_3, x_6); -x_8 = lean::box_size_t(x_7); +obj* x_5; +x_5 = l_Substring_takeRightWhileAux(x_0, x_1, x_2, x_3, x_4); lean::dec(x_0); -return x_8; +lean::dec(x_1); +return x_5; } } obj* l_Substring_takeRightWhile___main(obj* x_0, obj* x_1) { _start: { -obj* x_2; usize x_4; usize x_5; obj* x_6; usize x_7; obj* x_8; obj* x_9; obj* x_10; usize x_12; obj* x_13; obj* x_14; obj* x_15; +obj* x_2; obj* x_4; obj* x_6; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_14; obj* x_16; x_2 = lean::cnstr_get(x_0, 0); -x_4 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_5 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); +x_4 = lean::cnstr_get(x_0, 1); +x_6 = lean::cnstr_get(x_0, 2); if (lean::is_exclusive(x_0)) { - x_6 = x_0; + x_8 = x_0; } else { lean::inc(x_2); + lean::inc(x_4); + lean::inc(x_6); lean::dec(x_0); - x_6 = lean::box(0); + x_8 = lean::box(0); } -x_7 = lean::string_utf8_byte_size_old(x_2); -x_8 = lean::usize_to_nat(x_7); -x_9 = lean::mk_nat_obj(1ul); -x_10 = lean::nat_add(x_8, x_9); -lean::dec(x_8); -x_12 = l_Substring_takeRightWhileAux___main(x_2, x_4, x_1, x_10, x_5); -if (lean::is_scalar(x_6)) { - x_13 = lean::alloc_cnstr(0, 1, sizeof(size_t)*2); +x_9 = lean::string_utf8_byte_size(x_2); +x_10 = lean::mk_nat_obj(1ul); +x_11 = lean::nat_add(x_9, x_10); +lean::dec(x_9); +lean::inc(x_6); +x_14 = l_Substring_takeRightWhileAux___main(x_2, x_4, x_1, x_11, x_6); +lean::dec(x_4); +if (lean::is_scalar(x_8)) { + x_16 = lean::alloc_cnstr(0, 3, 0); } else { - x_13 = x_6; + x_16 = x_8; } -lean::cnstr_set(x_13, 0, x_2); -lean::cnstr_set_scalar(x_13, sizeof(void*)*1, x_12); -x_14 = x_13; -lean::cnstr_set_scalar(x_14, sizeof(void*)*2, x_5); -x_15 = x_14; -return x_15; +lean::cnstr_set(x_16, 0, x_2); +lean::cnstr_set(x_16, 1, x_14); +lean::cnstr_set(x_16, 2, x_6); +return x_16; } } obj* l_Substring_takeRightWhile(obj* x_0, obj* x_1) { _start: { -obj* x_2; usize x_4; usize x_5; obj* x_6; usize x_7; obj* x_8; obj* x_9; obj* x_10; usize x_12; obj* x_13; obj* x_14; obj* x_15; +obj* x_2; obj* x_4; obj* x_6; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_14; obj* x_16; x_2 = lean::cnstr_get(x_0, 0); -x_4 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_5 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); +x_4 = lean::cnstr_get(x_0, 1); +x_6 = lean::cnstr_get(x_0, 2); if (lean::is_exclusive(x_0)) { - x_6 = x_0; + x_8 = x_0; } else { lean::inc(x_2); + lean::inc(x_4); + lean::inc(x_6); lean::dec(x_0); - x_6 = lean::box(0); + x_8 = lean::box(0); } -x_7 = lean::string_utf8_byte_size_old(x_2); -x_8 = lean::usize_to_nat(x_7); -x_9 = lean::mk_nat_obj(1ul); -x_10 = lean::nat_add(x_8, x_9); -lean::dec(x_8); -x_12 = l_Substring_takeRightWhileAux___main(x_2, x_4, x_1, x_10, x_5); -if (lean::is_scalar(x_6)) { - x_13 = lean::alloc_cnstr(0, 1, sizeof(size_t)*2); +x_9 = lean::string_utf8_byte_size(x_2); +x_10 = lean::mk_nat_obj(1ul); +x_11 = lean::nat_add(x_9, x_10); +lean::dec(x_9); +lean::inc(x_6); +x_14 = l_Substring_takeRightWhileAux___main(x_2, x_4, x_1, x_11, x_6); +lean::dec(x_4); +if (lean::is_scalar(x_8)) { + x_16 = lean::alloc_cnstr(0, 3, 0); } else { - x_13 = x_6; + x_16 = x_8; } -lean::cnstr_set(x_13, 0, x_2); -lean::cnstr_set_scalar(x_13, sizeof(void*)*1, x_12); -x_14 = x_13; -lean::cnstr_set_scalar(x_14, sizeof(void*)*2, x_5); -x_15 = x_14; -return x_15; +lean::cnstr_set(x_16, 0, x_2); +lean::cnstr_set(x_16, 1, x_14); +lean::cnstr_set(x_16, 2, x_6); +return x_16; } } obj* l_Substring_dropRightWhile___main(obj* x_0, obj* x_1) { _start: { -obj* x_2; usize x_4; usize x_5; obj* x_6; usize x_7; obj* x_8; obj* x_9; obj* x_10; usize x_12; obj* x_13; obj* x_14; obj* x_15; +obj* x_2; obj* x_4; obj* x_6; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_13; obj* x_14; x_2 = lean::cnstr_get(x_0, 0); -x_4 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_5 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); +x_4 = lean::cnstr_get(x_0, 1); +x_6 = lean::cnstr_get(x_0, 2); if (lean::is_exclusive(x_0)) { - x_6 = x_0; + x_8 = x_0; } else { lean::inc(x_2); + lean::inc(x_4); + lean::inc(x_6); lean::dec(x_0); - x_6 = lean::box(0); + x_8 = lean::box(0); } -x_7 = lean::string_utf8_byte_size_old(x_2); -x_8 = lean::usize_to_nat(x_7); -x_9 = lean::mk_nat_obj(1ul); -x_10 = lean::nat_add(x_8, x_9); -lean::dec(x_8); -x_12 = l_Substring_takeRightWhileAux___main(x_2, x_4, x_1, x_10, x_5); -if (lean::is_scalar(x_6)) { - x_13 = lean::alloc_cnstr(0, 1, sizeof(size_t)*2); +x_9 = lean::string_utf8_byte_size(x_2); +x_10 = lean::mk_nat_obj(1ul); +x_11 = lean::nat_add(x_9, x_10); +lean::dec(x_9); +x_13 = l_Substring_takeRightWhileAux___main(x_2, x_4, x_1, x_11, x_6); +if (lean::is_scalar(x_8)) { + x_14 = lean::alloc_cnstr(0, 3, 0); } else { - x_13 = x_6; + x_14 = x_8; } -lean::cnstr_set(x_13, 0, x_2); -lean::cnstr_set_scalar(x_13, sizeof(void*)*1, x_4); -x_14 = x_13; -lean::cnstr_set_scalar(x_14, sizeof(void*)*2, x_12); -x_15 = x_14; -return x_15; +lean::cnstr_set(x_14, 0, x_2); +lean::cnstr_set(x_14, 1, x_4); +lean::cnstr_set(x_14, 2, x_13); +return x_14; } } obj* l_Substring_dropRightWhile(obj* x_0, obj* x_1) { _start: { -obj* x_2; usize x_4; usize x_5; obj* x_6; usize x_7; obj* x_8; obj* x_9; obj* x_10; usize x_12; obj* x_13; obj* x_14; obj* x_15; +obj* x_2; obj* x_4; obj* x_6; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_13; obj* x_14; x_2 = lean::cnstr_get(x_0, 0); -x_4 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_5 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); +x_4 = lean::cnstr_get(x_0, 1); +x_6 = lean::cnstr_get(x_0, 2); if (lean::is_exclusive(x_0)) { - x_6 = x_0; + x_8 = x_0; } else { lean::inc(x_2); + lean::inc(x_4); + lean::inc(x_6); lean::dec(x_0); - x_6 = lean::box(0); + x_8 = lean::box(0); } -x_7 = lean::string_utf8_byte_size_old(x_2); -x_8 = lean::usize_to_nat(x_7); -x_9 = lean::mk_nat_obj(1ul); -x_10 = lean::nat_add(x_8, x_9); -lean::dec(x_8); -x_12 = l_Substring_takeRightWhileAux___main(x_2, x_4, x_1, x_10, x_5); -if (lean::is_scalar(x_6)) { - x_13 = lean::alloc_cnstr(0, 1, sizeof(size_t)*2); +x_9 = lean::string_utf8_byte_size(x_2); +x_10 = lean::mk_nat_obj(1ul); +x_11 = lean::nat_add(x_9, x_10); +lean::dec(x_9); +x_13 = l_Substring_takeRightWhileAux___main(x_2, x_4, x_1, x_11, x_6); +if (lean::is_scalar(x_8)) { + x_14 = lean::alloc_cnstr(0, 3, 0); } else { - x_13 = x_6; + x_14 = x_8; } -lean::cnstr_set(x_13, 0, x_2); -lean::cnstr_set_scalar(x_13, sizeof(void*)*1, x_4); -x_14 = x_13; -lean::cnstr_set_scalar(x_14, sizeof(void*)*2, x_12); -x_15 = x_14; -return x_15; +lean::cnstr_set(x_14, 0, x_2); +lean::cnstr_set(x_14, 1, x_4); +lean::cnstr_set(x_14, 2, x_13); +return x_14; } } -usize l_Substring_takeWhileAux___main___at_Substring_trimLeft___spec__1(obj* x_0, usize x_1, obj* x_2, usize x_3) { +obj* l_Substring_takeWhileAux___main___at_Substring_trimLeft___spec__1(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { obj* x_4; uint8 x_5; @@ -5271,11 +5298,11 @@ x_5 = lean::nat_dec_eq(x_2, x_4); if (x_5 == 0) { uint8 x_6; -x_6 = x_3 == x_1; +x_6 = lean::nat_dec_eq(x_3, x_1); if (x_6 == 0) { uint32 x_7; uint8 x_8; -x_7 = lean::string_utf8_get_old(x_0, x_3); +x_7 = lean::string_utf8_get(x_0, x_3); x_8 = l_Char_isWhitespace(x_7); if (x_8 == 0) { @@ -5284,11 +5311,12 @@ return x_3; } else { -obj* x_10; obj* x_11; usize x_13; +obj* x_10; obj* x_11; obj* x_13; x_10 = lean::mk_nat_obj(1ul); x_11 = lean::nat_sub(x_2, x_10); lean::dec(x_2); -x_13 = lean::string_utf8_next_old(x_0, x_3); +x_13 = lean::string_utf8_next(x_0, x_3); +lean::dec(x_3); x_2 = x_11; x_3 = x_13; goto _start; @@ -5310,49 +5338,46 @@ return x_3; obj* l_Substring_trimLeft(obj* x_0) { _start: { -obj* x_1; usize x_3; usize x_4; obj* x_5; usize x_6; obj* x_7; obj* x_8; obj* x_9; usize x_11; obj* x_12; obj* x_13; obj* x_14; +obj* x_1; obj* x_3; obj* x_5; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_12; obj* x_13; x_1 = lean::cnstr_get(x_0, 0); -x_3 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_4 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); +x_3 = lean::cnstr_get(x_0, 1); +x_5 = lean::cnstr_get(x_0, 2); if (lean::is_exclusive(x_0)) { - x_5 = x_0; + x_7 = x_0; } else { lean::inc(x_1); + lean::inc(x_3); + lean::inc(x_5); lean::dec(x_0); - x_5 = lean::box(0); + x_7 = lean::box(0); } -x_6 = lean::string_utf8_byte_size_old(x_1); -x_7 = lean::usize_to_nat(x_6); -x_8 = lean::mk_nat_obj(1ul); -x_9 = lean::nat_add(x_7, x_8); -lean::dec(x_7); -x_11 = l_Substring_takeWhileAux___main___at_Substring_trimLeft___spec__1(x_1, x_4, x_9, x_3); -if (lean::is_scalar(x_5)) { - x_12 = lean::alloc_cnstr(0, 1, sizeof(size_t)*2); +x_8 = lean::string_utf8_byte_size(x_1); +x_9 = lean::mk_nat_obj(1ul); +x_10 = lean::nat_add(x_8, x_9); +lean::dec(x_8); +x_12 = l_Substring_takeWhileAux___main___at_Substring_trimLeft___spec__1(x_1, x_5, x_10, x_3); +if (lean::is_scalar(x_7)) { + x_13 = lean::alloc_cnstr(0, 3, 0); } else { - x_12 = x_5; + x_13 = x_7; } -lean::cnstr_set(x_12, 0, x_1); -lean::cnstr_set_scalar(x_12, sizeof(void*)*1, x_11); -x_13 = x_12; -lean::cnstr_set_scalar(x_13, sizeof(void*)*2, x_4); -x_14 = x_13; -return x_14; +lean::cnstr_set(x_13, 0, x_1); +lean::cnstr_set(x_13, 1, x_12); +lean::cnstr_set(x_13, 2, x_5); +return x_13; } } obj* l_Substring_takeWhileAux___main___at_Substring_trimLeft___spec__1___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { -usize x_4; usize x_5; usize x_6; obj* x_7; -x_4 = lean::unbox_size_t(x_1); -x_5 = lean::unbox_size_t(x_3); -x_6 = l_Substring_takeWhileAux___main___at_Substring_trimLeft___spec__1(x_0, x_4, x_2, x_5); -x_7 = lean::box_size_t(x_6); +obj* x_4; +x_4 = l_Substring_takeWhileAux___main___at_Substring_trimLeft___spec__1(x_0, x_1, x_2, x_3); lean::dec(x_0); -return x_7; +lean::dec(x_1); +return x_4; } } -usize l_Substring_takeRightWhileAux___main___at_Substring_trimRight___spec__1(obj* x_0, usize x_1, obj* x_2, usize x_3) { +obj* l_Substring_takeRightWhileAux___main___at_Substring_trimRight___spec__1(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { obj* x_4; uint8 x_5; @@ -5361,25 +5386,27 @@ x_5 = lean::nat_dec_eq(x_2, x_4); if (x_5 == 0) { uint8 x_6; -x_6 = x_3 == x_1; +x_6 = lean::nat_dec_eq(x_3, x_1); if (x_6 == 0) { -usize x_7; uint32 x_8; uint8 x_9; -x_7 = lean::string_utf8_prev_old(x_0, x_3); -x_8 = lean::string_utf8_get_old(x_0, x_7); +obj* x_7; uint32 x_8; uint8 x_9; +x_7 = lean::string_utf8_prev(x_0, x_3); +x_8 = lean::string_utf8_get(x_0, x_7); x_9 = l_Char_isWhitespace(x_8); if (x_9 == 0) { +lean::dec(x_7); lean::dec(x_2); return x_3; } else { -obj* x_11; obj* x_12; -x_11 = lean::mk_nat_obj(1ul); -x_12 = lean::nat_sub(x_2, x_11); +obj* x_13; obj* x_14; +lean::dec(x_3); +x_13 = lean::mk_nat_obj(1ul); +x_14 = lean::nat_sub(x_2, x_13); lean::dec(x_2); -x_2 = x_12; +x_2 = x_14; x_3 = x_7; goto _start; } @@ -5392,7 +5419,9 @@ return x_3; } else { +lean::dec(x_3); lean::dec(x_2); +lean::inc(x_1); return x_1; } } @@ -5400,49 +5429,46 @@ return x_1; obj* l_Substring_trimRight(obj* x_0) { _start: { -obj* x_1; usize x_3; usize x_4; obj* x_5; usize x_6; obj* x_7; obj* x_8; obj* x_9; usize x_11; obj* x_12; obj* x_13; obj* x_14; +obj* x_1; obj* x_3; obj* x_5; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_12; obj* x_13; x_1 = lean::cnstr_get(x_0, 0); -x_3 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_4 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); +x_3 = lean::cnstr_get(x_0, 1); +x_5 = lean::cnstr_get(x_0, 2); if (lean::is_exclusive(x_0)) { - x_5 = x_0; + x_7 = x_0; } else { lean::inc(x_1); + lean::inc(x_3); + lean::inc(x_5); lean::dec(x_0); - x_5 = lean::box(0); + x_7 = lean::box(0); } -x_6 = lean::string_utf8_byte_size_old(x_1); -x_7 = lean::usize_to_nat(x_6); -x_8 = lean::mk_nat_obj(1ul); -x_9 = lean::nat_add(x_7, x_8); -lean::dec(x_7); -x_11 = l_Substring_takeRightWhileAux___main___at_Substring_trimRight___spec__1(x_1, x_3, x_9, x_4); -if (lean::is_scalar(x_5)) { - x_12 = lean::alloc_cnstr(0, 1, sizeof(size_t)*2); +x_8 = lean::string_utf8_byte_size(x_1); +x_9 = lean::mk_nat_obj(1ul); +x_10 = lean::nat_add(x_8, x_9); +lean::dec(x_8); +x_12 = l_Substring_takeRightWhileAux___main___at_Substring_trimRight___spec__1(x_1, x_3, x_10, x_5); +if (lean::is_scalar(x_7)) { + x_13 = lean::alloc_cnstr(0, 3, 0); } else { - x_12 = x_5; + x_13 = x_7; } -lean::cnstr_set(x_12, 0, x_1); -lean::cnstr_set_scalar(x_12, sizeof(void*)*1, x_3); -x_13 = x_12; -lean::cnstr_set_scalar(x_13, sizeof(void*)*2, x_11); -x_14 = x_13; -return x_14; +lean::cnstr_set(x_13, 0, x_1); +lean::cnstr_set(x_13, 1, x_3); +lean::cnstr_set(x_13, 2, x_12); +return x_13; } } obj* l_Substring_takeRightWhileAux___main___at_Substring_trimRight___spec__1___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { -usize x_4; usize x_5; usize x_6; obj* x_7; -x_4 = lean::unbox_size_t(x_1); -x_5 = lean::unbox_size_t(x_3); -x_6 = l_Substring_takeRightWhileAux___main___at_Substring_trimRight___spec__1(x_0, x_4, x_2, x_5); -x_7 = lean::box_size_t(x_6); +obj* x_4; +x_4 = l_Substring_takeRightWhileAux___main___at_Substring_trimRight___spec__1(x_0, x_1, x_2, x_3); lean::dec(x_0); -return x_7; +lean::dec(x_1); +return x_4; } } -usize l_Substring_takeWhileAux___main___at_Substring_trim___main___spec__1(obj* x_0, usize x_1, obj* x_2, usize x_3) { +obj* l_Substring_takeWhileAux___main___at_Substring_trim___main___spec__1(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { obj* x_4; uint8 x_5; @@ -5451,11 +5477,11 @@ x_5 = lean::nat_dec_eq(x_2, x_4); if (x_5 == 0) { uint8 x_6; -x_6 = x_3 == x_1; +x_6 = lean::nat_dec_eq(x_3, x_1); if (x_6 == 0) { uint32 x_7; uint8 x_8; -x_7 = lean::string_utf8_get_old(x_0, x_3); +x_7 = lean::string_utf8_get(x_0, x_3); x_8 = l_Char_isWhitespace(x_7); if (x_8 == 0) { @@ -5464,11 +5490,12 @@ return x_3; } else { -obj* x_10; obj* x_11; usize x_13; +obj* x_10; obj* x_11; obj* x_13; x_10 = lean::mk_nat_obj(1ul); x_11 = lean::nat_sub(x_2, x_10); lean::dec(x_2); -x_13 = lean::string_utf8_next_old(x_0, x_3); +x_13 = lean::string_utf8_next(x_0, x_3); +lean::dec(x_3); x_2 = x_11; x_3 = x_13; goto _start; @@ -5487,7 +5514,7 @@ return x_3; } } } -usize l_Substring_takeRightWhileAux___main___at_Substring_trim___main___spec__2(obj* x_0, usize x_1, obj* x_2, usize x_3) { +obj* l_Substring_takeRightWhileAux___main___at_Substring_trim___main___spec__2(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { obj* x_4; uint8 x_5; @@ -5496,25 +5523,27 @@ x_5 = lean::nat_dec_eq(x_2, x_4); if (x_5 == 0) { uint8 x_6; -x_6 = x_3 == x_1; +x_6 = lean::nat_dec_eq(x_3, x_1); if (x_6 == 0) { -usize x_7; uint32 x_8; uint8 x_9; -x_7 = lean::string_utf8_prev_old(x_0, x_3); -x_8 = lean::string_utf8_get_old(x_0, x_7); +obj* x_7; uint32 x_8; uint8 x_9; +x_7 = lean::string_utf8_prev(x_0, x_3); +x_8 = lean::string_utf8_get(x_0, x_7); x_9 = l_Char_isWhitespace(x_8); if (x_9 == 0) { +lean::dec(x_7); lean::dec(x_2); return x_3; } else { -obj* x_11; obj* x_12; -x_11 = lean::mk_nat_obj(1ul); -x_12 = lean::nat_sub(x_2, x_11); +obj* x_13; obj* x_14; +lean::dec(x_3); +x_13 = lean::mk_nat_obj(1ul); +x_14 = lean::nat_sub(x_2, x_13); lean::dec(x_2); -x_2 = x_12; +x_2 = x_14; x_3 = x_7; goto _start; } @@ -5527,7 +5556,9 @@ return x_3; } else { +lean::dec(x_3); lean::dec(x_2); +lean::inc(x_1); return x_1; } } @@ -5535,63 +5566,58 @@ return x_1; obj* l_Substring_trim___main(obj* x_0) { _start: { -obj* x_1; usize x_3; usize x_4; obj* x_5; usize x_6; obj* x_7; obj* x_8; obj* x_9; usize x_12; usize x_13; obj* x_14; obj* x_15; obj* x_16; +obj* x_1; obj* x_3; obj* x_5; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_13; obj* x_14; obj* x_15; x_1 = lean::cnstr_get(x_0, 0); -x_3 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_4 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); +x_3 = lean::cnstr_get(x_0, 1); +x_5 = lean::cnstr_get(x_0, 2); if (lean::is_exclusive(x_0)) { - x_5 = x_0; + x_7 = x_0; } else { lean::inc(x_1); + lean::inc(x_3); + lean::inc(x_5); lean::dec(x_0); - x_5 = lean::box(0); + x_7 = lean::box(0); } -x_6 = lean::string_utf8_byte_size_old(x_1); -x_7 = lean::usize_to_nat(x_6); -x_8 = lean::mk_nat_obj(1ul); -x_9 = lean::nat_add(x_7, x_8); -lean::dec(x_7); -lean::inc(x_9); -x_12 = l_Substring_takeWhileAux___main___at_Substring_trim___main___spec__1(x_1, x_4, x_9, x_3); -x_13 = l_Substring_takeRightWhileAux___main___at_Substring_trim___main___spec__2(x_1, x_12, x_9, x_4); -if (lean::is_scalar(x_5)) { - x_14 = lean::alloc_cnstr(0, 1, sizeof(size_t)*2); +x_8 = lean::string_utf8_byte_size(x_1); +x_9 = lean::mk_nat_obj(1ul); +x_10 = lean::nat_add(x_8, x_9); +lean::dec(x_8); +lean::inc(x_10); +x_13 = l_Substring_takeWhileAux___main___at_Substring_trim___main___spec__1(x_1, x_5, x_10, x_3); +x_14 = l_Substring_takeRightWhileAux___main___at_Substring_trim___main___spec__2(x_1, x_13, x_10, x_5); +if (lean::is_scalar(x_7)) { + x_15 = lean::alloc_cnstr(0, 3, 0); } else { - x_14 = x_5; + x_15 = x_7; } -lean::cnstr_set(x_14, 0, x_1); -lean::cnstr_set_scalar(x_14, sizeof(void*)*1, x_12); -x_15 = x_14; -lean::cnstr_set_scalar(x_15, sizeof(void*)*2, x_13); -x_16 = x_15; -return x_16; +lean::cnstr_set(x_15, 0, x_1); +lean::cnstr_set(x_15, 1, x_13); +lean::cnstr_set(x_15, 2, x_14); +return x_15; } } obj* l_Substring_takeWhileAux___main___at_Substring_trim___main___spec__1___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { -usize x_4; usize x_5; usize x_6; obj* x_7; -x_4 = lean::unbox_size_t(x_1); -x_5 = lean::unbox_size_t(x_3); -x_6 = l_Substring_takeWhileAux___main___at_Substring_trim___main___spec__1(x_0, x_4, x_2, x_5); -x_7 = lean::box_size_t(x_6); +obj* x_4; +x_4 = l_Substring_takeWhileAux___main___at_Substring_trim___main___spec__1(x_0, x_1, x_2, x_3); lean::dec(x_0); -return x_7; +lean::dec(x_1); +return x_4; } } obj* l_Substring_takeRightWhileAux___main___at_Substring_trim___main___spec__2___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { -usize x_4; usize x_5; usize x_6; obj* x_7; -x_4 = lean::unbox_size_t(x_1); -x_5 = lean::unbox_size_t(x_3); -x_6 = l_Substring_takeRightWhileAux___main___at_Substring_trim___main___spec__2(x_0, x_4, x_2, x_5); -x_7 = lean::box_size_t(x_6); +obj* x_4; +x_4 = l_Substring_takeRightWhileAux___main___at_Substring_trim___main___spec__2(x_0, x_1, x_2, x_3); lean::dec(x_0); -return x_7; +lean::dec(x_1); +return x_4; } } -usize l_Substring_takeWhileAux___main___at_Substring_trim___spec__1(obj* x_0, usize x_1, obj* x_2, usize x_3) { +obj* l_Substring_takeWhileAux___main___at_Substring_trim___spec__1(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { obj* x_4; uint8 x_5; @@ -5600,11 +5626,11 @@ x_5 = lean::nat_dec_eq(x_2, x_4); if (x_5 == 0) { uint8 x_6; -x_6 = x_3 == x_1; +x_6 = lean::nat_dec_eq(x_3, x_1); if (x_6 == 0) { uint32 x_7; uint8 x_8; -x_7 = lean::string_utf8_get_old(x_0, x_3); +x_7 = lean::string_utf8_get(x_0, x_3); x_8 = l_Char_isWhitespace(x_7); if (x_8 == 0) { @@ -5613,11 +5639,12 @@ return x_3; } else { -obj* x_10; obj* x_11; usize x_13; +obj* x_10; obj* x_11; obj* x_13; x_10 = lean::mk_nat_obj(1ul); x_11 = lean::nat_sub(x_2, x_10); lean::dec(x_2); -x_13 = lean::string_utf8_next_old(x_0, x_3); +x_13 = lean::string_utf8_next(x_0, x_3); +lean::dec(x_3); x_2 = x_11; x_3 = x_13; goto _start; @@ -5636,7 +5663,7 @@ return x_3; } } } -usize l_Substring_takeRightWhileAux___main___at_Substring_trim___spec__2(obj* x_0, usize x_1, obj* x_2, usize x_3) { +obj* l_Substring_takeRightWhileAux___main___at_Substring_trim___spec__2(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { obj* x_4; uint8 x_5; @@ -5645,25 +5672,27 @@ x_5 = lean::nat_dec_eq(x_2, x_4); if (x_5 == 0) { uint8 x_6; -x_6 = x_3 == x_1; +x_6 = lean::nat_dec_eq(x_3, x_1); if (x_6 == 0) { -usize x_7; uint32 x_8; uint8 x_9; -x_7 = lean::string_utf8_prev_old(x_0, x_3); -x_8 = lean::string_utf8_get_old(x_0, x_7); +obj* x_7; uint32 x_8; uint8 x_9; +x_7 = lean::string_utf8_prev(x_0, x_3); +x_8 = lean::string_utf8_get(x_0, x_7); x_9 = l_Char_isWhitespace(x_8); if (x_9 == 0) { +lean::dec(x_7); lean::dec(x_2); return x_3; } else { -obj* x_11; obj* x_12; -x_11 = lean::mk_nat_obj(1ul); -x_12 = lean::nat_sub(x_2, x_11); +obj* x_13; obj* x_14; +lean::dec(x_3); +x_13 = lean::mk_nat_obj(1ul); +x_14 = lean::nat_sub(x_2, x_13); lean::dec(x_2); -x_2 = x_12; +x_2 = x_14; x_3 = x_7; goto _start; } @@ -5676,7 +5705,9 @@ return x_3; } else { +lean::dec(x_3); lean::dec(x_2); +lean::inc(x_1); return x_1; } } @@ -5684,63 +5715,58 @@ return x_1; obj* l_Substring_trim(obj* x_0) { _start: { -obj* x_1; usize x_3; usize x_4; obj* x_5; usize x_6; obj* x_7; obj* x_8; obj* x_9; usize x_12; usize x_13; obj* x_14; obj* x_15; obj* x_16; +obj* x_1; obj* x_3; obj* x_5; obj* x_7; obj* x_8; obj* x_9; obj* x_10; obj* x_13; obj* x_14; obj* x_15; x_1 = lean::cnstr_get(x_0, 0); -x_3 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_4 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); +x_3 = lean::cnstr_get(x_0, 1); +x_5 = lean::cnstr_get(x_0, 2); if (lean::is_exclusive(x_0)) { - x_5 = x_0; + x_7 = x_0; } else { lean::inc(x_1); + lean::inc(x_3); + lean::inc(x_5); lean::dec(x_0); - x_5 = lean::box(0); + x_7 = lean::box(0); } -x_6 = lean::string_utf8_byte_size_old(x_1); -x_7 = lean::usize_to_nat(x_6); -x_8 = lean::mk_nat_obj(1ul); -x_9 = lean::nat_add(x_7, x_8); -lean::dec(x_7); -lean::inc(x_9); -x_12 = l_Substring_takeWhileAux___main___at_Substring_trim___spec__1(x_1, x_4, x_9, x_3); -x_13 = l_Substring_takeRightWhileAux___main___at_Substring_trim___spec__2(x_1, x_12, x_9, x_4); -if (lean::is_scalar(x_5)) { - x_14 = lean::alloc_cnstr(0, 1, sizeof(size_t)*2); +x_8 = lean::string_utf8_byte_size(x_1); +x_9 = lean::mk_nat_obj(1ul); +x_10 = lean::nat_add(x_8, x_9); +lean::dec(x_8); +lean::inc(x_10); +x_13 = l_Substring_takeWhileAux___main___at_Substring_trim___spec__1(x_1, x_5, x_10, x_3); +x_14 = l_Substring_takeRightWhileAux___main___at_Substring_trim___spec__2(x_1, x_13, x_10, x_5); +if (lean::is_scalar(x_7)) { + x_15 = lean::alloc_cnstr(0, 3, 0); } else { - x_14 = x_5; + x_15 = x_7; } -lean::cnstr_set(x_14, 0, x_1); -lean::cnstr_set_scalar(x_14, sizeof(void*)*1, x_12); -x_15 = x_14; -lean::cnstr_set_scalar(x_15, sizeof(void*)*2, x_13); -x_16 = x_15; -return x_16; +lean::cnstr_set(x_15, 0, x_1); +lean::cnstr_set(x_15, 1, x_13); +lean::cnstr_set(x_15, 2, x_14); +return x_15; } } obj* l_Substring_takeWhileAux___main___at_Substring_trim___spec__1___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { -usize x_4; usize x_5; usize x_6; obj* x_7; -x_4 = lean::unbox_size_t(x_1); -x_5 = lean::unbox_size_t(x_3); -x_6 = l_Substring_takeWhileAux___main___at_Substring_trim___spec__1(x_0, x_4, x_2, x_5); -x_7 = lean::box_size_t(x_6); +obj* x_4; +x_4 = l_Substring_takeWhileAux___main___at_Substring_trim___spec__1(x_0, x_1, x_2, x_3); lean::dec(x_0); -return x_7; +lean::dec(x_1); +return x_4; } } obj* l_Substring_takeRightWhileAux___main___at_Substring_trim___spec__2___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { -usize x_4; usize x_5; usize x_6; obj* x_7; -x_4 = lean::unbox_size_t(x_1); -x_5 = lean::unbox_size_t(x_3); -x_6 = l_Substring_takeRightWhileAux___main___at_Substring_trim___spec__2(x_0, x_4, x_2, x_5); -x_7 = lean::box_size_t(x_6); +obj* x_4; +x_4 = l_Substring_takeRightWhileAux___main___at_Substring_trim___spec__2(x_0, x_1, x_2, x_3); lean::dec(x_0); -return x_7; +lean::dec(x_1); +return x_4; } } -obj* l_String_foldlAux___main___at_Substring_toNat___spec__1(obj* x_0, usize x_1, obj* x_2, usize x_3, obj* x_4) { +obj* l_String_foldlAux___main___at_Substring_toNat___spec__1(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { obj* x_5; uint8 x_6; @@ -5749,38 +5775,41 @@ x_6 = lean::nat_dec_eq(x_2, x_5); if (x_6 == 0) { uint8 x_7; -x_7 = x_3 == x_1; +x_7 = lean::nat_dec_eq(x_3, x_1); if (x_7 == 0) { -obj* x_8; obj* x_9; usize x_11; uint32 x_12; obj* x_13; obj* x_14; obj* x_16; obj* x_17; obj* x_18; obj* x_20; +obj* x_8; obj* x_9; obj* x_11; uint32 x_12; obj* x_14; obj* x_15; obj* x_17; obj* x_18; obj* x_19; obj* x_21; x_8 = lean::mk_nat_obj(1ul); x_9 = lean::nat_sub(x_2, x_8); lean::dec(x_2); -x_11 = lean::string_utf8_next_old(x_0, x_3); -x_12 = lean::string_utf8_get_old(x_0, x_3); -x_13 = lean::mk_nat_obj(10ul); -x_14 = lean::nat_mul(x_4, x_13); +x_11 = lean::string_utf8_next(x_0, x_3); +x_12 = lean::string_utf8_get(x_0, x_3); +lean::dec(x_3); +x_14 = lean::mk_nat_obj(10ul); +x_15 = lean::nat_mul(x_4, x_14); lean::dec(x_4); -x_16 = lean::uint32_to_nat(x_12); -x_17 = l_String_foldlAux___main___at_String_toNat___spec__1___closed__1; -x_18 = lean::nat_sub(x_16, x_17); -lean::dec(x_16); -x_20 = lean::nat_add(x_14, x_18); -lean::dec(x_18); -lean::dec(x_14); +x_17 = lean::uint32_to_nat(x_12); +x_18 = l_String_foldlAux___main___at_String_toNat___spec__1___closed__1; +x_19 = lean::nat_sub(x_17, x_18); +lean::dec(x_17); +x_21 = lean::nat_add(x_15, x_19); +lean::dec(x_19); +lean::dec(x_15); x_2 = x_9; x_3 = x_11; -x_4 = x_20; +x_4 = x_21; goto _start; } else { +lean::dec(x_3); lean::dec(x_2); return x_4; } } else { +lean::dec(x_3); lean::dec(x_2); return x_4; } @@ -5789,41 +5818,36 @@ return x_4; obj* l_Substring_toNat(obj* x_0) { _start: { -obj* x_1; usize x_2; usize x_3; usize x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_9; obj* x_10; +obj* x_1; obj* x_3; obj* x_5; obj* x_8; obj* x_9; obj* x_10; obj* x_12; obj* x_13; x_1 = lean::cnstr_get(x_0, 0); -x_2 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_3 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); -x_4 = lean::string_utf8_byte_size_old(x_1); -x_5 = lean::usize_to_nat(x_4); -x_6 = lean::mk_nat_obj(1ul); -x_7 = lean::nat_add(x_5, x_6); +lean::inc(x_1); +x_3 = lean::cnstr_get(x_0, 1); +lean::inc(x_3); +x_5 = lean::cnstr_get(x_0, 2); +lean::inc(x_5); +lean::dec(x_0); +x_8 = lean::string_utf8_byte_size(x_1); +x_9 = lean::mk_nat_obj(1ul); +x_10 = lean::nat_add(x_8, x_9); +lean::dec(x_8); +x_12 = lean::mk_nat_obj(0ul); +x_13 = l_String_foldlAux___main___at_Substring_toNat___spec__1(x_1, x_5, x_10, x_3, x_12); lean::dec(x_5); -x_9 = lean::mk_nat_obj(0ul); -x_10 = l_String_foldlAux___main___at_Substring_toNat___spec__1(x_1, x_3, x_7, x_2, x_9); -return x_10; +lean::dec(x_1); +return x_13; } } obj* l_String_foldlAux___main___at_Substring_toNat___spec__1___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4) { _start: { -usize x_5; usize x_6; obj* x_7; -x_5 = lean::unbox_size_t(x_1); -x_6 = lean::unbox_size_t(x_3); -x_7 = l_String_foldlAux___main___at_Substring_toNat___spec__1(x_0, x_5, x_2, x_6, x_4); +obj* x_5; +x_5 = l_String_foldlAux___main___at_Substring_toNat___spec__1(x_0, x_1, x_2, x_3, x_4); lean::dec(x_0); -return x_7; +lean::dec(x_1); +return x_5; } } -obj* l_Substring_toNat___boxed(obj* x_0) { -_start: -{ -obj* x_1; -x_1 = l_Substring_toNat(x_0); -lean::dec(x_0); -return x_1; -} -} -uint8 l_String_anyAux___main___at_Substring_isNat___spec__1(obj* x_0, usize x_1, obj* x_2, usize x_3) { +uint8 l_String_anyAux___main___at_Substring_isNat___spec__1(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { obj* x_4; uint8 x_5; @@ -5832,85 +5856,93 @@ x_5 = lean::nat_dec_eq(x_2, x_4); if (x_5 == 0) { uint8 x_6; -x_6 = x_3 == x_1; +x_6 = lean::nat_dec_eq(x_3, x_1); if (x_6 == 0) { uint32 x_7; uint8 x_8; -x_7 = lean::string_utf8_get_old(x_0, x_3); +x_7 = lean::string_utf8_get(x_0, x_3); x_8 = l_Char_isDigit(x_7); if (x_8 == 0) { -uint8 x_10; +uint8 x_11; +lean::dec(x_3); lean::dec(x_2); -x_10 = 1; -return x_10; +x_11 = 1; +return x_11; } else { -obj* x_11; obj* x_12; usize x_14; -x_11 = lean::mk_nat_obj(1ul); -x_12 = lean::nat_sub(x_2, x_11); +obj* x_12; obj* x_13; obj* x_15; +x_12 = lean::mk_nat_obj(1ul); +x_13 = lean::nat_sub(x_2, x_12); lean::dec(x_2); -x_14 = lean::string_utf8_next_old(x_0, x_3); -x_2 = x_12; -x_3 = x_14; +x_15 = lean::string_utf8_next(x_0, x_3); +lean::dec(x_3); +x_2 = x_13; +x_3 = x_15; goto _start; } } else { -uint8 x_17; +uint8 x_20; +lean::dec(x_3); lean::dec(x_2); -x_17 = 0; -return x_17; +x_20 = 0; +return x_20; } } else { -uint8 x_19; +uint8 x_23; +lean::dec(x_3); lean::dec(x_2); -x_19 = 0; -return x_19; +x_23 = 0; +return x_23; } } } uint8 l_Substring_isNat(obj* x_0) { _start: { -obj* x_1; usize x_2; usize x_3; usize x_4; obj* x_5; obj* x_6; obj* x_7; uint8 x_9; +obj* x_1; obj* x_3; obj* x_5; obj* x_8; obj* x_9; obj* x_10; uint8 x_12; x_1 = lean::cnstr_get(x_0, 0); -x_2 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_3 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); -x_4 = lean::string_utf8_byte_size_old(x_1); -x_5 = lean::usize_to_nat(x_4); -x_6 = lean::mk_nat_obj(1ul); -x_7 = lean::nat_add(x_5, x_6); +lean::inc(x_1); +x_3 = lean::cnstr_get(x_0, 1); +lean::inc(x_3); +x_5 = lean::cnstr_get(x_0, 2); +lean::inc(x_5); +lean::dec(x_0); +x_8 = lean::string_utf8_byte_size(x_1); +x_9 = lean::mk_nat_obj(1ul); +x_10 = lean::nat_add(x_8, x_9); +lean::dec(x_8); +x_12 = l_String_anyAux___main___at_Substring_isNat___spec__1(x_1, x_5, x_10, x_3); lean::dec(x_5); -x_9 = l_String_anyAux___main___at_Substring_isNat___spec__1(x_1, x_3, x_7, x_2); -if (x_9 == 0) +lean::dec(x_1); +if (x_12 == 0) { -uint8 x_10; -x_10 = 1; -return x_10; +uint8 x_15; +x_15 = 1; +return x_15; } else { -uint8 x_11; -x_11 = 0; -return x_11; +uint8 x_16; +x_16 = 0; +return x_16; } } } obj* l_String_anyAux___main___at_Substring_isNat___spec__1___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { -usize x_4; usize x_5; uint8 x_6; obj* x_7; -x_4 = lean::unbox_size_t(x_1); -x_5 = lean::unbox_size_t(x_3); -x_6 = l_String_anyAux___main___at_Substring_isNat___spec__1(x_0, x_4, x_2, x_5); -x_7 = lean::box(x_6); +uint8 x_4; obj* x_5; +x_4 = l_String_anyAux___main___at_Substring_isNat___spec__1(x_0, x_1, x_2, x_3); +x_5 = lean::box(x_4); lean::dec(x_0); -return x_7; +lean::dec(x_1); +return x_5; } } obj* l_Substring_isNat___boxed(obj* x_0) { @@ -5919,43 +5951,45 @@ _start: uint8 x_1; obj* x_2; x_1 = l_Substring_isNat(x_0); x_2 = lean::box(x_1); -lean::dec(x_0); return x_2; } } obj* _init_l_String_drop___closed__1() { _start: { -obj* x_0; usize x_1; obj* x_2; usize x_3; obj* x_4; -x_0 = lean::mk_nat_obj(0ul); -x_1 = lean::usize_of_nat(x_0); -x_2 = lean::mk_string(""); -x_3 = lean::string_utf8_byte_size_old(x_2); -x_4 = lean::string_utf8_extract_old(x_2, x_1, x_3); -lean::dec(x_2); -return x_4; +obj* x_0; obj* x_1; obj* x_2; obj* x_3; +x_0 = lean::mk_string(""); +x_1 = lean::string_utf8_byte_size(x_0); +x_2 = lean::mk_nat_obj(0ul); +x_3 = lean::string_utf8_extract(x_0, x_2, x_1); +lean::dec(x_1); +lean::dec(x_0); +return x_3; } } obj* l_String_drop(obj* x_0, obj* x_1) { _start: { -usize x_2; usize x_3; usize x_4; usize x_5; uint8 x_6; -x_2 = lean::string_utf8_byte_size_old(x_0); -x_3 = lean::usize_of_nat(x_1); -x_4 = l_String_toSubstring___closed__1; -x_5 = x_4 + x_3; -x_6 = x_2 <= x_5; -if (x_6 == 0) +obj* x_2; obj* x_3; obj* x_4; uint8 x_5; +x_2 = lean::string_utf8_byte_size(x_0); +x_3 = lean::mk_nat_obj(0ul); +x_4 = lean::nat_add(x_3, x_1); +x_5 = lean::nat_dec_le(x_2, x_4); +if (x_5 == 0) { -obj* x_7; -x_7 = lean::string_utf8_extract_old(x_0, x_5, x_2); -return x_7; +obj* x_6; +x_6 = lean::string_utf8_extract(x_0, x_4, x_2); +lean::dec(x_2); +lean::dec(x_4); +return x_6; } else { -obj* x_8; -x_8 = l_String_drop___closed__1; -return x_8; +obj* x_11; +lean::dec(x_4); +lean::dec(x_2); +x_11 = l_String_drop___closed__1; +return x_11; } } } @@ -5972,23 +6006,25 @@ return x_2; obj* l_String_dropRight(obj* x_0, obj* x_1) { _start: { -usize x_2; usize x_3; usize x_4; uint8 x_5; -x_2 = lean::string_utf8_byte_size_old(x_0); -x_3 = lean::usize_of_nat(x_1); -x_4 = x_2 - x_3; -x_5 = x_4 <= x_2; -if (x_5 == 0) +obj* x_2; obj* x_3; uint8 x_4; +x_2 = lean::string_utf8_byte_size(x_0); +x_3 = lean::nat_sub(x_2, x_1); +x_4 = lean::nat_dec_le(x_3, x_2); +lean::dec(x_2); +if (x_4 == 0) { -usize x_6; obj* x_7; -x_6 = l_String_toSubstring___closed__1; -x_7 = lean::string_utf8_extract_old(x_0, x_6, x_4); +obj* x_6; obj* x_7; +x_6 = lean::mk_nat_obj(0ul); +x_7 = lean::string_utf8_extract(x_0, x_6, x_3); +lean::dec(x_3); return x_7; } else { -obj* x_8; -x_8 = l_String_drop___closed__1; -return x_8; +obj* x_10; +lean::dec(x_3); +x_10 = l_String_drop___closed__1; +return x_10; } } } @@ -6005,23 +6041,26 @@ return x_2; obj* l_String_take(obj* x_0, obj* x_1) { _start: { -usize x_2; usize x_3; usize x_4; usize x_5; uint8 x_6; -x_2 = lean::string_utf8_byte_size_old(x_0); -x_3 = lean::usize_of_nat(x_1); -x_4 = l_String_toSubstring___closed__1; -x_5 = x_4 + x_3; -x_6 = x_2 <= x_5; -if (x_6 == 0) +obj* x_2; obj* x_3; obj* x_4; uint8 x_5; +x_2 = lean::string_utf8_byte_size(x_0); +x_3 = lean::mk_nat_obj(0ul); +x_4 = lean::nat_add(x_3, x_1); +x_5 = lean::nat_dec_le(x_2, x_4); +if (x_5 == 0) { obj* x_7; -x_7 = lean::string_utf8_extract_old(x_0, x_4, x_5); +lean::dec(x_2); +x_7 = lean::string_utf8_extract(x_0, x_3, x_4); +lean::dec(x_4); return x_7; } else { -obj* x_8; -x_8 = lean::string_utf8_extract_old(x_0, x_4, x_2); -return x_8; +obj* x_10; +lean::dec(x_4); +x_10 = lean::string_utf8_extract(x_0, x_3, x_2); +lean::dec(x_2); +return x_10; } } } @@ -6038,23 +6077,26 @@ return x_2; obj* l_String_takeRight(obj* x_0, obj* x_1) { _start: { -usize x_2; usize x_3; usize x_4; usize x_5; uint8 x_6; -x_2 = lean::string_utf8_byte_size_old(x_0); -x_3 = lean::usize_of_nat(x_1); -x_4 = x_2 - x_3; -x_5 = l_String_toSubstring___closed__1; -x_6 = x_4 <= x_5; -if (x_6 == 0) +obj* x_2; obj* x_3; obj* x_4; uint8 x_5; +x_2 = lean::string_utf8_byte_size(x_0); +x_3 = lean::nat_sub(x_2, x_1); +x_4 = lean::mk_nat_obj(0ul); +x_5 = lean::nat_dec_le(x_3, x_4); +if (x_5 == 0) { -obj* x_7; -x_7 = lean::string_utf8_extract_old(x_0, x_4, x_2); -return x_7; +obj* x_6; +x_6 = lean::string_utf8_extract(x_0, x_3, x_2); +lean::dec(x_2); +lean::dec(x_3); +return x_6; } else { -obj* x_8; -x_8 = lean::string_utf8_extract_old(x_0, x_5, x_2); -return x_8; +obj* x_10; +lean::dec(x_3); +x_10 = lean::string_utf8_extract(x_0, x_4, x_2); +lean::dec(x_2); +return x_10; } } } @@ -6071,16 +6113,16 @@ return x_2; obj* l_String_takeWhile(obj* x_0, obj* x_1) { _start: { -usize x_2; obj* x_3; obj* x_4; obj* x_5; usize x_7; usize x_8; obj* x_9; -x_2 = lean::string_utf8_byte_size_old(x_0); -x_3 = lean::usize_to_nat(x_2); -x_4 = lean::mk_nat_obj(1ul); -x_5 = lean::nat_add(x_3, x_4); -lean::dec(x_3); -x_7 = l_String_toSubstring___closed__1; -x_8 = l_Substring_takeWhileAux___main(x_0, x_2, x_1, x_5, x_7); -x_9 = lean::string_utf8_extract_old(x_0, x_7, x_8); -return x_9; +obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_8; +x_2 = lean::string_utf8_byte_size(x_0); +x_3 = lean::mk_nat_obj(1ul); +x_4 = lean::nat_add(x_2, x_3); +x_5 = lean::mk_nat_obj(0ul); +x_6 = l_Substring_takeWhileAux___main(x_0, x_2, x_1, x_4, x_5); +lean::dec(x_2); +x_8 = lean::string_utf8_extract(x_0, x_5, x_6); +lean::dec(x_6); +return x_8; } } obj* l_String_takeWhile___boxed(obj* x_0, obj* x_1) { @@ -6095,16 +6137,16 @@ return x_2; obj* l_String_dropWhile(obj* x_0, obj* x_1) { _start: { -usize x_2; obj* x_3; obj* x_4; obj* x_5; usize x_7; usize x_8; obj* x_9; -x_2 = lean::string_utf8_byte_size_old(x_0); -x_3 = lean::usize_to_nat(x_2); -x_4 = lean::mk_nat_obj(1ul); -x_5 = lean::nat_add(x_3, x_4); -lean::dec(x_3); -x_7 = l_String_toSubstring___closed__1; -x_8 = l_Substring_takeWhileAux___main(x_0, x_2, x_1, x_5, x_7); -x_9 = lean::string_utf8_extract_old(x_0, x_8, x_2); -return x_9; +obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; +x_2 = lean::string_utf8_byte_size(x_0); +x_3 = lean::mk_nat_obj(1ul); +x_4 = lean::nat_add(x_2, x_3); +x_5 = lean::mk_nat_obj(0ul); +x_6 = l_Substring_takeWhileAux___main(x_0, x_2, x_1, x_4, x_5); +x_7 = lean::string_utf8_extract(x_0, x_6, x_2); +lean::dec(x_2); +lean::dec(x_6); +return x_7; } } obj* l_String_dropWhile___boxed(obj* x_0, obj* x_1) { @@ -6116,7 +6158,7 @@ lean::dec(x_0); return x_2; } } -usize l_Substring_takeRightWhileAux___main___at_String_trimRight___spec__1(obj* x_0, usize x_1, obj* x_2, usize x_3) { +obj* l_Substring_takeRightWhileAux___main___at_String_trimRight___spec__1(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { obj* x_4; uint8 x_5; @@ -6125,25 +6167,27 @@ x_5 = lean::nat_dec_eq(x_2, x_4); if (x_5 == 0) { uint8 x_6; -x_6 = x_3 == x_1; +x_6 = lean::nat_dec_eq(x_3, x_1); if (x_6 == 0) { -usize x_7; uint32 x_8; uint8 x_9; -x_7 = lean::string_utf8_prev_old(x_0, x_3); -x_8 = lean::string_utf8_get_old(x_0, x_7); +obj* x_7; uint32 x_8; uint8 x_9; +x_7 = lean::string_utf8_prev(x_0, x_3); +x_8 = lean::string_utf8_get(x_0, x_7); x_9 = l_Char_isWhitespace(x_8); if (x_9 == 0) { +lean::dec(x_7); lean::dec(x_2); return x_3; } else { -obj* x_11; obj* x_12; -x_11 = lean::mk_nat_obj(1ul); -x_12 = lean::nat_sub(x_2, x_11); +obj* x_13; obj* x_14; +lean::dec(x_3); +x_13 = lean::mk_nat_obj(1ul); +x_14 = lean::nat_sub(x_2, x_13); lean::dec(x_2); -x_2 = x_12; +x_2 = x_14; x_3 = x_7; goto _start; } @@ -6156,7 +6200,9 @@ return x_3; } else { +lean::dec(x_3); lean::dec(x_2); +lean::inc(x_1); return x_1; } } @@ -6164,28 +6210,25 @@ return x_1; obj* l_String_trimRight(obj* x_0) { _start: { -usize x_1; obj* x_2; obj* x_3; obj* x_4; usize x_6; usize x_7; obj* x_8; -x_1 = lean::string_utf8_byte_size_old(x_0); -x_2 = lean::usize_to_nat(x_1); -x_3 = lean::mk_nat_obj(1ul); -x_4 = lean::nat_add(x_2, x_3); -lean::dec(x_2); -x_6 = l_String_toSubstring___closed__1; -x_7 = l_Substring_takeRightWhileAux___main___at_String_trimRight___spec__1(x_0, x_6, x_4, x_1); -x_8 = lean::string_utf8_extract_old(x_0, x_6, x_7); -return x_8; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; +x_1 = lean::string_utf8_byte_size(x_0); +x_2 = lean::mk_nat_obj(1ul); +x_3 = lean::nat_add(x_1, x_2); +x_4 = lean::mk_nat_obj(0ul); +x_5 = l_Substring_takeRightWhileAux___main___at_String_trimRight___spec__1(x_0, x_4, x_3, x_1); +x_6 = lean::string_utf8_extract(x_0, x_4, x_5); +lean::dec(x_5); +return x_6; } } obj* l_Substring_takeRightWhileAux___main___at_String_trimRight___spec__1___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { -usize x_4; usize x_5; usize x_6; obj* x_7; -x_4 = lean::unbox_size_t(x_1); -x_5 = lean::unbox_size_t(x_3); -x_6 = l_Substring_takeRightWhileAux___main___at_String_trimRight___spec__1(x_0, x_4, x_2, x_5); -x_7 = lean::box_size_t(x_6); +obj* x_4; +x_4 = l_Substring_takeRightWhileAux___main___at_String_trimRight___spec__1(x_0, x_1, x_2, x_3); lean::dec(x_0); -return x_7; +lean::dec(x_1); +return x_4; } } obj* l_String_trimRight___boxed(obj* x_0) { @@ -6197,7 +6240,7 @@ lean::dec(x_0); return x_1; } } -usize l_Substring_takeWhileAux___main___at_String_trimLeft___spec__1(obj* x_0, usize x_1, obj* x_2, usize x_3) { +obj* l_Substring_takeWhileAux___main___at_String_trimLeft___spec__1(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { obj* x_4; uint8 x_5; @@ -6206,11 +6249,11 @@ x_5 = lean::nat_dec_eq(x_2, x_4); if (x_5 == 0) { uint8 x_6; -x_6 = x_3 == x_1; +x_6 = lean::nat_dec_eq(x_3, x_1); if (x_6 == 0) { uint32 x_7; uint8 x_8; -x_7 = lean::string_utf8_get_old(x_0, x_3); +x_7 = lean::string_utf8_get(x_0, x_3); x_8 = l_Char_isWhitespace(x_7); if (x_8 == 0) { @@ -6219,11 +6262,12 @@ return x_3; } else { -obj* x_10; obj* x_11; usize x_13; +obj* x_10; obj* x_11; obj* x_13; x_10 = lean::mk_nat_obj(1ul); x_11 = lean::nat_sub(x_2, x_10); lean::dec(x_2); -x_13 = lean::string_utf8_next_old(x_0, x_3); +x_13 = lean::string_utf8_next(x_0, x_3); +lean::dec(x_3); x_2 = x_11; x_3 = x_13; goto _start; @@ -6245,28 +6289,26 @@ return x_3; obj* l_String_trimLeft(obj* x_0) { _start: { -usize x_1; obj* x_2; obj* x_3; obj* x_4; usize x_6; usize x_7; obj* x_8; -x_1 = lean::string_utf8_byte_size_old(x_0); -x_2 = lean::usize_to_nat(x_1); -x_3 = lean::mk_nat_obj(1ul); -x_4 = lean::nat_add(x_2, x_3); -lean::dec(x_2); -x_6 = l_String_toSubstring___closed__1; -x_7 = l_Substring_takeWhileAux___main___at_String_trimLeft___spec__1(x_0, x_1, x_4, x_6); -x_8 = lean::string_utf8_extract_old(x_0, x_7, x_1); -return x_8; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; +x_1 = lean::string_utf8_byte_size(x_0); +x_2 = lean::mk_nat_obj(1ul); +x_3 = lean::nat_add(x_1, x_2); +x_4 = lean::mk_nat_obj(0ul); +x_5 = l_Substring_takeWhileAux___main___at_String_trimLeft___spec__1(x_0, x_1, x_3, x_4); +x_6 = lean::string_utf8_extract(x_0, x_5, x_1); +lean::dec(x_1); +lean::dec(x_5); +return x_6; } } obj* l_Substring_takeWhileAux___main___at_String_trimLeft___spec__1___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { -usize x_4; usize x_5; usize x_6; obj* x_7; -x_4 = lean::unbox_size_t(x_1); -x_5 = lean::unbox_size_t(x_3); -x_6 = l_Substring_takeWhileAux___main___at_String_trimLeft___spec__1(x_0, x_4, x_2, x_5); -x_7 = lean::box_size_t(x_6); +obj* x_4; +x_4 = l_Substring_takeWhileAux___main___at_String_trimLeft___spec__1(x_0, x_1, x_2, x_3); lean::dec(x_0); -return x_7; +lean::dec(x_1); +return x_4; } } obj* l_String_trimLeft___boxed(obj* x_0) { @@ -6278,7 +6320,7 @@ lean::dec(x_0); return x_1; } } -usize l_Substring_takeWhileAux___main___at_String_trim___spec__1(obj* x_0, usize x_1, obj* x_2, usize x_3) { +obj* l_Substring_takeWhileAux___main___at_String_trim___spec__1(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { obj* x_4; uint8 x_5; @@ -6287,11 +6329,11 @@ x_5 = lean::nat_dec_eq(x_2, x_4); if (x_5 == 0) { uint8 x_6; -x_6 = x_3 == x_1; +x_6 = lean::nat_dec_eq(x_3, x_1); if (x_6 == 0) { uint32 x_7; uint8 x_8; -x_7 = lean::string_utf8_get_old(x_0, x_3); +x_7 = lean::string_utf8_get(x_0, x_3); x_8 = l_Char_isWhitespace(x_7); if (x_8 == 0) { @@ -6300,11 +6342,12 @@ return x_3; } else { -obj* x_10; obj* x_11; usize x_13; +obj* x_10; obj* x_11; obj* x_13; x_10 = lean::mk_nat_obj(1ul); x_11 = lean::nat_sub(x_2, x_10); lean::dec(x_2); -x_13 = lean::string_utf8_next_old(x_0, x_3); +x_13 = lean::string_utf8_next(x_0, x_3); +lean::dec(x_3); x_2 = x_11; x_3 = x_13; goto _start; @@ -6323,7 +6366,7 @@ return x_3; } } } -usize l_Substring_takeRightWhileAux___main___at_String_trim___spec__2(obj* x_0, usize x_1, obj* x_2, usize x_3) { +obj* l_Substring_takeRightWhileAux___main___at_String_trim___spec__2(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { obj* x_4; uint8 x_5; @@ -6332,25 +6375,27 @@ x_5 = lean::nat_dec_eq(x_2, x_4); if (x_5 == 0) { uint8 x_6; -x_6 = x_3 == x_1; +x_6 = lean::nat_dec_eq(x_3, x_1); if (x_6 == 0) { -usize x_7; uint32 x_8; uint8 x_9; -x_7 = lean::string_utf8_prev_old(x_0, x_3); -x_8 = lean::string_utf8_get_old(x_0, x_7); +obj* x_7; uint32 x_8; uint8 x_9; +x_7 = lean::string_utf8_prev(x_0, x_3); +x_8 = lean::string_utf8_get(x_0, x_7); x_9 = l_Char_isWhitespace(x_8); if (x_9 == 0) { +lean::dec(x_7); lean::dec(x_2); return x_3; } else { -obj* x_11; obj* x_12; -x_11 = lean::mk_nat_obj(1ul); -x_12 = lean::nat_sub(x_2, x_11); +obj* x_13; obj* x_14; +lean::dec(x_3); +x_13 = lean::mk_nat_obj(1ul); +x_14 = lean::nat_sub(x_2, x_13); lean::dec(x_2); -x_2 = x_12; +x_2 = x_14; x_3 = x_7; goto _start; } @@ -6363,7 +6408,9 @@ return x_3; } else { +lean::dec(x_3); lean::dec(x_2); +lean::inc(x_1); return x_1; } } @@ -6371,42 +6418,38 @@ return x_1; obj* l_String_trim(obj* x_0) { _start: { -usize x_1; obj* x_2; obj* x_3; obj* x_4; usize x_6; usize x_8; usize x_9; obj* x_10; -x_1 = lean::string_utf8_byte_size_old(x_0); -x_2 = lean::usize_to_nat(x_1); -x_3 = lean::mk_nat_obj(1ul); -x_4 = lean::nat_add(x_2, x_3); -lean::dec(x_2); -x_6 = l_String_toSubstring___closed__1; -lean::inc(x_4); -x_8 = l_Substring_takeWhileAux___main___at_String_trim___spec__1(x_0, x_1, x_4, x_6); -x_9 = l_Substring_takeRightWhileAux___main___at_String_trim___spec__2(x_0, x_8, x_4, x_1); -x_10 = lean::string_utf8_extract_old(x_0, x_8, x_9); -return x_10; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_6; obj* x_7; obj* x_8; +x_1 = lean::string_utf8_byte_size(x_0); +x_2 = lean::mk_nat_obj(1ul); +x_3 = lean::nat_add(x_1, x_2); +x_4 = lean::mk_nat_obj(0ul); +lean::inc(x_3); +x_6 = l_Substring_takeWhileAux___main___at_String_trim___spec__1(x_0, x_1, x_3, x_4); +x_7 = l_Substring_takeRightWhileAux___main___at_String_trim___spec__2(x_0, x_6, x_3, x_1); +x_8 = lean::string_utf8_extract(x_0, x_6, x_7); +lean::dec(x_7); +lean::dec(x_6); +return x_8; } } obj* l_Substring_takeWhileAux___main___at_String_trim___spec__1___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { -usize x_4; usize x_5; usize x_6; obj* x_7; -x_4 = lean::unbox_size_t(x_1); -x_5 = lean::unbox_size_t(x_3); -x_6 = l_Substring_takeWhileAux___main___at_String_trim___spec__1(x_0, x_4, x_2, x_5); -x_7 = lean::box_size_t(x_6); +obj* x_4; +x_4 = l_Substring_takeWhileAux___main___at_String_trim___spec__1(x_0, x_1, x_2, x_3); lean::dec(x_0); -return x_7; +lean::dec(x_1); +return x_4; } } obj* l_Substring_takeRightWhileAux___main___at_String_trim___spec__2___boxed(obj* x_0, obj* x_1, obj* x_2, obj* x_3) { _start: { -usize x_4; usize x_5; usize x_6; obj* x_7; -x_4 = lean::unbox_size_t(x_1); -x_5 = lean::unbox_size_t(x_3); -x_6 = l_Substring_takeRightWhileAux___main___at_String_trim___spec__2(x_0, x_4, x_2, x_5); -x_7 = lean::box_size_t(x_6); +obj* x_4; +x_4 = l_Substring_takeRightWhileAux___main___at_String_trim___spec__2(x_0, x_1, x_2, x_3); lean::dec(x_0); -return x_7; +lean::dec(x_1); +return x_4; } } obj* l_String_trim___boxed(obj* x_0) { @@ -6453,9 +6496,6 @@ w = initialize_init_data_option_basic(w); lean::mark_persistent(l_String_DecidableEq); l_String_HasLess = _init_l_String_HasLess(); lean::mark_persistent(l_String_HasLess); - l_String_toSubstring___closed__1 = _init_l_String_toSubstring___closed__1(); - l_String_toSubstring___closed__1___boxed = _init_l_String_toSubstring___closed__1___boxed(); -lean::mark_persistent(l_String_toSubstring___closed__1___boxed); l_String_splitAux___main___closed__1 = _init_l_String_splitAux___main___closed__1(); lean::mark_persistent(l_String_splitAux___main___closed__1); l_String_Inhabited = _init_l_String_Inhabited(); diff --git a/src/stage0/init/data/tostring.cpp b/src/stage0/init/data/tostring.cpp index 8a2c91ee25..05540e2d29 100644 --- a/src/stage0/init/data/tostring.cpp +++ b/src/stage0/init/data/tostring.cpp @@ -97,7 +97,7 @@ obj* l_Fin_HasToString___boxed(obj*); obj* l_String_HasToString(obj*); obj* l_Decidable_HasToString___rarg___boxed(obj*); namespace lean { -obj* string_utf8_extract_old(obj*, usize, usize); +obj* string_utf8_extract(obj*, obj*, obj*); } obj* l_List_toStringAux___boxed(obj*); obj* l_id_HasToString___rarg___boxed(obj*); @@ -174,11 +174,11 @@ return x_1; obj* l_Substring_HasToString(obj* x_0) { _start: { -obj* x_1; usize x_2; usize x_3; obj* x_4; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; x_1 = lean::cnstr_get(x_0, 0); -x_2 = lean::cnstr_get_scalar(x_0, sizeof(void*)*1); -x_3 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); -x_4 = lean::string_utf8_extract_old(x_1, x_2, x_3); +x_2 = lean::cnstr_get(x_0, 1); +x_3 = lean::cnstr_get(x_0, 2); +x_4 = lean::string_utf8_extract(x_1, x_2, x_3); return x_4; } } diff --git a/src/stage0/init/lean/extern.cpp b/src/stage0/init/lean/extern.cpp index f34c3dcc44..ec42911c5a 100644 --- a/src/stage0/init/lean/extern.cpp +++ b/src/stage0/init/lean/extern.cpp @@ -32,7 +32,6 @@ obj* mk_adhoc_ext_entry_core(obj*); namespace lean { obj* mk_foreign_ext_entry_core(obj*, obj*); } -extern usize l_String_toSubstring___closed__1; obj* l_List_intersperse___main___rarg(obj*, obj*); obj* l_Lean_expandExternEntry(obj*, obj*); obj* l_Lean_getExternEntryForAux___main___closed__1; @@ -333,16 +332,15 @@ namespace lean { obj* expand_extern_pattern_core(obj* x_0, obj* x_1) { _start: { -obj* x_2; usize x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; +obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; x_2 = lean::string_length(x_0); -x_3 = l_String_toSubstring___closed__1; -x_4 = lean::alloc_cnstr(0, 1, sizeof(size_t)*1); +x_3 = lean::mk_nat_obj(0ul); +x_4 = lean::alloc_cnstr(0, 2, 0); lean::cnstr_set(x_4, 0, x_0); -lean::cnstr_set_scalar(x_4, sizeof(void*)*1, x_3); -x_5 = x_4; -x_6 = l_String_splitAux___main___closed__1; -x_7 = l_Lean_expandExternPatternAux___main(x_1, x_2, x_5, x_6); -return x_7; +lean::cnstr_set(x_4, 1, x_3); +x_5 = l_String_splitAux___main___closed__1; +x_6 = l_Lean_expandExternPatternAux___main(x_1, x_2, x_4, x_5); +return x_6; } } } diff --git a/src/stage0/init/lean/name_mangling.cpp b/src/stage0/init/lean/name_mangling.cpp index b9a5c46f75..a8909acb45 100644 --- a/src/stage0/init/lean/name_mangling.cpp +++ b/src/stage0/init/lean/name_mangling.cpp @@ -33,7 +33,6 @@ uint8 l_String_isEmpty(obj*); obj* l_Lean_Parser_parseHexDigit___at___private_init_lean_name__mangling_2__parseMangledStringAux___main___spec__2(obj*); extern obj* l_Lean_Parser_parseHexDigit___rarg___lambda__3___closed__1; obj* l_Lean_Parser_MonadParsec_ch___at___private_init_lean_name__mangling_5__parseMangledNameAux___main___spec__1(uint32, obj*); -extern usize l_String_toSubstring___closed__1; obj* l_Lean_Name_mangle___boxed(obj*, obj*); extern obj* l_Lean_Parser_MonadParsec_eoi___rarg___lambda__1___closed__1; extern obj* l_mjoin___rarg___closed__1; @@ -307,16 +306,15 @@ return x_3; obj* l_Lean_String_mangle(obj* x_0) { _start: { -obj* x_1; usize x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; x_1 = lean::string_length(x_0); -x_2 = l_String_toSubstring___closed__1; -x_3 = lean::alloc_cnstr(0, 1, sizeof(size_t)*1); +x_2 = lean::mk_nat_obj(0ul); +x_3 = lean::alloc_cnstr(0, 2, 0); lean::cnstr_set(x_3, 0, x_0); -lean::cnstr_set_scalar(x_3, sizeof(void*)*1, x_2); -x_4 = x_3; -x_5 = l_String_splitAux___main___closed__1; -x_6 = l___private_init_lean_name__mangling_1__String_mangleAux___main(x_1, x_4, x_5); -return x_6; +lean::cnstr_set(x_3, 1, x_2); +x_4 = l_String_splitAux___main___closed__1; +x_5 = l___private_init_lean_name__mangling_1__String_mangleAux___main(x_1, x_3, x_4); +return x_5; } } obj* l_Lean_Parser_MonadParsec_strCore___at___private_init_lean_name__mangling_2__parseMangledStringAux___main___spec__1(obj* x_0, obj* x_1, obj* x_2) { @@ -326,64 +324,62 @@ uint8 x_3; x_3 = l_String_isEmpty(x_0); if (x_3 == 0) { -obj* x_4; obj* x_5; usize x_6; obj* x_8; obj* x_9; obj* x_11; +obj* x_4; obj* x_5; obj* x_7; obj* x_9; x_4 = lean::string_length(x_0); x_5 = lean::mk_nat_obj(0ul); -x_6 = l_String_toSubstring___closed__1; lean::inc(x_0); -x_8 = lean::alloc_cnstr(0, 2, sizeof(size_t)*1); -lean::cnstr_set(x_8, 0, x_0); -lean::cnstr_set(x_8, 1, x_5); -lean::cnstr_set_scalar(x_8, sizeof(void*)*2, x_6); -x_9 = x_8; +x_7 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_7, 0, x_0); +lean::cnstr_set(x_7, 1, x_5); +lean::cnstr_set(x_7, 2, x_5); lean::inc(x_2); -x_11 = l___private_init_lean_parser_parsec_2__strAux___main(x_4, x_9, x_2); -if (lean::obj_tag(x_11) == 0) +x_9 = l___private_init_lean_parser_parsec_2__strAux___main(x_4, x_7, x_2); +if (lean::obj_tag(x_9) == 0) { -obj* x_13; obj* x_14; obj* x_15; uint8 x_16; obj* x_17; obj* x_18; +obj* x_11; obj* x_12; obj* x_13; uint8 x_14; obj* x_15; obj* x_16; lean::dec(x_0); -x_13 = lean::box(0); -x_14 = l_String_splitAux___main___closed__1; -x_15 = lean::alloc_cnstr(0, 4, 0); -lean::cnstr_set(x_15, 0, x_2); -lean::cnstr_set(x_15, 1, x_14); -lean::cnstr_set(x_15, 2, x_1); -lean::cnstr_set(x_15, 3, x_13); -x_16 = 0; -x_17 = lean::alloc_cnstr(1, 1, 1); -lean::cnstr_set(x_17, 0, x_15); -lean::cnstr_set_scalar(x_17, sizeof(void*)*1, x_16); -x_18 = x_17; -return x_18; +x_11 = lean::box(0); +x_12 = l_String_splitAux___main___closed__1; +x_13 = lean::alloc_cnstr(0, 4, 0); +lean::cnstr_set(x_13, 0, x_2); +lean::cnstr_set(x_13, 1, x_12); +lean::cnstr_set(x_13, 2, x_1); +lean::cnstr_set(x_13, 3, x_11); +x_14 = 0; +x_15 = lean::alloc_cnstr(1, 1, 1); +lean::cnstr_set(x_15, 0, x_13); +lean::cnstr_set_scalar(x_15, sizeof(void*)*1, x_14); +x_16 = x_15; +return x_16; } else { -obj* x_21; obj* x_24; obj* x_25; +obj* x_19; obj* x_22; obj* x_23; lean::dec(x_1); lean::dec(x_2); -x_21 = lean::cnstr_get(x_11, 0); -lean::inc(x_21); -lean::dec(x_11); -x_24 = lean::box(0); -x_25 = lean::alloc_cnstr(0, 3, 0); -lean::cnstr_set(x_25, 0, x_0); -lean::cnstr_set(x_25, 1, x_21); -lean::cnstr_set(x_25, 2, x_24); -return x_25; +x_19 = lean::cnstr_get(x_9, 0); +lean::inc(x_19); +lean::dec(x_9); +x_22 = lean::box(0); +x_23 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_23, 0, x_0); +lean::cnstr_set(x_23, 1, x_19); +lean::cnstr_set(x_23, 2, x_22); +return x_23; } } else { -obj* x_28; obj* x_29; obj* x_30; +obj* x_26; obj* x_27; obj* x_28; lean::dec(x_1); lean::dec(x_0); -x_28 = l_String_splitAux___main___closed__1; -x_29 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1; -x_30 = lean::alloc_cnstr(0, 3, 0); -lean::cnstr_set(x_30, 0, x_28); -lean::cnstr_set(x_30, 1, x_2); -lean::cnstr_set(x_30, 2, x_29); -return x_30; +x_26 = l_String_splitAux___main___closed__1; +x_27 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1; +x_28 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_28, 0, x_26); +lean::cnstr_set(x_28, 1, x_2); +lean::cnstr_set(x_28, 2, x_27); +return x_28; } } } diff --git a/src/stage0/init/lean/parser/basic.cpp b/src/stage0/init/lean/parser/basic.cpp index 87c4f15329..452c3641be 100644 --- a/src/stage0/init/lean/parser/basic.cpp +++ b/src/stage0/init/lean/parser/basic.cpp @@ -38,7 +38,6 @@ extern obj* l_Lean_Parser_Trie_mk___closed__1; obj* l_Lean_Parser_messageOfParsecMessage(obj*); obj* l_Lean_Parser_MonadRec_trans___rarg___boxed(obj*, obj*, obj*, obj*); obj* l_Lean_Parser_ParserT_Lean_Parser_MonadParsec___rarg(obj*); -extern usize l_String_toSubstring___closed__1; obj* l_Lean_Parser_logMessage___rarg(obj*, obj*, obj*, obj*, obj*); obj* l_Lean_Parser_TokenMap_ofList___rarg(obj*); obj* l_Lean_Parser_ParserT_Alternative___rarg(obj*); @@ -1038,21 +1037,19 @@ return x_33; obj* l_Lean_Parser_ParsecT_run___at_Lean_Parser_run___spec__1___rarg(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5, obj* x_6) { _start: { -obj* x_7; usize x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_13; obj* x_14; obj* x_15; +obj* x_7; obj* x_8; obj* x_9; obj* x_11; obj* x_12; obj* x_13; x_7 = lean::mk_nat_obj(0ul); -x_8 = l_String_toSubstring___closed__1; -x_9 = lean::alloc_cnstr(0, 2, sizeof(size_t)*1); -lean::cnstr_set(x_9, 0, x_4); -lean::cnstr_set(x_9, 1, x_7); -lean::cnstr_set_scalar(x_9, sizeof(void*)*2, x_8); -x_10 = x_9; -x_11 = lean::cnstr_get(x_0, 1); -lean::inc(x_11); -x_13 = lean::apply_2(x_3, x_10, x_6); -x_14 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_ParsecT_run___at_Lean_Parser_run___spec__1___rarg___lambda__1), 2, 1); -lean::closure_set(x_14, 0, x_0); -x_15 = lean::apply_4(x_11, lean::box(0), lean::box(0), x_13, x_14); -return x_15; +x_8 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_8, 0, x_4); +lean::cnstr_set(x_8, 1, x_7); +lean::cnstr_set(x_8, 2, x_7); +x_9 = lean::cnstr_get(x_0, 1); +lean::inc(x_9); +x_11 = lean::apply_2(x_3, x_8, x_6); +x_12 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_ParsecT_run___at_Lean_Parser_run___spec__1___rarg___lambda__1), 2, 1); +lean::closure_set(x_12, 0, x_0); +x_13 = lean::apply_4(x_9, lean::box(0), lean::box(0), x_11, x_12); +return x_13; } } obj* l_Lean_Parser_ParsecT_run___at_Lean_Parser_run___spec__1(obj* x_0) { diff --git a/src/stage0/init/lean/parser/declaration.cpp b/src/stage0/init/lean/parser/declaration.cpp index 88d7bdd340..245cb4cc1e 100644 --- a/src/stage0/init/lean/parser/declaration.cpp +++ b/src/stage0/init/lean/parser/declaration.cpp @@ -78,7 +78,6 @@ obj* l_Lean_Parser_command_univParams_HasView_x_27___lambda__1___closed__1; extern obj* l_Lean_Parser_Combinators_choiceAux___main___rarg___closed__1; obj* l_Lean_Parser_command_extends_HasView_x_27___lambda__1___closed__3; obj* l_Lean_Parser_command_axiom_HasView_x_27; -extern usize l_String_toSubstring___closed__1; obj* l_Lean_Parser_command_declAttributes_HasView_x_27___lambda__1___closed__2; obj* l_List_mfoldl___main___at_Lean_Parser_command_docComment_Parser___spec__5(obj*, obj*, obj*, obj*, obj*, obj*, obj*); obj* l_Lean_Parser_command_oldUnivParams_Parser_Lean_Parser_HasView; @@ -1445,73 +1444,71 @@ uint8 x_6; x_6 = l_String_isEmpty(x_0); if (x_6 == 0) { -obj* x_7; obj* x_8; usize x_9; obj* x_11; obj* x_12; obj* x_14; +obj* x_7; obj* x_8; obj* x_10; obj* x_12; x_7 = lean::string_length(x_0); x_8 = lean::mk_nat_obj(0ul); -x_9 = l_String_toSubstring___closed__1; lean::inc(x_0); -x_11 = lean::alloc_cnstr(0, 2, sizeof(size_t)*1); -lean::cnstr_set(x_11, 0, x_0); -lean::cnstr_set(x_11, 1, x_8); -lean::cnstr_set_scalar(x_11, sizeof(void*)*2, x_9); -x_12 = x_11; +x_10 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_10, 0, x_0); +lean::cnstr_set(x_10, 1, x_8); +lean::cnstr_set(x_10, 2, x_8); lean::inc(x_4); -x_14 = l___private_init_lean_parser_parsec_2__strAux___main(x_7, x_12, x_4); -if (lean::obj_tag(x_14) == 0) +x_12 = l___private_init_lean_parser_parsec_2__strAux___main(x_7, x_10, x_4); +if (lean::obj_tag(x_12) == 0) { -obj* x_16; obj* x_17; obj* x_18; uint8 x_19; obj* x_20; obj* x_21; obj* x_22; +obj* x_14; obj* x_15; obj* x_16; uint8 x_17; obj* x_18; obj* x_19; obj* x_20; lean::dec(x_0); -x_16 = lean::box(0); -x_17 = l_String_splitAux___main___closed__1; -x_18 = lean::alloc_cnstr(0, 4, 0); -lean::cnstr_set(x_18, 0, x_4); -lean::cnstr_set(x_18, 1, x_17); -lean::cnstr_set(x_18, 2, x_1); -lean::cnstr_set(x_18, 3, x_16); -x_19 = 0; -x_20 = lean::alloc_cnstr(1, 1, 1); -lean::cnstr_set(x_20, 0, x_18); -lean::cnstr_set_scalar(x_20, sizeof(void*)*1, x_19); -x_21 = x_20; -x_22 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_22, 0, x_21); -lean::cnstr_set(x_22, 1, x_5); -return x_22; +x_14 = lean::box(0); +x_15 = l_String_splitAux___main___closed__1; +x_16 = lean::alloc_cnstr(0, 4, 0); +lean::cnstr_set(x_16, 0, x_4); +lean::cnstr_set(x_16, 1, x_15); +lean::cnstr_set(x_16, 2, x_1); +lean::cnstr_set(x_16, 3, x_14); +x_17 = 0; +x_18 = lean::alloc_cnstr(1, 1, 1); +lean::cnstr_set(x_18, 0, x_16); +lean::cnstr_set_scalar(x_18, sizeof(void*)*1, x_17); +x_19 = x_18; +x_20 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_20, 0, x_19); +lean::cnstr_set(x_20, 1, x_5); +return x_20; } else { -obj* x_25; obj* x_28; obj* x_29; obj* x_30; +obj* x_23; obj* x_26; obj* x_27; obj* x_28; lean::dec(x_4); lean::dec(x_1); -x_25 = lean::cnstr_get(x_14, 0); -lean::inc(x_25); -lean::dec(x_14); -x_28 = lean::box(0); -x_29 = lean::alloc_cnstr(0, 3, 0); -lean::cnstr_set(x_29, 0, x_0); -lean::cnstr_set(x_29, 1, x_25); -lean::cnstr_set(x_29, 2, 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_5); -return x_30; +x_23 = lean::cnstr_get(x_12, 0); +lean::inc(x_23); +lean::dec(x_12); +x_26 = lean::box(0); +x_27 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_27, 0, x_0); +lean::cnstr_set(x_27, 1, x_23); +lean::cnstr_set(x_27, 2, x_26); +x_28 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_28, 0, x_27); +lean::cnstr_set(x_28, 1, x_5); +return x_28; } } else { -obj* x_33; obj* x_34; obj* x_35; obj* x_36; +obj* x_31; obj* x_32; obj* x_33; obj* x_34; lean::dec(x_1); lean::dec(x_0); -x_33 = l_String_splitAux___main___closed__1; -x_34 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1; -x_35 = lean::alloc_cnstr(0, 3, 0); -lean::cnstr_set(x_35, 0, x_33); -lean::cnstr_set(x_35, 1, x_4); -lean::cnstr_set(x_35, 2, x_34); -x_36 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_36, 0, x_35); -lean::cnstr_set(x_36, 1, x_5); -return x_36; +x_31 = l_String_splitAux___main___closed__1; +x_32 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1; +x_33 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_33, 0, x_31); +lean::cnstr_set(x_33, 1, x_4); +lean::cnstr_set(x_33, 2, x_32); +x_34 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_34, 0, x_33); +lean::cnstr_set(x_34, 1, x_5); +return x_34; } } } diff --git a/src/stage0/init/lean/parser/level.cpp b/src/stage0/init/lean/parser/level.cpp index e9f49d5d35..60e3ef7f46 100644 --- a/src/stage0/init/lean/parser/level.cpp +++ b/src/stage0/init/lean/parser/level.cpp @@ -38,7 +38,6 @@ obj* l_Lean_Parser_Combinators_node___at_Lean_Parser_Level_paren_Parser___spec__ obj* l_Lean_Parser_Level_Parser_Lean_Parser_HasTokens___closed__1; extern obj* l_Lean_Parser_Combinators_choiceAux___main___rarg___closed__1; obj* l_Lean_Parser_MonadRec_trans___rarg___boxed(obj*, obj*, obj*, obj*); -extern usize l_String_toSubstring___closed__1; obj* l_Lean_Parser_Level_trailing_HasView; obj* l_Lean_Parser_Level_leading_HasView_x_27___lambda__1___closed__5; extern obj* l_mjoin___rarg___closed__1; @@ -5889,7 +5888,7 @@ lean::dec(x_9); switch (lean::obj_tag(x_26)) { case 0: { -obj* x_29; obj* x_32; obj* x_35; obj* x_37; obj* x_39; obj* x_40; obj* x_43; obj* x_45; usize x_46; obj* x_47; obj* x_48; obj* x_49; +obj* x_29; obj* x_32; obj* x_35; obj* x_37; obj* x_39; obj* x_40; obj* x_43; obj* x_45; obj* x_46; obj* x_47; x_29 = lean::cnstr_get(x_26, 0); lean::inc(x_29); lean::dec(x_26); @@ -5915,330 +5914,328 @@ lean::dec(x_29); x_43 = lean::cnstr_get(x_1, 1); lean::inc(x_43); x_45 = lean::mk_nat_obj(0ul); -x_46 = l_String_toSubstring___closed__1; -x_47 = lean::alloc_cnstr(0, 2, sizeof(size_t)*1); -lean::cnstr_set(x_47, 0, x_40); -lean::cnstr_set(x_47, 1, x_45); -lean::cnstr_set_scalar(x_47, sizeof(void*)*2, x_46); -x_48 = x_47; -x_49 = l_Lean_Parser_Trie_matchPrefix___rarg(x_43, x_48); -if (lean::obj_tag(x_49) == 0) +x_46 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_46, 0, x_40); +lean::cnstr_set(x_46, 1, x_45); +lean::cnstr_set(x_46, 2, x_45); +x_47 = l_Lean_Parser_Trie_matchPrefix___rarg(x_43, x_46); +if (lean::obj_tag(x_47) == 0) { -obj* x_51; obj* x_52; obj* x_53; obj* x_54; obj* x_57; obj* x_59; obj* x_61; obj* x_62; obj* x_63; obj* x_64; obj* x_65; obj* x_66; +obj* x_49; obj* x_50; obj* x_51; obj* x_52; obj* x_55; obj* x_57; obj* x_59; obj* x_60; obj* x_61; obj* x_62; obj* x_63; obj* x_64; lean::dec(x_39); -x_51 = lean::box(0); -x_52 = l_Lean_Parser_currLbp___rarg___lambda__1___closed__1; -x_53 = l_mjoin___rarg___closed__1; -x_54 = l_Lean_Parser_MonadParsec_error___at_Lean_Parser_levelParser_run___spec__3___rarg(x_52, x_53, x_51, x_51, x_0, x_1, x_35, x_32); +x_49 = lean::box(0); +x_50 = l_Lean_Parser_currLbp___rarg___lambda__1___closed__1; +x_51 = l_mjoin___rarg___closed__1; +x_52 = l_Lean_Parser_MonadParsec_error___at_Lean_Parser_levelParser_run___spec__3___rarg(x_50, x_51, x_49, x_49, x_0, x_1, x_35, x_32); lean::dec(x_35); lean::dec(x_1); -x_57 = lean::cnstr_get(x_54, 0); -x_59 = lean::cnstr_get(x_54, 1); -if (lean::is_exclusive(x_54)) { - x_61 = x_54; +x_55 = lean::cnstr_get(x_52, 0); +x_57 = lean::cnstr_get(x_52, 1); +if (lean::is_exclusive(x_52)) { + x_59 = x_52; } else { + lean::inc(x_55); lean::inc(x_57); - lean::inc(x_59); - lean::dec(x_54); - x_61 = lean::box(0); + lean::dec(x_52); + x_59 = lean::box(0); } -x_62 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1; -x_63 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_62, x_57); -x_64 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_62, x_63); -x_65 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_37, x_64); -if (lean::is_scalar(x_61)) { - x_66 = lean::alloc_cnstr(0, 2, 0); +x_60 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1; +x_61 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_60, x_55); +x_62 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_60, x_61); +x_63 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_37, x_62); +if (lean::is_scalar(x_59)) { + x_64 = lean::alloc_cnstr(0, 2, 0); } else { - x_66 = x_61; + x_64 = x_59; } -lean::cnstr_set(x_66, 0, x_65); -lean::cnstr_set(x_66, 1, x_59); -return x_66; +lean::cnstr_set(x_64, 0, x_63); +lean::cnstr_set(x_64, 1, x_57); +return x_64; } else { -obj* x_68; obj* x_71; obj* x_73; obj* x_74; obj* x_77; obj* x_78; obj* x_79; obj* x_80; +obj* x_66; obj* x_69; obj* x_71; obj* x_72; obj* x_75; obj* x_76; obj* x_77; obj* x_78; lean::dec(x_1); -x_68 = lean::cnstr_get(x_49, 0); -lean::inc(x_68); -lean::dec(x_49); -x_71 = lean::cnstr_get(x_68, 1); -if (lean::is_exclusive(x_68)) { - lean::cnstr_release(x_68, 0); - x_73 = x_68; +x_66 = lean::cnstr_get(x_47, 0); +lean::inc(x_66); +lean::dec(x_47); +x_69 = lean::cnstr_get(x_66, 1); +if (lean::is_exclusive(x_66)) { + lean::cnstr_release(x_66, 0); + x_71 = x_66; } else { - lean::inc(x_71); - lean::dec(x_68); - x_73 = lean::box(0); + lean::inc(x_69); + lean::dec(x_66); + x_71 = lean::box(0); } -x_74 = lean::cnstr_get(x_71, 1); -lean::inc(x_74); -lean::dec(x_71); -x_77 = l_Lean_Parser_matchToken___closed__1; +x_72 = lean::cnstr_get(x_69, 1); +lean::inc(x_72); +lean::dec(x_69); +x_75 = l_Lean_Parser_matchToken___closed__1; if (lean::is_scalar(x_39)) { - x_78 = lean::alloc_cnstr(0, 3, 0); + x_76 = lean::alloc_cnstr(0, 3, 0); } else { - x_78 = x_39; + x_76 = x_39; } -lean::cnstr_set(x_78, 0, x_74); -lean::cnstr_set(x_78, 1, x_35); -lean::cnstr_set(x_78, 2, x_77); -x_79 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_37, x_78); -if (lean::is_scalar(x_73)) { - x_80 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_76, 0, x_72); +lean::cnstr_set(x_76, 1, x_35); +lean::cnstr_set(x_76, 2, x_75); +x_77 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_37, x_76); +if (lean::is_scalar(x_71)) { + x_78 = lean::alloc_cnstr(0, 2, 0); } else { - x_80 = x_73; + x_78 = x_71; } -lean::cnstr_set(x_80, 0, x_79); -lean::cnstr_set(x_80, 1, x_32); -return x_80; +lean::cnstr_set(x_78, 0, x_77); +lean::cnstr_set(x_78, 1, x_32); +return x_78; } } case 1: { -obj* x_83; obj* x_85; obj* x_86; obj* x_88; obj* x_90; obj* x_91; obj* x_92; obj* x_93; obj* x_94; obj* x_95; +obj* x_81; obj* x_83; obj* x_84; obj* x_86; obj* x_88; obj* x_89; obj* x_90; obj* x_91; obj* x_92; obj* x_93; lean::dec(x_1); lean::dec(x_26); -x_83 = lean::cnstr_get(x_6, 1); +x_81 = lean::cnstr_get(x_6, 1); if (lean::is_exclusive(x_6)) { lean::cnstr_release(x_6, 0); - x_85 = x_6; + x_83 = x_6; } else { - lean::inc(x_83); + lean::inc(x_81); lean::dec(x_6); - x_85 = lean::box(0); + x_83 = lean::box(0); } -x_86 = lean::cnstr_get(x_7, 1); -x_88 = lean::cnstr_get(x_7, 2); +x_84 = lean::cnstr_get(x_7, 1); +x_86 = lean::cnstr_get(x_7, 2); if (lean::is_exclusive(x_7)) { lean::cnstr_release(x_7, 0); - x_90 = x_7; + x_88 = x_7; } else { + lean::inc(x_84); lean::inc(x_86); - lean::inc(x_88); lean::dec(x_7); - x_90 = lean::box(0); + x_88 = lean::box(0); } -x_91 = l_Lean_Parser_maxPrec; -x_92 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1; -if (lean::is_scalar(x_90)) { - x_93 = lean::alloc_cnstr(0, 3, 0); +x_89 = l_Lean_Parser_maxPrec; +x_90 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1; +if (lean::is_scalar(x_88)) { + x_91 = lean::alloc_cnstr(0, 3, 0); } else { - x_93 = x_90; + x_91 = x_88; } -lean::cnstr_set(x_93, 0, x_91); -lean::cnstr_set(x_93, 1, x_86); -lean::cnstr_set(x_93, 2, x_92); -x_94 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_88, x_93); -if (lean::is_scalar(x_85)) { - x_95 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_91, 0, x_89); +lean::cnstr_set(x_91, 1, x_84); +lean::cnstr_set(x_91, 2, x_90); +x_92 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_86, x_91); +if (lean::is_scalar(x_83)) { + x_93 = lean::alloc_cnstr(0, 2, 0); } else { - x_95 = x_85; + x_93 = x_83; } -lean::cnstr_set(x_95, 0, x_94); -lean::cnstr_set(x_95, 1, x_83); -return x_95; +lean::cnstr_set(x_93, 0, x_92); +lean::cnstr_set(x_93, 1, x_81); +return x_93; } case 2: { -obj* x_96; obj* x_99; obj* x_101; obj* x_102; obj* x_104; obj* x_106; obj* x_107; obj* x_110; uint8 x_111; -x_96 = lean::cnstr_get(x_26, 0); -lean::inc(x_96); +obj* x_94; obj* x_97; obj* x_99; obj* x_100; obj* x_102; obj* x_104; obj* x_105; obj* x_108; uint8 x_109; +x_94 = lean::cnstr_get(x_26, 0); +lean::inc(x_94); lean::dec(x_26); -x_99 = lean::cnstr_get(x_6, 1); +x_97 = lean::cnstr_get(x_6, 1); if (lean::is_exclusive(x_6)) { lean::cnstr_release(x_6, 0); lean::cnstr_set(x_6, 1, lean::box(0)); - x_101 = x_6; + x_99 = x_6; } else { - lean::inc(x_99); + lean::inc(x_97); lean::dec(x_6); - x_101 = lean::box(0); + x_99 = lean::box(0); } -x_102 = lean::cnstr_get(x_7, 1); -x_104 = lean::cnstr_get(x_7, 2); +x_100 = lean::cnstr_get(x_7, 1); +x_102 = lean::cnstr_get(x_7, 2); if (lean::is_exclusive(x_7)) { lean::cnstr_release(x_7, 0); lean::cnstr_set(x_7, 1, lean::box(0)); lean::cnstr_set(x_7, 2, lean::box(0)); - x_106 = x_7; + x_104 = x_7; } else { + lean::inc(x_100); lean::inc(x_102); - lean::inc(x_104); lean::dec(x_7); - x_106 = lean::box(0); + x_104 = lean::box(0); } -x_107 = lean::cnstr_get(x_96, 0); -lean::inc(x_107); -lean::dec(x_96); -x_110 = l_Lean_Parser_number_HasView_x_27___lambda__1___closed__6; -x_111 = lean_name_dec_eq(x_107, x_110); +x_105 = lean::cnstr_get(x_94, 0); +lean::inc(x_105); +lean::dec(x_94); +x_108 = l_Lean_Parser_number_HasView_x_27___lambda__1___closed__6; +x_109 = lean_name_dec_eq(x_105, x_108); +if (x_109 == 0) +{ +obj* x_110; uint8 x_111; +x_110 = l_Lean_Parser_currLbp___rarg___lambda__3___closed__1; +x_111 = lean_name_dec_eq(x_105, x_110); +lean::dec(x_105); if (x_111 == 0) { -obj* x_112; uint8 x_113; -x_112 = l_Lean_Parser_currLbp___rarg___lambda__3___closed__1; -x_113 = lean_name_dec_eq(x_107, x_112); -lean::dec(x_107); -if (x_113 == 0) -{ -obj* x_117; obj* x_118; obj* x_119; obj* x_120; obj* x_123; obj* x_125; obj* x_127; obj* x_128; obj* x_129; -lean::dec(x_101); -lean::dec(x_106); -x_117 = lean::box(0); -x_118 = l_Lean_Parser_currLbp___rarg___lambda__3___closed__2; -x_119 = l_mjoin___rarg___closed__1; -x_120 = l_Lean_Parser_MonadParsec_error___at_Lean_Parser_levelParser_run___spec__3___rarg(x_118, x_119, x_117, x_117, x_0, x_1, x_102, x_99); -lean::dec(x_102); +obj* x_115; obj* x_116; obj* x_117; obj* x_118; obj* x_121; obj* x_123; obj* x_125; obj* x_126; obj* x_127; +lean::dec(x_104); +lean::dec(x_99); +x_115 = lean::box(0); +x_116 = l_Lean_Parser_currLbp___rarg___lambda__3___closed__2; +x_117 = l_mjoin___rarg___closed__1; +x_118 = l_Lean_Parser_MonadParsec_error___at_Lean_Parser_levelParser_run___spec__3___rarg(x_116, x_117, x_115, x_115, x_0, x_1, x_100, x_97); +lean::dec(x_100); lean::dec(x_1); -x_123 = lean::cnstr_get(x_120, 0); -x_125 = lean::cnstr_get(x_120, 1); -if (lean::is_exclusive(x_120)) { - x_127 = x_120; +x_121 = lean::cnstr_get(x_118, 0); +x_123 = lean::cnstr_get(x_118, 1); +if (lean::is_exclusive(x_118)) { + x_125 = x_118; } else { + lean::inc(x_121); lean::inc(x_123); - lean::inc(x_125); - lean::dec(x_120); - x_127 = lean::box(0); + lean::dec(x_118); + x_125 = lean::box(0); } -x_128 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_104, x_123); -if (lean::is_scalar(x_127)) { - x_129 = lean::alloc_cnstr(0, 2, 0); +x_126 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_102, x_121); +if (lean::is_scalar(x_125)) { + x_127 = lean::alloc_cnstr(0, 2, 0); } else { - x_129 = x_127; + x_127 = x_125; } -lean::cnstr_set(x_129, 0, x_128); -lean::cnstr_set(x_129, 1, x_125); -return x_129; +lean::cnstr_set(x_127, 0, x_126); +lean::cnstr_set(x_127, 1, x_123); +return x_127; } else { -obj* x_131; obj* x_132; obj* x_133; obj* x_134; obj* x_135; +obj* x_129; obj* x_130; obj* x_131; obj* x_132; obj* x_133; lean::dec(x_1); -x_131 = l_Lean_Parser_maxPrec; -x_132 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1; -if (lean::is_scalar(x_106)) { - x_133 = lean::alloc_cnstr(0, 3, 0); +x_129 = l_Lean_Parser_maxPrec; +x_130 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1; +if (lean::is_scalar(x_104)) { + x_131 = lean::alloc_cnstr(0, 3, 0); } else { - x_133 = x_106; + x_131 = x_104; } -lean::cnstr_set(x_133, 0, x_131); -lean::cnstr_set(x_133, 1, x_102); -lean::cnstr_set(x_133, 2, x_132); -x_134 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_104, x_133); -if (lean::is_scalar(x_101)) { - x_135 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_131, 0, x_129); +lean::cnstr_set(x_131, 1, x_100); +lean::cnstr_set(x_131, 2, x_130); +x_132 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_102, x_131); +if (lean::is_scalar(x_99)) { + x_133 = lean::alloc_cnstr(0, 2, 0); } else { - x_135 = x_101; + x_133 = x_99; } -lean::cnstr_set(x_135, 0, x_134); -lean::cnstr_set(x_135, 1, x_99); -return x_135; +lean::cnstr_set(x_133, 0, x_132); +lean::cnstr_set(x_133, 1, x_97); +return x_133; } } else { -obj* x_138; obj* x_139; obj* x_140; obj* x_141; obj* x_142; +obj* x_136; obj* x_137; obj* x_138; obj* x_139; obj* x_140; lean::dec(x_1); -lean::dec(x_107); -x_138 = l_Lean_Parser_maxPrec; -x_139 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1; -if (lean::is_scalar(x_106)) { - x_140 = lean::alloc_cnstr(0, 3, 0); +lean::dec(x_105); +x_136 = l_Lean_Parser_maxPrec; +x_137 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1; +if (lean::is_scalar(x_104)) { + x_138 = lean::alloc_cnstr(0, 3, 0); } else { - x_140 = x_106; + x_138 = x_104; } -lean::cnstr_set(x_140, 0, x_138); -lean::cnstr_set(x_140, 1, x_102); -lean::cnstr_set(x_140, 2, x_139); -x_141 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_104, x_140); -if (lean::is_scalar(x_101)) { - x_142 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_138, 0, x_136); +lean::cnstr_set(x_138, 1, x_100); +lean::cnstr_set(x_138, 2, x_137); +x_139 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_102, x_138); +if (lean::is_scalar(x_99)) { + x_140 = lean::alloc_cnstr(0, 2, 0); } else { - x_142 = x_101; + x_140 = x_99; } -lean::cnstr_set(x_142, 0, x_141); -lean::cnstr_set(x_142, 1, x_99); -return x_142; +lean::cnstr_set(x_140, 0, x_139); +lean::cnstr_set(x_140, 1, x_97); +return x_140; } } default: { -obj* x_143; obj* x_146; obj* x_148; obj* x_151; obj* x_152; obj* x_153; obj* x_154; obj* x_157; obj* x_159; obj* x_161; obj* x_162; obj* x_163; -x_143 = lean::cnstr_get(x_6, 1); -lean::inc(x_143); +obj* x_141; obj* x_144; obj* x_146; obj* x_149; obj* x_150; obj* x_151; obj* x_152; obj* x_155; obj* x_157; obj* x_159; obj* x_160; obj* x_161; +x_141 = lean::cnstr_get(x_6, 1); +lean::inc(x_141); lean::dec(x_6); -x_146 = lean::cnstr_get(x_7, 1); +x_144 = lean::cnstr_get(x_7, 1); +lean::inc(x_144); +x_146 = lean::cnstr_get(x_7, 2); lean::inc(x_146); -x_148 = lean::cnstr_get(x_7, 2); -lean::inc(x_148); lean::dec(x_7); -x_151 = lean::box(0); -x_152 = l_Lean_Parser_currLbp___rarg___lambda__3___closed__2; -x_153 = l_mjoin___rarg___closed__1; -x_154 = l_Lean_Parser_MonadParsec_error___at_Lean_Parser_levelParser_run___spec__3___rarg(x_152, x_153, x_151, x_151, x_0, x_1, x_146, x_143); -lean::dec(x_146); +x_149 = lean::box(0); +x_150 = l_Lean_Parser_currLbp___rarg___lambda__3___closed__2; +x_151 = l_mjoin___rarg___closed__1; +x_152 = l_Lean_Parser_MonadParsec_error___at_Lean_Parser_levelParser_run___spec__3___rarg(x_150, x_151, x_149, x_149, x_0, x_1, x_144, x_141); +lean::dec(x_144); lean::dec(x_1); -x_157 = lean::cnstr_get(x_154, 0); -x_159 = lean::cnstr_get(x_154, 1); -if (lean::is_exclusive(x_154)) { - x_161 = x_154; +x_155 = lean::cnstr_get(x_152, 0); +x_157 = lean::cnstr_get(x_152, 1); +if (lean::is_exclusive(x_152)) { + x_159 = x_152; } else { + lean::inc(x_155); lean::inc(x_157); - lean::inc(x_159); - lean::dec(x_154); - x_161 = lean::box(0); + lean::dec(x_152); + x_159 = lean::box(0); } -x_162 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_148, x_157); -if (lean::is_scalar(x_161)) { - x_163 = lean::alloc_cnstr(0, 2, 0); +x_160 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_146, x_155); +if (lean::is_scalar(x_159)) { + x_161 = lean::alloc_cnstr(0, 2, 0); } else { - x_163 = x_161; + x_161 = x_159; } -lean::cnstr_set(x_163, 0, x_162); -lean::cnstr_set(x_163, 1, x_159); -return x_163; +lean::cnstr_set(x_161, 0, x_160); +lean::cnstr_set(x_161, 1, x_157); +return x_161; } } } } else { -obj* x_165; obj* x_167; obj* x_168; uint8 x_170; obj* x_171; obj* x_172; obj* x_173; obj* x_174; +obj* x_163; obj* x_165; obj* x_166; uint8 x_168; obj* x_169; obj* x_170; obj* x_171; obj* x_172; lean::dec(x_1); -x_165 = lean::cnstr_get(x_6, 1); +x_163 = lean::cnstr_get(x_6, 1); if (lean::is_exclusive(x_6)) { lean::cnstr_release(x_6, 0); - x_167 = x_6; + x_165 = x_6; } else { - lean::inc(x_165); + lean::inc(x_163); lean::dec(x_6); - x_167 = lean::box(0); + x_165 = lean::box(0); } -x_168 = lean::cnstr_get(x_7, 0); -x_170 = lean::cnstr_get_scalar(x_7, sizeof(void*)*1); +x_166 = lean::cnstr_get(x_7, 0); +x_168 = lean::cnstr_get_scalar(x_7, sizeof(void*)*1); if (lean::is_exclusive(x_7)) { - x_171 = x_7; + x_169 = x_7; } else { - lean::inc(x_168); + lean::inc(x_166); lean::dec(x_7); - x_171 = lean::box(0); + x_169 = lean::box(0); } -if (lean::is_scalar(x_171)) { - x_172 = lean::alloc_cnstr(1, 1, 1); +if (lean::is_scalar(x_169)) { + x_170 = lean::alloc_cnstr(1, 1, 1); } else { - x_172 = x_171; + x_170 = x_169; } -lean::cnstr_set(x_172, 0, x_168); -lean::cnstr_set_scalar(x_172, sizeof(void*)*1, x_170); -x_173 = x_172; -if (lean::is_scalar(x_167)) { - x_174 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_170, 0, x_166); +lean::cnstr_set_scalar(x_170, sizeof(void*)*1, x_168); +x_171 = x_170; +if (lean::is_scalar(x_165)) { + x_172 = lean::alloc_cnstr(0, 2, 0); } else { - x_174 = x_167; + x_172 = x_165; } -lean::cnstr_set(x_174, 0, x_173); -lean::cnstr_set(x_174, 1, x_165); -return x_174; +lean::cnstr_set(x_172, 0, x_171); +lean::cnstr_set(x_172, 1, x_163); +return x_172; } } } diff --git a/src/stage0/init/lean/parser/module.cpp b/src/stage0/init/lean/parser/module.cpp index 2cc34d3727..5de0960687 100644 --- a/src/stage0/init/lean/parser/module.cpp +++ b/src/stage0/init/lean/parser/module.cpp @@ -37,7 +37,6 @@ obj* l_Lean_Parser_ModuleParserM_liftParserT___boxed(obj*); obj* l_Lean_Parser_resumeModuleParser___boxed(obj*); obj* l_Lean_Parser_Module_header_HasView_x_27___lambda__1___closed__3; obj* l_Lean_Parser_ParserT_Lean_Parser_MonadParsec___rarg(obj*); -extern usize l_String_toSubstring___closed__1; obj* l_Lean_Parser_MonadParsec_eoi___at_Lean_Parser_Module_eoi_Parser___spec__1___boxed(obj*, obj*, obj*, obj*); obj* l_Lean_Parser_Module_importPath_Parser_Lean_Parser_HasView___lambda__1___boxed(obj*, obj*, obj*, obj*, obj*); obj* l_Lean_Parser_ParsecT_runFrom___at_Lean_Parser_resumeModuleParser___spec__1(obj*, obj*); @@ -5475,7 +5474,7 @@ return x_2; obj* l_Lean_Parser_parseHeader(obj* x_0) { _start: { -obj* x_1; obj* x_3; obj* x_6; obj* x_9; obj* x_12; usize x_13; obj* x_14; obj* x_15; uint8 x_16; obj* x_17; obj* x_18; obj* x_20; obj* x_21; obj* x_22; +obj* x_1; obj* x_3; obj* x_6; obj* x_9; obj* x_12; obj* x_13; uint8 x_14; obj* x_15; obj* x_16; obj* x_18; obj* x_19; obj* x_20; x_1 = lean::cnstr_get(x_0, 0); lean::inc(x_1); x_3 = lean::cnstr_get(x_1, 0); @@ -5488,23 +5487,21 @@ x_9 = lean::cnstr_get(x_6, 1); lean::inc(x_9); lean::dec(x_6); x_12 = lean::mk_nat_obj(0ul); -x_13 = l_String_toSubstring___closed__1; -x_14 = lean::alloc_cnstr(0, 2, sizeof(size_t)*1); -lean::cnstr_set(x_14, 0, x_9); -lean::cnstr_set(x_14, 1, x_12); -lean::cnstr_set_scalar(x_14, sizeof(void*)*2, x_13); -x_15 = x_14; -x_16 = 0; -x_17 = lean::alloc_cnstr(0, 1, 1); -lean::cnstr_set(x_17, 0, x_15); -lean::cnstr_set_scalar(x_17, sizeof(void*)*1, x_16); -x_18 = x_17; -lean::inc(x_18); -x_20 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_parseHeader___lambda__1), 2, 1); -lean::closure_set(x_20, 0, x_18); -x_21 = l_Lean_Parser_parseHeader___closed__1; -x_22 = l_Lean_Parser_resumeModuleParser___rarg(x_0, x_18, x_20, x_21); -return x_22; +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_12); +x_14 = 0; +x_15 = lean::alloc_cnstr(0, 1, 1); +lean::cnstr_set(x_15, 0, x_13); +lean::cnstr_set_scalar(x_15, sizeof(void*)*1, x_14); +x_16 = x_15; +lean::inc(x_16); +x_18 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_parseHeader___lambda__1), 2, 1); +lean::closure_set(x_18, 0, x_16); +x_19 = l_Lean_Parser_parseHeader___closed__1; +x_20 = l_Lean_Parser_resumeModuleParser___rarg(x_0, x_16, x_18, x_19); +return x_20; } } obj* l_StateT_bind___at_Lean_Parser_parseHeader___spec__1___boxed(obj* x_0, obj* x_1) { diff --git a/src/stage0/init/lean/parser/notation.cpp b/src/stage0/init/lean/parser/notation.cpp index 503c9cedc5..02f8cb7530 100644 --- a/src/stage0/init/lean/parser/notation.cpp +++ b/src/stage0/init/lean/parser/notation.cpp @@ -70,7 +70,6 @@ extern obj* l_Lean_Parser_Combinators_choiceAux___main___rarg___closed__1; obj* l_ReaderT_lift___at_Lean_Parser_command_NotationSpec_symbolQuote_Parser_Lean_Parser_HasTokens___spec__1___boxed(obj*); obj* l_Lean_Parser_command_NotationSpec_precedence_HasView_x_27; obj* l_Lean_Parser_command_NotationSpec_unquotedSymbol_tokens; -extern usize l_String_toSubstring___closed__1; obj* l_Lean_Parser_command_NotationSpec_transition_Parser___closed__1; obj* l_Lean_Parser_command_notation_HasView_x_27___lambda__2(obj*); obj* l_Lean_Parser_command_mixfix_HasView_x_27; @@ -5767,73 +5766,71 @@ uint8 x_7; x_7 = l_String_isEmpty(x_0); if (x_7 == 0) { -obj* x_8; obj* x_9; usize x_10; obj* x_12; obj* x_13; obj* x_15; +obj* x_8; obj* x_9; obj* x_11; obj* x_13; x_8 = lean::string_length(x_0); x_9 = lean::mk_nat_obj(0ul); -x_10 = l_String_toSubstring___closed__1; lean::inc(x_0); -x_12 = lean::alloc_cnstr(0, 2, sizeof(size_t)*1); -lean::cnstr_set(x_12, 0, x_0); -lean::cnstr_set(x_12, 1, x_9); -lean::cnstr_set_scalar(x_12, sizeof(void*)*2, x_10); -x_13 = x_12; +x_11 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_11, 0, x_0); +lean::cnstr_set(x_11, 1, x_9); +lean::cnstr_set(x_11, 2, x_9); lean::inc(x_5); -x_15 = l___private_init_lean_parser_parsec_2__strAux___main(x_8, x_13, x_5); -if (lean::obj_tag(x_15) == 0) +x_13 = l___private_init_lean_parser_parsec_2__strAux___main(x_8, x_11, x_5); +if (lean::obj_tag(x_13) == 0) { -obj* x_17; obj* x_18; obj* x_19; uint8 x_20; obj* x_21; obj* x_22; obj* x_23; +obj* x_15; obj* x_16; obj* x_17; uint8 x_18; obj* x_19; obj* x_20; obj* x_21; lean::dec(x_0); -x_17 = lean::box(0); -x_18 = l_String_splitAux___main___closed__1; -x_19 = lean::alloc_cnstr(0, 4, 0); -lean::cnstr_set(x_19, 0, x_5); -lean::cnstr_set(x_19, 1, x_18); -lean::cnstr_set(x_19, 2, x_1); -lean::cnstr_set(x_19, 3, x_17); -x_20 = 0; -x_21 = lean::alloc_cnstr(1, 1, 1); -lean::cnstr_set(x_21, 0, x_19); -lean::cnstr_set_scalar(x_21, sizeof(void*)*1, x_20); -x_22 = x_21; -x_23 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_23, 0, x_22); -lean::cnstr_set(x_23, 1, x_6); -return x_23; +x_15 = lean::box(0); +x_16 = l_String_splitAux___main___closed__1; +x_17 = lean::alloc_cnstr(0, 4, 0); +lean::cnstr_set(x_17, 0, x_5); +lean::cnstr_set(x_17, 1, x_16); +lean::cnstr_set(x_17, 2, x_1); +lean::cnstr_set(x_17, 3, x_15); +x_18 = 0; +x_19 = lean::alloc_cnstr(1, 1, 1); +lean::cnstr_set(x_19, 0, x_17); +lean::cnstr_set_scalar(x_19, sizeof(void*)*1, x_18); +x_20 = x_19; +x_21 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_21, 0, x_20); +lean::cnstr_set(x_21, 1, x_6); +return x_21; } else { -obj* x_26; obj* x_29; obj* x_30; obj* x_31; +obj* x_24; obj* x_27; obj* x_28; obj* x_29; lean::dec(x_5); lean::dec(x_1); -x_26 = lean::cnstr_get(x_15, 0); -lean::inc(x_26); -lean::dec(x_15); -x_29 = lean::box(0); -x_30 = lean::alloc_cnstr(0, 3, 0); -lean::cnstr_set(x_30, 0, x_0); -lean::cnstr_set(x_30, 1, x_26); -lean::cnstr_set(x_30, 2, 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_6); -return x_31; +x_24 = lean::cnstr_get(x_13, 0); +lean::inc(x_24); +lean::dec(x_13); +x_27 = lean::box(0); +x_28 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_28, 0, x_0); +lean::cnstr_set(x_28, 1, x_24); +lean::cnstr_set(x_28, 2, 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_6); +return x_29; } } else { -obj* x_34; obj* x_35; obj* x_36; obj* x_37; +obj* x_32; obj* x_33; obj* x_34; obj* x_35; lean::dec(x_1); lean::dec(x_0); -x_34 = l_String_splitAux___main___closed__1; -x_35 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1; -x_36 = lean::alloc_cnstr(0, 3, 0); -lean::cnstr_set(x_36, 0, x_34); -lean::cnstr_set(x_36, 1, x_5); -lean::cnstr_set(x_36, 2, 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_6); -return x_37; +x_32 = l_String_splitAux___main___closed__1; +x_33 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1; +x_34 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_34, 0, x_32); +lean::cnstr_set(x_34, 1, x_5); +lean::cnstr_set(x_34, 2, 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_6); +return x_35; } } } diff --git a/src/stage0/init/lean/parser/parsec.cpp b/src/stage0/init/lean/parser/parsec.cpp index 651e1a9d2e..3ddbaf8b9e 100644 --- a/src/stage0/init/lean/parser/parsec.cpp +++ b/src/stage0/init/lean/parser/parsec.cpp @@ -62,7 +62,7 @@ obj* l_Lean_Parser_MonadParsec_upper___rarg___lambda__1(obj*, obj*, obj*); obj* l_Lean_Parser_ParsecT_orelse___rarg___lambda__2(obj*, obj*, obj*, obj*, obj*); obj* l_Lean_Parser_ParsecT_Monad___rarg___lambda__11(obj*, obj*, obj*, obj*, obj*, obj*); namespace lean { -usize string_utf8_prev_old(obj*, usize); +obj* string_utf8_prev(obj*, obj*); } obj* l_Lean_Parser_MonadParsec_takeWhile_x_27___boxed(obj*, obj*, obj*); obj* l_Lean_Parser_MonadParsec_notFollowedBy(obj*, obj*); @@ -78,7 +78,6 @@ obj* l_Lean_Parser_MonadParsec_take___rarg(obj*, obj*, obj*); obj* l_Lean_Parser_MonadParsec_error___at_Lean_Parser_MonadParsec_longestMatch___spec__1___rarg(obj*, obj*, obj*, obj*, obj*); obj* l_String_OldIterator_hasNext___main___boxed(obj*); obj* l_Lean_Parser_MonadParsec_foldlAux___main___rarg___lambda__1(obj*, obj*, obj*, obj*, obj*, obj*, obj*); -extern usize l_String_toSubstring___closed__1; obj* l_Lean_Parser_MonadParsec_labels___rarg(obj*, obj*, obj*, obj*); obj* l_Lean_Parser_MonadParsec_label___rarg___boxed(obj*, obj*, obj*, obj*); obj* l_String_intercalate(obj*, obj*); @@ -90,7 +89,7 @@ obj* l_List_mfoldr___main___at_Lean_Parser_MonadParsec_longestMatch___spec__2___ obj* l_Lean_Parser_MonadParsec_takeUntil1___rarg(obj*, obj*, obj*); obj* l_Lean_Parser_ParsecT_parseWithEoi___rarg___lambda__2(obj*, obj*, obj*); obj* l___private_init_lean_parser_parsec_7__takeWhileAux_x_27___boxed(obj*); -usize l_String_OldIterator_remainingBytes___main(obj*); +obj* l_String_OldIterator_remainingBytes___main(obj*); obj* l_Lean_Parser_MonadParsec_eoi___rarg___lambda__1___closed__1; obj* l_String_OldIterator_prevn(obj*, obj*); obj* l___private_init_lean_parser_parsec_7__takeWhileAux_x_27___main___boxed(obj*); @@ -437,7 +436,7 @@ obj* l_Lean_Parser_MonadParsec_takeWhileCont___at_Lean_Parser_MonadParsec_takeUn obj* l_Lean_Parser_ParsecT_MonadExcept___rarg___lambda__3(obj*, obj*, obj*, obj*); obj* l_Lean_Parser_MonadParsec_fix(obj*, obj*); namespace lean { -uint32 string_utf8_get_old(obj*, usize); +uint32 string_utf8_get(obj*, obj*); } obj* l_Lean_Parser_MonadParsec_leftOver(obj*, obj*, obj*); obj* l_Lean_Parser_MonadParsec_remaining___boxed(obj*, obj*); @@ -579,7 +578,7 @@ obj* l_Lean_Parser_MonadParsec_many1Aux_x_27___rarg(obj*, obj*, obj*); obj* l_Lean_Parser_ParsecT_Monad___rarg(obj*, obj*); obj* l_String_OldIterator_isPrefixOfRemaining___main___boxed(obj*, obj*); obj* l_Lean_Parser_MonadParsec_foldlAux___main___rarg___boxed(obj*, obj*, obj*, obj*, obj*, obj*, obj*, obj*); -usize l_String_OldIterator_remainingBytes(obj*); +obj* l_String_OldIterator_remainingBytes(obj*); obj* l_Lean_Parser_MonadParsec_strCore___rarg(obj*, obj*, obj*, obj*); obj* l___private_init_lean_parser_parsec_6__mkConsumedResult___boxed(obj*); obj* l_Lean_Parser_MonadParsec_curr(obj*, obj*); @@ -597,7 +596,7 @@ obj* l_Lean_Parser_MonadParsec_labels___rarg___lambda__1___boxed(obj*, obj*, obj obj* l_Lean_Parser_MonadParsec_unexpectedAt___rarg___boxed(obj*, obj*, obj*, obj*); obj* l_Lean_Parser_MonadParsec_many1Aux___main___rarg___lambda__3(obj*, obj*); namespace lean { -usize string_utf8_next_old(obj*, usize); +obj* string_utf8_next(obj*, obj*); } obj* l_Lean_Parser_ParsecT_bind_x_27(obj*); extern uint8 l_True_Decidable; @@ -622,7 +621,7 @@ namespace lean { uint8 nat_dec_le(obj*, obj*); } namespace lean { -obj* string_utf8_extract_old(obj*, usize, usize); +obj* string_utf8_extract(obj*, obj*, obj*); } obj* l_Lean_Parser_MonadParsec_whitespace(obj*, obj*); obj* l_Lean_Parser_Parsec_parse___rarg___boxed(obj*, obj*, obj*); @@ -639,7 +638,7 @@ obj* l_Lean_Parser_MonadParsec_fixAux___main___rarg___boxed(obj*, obj*, obj*, ob obj* l_Lean_Parser_MonadParsec_takeWhile_x_27___at_Lean_Parser_MonadParsec_whitespace___spec__1___rarg(obj*); obj* l_Lean_Parser_MonadParsec_observing___rarg___boxed(obj*, obj*, obj*, obj*, obj*); namespace lean { -usize string_utf8_byte_size_old(obj*); +obj* string_utf8_byte_size(obj*); } obj* l_Lean_Parser_MonadParsec_fix___rarg(obj*, obj*, obj*, obj*, obj*); obj* l___private_init_lean_parser_parsec_3__takeAux___main___rarg(obj*, obj*, obj*); @@ -736,7 +735,7 @@ obj* l_Lean_Parser_ParsecT_Monad_x_27___rarg___lambda__2(obj*, obj*, obj*, obj*, obj* l_Lean_Parser_MonadParsec_takeWhile1___at_Lean_Parser_MonadParsec_num___spec__1___rarg___lambda__1(obj*, obj*, uint32); extern obj* l_String_splitAux___main___closed__1; namespace lean { -obj* string_utf8_set_old(obj*, usize, uint32); +obj* string_utf8_set(obj*, obj*, uint32); } obj* l_Lean_Parser_MonadParsec_hidden___rarg___lambda__1(obj*, obj*); namespace lean { @@ -746,15 +745,13 @@ obj* l_Lean_Parser_ParsecT_failure(obj*); obj* l_String_mkOldIterator(obj* x_0) { _start: { -obj* x_1; usize x_2; obj* x_3; obj* x_4; +obj* x_1; obj* x_2; x_1 = lean::mk_nat_obj(0ul); -x_2 = l_String_toSubstring___closed__1; -x_3 = lean::alloc_cnstr(0, 2, sizeof(size_t)*1); -lean::cnstr_set(x_3, 0, x_0); -lean::cnstr_set(x_3, 1, x_1); -lean::cnstr_set_scalar(x_3, sizeof(void*)*2, x_2); -x_4 = x_3; -return x_4; +x_2 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_2, 0, x_0); +lean::cnstr_set(x_2, 1, x_1); +lean::cnstr_set(x_2, 2, x_1); +return x_2; } } obj* l_String_OldIterator_remaining___main(obj* x_0) { @@ -830,31 +827,31 @@ lean::dec(x_0); return x_1; } } -usize l_String_OldIterator_remainingBytes___main(obj* x_0) { +obj* l_String_OldIterator_remainingBytes___main(obj* x_0) { _start: { -obj* x_1; usize x_2; usize x_3; usize x_4; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; x_1 = lean::cnstr_get(x_0, 0); -x_2 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); -x_3 = lean::string_utf8_byte_size_old(x_1); -x_4 = x_3 - x_2; +x_2 = lean::cnstr_get(x_0, 2); +x_3 = lean::string_utf8_byte_size(x_1); +x_4 = lean::nat_sub(x_3, x_2); +lean::dec(x_3); return x_4; } } obj* l_String_OldIterator_remainingBytes___main___boxed(obj* x_0) { _start: { -usize x_1; obj* x_2; +obj* x_1; x_1 = l_String_OldIterator_remainingBytes___main(x_0); -x_2 = lean::box_size_t(x_1); lean::dec(x_0); -return x_2; +return x_1; } } -usize l_String_OldIterator_remainingBytes(obj* x_0) { +obj* l_String_OldIterator_remainingBytes(obj* x_0) { _start: { -usize x_1; +obj* x_1; x_1 = l_String_OldIterator_remainingBytes___main(x_0); return x_1; } @@ -862,20 +859,19 @@ return x_1; obj* l_String_OldIterator_remainingBytes___boxed(obj* x_0) { _start: { -usize x_1; obj* x_2; +obj* x_1; x_1 = l_String_OldIterator_remainingBytes(x_0); -x_2 = lean::box_size_t(x_1); lean::dec(x_0); -return x_2; +return x_1; } } uint32 l_String_OldIterator_curr___main(obj* x_0) { _start: { -obj* x_1; usize x_2; uint32 x_3; +obj* x_1; obj* x_2; uint32 x_3; x_1 = lean::cnstr_get(x_0, 0); -x_2 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); -x_3 = lean::string_utf8_get_old(x_1, x_2); +x_2 = lean::cnstr_get(x_0, 2); +x_3 = lean::string_utf8_get(x_1, x_2); return x_3; } } @@ -910,32 +906,33 @@ return x_2; obj* l_String_OldIterator_next___main(obj* x_0) { _start: { -obj* x_1; obj* x_3; usize x_5; obj* x_6; obj* x_7; obj* x_8; usize x_10; obj* x_11; obj* x_12; +obj* x_1; obj* x_3; obj* x_5; obj* x_7; obj* x_8; obj* x_9; obj* x_11; obj* x_13; x_1 = lean::cnstr_get(x_0, 0); x_3 = lean::cnstr_get(x_0, 1); -x_5 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); +x_5 = lean::cnstr_get(x_0, 2); if (lean::is_exclusive(x_0)) { - x_6 = x_0; + x_7 = x_0; } else { lean::inc(x_1); lean::inc(x_3); + lean::inc(x_5); lean::dec(x_0); - x_6 = lean::box(0); + x_7 = lean::box(0); } -x_7 = lean::mk_nat_obj(1ul); -x_8 = lean::nat_add(x_3, x_7); +x_8 = lean::mk_nat_obj(1ul); +x_9 = lean::nat_add(x_3, x_8); lean::dec(x_3); -x_10 = lean::string_utf8_next_old(x_1, x_5); -if (lean::is_scalar(x_6)) { - x_11 = lean::alloc_cnstr(0, 2, sizeof(size_t)*1); +x_11 = lean::string_utf8_next(x_1, x_5); +lean::dec(x_5); +if (lean::is_scalar(x_7)) { + x_13 = lean::alloc_cnstr(0, 3, 0); } else { - x_11 = x_6; + x_13 = x_7; } -lean::cnstr_set(x_11, 0, x_1); -lean::cnstr_set(x_11, 1, x_8); -lean::cnstr_set_scalar(x_11, sizeof(void*)*2, x_10); -x_12 = x_11; -return x_12; +lean::cnstr_set(x_13, 0, x_1); +lean::cnstr_set(x_13, 1, x_9); +lean::cnstr_set(x_13, 2, x_11); +return x_13; } } obj* l_String_OldIterator_next(obj* x_0) { @@ -949,32 +946,33 @@ return x_1; obj* l_String_OldIterator_prev___main(obj* x_0) { _start: { -obj* x_1; obj* x_3; usize x_5; obj* x_6; obj* x_7; obj* x_8; usize x_10; obj* x_11; obj* x_12; +obj* x_1; obj* x_3; obj* x_5; obj* x_7; obj* x_8; obj* x_9; obj* x_11; obj* x_13; x_1 = lean::cnstr_get(x_0, 0); x_3 = lean::cnstr_get(x_0, 1); -x_5 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); +x_5 = lean::cnstr_get(x_0, 2); if (lean::is_exclusive(x_0)) { - x_6 = x_0; + x_7 = x_0; } else { lean::inc(x_1); lean::inc(x_3); + lean::inc(x_5); lean::dec(x_0); - x_6 = lean::box(0); + x_7 = lean::box(0); } -x_7 = lean::mk_nat_obj(1ul); -x_8 = lean::nat_sub(x_3, x_7); +x_8 = lean::mk_nat_obj(1ul); +x_9 = lean::nat_sub(x_3, x_8); lean::dec(x_3); -x_10 = lean::string_utf8_prev_old(x_1, x_5); -if (lean::is_scalar(x_6)) { - x_11 = lean::alloc_cnstr(0, 2, sizeof(size_t)*1); +x_11 = lean::string_utf8_prev(x_1, x_5); +lean::dec(x_5); +if (lean::is_scalar(x_7)) { + x_13 = lean::alloc_cnstr(0, 3, 0); } else { - x_11 = x_6; + x_13 = x_7; } -lean::cnstr_set(x_11, 0, x_1); -lean::cnstr_set(x_11, 1, x_8); -lean::cnstr_set_scalar(x_11, sizeof(void*)*2, x_10); -x_12 = x_11; -return x_12; +lean::cnstr_set(x_13, 0, x_1); +lean::cnstr_set(x_13, 1, x_9); +lean::cnstr_set(x_13, 2, x_11); +return x_13; } } obj* l_String_OldIterator_prev(obj* x_0) { @@ -988,11 +986,12 @@ return x_1; uint8 l_String_OldIterator_hasNext___main(obj* x_0) { _start: { -obj* x_1; usize x_2; usize x_3; uint8 x_4; +obj* x_1; obj* x_2; obj* x_3; uint8 x_4; x_1 = lean::cnstr_get(x_0, 0); -x_2 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); -x_3 = lean::string_utf8_byte_size_old(x_1); -x_4 = x_2 < x_3; +x_2 = lean::cnstr_get(x_0, 2); +x_3 = lean::string_utf8_byte_size(x_1); +x_4 = lean::nat_dec_lt(x_2, x_3); +lean::dec(x_3); return x_4; } } @@ -1027,10 +1026,10 @@ return x_2; uint8 l_String_OldIterator_hasPrev___main(obj* x_0) { _start: { -usize x_1; usize x_2; uint8 x_3; -x_1 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); -x_2 = l_String_toSubstring___closed__1; -x_3 = x_2 < x_1; +obj* x_1; obj* x_2; uint8 x_3; +x_1 = lean::cnstr_get(x_0, 2); +x_2 = lean::mk_nat_obj(0ul); +x_3 = lean::nat_dec_lt(x_2, x_1); return x_3; } } @@ -1065,28 +1064,28 @@ return x_2; obj* l_String_OldIterator_setCurr___main(obj* x_0, uint32 x_1) { _start: { -obj* x_2; obj* x_4; usize x_6; obj* x_7; obj* x_8; obj* x_9; obj* x_10; +obj* x_2; obj* x_4; obj* x_6; obj* x_8; obj* x_9; obj* x_10; x_2 = lean::cnstr_get(x_0, 0); x_4 = lean::cnstr_get(x_0, 1); -x_6 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); +x_6 = lean::cnstr_get(x_0, 2); if (lean::is_exclusive(x_0)) { - x_7 = x_0; + x_8 = x_0; } else { lean::inc(x_2); lean::inc(x_4); + lean::inc(x_6); lean::dec(x_0); - x_7 = lean::box(0); + x_8 = lean::box(0); } -x_8 = lean::string_utf8_set_old(x_2, x_6, x_1); -if (lean::is_scalar(x_7)) { - x_9 = lean::alloc_cnstr(0, 2, sizeof(size_t)*1); +x_9 = lean::string_utf8_set(x_2, x_6, x_1); +if (lean::is_scalar(x_8)) { + x_10 = lean::alloc_cnstr(0, 3, 0); } else { - x_9 = x_7; + x_10 = x_8; } -lean::cnstr_set(x_9, 0, x_8); -lean::cnstr_set(x_9, 1, x_4); -lean::cnstr_set_scalar(x_9, sizeof(void*)*2, x_6); -x_10 = x_9; +lean::cnstr_set(x_10, 0, x_9); +lean::cnstr_set(x_10, 1, x_4); +lean::cnstr_set(x_10, 2, x_6); return x_10; } } @@ -1119,10 +1118,11 @@ return x_3; obj* l_String_OldIterator_toEnd___main(obj* x_0) { _start: { -obj* x_1; obj* x_3; obj* x_4; usize x_5; obj* x_6; obj* x_7; +obj* x_1; obj* x_3; obj* x_4; obj* x_5; obj* x_6; x_1 = lean::cnstr_get(x_0, 0); if (lean::is_exclusive(x_0)) { lean::cnstr_release(x_0, 1); + lean::cnstr_release(x_0, 2); x_3 = x_0; } else { lean::inc(x_1); @@ -1130,17 +1130,16 @@ if (lean::is_exclusive(x_0)) { x_3 = lean::box(0); } x_4 = lean::string_length(x_1); -x_5 = lean::string_utf8_byte_size_old(x_1); +x_5 = lean::string_utf8_byte_size(x_1); if (lean::is_scalar(x_3)) { - x_6 = lean::alloc_cnstr(0, 2, sizeof(size_t)*1); + x_6 = lean::alloc_cnstr(0, 3, 0); } else { x_6 = x_3; } lean::cnstr_set(x_6, 0, x_1); lean::cnstr_set(x_6, 1, x_4); -lean::cnstr_set_scalar(x_6, sizeof(void*)*2, x_5); -x_7 = x_6; -return x_7; +lean::cnstr_set(x_6, 2, x_5); +return x_6; } } obj* l_String_OldIterator_toEnd(obj* x_0) { @@ -1154,12 +1153,12 @@ return x_1; obj* l_String_OldIterator_extract___main(obj* x_0, obj* x_1) { _start: { -usize x_2; obj* x_3; obj* x_4; usize x_5; uint8 x_6; -x_2 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); -x_3 = lean::cnstr_get(x_0, 0); +obj* x_2; obj* x_3; obj* x_4; obj* x_5; uint8 x_6; +x_2 = lean::cnstr_get(x_0, 0); +x_3 = lean::cnstr_get(x_0, 2); x_4 = lean::cnstr_get(x_1, 0); -x_5 = lean::cnstr_get_scalar(x_1, sizeof(void*)*2); -x_6 = lean::string_dec_eq(x_3, x_4); +x_5 = lean::cnstr_get(x_1, 2); +x_6 = lean::string_dec_eq(x_2, x_4); if (x_6 == 0) { obj* x_7; @@ -1169,11 +1168,11 @@ return x_7; else { uint8 x_8; -x_8 = x_5 < x_2; +x_8 = lean::nat_dec_lt(x_5, x_3); if (x_8 == 0) { obj* x_9; -x_9 = lean::string_utf8_extract_old(x_3, x_2, x_5); +x_9 = lean::string_utf8_extract(x_2, x_3, x_5); return x_9; } else @@ -1248,11 +1247,12 @@ return x_2; obj* l_String_OldIterator_remainingToString___main(obj* x_0) { _start: { -obj* x_1; usize x_2; usize x_3; obj* x_4; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; x_1 = lean::cnstr_get(x_0, 0); -x_2 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); -x_3 = lean::string_utf8_byte_size_old(x_1); -x_4 = lean::string_utf8_extract_old(x_1, x_2, x_3); +x_2 = lean::cnstr_get(x_0, 2); +x_3 = lean::string_utf8_byte_size(x_1); +x_4 = lean::string_utf8_extract(x_1, x_2, x_3); +lean::dec(x_3); return x_4; } } @@ -1285,20 +1285,23 @@ return x_1; uint8 l_String_OldIterator_isPrefixOfRemaining___main(obj* x_0, obj* x_1) { _start: { -usize x_2; obj* x_3; obj* x_4; usize x_5; usize x_6; obj* x_7; usize x_8; usize x_9; obj* x_10; uint8 x_11; -x_2 = lean::cnstr_get_scalar(x_0, sizeof(void*)*2); -x_3 = lean::cnstr_get(x_0, 0); +obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; obj* x_10; obj* x_12; uint8 x_14; +x_2 = lean::cnstr_get(x_0, 0); +x_3 = lean::cnstr_get(x_0, 2); x_4 = lean::cnstr_get(x_1, 0); -x_5 = lean::cnstr_get_scalar(x_1, sizeof(void*)*2); -x_6 = lean::string_utf8_byte_size_old(x_3); -x_7 = lean::string_utf8_extract_old(x_3, x_2, x_6); -x_8 = x_6 - x_2; -x_9 = x_5 + x_8; -x_10 = lean::string_utf8_extract_old(x_4, x_5, x_9); -x_11 = lean::string_dec_eq(x_7, x_10); +x_5 = lean::cnstr_get(x_1, 2); +x_6 = lean::string_utf8_byte_size(x_2); +x_7 = lean::string_utf8_extract(x_2, x_3, x_6); +x_8 = lean::nat_sub(x_6, x_3); +lean::dec(x_6); +x_10 = lean::nat_add(x_5, x_8); +lean::dec(x_8); +x_12 = lean::string_utf8_extract(x_4, x_5, x_10); lean::dec(x_10); +x_14 = lean::string_dec_eq(x_7, x_12); +lean::dec(x_12); lean::dec(x_7); -return x_11; +return x_14; } } obj* l_String_OldIterator_isPrefixOfRemaining___main___boxed(obj* x_0, obj* x_1) { @@ -1492,17 +1495,15 @@ return x_3; obj* l_String_oldLineColumn(obj* x_0, obj* x_1) { _start: { -obj* x_2; usize x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; +obj* x_2; obj* x_3; obj* x_4; obj* x_5; x_2 = lean::mk_nat_obj(0ul); -x_3 = l_String_toSubstring___closed__1; -x_4 = lean::alloc_cnstr(0, 2, sizeof(size_t)*1); -lean::cnstr_set(x_4, 0, x_0); -lean::cnstr_set(x_4, 1, x_2); -lean::cnstr_set_scalar(x_4, sizeof(void*)*2, x_3); -x_5 = x_4; -x_6 = l_String_lineColumn___closed__1; -x_7 = l___private_init_lean_parser_parsec_1__oldLineColumnAux___main(x_1, x_5, x_6); -return x_7; +x_3 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_3, 0, x_0); +lean::cnstr_set(x_3, 1, x_2); +lean::cnstr_set(x_3, 2, x_2); +x_4 = l_String_lineColumn___closed__1; +x_5 = l___private_init_lean_parser_parsec_1__oldLineColumnAux___main(x_1, x_3, x_4); +return x_5; } } obj* _init_l_Lean_Parser_Parsec_expected_toString___main___closed__1() { @@ -1963,21 +1964,19 @@ return x_23; obj* l_Lean_Parser_ParsecT_run___rarg(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { _start: { -obj* x_6; obj* x_8; usize x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; +obj* x_6; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; x_6 = lean::cnstr_get(x_0, 1); lean::inc(x_6); x_8 = lean::mk_nat_obj(0ul); -x_9 = l_String_toSubstring___closed__1; -x_10 = lean::alloc_cnstr(0, 2, sizeof(size_t)*1); -lean::cnstr_set(x_10, 0, x_4); -lean::cnstr_set(x_10, 1, x_8); -lean::cnstr_set_scalar(x_10, sizeof(void*)*2, x_9); -x_11 = x_10; -x_12 = lean::apply_1(x_3, x_11); -x_13 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_ParsecT_run___rarg___lambda__1), 2, 1); -lean::closure_set(x_13, 0, x_0); -x_14 = lean::apply_4(x_6, lean::box(0), lean::box(0), x_12, x_13); -return x_14; +x_9 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_9, 0, x_4); +lean::cnstr_set(x_9, 1, x_8); +lean::cnstr_set(x_9, 2, x_8); +x_10 = lean::apply_1(x_3, x_9); +x_11 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_ParsecT_run___rarg___lambda__1), 2, 1); +lean::closure_set(x_11, 0, x_0); +x_12 = lean::apply_4(x_6, lean::box(0), lean::box(0), x_10, x_11); +return x_12; } } obj* l_Lean_Parser_ParsecT_run(obj* x_0) { @@ -6574,50 +6573,48 @@ return x_3; obj* l_Lean_Parser_MonadParsec_strCore___rarg___lambda__1(obj* x_0, obj* x_1, obj* x_2) { _start: { -obj* x_3; obj* x_4; usize x_5; obj* x_7; obj* x_8; obj* x_10; +obj* x_3; obj* x_4; obj* x_6; obj* x_8; x_3 = lean::string_length(x_0); x_4 = lean::mk_nat_obj(0ul); -x_5 = l_String_toSubstring___closed__1; lean::inc(x_0); -x_7 = lean::alloc_cnstr(0, 2, sizeof(size_t)*1); -lean::cnstr_set(x_7, 0, x_0); -lean::cnstr_set(x_7, 1, x_4); -lean::cnstr_set_scalar(x_7, sizeof(void*)*2, x_5); -x_8 = x_7; +x_6 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_6, 0, x_0); +lean::cnstr_set(x_6, 1, x_4); +lean::cnstr_set(x_6, 2, x_4); lean::inc(x_2); -x_10 = l___private_init_lean_parser_parsec_2__strAux___main(x_3, x_8, x_2); -if (lean::obj_tag(x_10) == 0) +x_8 = l___private_init_lean_parser_parsec_2__strAux___main(x_3, x_6, x_2); +if (lean::obj_tag(x_8) == 0) { -obj* x_12; obj* x_13; obj* x_14; uint8 x_15; obj* x_16; obj* x_17; +obj* x_10; obj* x_11; obj* x_12; uint8 x_13; obj* x_14; obj* x_15; lean::dec(x_0); -x_12 = lean::box(0); -x_13 = l_String_splitAux___main___closed__1; -x_14 = lean::alloc_cnstr(0, 4, 0); -lean::cnstr_set(x_14, 0, x_2); -lean::cnstr_set(x_14, 1, x_13); -lean::cnstr_set(x_14, 2, x_1); -lean::cnstr_set(x_14, 3, x_12); -x_15 = 0; -x_16 = lean::alloc_cnstr(1, 1, 1); -lean::cnstr_set(x_16, 0, x_14); -lean::cnstr_set_scalar(x_16, sizeof(void*)*1, x_15); -x_17 = x_16; -return x_17; +x_10 = lean::box(0); +x_11 = l_String_splitAux___main___closed__1; +x_12 = lean::alloc_cnstr(0, 4, 0); +lean::cnstr_set(x_12, 0, x_2); +lean::cnstr_set(x_12, 1, x_11); +lean::cnstr_set(x_12, 2, x_1); +lean::cnstr_set(x_12, 3, x_10); +x_13 = 0; +x_14 = lean::alloc_cnstr(1, 1, 1); +lean::cnstr_set(x_14, 0, x_12); +lean::cnstr_set_scalar(x_14, sizeof(void*)*1, x_13); +x_15 = x_14; +return x_15; } else { -obj* x_20; obj* x_23; obj* x_24; +obj* x_18; obj* x_21; obj* x_22; lean::dec(x_1); lean::dec(x_2); -x_20 = lean::cnstr_get(x_10, 0); -lean::inc(x_20); -lean::dec(x_10); -x_23 = lean::box(0); -x_24 = lean::alloc_cnstr(0, 3, 0); -lean::cnstr_set(x_24, 0, x_0); -lean::cnstr_set(x_24, 1, x_20); -lean::cnstr_set(x_24, 2, x_23); -return x_24; +x_18 = lean::cnstr_get(x_8, 0); +lean::inc(x_18); +lean::dec(x_8); +x_21 = lean::box(0); +x_22 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_22, 0, x_0); +lean::cnstr_set(x_22, 1, x_18); +lean::cnstr_set(x_22, 2, x_21); +return x_22; } } } @@ -10674,21 +10671,19 @@ return x_2; obj* l_Lean_Parser_ParsecT_run___at_Lean_Parser_ParsecT_parseWithEoi___spec__3___rarg(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { _start: { -obj* x_6; obj* x_8; usize x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; +obj* x_6; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; x_6 = lean::cnstr_get(x_0, 1); lean::inc(x_6); x_8 = lean::mk_nat_obj(0ul); -x_9 = l_String_toSubstring___closed__1; -x_10 = lean::alloc_cnstr(0, 2, sizeof(size_t)*1); -lean::cnstr_set(x_10, 0, x_4); -lean::cnstr_set(x_10, 1, x_8); -lean::cnstr_set_scalar(x_10, sizeof(void*)*2, x_9); -x_11 = x_10; -x_12 = lean::apply_1(x_3, x_11); -x_13 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_ParsecT_run___rarg___lambda__1), 2, 1); -lean::closure_set(x_13, 0, x_0); -x_14 = lean::apply_4(x_6, lean::box(0), lean::box(0), x_12, x_13); -return x_14; +x_9 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_9, 0, x_4); +lean::cnstr_set(x_9, 1, x_8); +lean::cnstr_set(x_9, 2, x_8); +x_10 = lean::apply_1(x_3, x_9); +x_11 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_ParsecT_run___rarg___lambda__1), 2, 1); +lean::closure_set(x_11, 0, x_0); +x_12 = lean::apply_4(x_6, lean::box(0), lean::box(0), x_10, x_11); +return x_12; } } obj* l_Lean_Parser_ParsecT_run___at_Lean_Parser_ParsecT_parseWithEoi___spec__3(obj* x_0) { @@ -10872,21 +10867,19 @@ return x_2; obj* l_Lean_Parser_ParsecT_run___at_Lean_Parser_ParsecT_parseWithLeftOver___spec__1___rarg(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { _start: { -obj* x_6; obj* x_8; usize x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; +obj* x_6; obj* x_8; obj* x_9; obj* x_10; obj* x_11; obj* x_12; x_6 = lean::cnstr_get(x_0, 1); lean::inc(x_6); x_8 = lean::mk_nat_obj(0ul); -x_9 = l_String_toSubstring___closed__1; -x_10 = lean::alloc_cnstr(0, 2, sizeof(size_t)*1); -lean::cnstr_set(x_10, 0, x_4); -lean::cnstr_set(x_10, 1, x_8); -lean::cnstr_set_scalar(x_10, sizeof(void*)*2, x_9); -x_11 = x_10; -x_12 = lean::apply_1(x_3, x_11); -x_13 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_ParsecT_run___rarg___lambda__1), 2, 1); -lean::closure_set(x_13, 0, x_0); -x_14 = lean::apply_4(x_6, lean::box(0), lean::box(0), x_12, x_13); -return x_14; +x_9 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_9, 0, x_4); +lean::cnstr_set(x_9, 1, x_8); +lean::cnstr_set(x_9, 2, x_8); +x_10 = lean::apply_1(x_3, x_9); +x_11 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_ParsecT_run___rarg___lambda__1), 2, 1); +lean::closure_set(x_11, 0, x_0); +x_12 = lean::apply_4(x_6, lean::box(0), lean::box(0), x_10, x_11); +return x_12; } } obj* l_Lean_Parser_ParsecT_run___at_Lean_Parser_ParsecT_parseWithLeftOver___spec__1(obj* x_0) { @@ -11203,34 +11196,32 @@ return x_2; obj* l_Lean_Parser_ParsecT_run___at_Lean_Parser_Parsec_parse___spec__1___rarg(obj* x_0, obj* x_1, obj* x_2) { _start: { -obj* x_3; usize x_4; obj* x_5; obj* x_6; obj* x_7; +obj* x_3; obj* x_4; obj* x_5; x_3 = lean::mk_nat_obj(0ul); -x_4 = l_String_toSubstring___closed__1; -x_5 = lean::alloc_cnstr(0, 2, sizeof(size_t)*1); -lean::cnstr_set(x_5, 0, x_1); -lean::cnstr_set(x_5, 1, x_3); -lean::cnstr_set_scalar(x_5, sizeof(void*)*2, x_4); -x_6 = x_5; -x_7 = lean::apply_1(x_0, x_6); -if (lean::obj_tag(x_7) == 0) +x_4 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_4, 0, x_1); +lean::cnstr_set(x_4, 1, x_3); +lean::cnstr_set(x_4, 2, x_3); +x_5 = lean::apply_1(x_0, x_4); +if (lean::obj_tag(x_5) == 0) { -obj* x_8; obj* x_11; -x_8 = lean::cnstr_get(x_7, 0); -lean::inc(x_8); -lean::dec(x_7); -x_11 = lean::alloc_cnstr(1, 1, 0); -lean::cnstr_set(x_11, 0, x_8); -return x_11; +obj* x_6; obj* x_9; +x_6 = lean::cnstr_get(x_5, 0); +lean::inc(x_6); +lean::dec(x_5); +x_9 = lean::alloc_cnstr(1, 1, 0); +lean::cnstr_set(x_9, 0, x_6); +return x_9; } else { -obj* x_12; obj* x_15; -x_12 = lean::cnstr_get(x_7, 0); -lean::inc(x_12); -lean::dec(x_7); -x_15 = lean::alloc_cnstr(0, 1, 0); -lean::cnstr_set(x_15, 0, x_12); -return x_15; +obj* x_10; obj* x_13; +x_10 = lean::cnstr_get(x_5, 0); +lean::inc(x_10); +lean::dec(x_5); +x_13 = lean::alloc_cnstr(0, 1, 0); +lean::cnstr_set(x_13, 0, x_10); +return x_13; } } } diff --git a/src/stage0/init/lean/parser/pratt.cpp b/src/stage0/init/lean/parser/pratt.cpp index e7a60d1931..bf2b9301ca 100644 --- a/src/stage0/init/lean/parser/pratt.cpp +++ b/src/stage0/init/lean/parser/pratt.cpp @@ -24,7 +24,6 @@ namespace lean { obj* nat_sub(obj*, obj*); } obj* l_Lean_Parser_MonadParsec_error___at_Lean_Parser_currLbp___spec__3(obj*, obj*); -extern usize l_String_toSubstring___closed__1; obj* l_Lean_Parser_prattParser_View___boxed(obj*); extern obj* l_mjoin___rarg___closed__1; obj* l_Lean_Parser_currLbp___rarg___lambda__3___closed__2; @@ -210,32 +209,30 @@ return x_20; obj* l_Lean_Parser_currLbp___rarg___lambda__2(obj* x_0, obj* x_1, obj* x_2, obj* x_3, obj* x_4, obj* x_5) { _start: { -obj* x_6; obj* x_9; usize x_10; obj* x_11; obj* x_12; obj* x_13; obj* x_14; obj* x_16; obj* x_20; obj* x_21; obj* x_22; +obj* x_6; obj* x_9; obj* x_10; obj* x_11; obj* x_12; obj* x_14; obj* x_18; obj* x_19; obj* x_20; x_6 = lean::cnstr_get(x_5, 1); lean::inc(x_6); lean::dec(x_5); x_9 = lean::mk_nat_obj(0ul); -x_10 = l_String_toSubstring___closed__1; -x_11 = lean::alloc_cnstr(0, 2, sizeof(size_t)*1); -lean::cnstr_set(x_11, 0, x_0); -lean::cnstr_set(x_11, 1, x_9); -lean::cnstr_set_scalar(x_11, sizeof(void*)*2, x_10); -x_12 = x_11; -x_13 = l_Lean_Parser_Trie_matchPrefix___rarg(x_6, x_12); -x_14 = lean::cnstr_get(x_1, 0); +x_10 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_10, 0, x_0); +lean::cnstr_set(x_10, 1, x_9); +lean::cnstr_set(x_10, 2, x_9); +x_11 = l_Lean_Parser_Trie_matchPrefix___rarg(x_6, x_10); +x_12 = lean::cnstr_get(x_1, 0); +lean::inc(x_12); +x_14 = lean::cnstr_get(x_12, 1); lean::inc(x_14); -x_16 = lean::cnstr_get(x_14, 1); -lean::inc(x_16); -lean::dec(x_14); -lean::inc(x_16); -x_20 = lean::apply_2(x_16, lean::box(0), x_13); -x_21 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_currLbp___rarg___lambda__1___boxed), 5, 4); -lean::closure_set(x_21, 0, x_1); -lean::closure_set(x_21, 1, x_2); -lean::closure_set(x_21, 2, x_3); -lean::closure_set(x_21, 3, x_16); -x_22 = lean::apply_4(x_4, lean::box(0), lean::box(0), x_20, x_21); -return x_22; +lean::dec(x_12); +lean::inc(x_14); +x_18 = lean::apply_2(x_14, lean::box(0), x_11); +x_19 = lean::alloc_closure(reinterpret_cast(l_Lean_Parser_currLbp___rarg___lambda__1___boxed), 5, 4); +lean::closure_set(x_19, 0, x_1); +lean::closure_set(x_19, 1, x_2); +lean::closure_set(x_19, 2, x_3); +lean::closure_set(x_19, 3, x_14); +x_20 = lean::apply_4(x_4, lean::box(0), lean::box(0), x_18, x_19); +return x_20; } } obj* _init_l_Lean_Parser_currLbp___rarg___lambda__3___closed__1() { diff --git a/src/stage0/init/lean/parser/syntax.cpp b/src/stage0/init/lean/parser/syntax.cpp index f998d6c0a3..bbec7902a1 100644 --- a/src/stage0/init/lean/parser/syntax.cpp +++ b/src/stage0/init/lean/parser/syntax.cpp @@ -31,7 +31,6 @@ obj* l_Lean_Parser_Syntax_mreplaceLst___main___at_Lean_Parser_Syntax_updateLeadi obj* l_Lean_Parser_Syntax_getHeadInfo___boxed(obj*); extern obj* l_Lean_Format_paren___closed__2; obj* l_List_map___main___at_Lean_Parser_Syntax_asNode___main___spec__1(obj*, obj*); -extern usize l_String_toSubstring___closed__1; obj* l_Lean_Parser_Syntax_updateLeading___closed__1; obj* l_Lean_Parser_Syntax_getHeadInfoLst___main(obj*); obj* l_Lean_Parser_MacroScope_DecidableEq; @@ -230,20 +229,18 @@ return x_1; obj* l_Lean_Parser_Substring_ofString(obj* x_0) { _start: { -obj* x_1; usize x_2; obj* x_3; obj* x_4; obj* x_6; obj* x_7; +obj* x_1; obj* x_2; obj* x_4; obj* x_5; x_1 = lean::mk_nat_obj(0ul); -x_2 = l_String_toSubstring___closed__1; -x_3 = lean::alloc_cnstr(0, 2, sizeof(size_t)*1); -lean::cnstr_set(x_3, 0, x_0); -lean::cnstr_set(x_3, 1, x_1); -lean::cnstr_set_scalar(x_3, sizeof(void*)*2, x_2); -x_4 = x_3; -lean::inc(x_4); -x_6 = l_String_OldIterator_toEnd___main(x_4); -x_7 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_7, 0, x_4); -lean::cnstr_set(x_7, 1, x_6); -return x_7; +x_2 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_2, 0, x_0); +lean::cnstr_set(x_2, 1, x_1); +lean::cnstr_set(x_2, 2, x_1); +lean::inc(x_2); +x_4 = l_String_OldIterator_toEnd___main(x_2); +x_5 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_5, 0, x_2); +lean::cnstr_set(x_5, 1, x_4); +return x_5; } } obj* _init_l_Lean_Parser_Substring_HasToString() { @@ -1450,20 +1447,18 @@ return x_0; obj* l_Lean_Parser_Syntax_updateLeading(obj* x_0, obj* x_1) { _start: { -obj* x_2; usize x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; +obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; x_2 = lean::mk_nat_obj(0ul); -x_3 = l_String_toSubstring___closed__1; -x_4 = lean::alloc_cnstr(0, 2, sizeof(size_t)*1); -lean::cnstr_set(x_4, 0, x_0); -lean::cnstr_set(x_4, 1, x_2); -lean::cnstr_set_scalar(x_4, sizeof(void*)*2, x_3); -x_5 = x_4; -x_6 = l_Lean_Parser_Syntax_updateLeading___closed__1; -x_7 = l_Lean_Parser_Syntax_mreplace___main___at_Lean_Parser_Syntax_updateLeading___spec__1(x_6, x_1, x_5); -x_8 = lean::cnstr_get(x_7, 0); -lean::inc(x_8); -lean::dec(x_7); -return x_8; +x_3 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_3, 0, x_0); +lean::cnstr_set(x_3, 1, x_2); +lean::cnstr_set(x_3, 2, x_2); +x_4 = l_Lean_Parser_Syntax_updateLeading___closed__1; +x_5 = l_Lean_Parser_Syntax_mreplace___main___at_Lean_Parser_Syntax_updateLeading___spec__1(x_4, x_1, x_3); +x_6 = lean::cnstr_get(x_5, 0); +lean::inc(x_6); +lean::dec(x_5); +return x_6; } } obj* l_Lean_Parser_Syntax_getHeadInfo___main(obj* x_0) { diff --git a/src/stage0/init/lean/parser/term.cpp b/src/stage0/init/lean/parser/term.cpp index 2c91d6ea55..5a9f964665 100644 --- a/src/stage0/init/lean/parser/term.cpp +++ b/src/stage0/init/lean/parser/term.cpp @@ -115,7 +115,6 @@ obj* l_Lean_Parser_Term_letLhsId; obj* l_Lean_Parser_Term_bracketedBinder_Parser_Lean_Parser_HasTokens___closed__1; obj* l_Lean_Parser_Term_structInstWith_HasView_x_27___lambda__2(obj*); extern obj* l_Lean_Parser_Combinators_choiceAux___main___rarg___closed__1; -extern usize l_String_toSubstring___closed__1; obj* l_Lean_Parser_Term_structInstField_HasView_x_27___lambda__1(obj*); obj* l_Lean_Parser_Term_implicitBinder_HasView_x_27___lambda__1___closed__1; obj* l_Lean_Parser_Term_bindersTypes_HasView_x_27___lambda__1___closed__1; @@ -43519,73 +43518,71 @@ uint8 x_8; x_8 = l_String_isEmpty(x_0); if (x_8 == 0) { -obj* x_9; obj* x_10; usize x_11; obj* x_13; obj* x_14; obj* x_16; +obj* x_9; obj* x_10; obj* x_12; obj* x_14; x_9 = lean::string_length(x_0); x_10 = lean::mk_nat_obj(0ul); -x_11 = l_String_toSubstring___closed__1; lean::inc(x_0); -x_13 = lean::alloc_cnstr(0, 2, sizeof(size_t)*1); -lean::cnstr_set(x_13, 0, x_0); -lean::cnstr_set(x_13, 1, x_10); -lean::cnstr_set_scalar(x_13, sizeof(void*)*2, x_11); -x_14 = x_13; +x_12 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_12, 0, x_0); +lean::cnstr_set(x_12, 1, x_10); +lean::cnstr_set(x_12, 2, x_10); lean::inc(x_6); -x_16 = l___private_init_lean_parser_parsec_2__strAux___main(x_9, x_14, x_6); -if (lean::obj_tag(x_16) == 0) +x_14 = l___private_init_lean_parser_parsec_2__strAux___main(x_9, x_12, x_6); +if (lean::obj_tag(x_14) == 0) { -obj* x_18; obj* x_19; obj* x_20; uint8 x_21; obj* x_22; obj* x_23; obj* x_24; +obj* x_16; obj* x_17; obj* x_18; uint8 x_19; obj* x_20; obj* x_21; obj* x_22; lean::dec(x_0); -x_18 = lean::box(0); -x_19 = l_String_splitAux___main___closed__1; -x_20 = lean::alloc_cnstr(0, 4, 0); -lean::cnstr_set(x_20, 0, x_6); -lean::cnstr_set(x_20, 1, x_19); -lean::cnstr_set(x_20, 2, x_1); -lean::cnstr_set(x_20, 3, x_18); -x_21 = 0; -x_22 = lean::alloc_cnstr(1, 1, 1); -lean::cnstr_set(x_22, 0, x_20); -lean::cnstr_set_scalar(x_22, sizeof(void*)*1, x_21); -x_23 = x_22; -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; +x_16 = lean::box(0); +x_17 = l_String_splitAux___main___closed__1; +x_18 = lean::alloc_cnstr(0, 4, 0); +lean::cnstr_set(x_18, 0, x_6); +lean::cnstr_set(x_18, 1, x_17); +lean::cnstr_set(x_18, 2, x_1); +lean::cnstr_set(x_18, 3, x_16); +x_19 = 0; +x_20 = lean::alloc_cnstr(1, 1, 1); +lean::cnstr_set(x_20, 0, x_18); +lean::cnstr_set_scalar(x_20, sizeof(void*)*1, x_19); +x_21 = x_20; +x_22 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_22, 0, x_21); +lean::cnstr_set(x_22, 1, x_7); +return x_22; } else { -obj* x_27; obj* x_30; obj* x_31; obj* x_32; +obj* x_25; obj* x_28; obj* x_29; obj* x_30; lean::dec(x_1); lean::dec(x_6); -x_27 = lean::cnstr_get(x_16, 0); -lean::inc(x_27); -lean::dec(x_16); -x_30 = lean::box(0); -x_31 = lean::alloc_cnstr(0, 3, 0); -lean::cnstr_set(x_31, 0, x_0); -lean::cnstr_set(x_31, 1, x_27); -lean::cnstr_set(x_31, 2, 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_7); -return x_32; +x_25 = lean::cnstr_get(x_14, 0); +lean::inc(x_25); +lean::dec(x_14); +x_28 = lean::box(0); +x_29 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_29, 0, x_0); +lean::cnstr_set(x_29, 1, x_25); +lean::cnstr_set(x_29, 2, 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_7); +return x_30; } } else { -obj* x_35; obj* x_36; obj* x_37; obj* x_38; +obj* x_33; obj* x_34; obj* x_35; obj* x_36; lean::dec(x_1); lean::dec(x_0); -x_35 = l_String_splitAux___main___closed__1; -x_36 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1; -x_37 = lean::alloc_cnstr(0, 3, 0); -lean::cnstr_set(x_37, 0, x_35); -lean::cnstr_set(x_37, 1, x_6); -lean::cnstr_set(x_37, 2, x_36); -x_38 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_38, 0, x_37); -lean::cnstr_set(x_38, 1, x_7); -return x_38; +x_33 = l_String_splitAux___main___closed__1; +x_34 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1; +x_35 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_35, 0, x_33); +lean::cnstr_set(x_35, 1, x_6); +lean::cnstr_set(x_35, 2, x_34); +x_36 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_36, 0, x_35); +lean::cnstr_set(x_36, 1, x_7); +return x_36; } } } @@ -48073,7 +48070,7 @@ lean::dec(x_10); switch (lean::obj_tag(x_27)) { case 0: { -obj* x_30; obj* x_33; obj* x_36; obj* x_38; obj* x_40; obj* x_41; obj* x_44; obj* x_46; usize x_47; obj* x_48; obj* x_49; obj* x_50; +obj* x_30; obj* x_33; obj* x_36; obj* x_38; obj* x_40; obj* x_41; obj* x_44; obj* x_46; obj* x_47; obj* x_48; x_30 = lean::cnstr_get(x_27, 0); lean::inc(x_30); lean::dec(x_27); @@ -48099,330 +48096,328 @@ lean::dec(x_30); x_44 = lean::cnstr_get(x_1, 1); lean::inc(x_44); x_46 = lean::mk_nat_obj(0ul); -x_47 = l_String_toSubstring___closed__1; -x_48 = lean::alloc_cnstr(0, 2, sizeof(size_t)*1); -lean::cnstr_set(x_48, 0, x_41); -lean::cnstr_set(x_48, 1, x_46); -lean::cnstr_set_scalar(x_48, sizeof(void*)*2, x_47); -x_49 = x_48; -x_50 = l_Lean_Parser_Trie_matchPrefix___rarg(x_44, x_49); -if (lean::obj_tag(x_50) == 0) +x_47 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_47, 0, x_41); +lean::cnstr_set(x_47, 1, x_46); +lean::cnstr_set(x_47, 2, x_46); +x_48 = l_Lean_Parser_Trie_matchPrefix___rarg(x_44, x_47); +if (lean::obj_tag(x_48) == 0) { -obj* x_52; obj* x_53; obj* x_54; obj* x_55; obj* x_58; obj* x_60; obj* x_62; obj* x_63; obj* x_64; obj* x_65; obj* x_66; obj* x_67; +obj* x_50; obj* x_51; obj* x_52; obj* x_53; obj* x_56; obj* x_58; obj* x_60; obj* x_61; obj* x_62; obj* x_63; obj* x_64; obj* x_65; lean::dec(x_40); -x_52 = lean::box(0); -x_53 = l_Lean_Parser_currLbp___rarg___lambda__1___closed__1; -x_54 = l_mjoin___rarg___closed__1; -x_55 = l_Lean_Parser_MonadParsec_error___at_Lean_Parser_termParser_run___spec__4___rarg(x_53, x_54, x_52, x_52, x_0, x_1, x_2, x_36, x_33); +x_50 = lean::box(0); +x_51 = l_Lean_Parser_currLbp___rarg___lambda__1___closed__1; +x_52 = l_mjoin___rarg___closed__1; +x_53 = l_Lean_Parser_MonadParsec_error___at_Lean_Parser_termParser_run___spec__4___rarg(x_51, x_52, x_50, x_50, x_0, x_1, x_2, x_36, x_33); lean::dec(x_36); lean::dec(x_1); -x_58 = lean::cnstr_get(x_55, 0); -x_60 = lean::cnstr_get(x_55, 1); -if (lean::is_exclusive(x_55)) { - x_62 = x_55; +x_56 = lean::cnstr_get(x_53, 0); +x_58 = lean::cnstr_get(x_53, 1); +if (lean::is_exclusive(x_53)) { + x_60 = x_53; } else { + lean::inc(x_56); lean::inc(x_58); - lean::inc(x_60); - lean::dec(x_55); - x_62 = lean::box(0); + lean::dec(x_53); + x_60 = lean::box(0); } -x_63 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1; -x_64 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_63, x_58); -x_65 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_63, x_64); -x_66 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_38, x_65); -if (lean::is_scalar(x_62)) { - x_67 = lean::alloc_cnstr(0, 2, 0); +x_61 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1; +x_62 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_61, x_56); +x_63 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_61, x_62); +x_64 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_38, x_63); +if (lean::is_scalar(x_60)) { + x_65 = lean::alloc_cnstr(0, 2, 0); } else { - x_67 = x_62; + x_65 = x_60; } -lean::cnstr_set(x_67, 0, x_66); -lean::cnstr_set(x_67, 1, x_60); -return x_67; +lean::cnstr_set(x_65, 0, x_64); +lean::cnstr_set(x_65, 1, x_58); +return x_65; } else { -obj* x_69; obj* x_72; obj* x_74; obj* x_75; obj* x_78; obj* x_79; obj* x_80; obj* x_81; +obj* x_67; obj* x_70; obj* x_72; obj* x_73; obj* x_76; obj* x_77; obj* x_78; obj* x_79; lean::dec(x_1); -x_69 = lean::cnstr_get(x_50, 0); -lean::inc(x_69); -lean::dec(x_50); -x_72 = lean::cnstr_get(x_69, 1); -if (lean::is_exclusive(x_69)) { - lean::cnstr_release(x_69, 0); - x_74 = x_69; +x_67 = lean::cnstr_get(x_48, 0); +lean::inc(x_67); +lean::dec(x_48); +x_70 = lean::cnstr_get(x_67, 1); +if (lean::is_exclusive(x_67)) { + lean::cnstr_release(x_67, 0); + x_72 = x_67; } else { - lean::inc(x_72); - lean::dec(x_69); - x_74 = lean::box(0); + lean::inc(x_70); + lean::dec(x_67); + x_72 = lean::box(0); } -x_75 = lean::cnstr_get(x_72, 1); -lean::inc(x_75); -lean::dec(x_72); -x_78 = l_Lean_Parser_matchToken___closed__1; +x_73 = lean::cnstr_get(x_70, 1); +lean::inc(x_73); +lean::dec(x_70); +x_76 = l_Lean_Parser_matchToken___closed__1; if (lean::is_scalar(x_40)) { - x_79 = lean::alloc_cnstr(0, 3, 0); + x_77 = lean::alloc_cnstr(0, 3, 0); } else { - x_79 = x_40; + x_77 = x_40; } -lean::cnstr_set(x_79, 0, x_75); -lean::cnstr_set(x_79, 1, x_36); -lean::cnstr_set(x_79, 2, x_78); -x_80 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_38, x_79); -if (lean::is_scalar(x_74)) { - x_81 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_77, 0, x_73); +lean::cnstr_set(x_77, 1, x_36); +lean::cnstr_set(x_77, 2, x_76); +x_78 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_38, x_77); +if (lean::is_scalar(x_72)) { + x_79 = lean::alloc_cnstr(0, 2, 0); } else { - x_81 = x_74; + x_79 = x_72; } -lean::cnstr_set(x_81, 0, x_80); -lean::cnstr_set(x_81, 1, x_33); -return x_81; +lean::cnstr_set(x_79, 0, x_78); +lean::cnstr_set(x_79, 1, x_33); +return x_79; } } case 1: { -obj* x_84; obj* x_86; obj* x_87; obj* x_89; obj* x_91; obj* x_92; obj* x_93; obj* x_94; obj* x_95; obj* x_96; +obj* x_82; obj* x_84; obj* x_85; obj* x_87; obj* x_89; obj* x_90; obj* x_91; obj* x_92; obj* x_93; obj* x_94; lean::dec(x_1); lean::dec(x_27); -x_84 = lean::cnstr_get(x_7, 1); +x_82 = lean::cnstr_get(x_7, 1); if (lean::is_exclusive(x_7)) { lean::cnstr_release(x_7, 0); - x_86 = x_7; + x_84 = x_7; } else { - lean::inc(x_84); + lean::inc(x_82); lean::dec(x_7); - x_86 = lean::box(0); + x_84 = lean::box(0); } -x_87 = lean::cnstr_get(x_8, 1); -x_89 = lean::cnstr_get(x_8, 2); +x_85 = lean::cnstr_get(x_8, 1); +x_87 = lean::cnstr_get(x_8, 2); if (lean::is_exclusive(x_8)) { lean::cnstr_release(x_8, 0); - x_91 = x_8; + x_89 = x_8; } else { + lean::inc(x_85); lean::inc(x_87); - lean::inc(x_89); lean::dec(x_8); - x_91 = lean::box(0); + x_89 = lean::box(0); } -x_92 = l_Lean_Parser_maxPrec; -x_93 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1; -if (lean::is_scalar(x_91)) { - x_94 = lean::alloc_cnstr(0, 3, 0); +x_90 = l_Lean_Parser_maxPrec; +x_91 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1; +if (lean::is_scalar(x_89)) { + x_92 = lean::alloc_cnstr(0, 3, 0); } else { - x_94 = x_91; + x_92 = x_89; } -lean::cnstr_set(x_94, 0, x_92); -lean::cnstr_set(x_94, 1, x_87); -lean::cnstr_set(x_94, 2, x_93); -x_95 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_89, x_94); -if (lean::is_scalar(x_86)) { - x_96 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_92, 0, x_90); +lean::cnstr_set(x_92, 1, x_85); +lean::cnstr_set(x_92, 2, x_91); +x_93 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_87, x_92); +if (lean::is_scalar(x_84)) { + x_94 = lean::alloc_cnstr(0, 2, 0); } else { - x_96 = x_86; + x_94 = x_84; } -lean::cnstr_set(x_96, 0, x_95); -lean::cnstr_set(x_96, 1, x_84); -return x_96; +lean::cnstr_set(x_94, 0, x_93); +lean::cnstr_set(x_94, 1, x_82); +return x_94; } case 2: { -obj* x_97; obj* x_100; obj* x_102; obj* x_103; obj* x_105; obj* x_107; obj* x_108; obj* x_111; uint8 x_112; -x_97 = lean::cnstr_get(x_27, 0); -lean::inc(x_97); +obj* x_95; obj* x_98; obj* x_100; obj* x_101; obj* x_103; obj* x_105; obj* x_106; obj* x_109; uint8 x_110; +x_95 = lean::cnstr_get(x_27, 0); +lean::inc(x_95); lean::dec(x_27); -x_100 = lean::cnstr_get(x_7, 1); +x_98 = lean::cnstr_get(x_7, 1); if (lean::is_exclusive(x_7)) { lean::cnstr_release(x_7, 0); lean::cnstr_set(x_7, 1, lean::box(0)); - x_102 = x_7; + x_100 = x_7; } else { - lean::inc(x_100); + lean::inc(x_98); lean::dec(x_7); - x_102 = lean::box(0); + x_100 = lean::box(0); } -x_103 = lean::cnstr_get(x_8, 1); -x_105 = lean::cnstr_get(x_8, 2); +x_101 = lean::cnstr_get(x_8, 1); +x_103 = lean::cnstr_get(x_8, 2); if (lean::is_exclusive(x_8)) { lean::cnstr_release(x_8, 0); lean::cnstr_set(x_8, 1, lean::box(0)); lean::cnstr_set(x_8, 2, lean::box(0)); - x_107 = x_8; + x_105 = x_8; } else { + lean::inc(x_101); lean::inc(x_103); - lean::inc(x_105); lean::dec(x_8); - x_107 = lean::box(0); + x_105 = lean::box(0); } -x_108 = lean::cnstr_get(x_97, 0); -lean::inc(x_108); -lean::dec(x_97); -x_111 = l_Lean_Parser_number_HasView_x_27___lambda__1___closed__6; -x_112 = lean_name_dec_eq(x_108, x_111); +x_106 = lean::cnstr_get(x_95, 0); +lean::inc(x_106); +lean::dec(x_95); +x_109 = l_Lean_Parser_number_HasView_x_27___lambda__1___closed__6; +x_110 = lean_name_dec_eq(x_106, x_109); +if (x_110 == 0) +{ +obj* x_111; uint8 x_112; +x_111 = l_Lean_Parser_currLbp___rarg___lambda__3___closed__1; +x_112 = lean_name_dec_eq(x_106, x_111); +lean::dec(x_106); if (x_112 == 0) { -obj* x_113; uint8 x_114; -x_113 = l_Lean_Parser_currLbp___rarg___lambda__3___closed__1; -x_114 = lean_name_dec_eq(x_108, x_113); -lean::dec(x_108); -if (x_114 == 0) -{ -obj* x_118; obj* x_119; obj* x_120; obj* x_121; obj* x_124; obj* x_126; obj* x_128; obj* x_129; obj* x_130; -lean::dec(x_102); -lean::dec(x_107); -x_118 = lean::box(0); -x_119 = l_Lean_Parser_currLbp___rarg___lambda__3___closed__2; -x_120 = l_mjoin___rarg___closed__1; -x_121 = l_Lean_Parser_MonadParsec_error___at_Lean_Parser_termParser_run___spec__4___rarg(x_119, x_120, x_118, x_118, x_0, x_1, x_2, x_103, x_100); -lean::dec(x_103); +obj* x_116; obj* x_117; obj* x_118; obj* x_119; obj* x_122; obj* x_124; obj* x_126; obj* x_127; obj* x_128; +lean::dec(x_100); +lean::dec(x_105); +x_116 = lean::box(0); +x_117 = l_Lean_Parser_currLbp___rarg___lambda__3___closed__2; +x_118 = l_mjoin___rarg___closed__1; +x_119 = l_Lean_Parser_MonadParsec_error___at_Lean_Parser_termParser_run___spec__4___rarg(x_117, x_118, x_116, x_116, x_0, x_1, x_2, x_101, x_98); +lean::dec(x_101); lean::dec(x_1); -x_124 = lean::cnstr_get(x_121, 0); -x_126 = lean::cnstr_get(x_121, 1); -if (lean::is_exclusive(x_121)) { - x_128 = x_121; +x_122 = lean::cnstr_get(x_119, 0); +x_124 = lean::cnstr_get(x_119, 1); +if (lean::is_exclusive(x_119)) { + x_126 = x_119; } else { + lean::inc(x_122); lean::inc(x_124); - lean::inc(x_126); - lean::dec(x_121); - x_128 = lean::box(0); + lean::dec(x_119); + x_126 = lean::box(0); } -x_129 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_105, x_124); -if (lean::is_scalar(x_128)) { - x_130 = lean::alloc_cnstr(0, 2, 0); +x_127 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_103, x_122); +if (lean::is_scalar(x_126)) { + x_128 = lean::alloc_cnstr(0, 2, 0); } else { - x_130 = x_128; + x_128 = x_126; } -lean::cnstr_set(x_130, 0, x_129); -lean::cnstr_set(x_130, 1, x_126); -return x_130; +lean::cnstr_set(x_128, 0, x_127); +lean::cnstr_set(x_128, 1, x_124); +return x_128; } else { -obj* x_132; obj* x_133; obj* x_134; obj* x_135; obj* x_136; +obj* x_130; obj* x_131; obj* x_132; obj* x_133; obj* x_134; lean::dec(x_1); -x_132 = l_Lean_Parser_maxPrec; -x_133 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1; -if (lean::is_scalar(x_107)) { - x_134 = lean::alloc_cnstr(0, 3, 0); +x_130 = l_Lean_Parser_maxPrec; +x_131 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1; +if (lean::is_scalar(x_105)) { + x_132 = lean::alloc_cnstr(0, 3, 0); } else { - x_134 = x_107; + x_132 = x_105; } -lean::cnstr_set(x_134, 0, x_132); -lean::cnstr_set(x_134, 1, x_103); -lean::cnstr_set(x_134, 2, x_133); -x_135 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_105, x_134); -if (lean::is_scalar(x_102)) { - x_136 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_132, 0, x_130); +lean::cnstr_set(x_132, 1, x_101); +lean::cnstr_set(x_132, 2, x_131); +x_133 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_103, x_132); +if (lean::is_scalar(x_100)) { + x_134 = lean::alloc_cnstr(0, 2, 0); } else { - x_136 = x_102; + x_134 = x_100; } -lean::cnstr_set(x_136, 0, x_135); -lean::cnstr_set(x_136, 1, x_100); -return x_136; +lean::cnstr_set(x_134, 0, x_133); +lean::cnstr_set(x_134, 1, x_98); +return x_134; } } else { -obj* x_139; obj* x_140; obj* x_141; obj* x_142; obj* x_143; +obj* x_137; obj* x_138; obj* x_139; obj* x_140; obj* x_141; lean::dec(x_1); -lean::dec(x_108); -x_139 = l_Lean_Parser_maxPrec; -x_140 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1; -if (lean::is_scalar(x_107)) { - x_141 = lean::alloc_cnstr(0, 3, 0); +lean::dec(x_106); +x_137 = l_Lean_Parser_maxPrec; +x_138 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1; +if (lean::is_scalar(x_105)) { + x_139 = lean::alloc_cnstr(0, 3, 0); } else { - x_141 = x_107; + x_139 = x_105; } -lean::cnstr_set(x_141, 0, x_139); -lean::cnstr_set(x_141, 1, x_103); -lean::cnstr_set(x_141, 2, x_140); -x_142 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_105, x_141); -if (lean::is_scalar(x_102)) { - x_143 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_139, 0, x_137); +lean::cnstr_set(x_139, 1, x_101); +lean::cnstr_set(x_139, 2, x_138); +x_140 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_103, x_139); +if (lean::is_scalar(x_100)) { + x_141 = lean::alloc_cnstr(0, 2, 0); } else { - x_143 = x_102; + x_141 = x_100; } -lean::cnstr_set(x_143, 0, x_142); -lean::cnstr_set(x_143, 1, x_100); -return x_143; +lean::cnstr_set(x_141, 0, x_140); +lean::cnstr_set(x_141, 1, x_98); +return x_141; } } default: { -obj* x_144; obj* x_147; obj* x_149; obj* x_152; obj* x_153; obj* x_154; obj* x_155; obj* x_158; obj* x_160; obj* x_162; obj* x_163; obj* x_164; -x_144 = lean::cnstr_get(x_7, 1); -lean::inc(x_144); +obj* x_142; obj* x_145; obj* x_147; obj* x_150; obj* x_151; obj* x_152; obj* x_153; obj* x_156; obj* x_158; obj* x_160; obj* x_161; obj* x_162; +x_142 = lean::cnstr_get(x_7, 1); +lean::inc(x_142); lean::dec(x_7); -x_147 = lean::cnstr_get(x_8, 1); +x_145 = lean::cnstr_get(x_8, 1); +lean::inc(x_145); +x_147 = lean::cnstr_get(x_8, 2); lean::inc(x_147); -x_149 = lean::cnstr_get(x_8, 2); -lean::inc(x_149); lean::dec(x_8); -x_152 = lean::box(0); -x_153 = l_Lean_Parser_currLbp___rarg___lambda__3___closed__2; -x_154 = l_mjoin___rarg___closed__1; -x_155 = l_Lean_Parser_MonadParsec_error___at_Lean_Parser_termParser_run___spec__4___rarg(x_153, x_154, x_152, x_152, x_0, x_1, x_2, x_147, x_144); -lean::dec(x_147); +x_150 = lean::box(0); +x_151 = l_Lean_Parser_currLbp___rarg___lambda__3___closed__2; +x_152 = l_mjoin___rarg___closed__1; +x_153 = l_Lean_Parser_MonadParsec_error___at_Lean_Parser_termParser_run___spec__4___rarg(x_151, x_152, x_150, x_150, x_0, x_1, x_2, x_145, x_142); +lean::dec(x_145); lean::dec(x_1); -x_158 = lean::cnstr_get(x_155, 0); -x_160 = lean::cnstr_get(x_155, 1); -if (lean::is_exclusive(x_155)) { - x_162 = x_155; +x_156 = lean::cnstr_get(x_153, 0); +x_158 = lean::cnstr_get(x_153, 1); +if (lean::is_exclusive(x_153)) { + x_160 = x_153; } else { + lean::inc(x_156); lean::inc(x_158); - lean::inc(x_160); - lean::dec(x_155); - x_162 = lean::box(0); + lean::dec(x_153); + x_160 = lean::box(0); } -x_163 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_149, x_158); -if (lean::is_scalar(x_162)) { - x_164 = lean::alloc_cnstr(0, 2, 0); +x_161 = l_Lean_Parser_ParsecT_bindMkRes___rarg(x_147, x_156); +if (lean::is_scalar(x_160)) { + x_162 = lean::alloc_cnstr(0, 2, 0); } else { - x_164 = x_162; + x_162 = x_160; } -lean::cnstr_set(x_164, 0, x_163); -lean::cnstr_set(x_164, 1, x_160); -return x_164; +lean::cnstr_set(x_162, 0, x_161); +lean::cnstr_set(x_162, 1, x_158); +return x_162; } } } } else { -obj* x_166; obj* x_168; obj* x_169; uint8 x_171; obj* x_172; obj* x_173; obj* x_174; obj* x_175; +obj* x_164; obj* x_166; obj* x_167; uint8 x_169; obj* x_170; obj* x_171; obj* x_172; obj* x_173; lean::dec(x_1); -x_166 = lean::cnstr_get(x_7, 1); +x_164 = lean::cnstr_get(x_7, 1); if (lean::is_exclusive(x_7)) { lean::cnstr_release(x_7, 0); - x_168 = x_7; + x_166 = x_7; } else { - lean::inc(x_166); + lean::inc(x_164); lean::dec(x_7); - x_168 = lean::box(0); + x_166 = lean::box(0); } -x_169 = lean::cnstr_get(x_8, 0); -x_171 = lean::cnstr_get_scalar(x_8, sizeof(void*)*1); +x_167 = lean::cnstr_get(x_8, 0); +x_169 = lean::cnstr_get_scalar(x_8, sizeof(void*)*1); if (lean::is_exclusive(x_8)) { - x_172 = x_8; + x_170 = x_8; } else { - lean::inc(x_169); + lean::inc(x_167); lean::dec(x_8); - x_172 = lean::box(0); + x_170 = lean::box(0); } -if (lean::is_scalar(x_172)) { - x_173 = lean::alloc_cnstr(1, 1, 1); +if (lean::is_scalar(x_170)) { + x_171 = lean::alloc_cnstr(1, 1, 1); } else { - x_173 = x_172; + x_171 = x_170; } -lean::cnstr_set(x_173, 0, x_169); -lean::cnstr_set_scalar(x_173, sizeof(void*)*1, x_171); -x_174 = x_173; -if (lean::is_scalar(x_168)) { - x_175 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_171, 0, x_167); +lean::cnstr_set_scalar(x_171, sizeof(void*)*1, x_169); +x_172 = x_171; +if (lean::is_scalar(x_166)) { + x_173 = lean::alloc_cnstr(0, 2, 0); } else { - x_175 = x_168; + x_173 = x_166; } -lean::cnstr_set(x_175, 0, x_174); -lean::cnstr_set(x_175, 1, x_166); -return x_175; +lean::cnstr_set(x_173, 0, x_172); +lean::cnstr_set(x_173, 1, x_164); +return x_173; } } } diff --git a/src/stage0/init/lean/parser/token.cpp b/src/stage0/init/lean/parser/token.cpp index 15317bc0c6..3f85038d23 100644 --- a/src/stage0/init/lean/parser/token.cpp +++ b/src/stage0/init/lean/parser/token.cpp @@ -103,7 +103,6 @@ extern obj* l_Lean_Parser_parseHexDigit___rarg___lambda__3___closed__1; obj* l_Lean_Parser_stringLit_Parser___rarg(obj*); extern obj* l_Lean_Parser_Combinators_choiceAux___main___rarg___closed__1; obj* l_ReaderT_bind___at_Lean_Parser_detailIdentSuffix_Parser_Lean_Parser_HasTokens___spec__6(obj*, obj*); -extern usize l_String_toSubstring___closed__1; obj* l_Lean_Parser_symbolOrIdent___boxed(obj*); obj* l_Lean_Parser_MonadParsec_takeWhileCont___at___private_init_lean_parser_token_4__ident_x_27___spec__8___boxed(obj*, obj*, obj*, obj*); obj* l_Lean_Parser_parseQuotedChar___at_Lean_Parser_stringLit_x_27___spec__3(obj*, obj*, obj*); @@ -954,73 +953,71 @@ uint8 x_5; x_5 = l_String_isEmpty(x_0); if (x_5 == 0) { -obj* x_6; obj* x_7; usize x_8; obj* x_10; obj* x_11; obj* x_13; +obj* x_6; obj* x_7; obj* x_9; obj* x_11; x_6 = lean::string_length(x_0); x_7 = lean::mk_nat_obj(0ul); -x_8 = l_String_toSubstring___closed__1; lean::inc(x_0); -x_10 = lean::alloc_cnstr(0, 2, sizeof(size_t)*1); -lean::cnstr_set(x_10, 0, x_0); -lean::cnstr_set(x_10, 1, x_7); -lean::cnstr_set_scalar(x_10, sizeof(void*)*2, x_8); -x_11 = x_10; +x_9 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_9, 0, x_0); +lean::cnstr_set(x_9, 1, x_7); +lean::cnstr_set(x_9, 2, x_7); lean::inc(x_3); -x_13 = l___private_init_lean_parser_parsec_2__strAux___main(x_6, x_11, x_3); -if (lean::obj_tag(x_13) == 0) +x_11 = l___private_init_lean_parser_parsec_2__strAux___main(x_6, x_9, x_3); +if (lean::obj_tag(x_11) == 0) { -obj* x_15; obj* x_16; obj* x_17; uint8 x_18; obj* x_19; obj* x_20; obj* x_21; +obj* x_13; obj* x_14; obj* x_15; uint8 x_16; obj* x_17; obj* x_18; obj* x_19; lean::dec(x_0); -x_15 = lean::box(0); -x_16 = l_String_splitAux___main___closed__1; -x_17 = lean::alloc_cnstr(0, 4, 0); -lean::cnstr_set(x_17, 0, x_3); -lean::cnstr_set(x_17, 1, x_16); -lean::cnstr_set(x_17, 2, x_1); -lean::cnstr_set(x_17, 3, x_15); -x_18 = 0; -x_19 = lean::alloc_cnstr(1, 1, 1); -lean::cnstr_set(x_19, 0, x_17); -lean::cnstr_set_scalar(x_19, sizeof(void*)*1, x_18); -x_20 = x_19; -x_21 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_21, 0, x_20); -lean::cnstr_set(x_21, 1, x_4); -return x_21; +x_13 = lean::box(0); +x_14 = l_String_splitAux___main___closed__1; +x_15 = lean::alloc_cnstr(0, 4, 0); +lean::cnstr_set(x_15, 0, x_3); +lean::cnstr_set(x_15, 1, x_14); +lean::cnstr_set(x_15, 2, x_1); +lean::cnstr_set(x_15, 3, x_13); +x_16 = 0; +x_17 = lean::alloc_cnstr(1, 1, 1); +lean::cnstr_set(x_17, 0, x_15); +lean::cnstr_set_scalar(x_17, sizeof(void*)*1, x_16); +x_18 = x_17; +x_19 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_19, 0, x_18); +lean::cnstr_set(x_19, 1, x_4); +return x_19; } else { -obj* x_24; obj* x_27; obj* x_28; obj* x_29; +obj* x_22; obj* x_25; obj* x_26; obj* x_27; lean::dec(x_1); lean::dec(x_3); -x_24 = lean::cnstr_get(x_13, 0); -lean::inc(x_24); -lean::dec(x_13); -x_27 = lean::box(0); -x_28 = lean::alloc_cnstr(0, 3, 0); -lean::cnstr_set(x_28, 0, x_0); -lean::cnstr_set(x_28, 1, x_24); -lean::cnstr_set(x_28, 2, 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_4); -return x_29; +x_22 = lean::cnstr_get(x_11, 0); +lean::inc(x_22); +lean::dec(x_11); +x_25 = lean::box(0); +x_26 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_26, 0, x_0); +lean::cnstr_set(x_26, 1, x_22); +lean::cnstr_set(x_26, 2, x_25); +x_27 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_27, 0, x_26); +lean::cnstr_set(x_27, 1, x_4); +return x_27; } } else { -obj* x_32; obj* x_33; obj* x_34; obj* x_35; +obj* x_30; obj* x_31; obj* x_32; obj* x_33; lean::dec(x_1); lean::dec(x_0); -x_32 = l_String_splitAux___main___closed__1; -x_33 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1; -x_34 = lean::alloc_cnstr(0, 3, 0); -lean::cnstr_set(x_34, 0, x_32); -lean::cnstr_set(x_34, 1, x_3); -lean::cnstr_set(x_34, 2, 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_4); -return x_35; +x_30 = l_String_splitAux___main___closed__1; +x_31 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1; +x_32 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_32, 0, x_30); +lean::cnstr_set(x_32, 1, x_3); +lean::cnstr_set(x_32, 2, 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_4); +return x_33; } } } @@ -9843,73 +9840,71 @@ uint8 x_6; x_6 = l_String_isEmpty(x_0); if (x_6 == 0) { -obj* x_7; obj* x_8; usize x_9; obj* x_11; obj* x_12; obj* x_14; +obj* x_7; obj* x_8; obj* x_10; obj* x_12; x_7 = lean::string_length(x_0); x_8 = lean::mk_nat_obj(0ul); -x_9 = l_String_toSubstring___closed__1; lean::inc(x_0); -x_11 = lean::alloc_cnstr(0, 2, sizeof(size_t)*1); -lean::cnstr_set(x_11, 0, x_0); -lean::cnstr_set(x_11, 1, x_8); -lean::cnstr_set_scalar(x_11, sizeof(void*)*2, x_9); -x_12 = x_11; +x_10 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_10, 0, x_0); +lean::cnstr_set(x_10, 1, x_8); +lean::cnstr_set(x_10, 2, x_8); lean::inc(x_4); -x_14 = l___private_init_lean_parser_parsec_2__strAux___main(x_7, x_12, x_4); -if (lean::obj_tag(x_14) == 0) +x_12 = l___private_init_lean_parser_parsec_2__strAux___main(x_7, x_10, x_4); +if (lean::obj_tag(x_12) == 0) { -obj* x_16; obj* x_17; obj* x_18; uint8 x_19; obj* x_20; obj* x_21; obj* x_22; +obj* x_14; obj* x_15; obj* x_16; uint8 x_17; obj* x_18; obj* x_19; obj* x_20; lean::dec(x_0); -x_16 = lean::box(0); -x_17 = l_String_splitAux___main___closed__1; -x_18 = lean::alloc_cnstr(0, 4, 0); -lean::cnstr_set(x_18, 0, x_4); -lean::cnstr_set(x_18, 1, x_17); -lean::cnstr_set(x_18, 2, x_1); -lean::cnstr_set(x_18, 3, x_16); -x_19 = 0; -x_20 = lean::alloc_cnstr(1, 1, 1); -lean::cnstr_set(x_20, 0, x_18); -lean::cnstr_set_scalar(x_20, sizeof(void*)*1, x_19); -x_21 = x_20; -x_22 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_22, 0, x_21); -lean::cnstr_set(x_22, 1, x_5); -return x_22; +x_14 = lean::box(0); +x_15 = l_String_splitAux___main___closed__1; +x_16 = lean::alloc_cnstr(0, 4, 0); +lean::cnstr_set(x_16, 0, x_4); +lean::cnstr_set(x_16, 1, x_15); +lean::cnstr_set(x_16, 2, x_1); +lean::cnstr_set(x_16, 3, x_14); +x_17 = 0; +x_18 = lean::alloc_cnstr(1, 1, 1); +lean::cnstr_set(x_18, 0, x_16); +lean::cnstr_set_scalar(x_18, sizeof(void*)*1, x_17); +x_19 = x_18; +x_20 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_20, 0, x_19); +lean::cnstr_set(x_20, 1, x_5); +return x_20; } else { -obj* x_25; obj* x_28; obj* x_29; obj* x_30; +obj* x_23; obj* x_26; obj* x_27; obj* x_28; lean::dec(x_4); lean::dec(x_1); -x_25 = lean::cnstr_get(x_14, 0); -lean::inc(x_25); -lean::dec(x_14); -x_28 = lean::box(0); -x_29 = lean::alloc_cnstr(0, 3, 0); -lean::cnstr_set(x_29, 0, x_0); -lean::cnstr_set(x_29, 1, x_25); -lean::cnstr_set(x_29, 2, 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_5); -return x_30; +x_23 = lean::cnstr_get(x_12, 0); +lean::inc(x_23); +lean::dec(x_12); +x_26 = lean::box(0); +x_27 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_27, 0, x_0); +lean::cnstr_set(x_27, 1, x_23); +lean::cnstr_set(x_27, 2, x_26); +x_28 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_28, 0, x_27); +lean::cnstr_set(x_28, 1, x_5); +return x_28; } } else { -obj* x_33; obj* x_34; obj* x_35; obj* x_36; +obj* x_31; obj* x_32; obj* x_33; obj* x_34; lean::dec(x_1); lean::dec(x_0); -x_33 = l_String_splitAux___main___closed__1; -x_34 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1; -x_35 = lean::alloc_cnstr(0, 3, 0); -lean::cnstr_set(x_35, 0, x_33); -lean::cnstr_set(x_35, 1, x_4); -lean::cnstr_set(x_35, 2, x_34); -x_36 = lean::alloc_cnstr(0, 2, 0); -lean::cnstr_set(x_36, 0, x_35); -lean::cnstr_set(x_36, 1, x_5); -return x_36; +x_31 = l_String_splitAux___main___closed__1; +x_32 = l_Lean_Parser_Parsec_Result_mkEps___rarg___closed__1; +x_33 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_33, 0, x_31); +lean::cnstr_set(x_33, 1, x_4); +lean::cnstr_set(x_33, 2, x_32); +x_34 = lean::alloc_cnstr(0, 2, 0); +lean::cnstr_set(x_34, 0, x_33); +lean::cnstr_set(x_34, 1, x_5); +return x_34; } } } @@ -23062,19 +23057,17 @@ return x_4; obj* l___private_init_lean_parser_token_8__toNatBase(obj* x_0, obj* x_1) { _start: { -obj* x_2; usize x_3; obj* x_5; obj* x_6; obj* x_7; obj* x_9; +obj* x_2; obj* x_4; obj* x_5; obj* x_7; x_2 = lean::mk_nat_obj(0ul); -x_3 = l_String_toSubstring___closed__1; lean::inc(x_0); -x_5 = lean::alloc_cnstr(0, 2, sizeof(size_t)*1); -lean::cnstr_set(x_5, 0, x_0); -lean::cnstr_set(x_5, 1, x_2); -lean::cnstr_set_scalar(x_5, sizeof(void*)*2, x_3); -x_6 = x_5; -x_7 = lean::string_length(x_0); +x_4 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_4, 0, x_0); +lean::cnstr_set(x_4, 1, x_2); +lean::cnstr_set(x_4, 2, x_2); +x_5 = lean::string_length(x_0); lean::dec(x_0); -x_9 = l___private_init_lean_parser_token_7__toNatCore___main(x_1, x_6, x_7, x_2); -return x_9; +x_7 = l___private_init_lean_parser_token_7__toNatCore___main(x_1, x_4, x_5, x_2); +return x_7; } } obj* l___private_init_lean_parser_token_8__toNatBase___boxed(obj* x_0, obj* x_1) { diff --git a/src/stage0/init/lean/parser/trie.cpp b/src/stage0/init/lean/parser/trie.cpp index 28ac3ccbc4..2f15c3ccd6 100644 --- a/src/stage0/init/lean/parser/trie.cpp +++ b/src/stage0/init/lean/parser/trie.cpp @@ -27,7 +27,6 @@ obj* nat_sub(obj*, obj*); obj* l_Lean_Format_pretty(obj*, obj*); obj* l_Lean_Parser_Trie_insert___boxed(obj*); obj* l_Lean_Parser_Trie_mk___closed__1; -extern usize l_String_toSubstring___closed__1; obj* l_Lean_Format_group___main(obj*); obj* l___private_init_lean_parser_trie_4__toStringAux___main___rarg(obj*); obj* l_RBNode_ins___main___at___private_init_lean_parser_trie_1__insertAux___main___spec__3(obj*); @@ -913,16 +912,15 @@ return x_1; obj* l_Lean_Parser_Trie_insert___rarg(obj* x_0, obj* x_1, obj* x_2) { _start: { -obj* x_3; usize x_4; obj* x_5; obj* x_6; obj* x_7; +obj* x_3; obj* x_4; obj* x_5; obj* x_6; x_3 = lean::string_length(x_1); -x_4 = l_String_toSubstring___closed__1; -x_5 = lean::alloc_cnstr(0, 1, sizeof(size_t)*1); +x_4 = lean::mk_nat_obj(0ul); +x_5 = lean::alloc_cnstr(0, 2, 0); lean::cnstr_set(x_5, 0, x_1); -lean::cnstr_set_scalar(x_5, sizeof(void*)*1, x_4); -x_6 = x_5; -x_7 = l___private_init_lean_parser_trie_1__insertAux___main___rarg(x_2, x_3, x_0, x_6); +lean::cnstr_set(x_5, 1, x_4); +x_6 = l___private_init_lean_parser_trie_1__insertAux___main___rarg(x_2, x_3, x_0, x_5); lean::dec(x_3); -return x_7; +return x_6; } } obj* l_Lean_Parser_Trie_insert(obj* x_0) { @@ -1037,15 +1035,14 @@ return x_1; obj* l_Lean_Parser_Trie_find___rarg(obj* x_0, obj* x_1) { _start: { -obj* x_2; usize x_3; obj* x_4; obj* x_5; obj* x_6; +obj* x_2; obj* x_3; obj* x_4; obj* x_5; x_2 = lean::string_length(x_1); -x_3 = l_String_toSubstring___closed__1; -x_4 = lean::alloc_cnstr(0, 1, sizeof(size_t)*1); +x_3 = lean::mk_nat_obj(0ul); +x_4 = lean::alloc_cnstr(0, 2, 0); lean::cnstr_set(x_4, 0, x_1); -lean::cnstr_set_scalar(x_4, sizeof(void*)*1, x_3); -x_5 = x_4; -x_6 = l___private_init_lean_parser_trie_2__findAux___main___rarg(x_2, x_0, x_5); -return x_6; +lean::cnstr_set(x_4, 1, x_3); +x_5 = l___private_init_lean_parser_trie_2__findAux___main___rarg(x_2, x_0, x_4); +return x_5; } } obj* l_Lean_Parser_Trie_find(obj* x_0) { diff --git a/src/stage0/init/lean/position.cpp b/src/stage0/init/lean/position.cpp index 24e1ad6c1a..b2374942b1 100644 --- a/src/stage0/init/lean/position.cpp +++ b/src/stage0/init/lean/position.cpp @@ -20,7 +20,6 @@ namespace lean { obj* nat_sub(obj*, obj*); } obj* l_Lean_Position_DecidableEq___boxed(obj*, obj*); -extern usize l_String_toSubstring___closed__1; uint32 l_String_OldIterator_curr___main(obj*); obj* l___private_init_lean_position_1__fromStringAux___main___boxed(obj*, obj*, obj*); obj* l_Lean_Position_decidableLt___boxed(obj*, obj*); @@ -665,19 +664,17 @@ return x_13; obj* l_Lean_FileMap_fromString(obj* x_0) { _start: { -obj* x_1; obj* x_2; usize x_3; obj* x_4; obj* x_5; obj* x_6; obj* x_7; obj* x_8; +obj* x_1; obj* x_2; obj* x_3; obj* x_4; obj* x_5; obj* x_6; x_1 = lean::string_length(x_0); x_2 = lean::mk_nat_obj(0ul); -x_3 = l_String_toSubstring___closed__1; -x_4 = lean::alloc_cnstr(0, 2, sizeof(size_t)*1); -lean::cnstr_set(x_4, 0, x_0); -lean::cnstr_set(x_4, 1, x_2); -lean::cnstr_set_scalar(x_4, sizeof(void*)*2, x_3); -x_5 = x_4; -x_6 = lean::mk_nat_obj(1ul); -x_7 = l___private_init_lean_position_1__fromStringAux___main(x_1, x_5, x_6); -x_8 = l_RBMap_ofList___main___at_Lean_FileMap_fromString___spec__1(x_7); -return x_8; +x_3 = lean::alloc_cnstr(0, 3, 0); +lean::cnstr_set(x_3, 0, x_0); +lean::cnstr_set(x_3, 1, x_2); +lean::cnstr_set(x_3, 2, x_2); +x_4 = lean::mk_nat_obj(1ul); +x_5 = l___private_init_lean_position_1__fromStringAux___main(x_1, x_3, x_4); +x_6 = l_RBMap_ofList___main___at_Lean_FileMap_fromString___spec__1(x_5); +return x_6; } } obj* l_RBNode_lowerBound___main___at_Lean_FileMap_toPosition___spec__2(obj* x_0, obj* x_1, obj* x_2) {