From ffa1dd5703c824e63f56ae3f165f4c02440b46cb Mon Sep 17 00:00:00 2001 From: Ian McLerran Date: Thu, 9 Jan 2025 09:40:59 -0600 Subject: [PATCH 1/5] unified formatting for walk --- crates/compiler/builtins/roc/List.roc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/compiler/builtins/roc/List.roc b/crates/compiler/builtins/roc/List.roc index 9f88645869..c25dd43a1a 100644 --- a/crates/compiler/builtins/roc/List.roc +++ b/crates/compiler/builtins/roc/List.roc @@ -1514,7 +1514,11 @@ for_each_try! = \list, func! -> walk! : List elem, state, (state, elem => state) => state walk! = \list, state, func! -> when list is - [] -> state + [] -> + state + [elem, .. as rest] -> next_state = func!(state, elem) walk!(rest, next_state, func!) + + From ea2a007834768dfb63faeda22026f0dcb7a0dfad Mon Sep 17 00:00:00 2001 From: Ian McLerran Date: Thu, 9 Jan 2025 11:45:01 -0600 Subject: [PATCH 2/5] Add List.walk_try! --- crates/compiler/builtins/roc/List.roc | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/crates/compiler/builtins/roc/List.roc b/crates/compiler/builtins/roc/List.roc index c25dd43a1a..9c15c731cf 100644 --- a/crates/compiler/builtins/roc/List.roc +++ b/crates/compiler/builtins/roc/List.roc @@ -75,6 +75,7 @@ module [ for_each!, for_each_try!, walk!, + walk_try!, ] import Bool exposing [Bool, Eq] @@ -1514,11 +1515,24 @@ for_each_try! = \list, func! -> walk! : List elem, state, (state, elem => state) => state walk! = \list, state, func! -> when list is - [] -> + [] -> state [elem, .. as rest] -> next_state = func!(state, elem) walk!(rest, next_state, func!) +## Build a value from the contents of a list, using an effectful function that might fail. +walk_try! : List elem, state, (state, elem => Result state err) => Result state err +walk_try! = \list, state, func! -> + when list is + [] -> + Ok(state) + [elem, .. as rest] -> + when func!(state, elem) is + Ok(next_state) -> + walk_try!(rest, next_state, func!) + + Err(err) -> + Err(err) From 56f53c56d2eb4a522cbc9ab21fa12a1bdbb8db90 Mon Sep 17 00:00:00 2001 From: Ian McLerran Date: Thu, 9 Jan 2025 12:16:13 -0600 Subject: [PATCH 3/5] add walk_try! to symbols.rs --- crates/compiler/module/src/symbol.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/compiler/module/src/symbol.rs b/crates/compiler/module/src/symbol.rs index 5b99770ac7..61e8d7dbbb 100644 --- a/crates/compiler/module/src/symbol.rs +++ b/crates/compiler/module/src/symbol.rs @@ -1515,6 +1515,7 @@ define_builtins! { 92 LIST_WALK_FX: "walk!" 93 LIST_SPLIT_ON: "split_on" 94 LIST_SPLIT_ON_LIST: "split_on_list" + 95 LIST_WALK_TRY_FX: "walk_try!" } 7 RESULT: "Result" => { 0 RESULT_RESULT: "Result" exposed_type=true // the Result.Result type alias From ab3f39a7c9d2786775ae70847e26668bcca593ab Mon Sep 17 00:00:00 2001 From: Ian McLerran Date: Thu, 9 Jan 2025 13:49:33 -0600 Subject: [PATCH 4/5] Add docs for List.walk_try! --- crates/compiler/builtins/roc/List.roc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/crates/compiler/builtins/roc/List.roc b/crates/compiler/builtins/roc/List.roc index 9c15c731cf..320cc42532 100644 --- a/crates/compiler/builtins/roc/List.roc +++ b/crates/compiler/builtins/roc/List.roc @@ -1523,6 +1523,21 @@ walk! = \list, state, func! -> walk!(rest, next_state, func!) ## Build a value from the contents of a list, using an effectful function that might fail. +## +## If the function returns `Err`, the iteration stops and the error is returned. +## +## ``` +## names = try List.walk_try!( +## ["First", "Middle", "Last"], +## [], +## \accumulator, which -> +## try Stdout.write! ("$(which) name: ") +## name = try Stdin.line! ({}) +## Ok (List.append accumulator name), +## ) +## ``` +## +## This is the same as [walk_try], except that the step function can have effects. walk_try! : List elem, state, (state, elem => Result state err) => Result state err walk_try! = \list, state, func! -> when list is From 541fb6056c588bf3dc09d3faea4cc53206ae38b3 Mon Sep 17 00:00:00 2001 From: Ian McLerran Date: Thu, 9 Jan 2025 13:53:01 -0600 Subject: [PATCH 5/5] update mono tests --- ...e_in_polymorphic_expression_issue_4717.txt | 116 +++---- .../generated/call_function_in_empty_list.txt | 68 ++--- .../call_function_in_empty_list_unbound.txt | 68 ++--- .../generated/capture_void_layout_task.txt | 44 +-- .../test_mono/generated/closure_in_list.txt | 4 +- ...lambda_set_productive_nullable_wrapped.txt | 44 +-- crates/compiler/test_mono/generated/dict.txt | 4 +- .../generated/empty_list_of_function_type.txt | 28 +- .../compiler/test_mono/generated/encode.txt | 18 +- .../encode_derived_nested_record_string.txt | 120 ++++---- ...encode_derived_record_one_field_string.txt | 70 ++--- ...ncode_derived_record_two_field_strings.txt | 70 ++--- .../generated/encode_derived_string.txt | 22 +- .../encode_derived_tag_one_field_string.txt | 70 ++--- ...encode_derived_tag_two_payloads_string.txt | 70 ++--- .../generated/inspect_derived_dict.txt | 288 +++++++++--------- .../generated/inspect_derived_list.txt | 44 +-- .../inspect_derived_nested_record_string.txt | 92 +++--- .../generated/inspect_derived_record.txt | 46 +-- ...nspect_derived_record_one_field_string.txt | 46 +-- ...spect_derived_record_two_field_strings.txt | 46 +-- .../inspect_derived_tag_one_field_string.txt | 76 ++--- ...nspect_derived_tag_two_payloads_string.txt | 68 ++--- .../test_mono/generated/ir_int_add.txt | 4 +- ...cialize_errors_behind_unified_branches.txt | 54 ++-- .../test_mono/generated/issue_4770.txt | 188 ++++++------ ...ure_with_multiple_recursive_structures.txt | 44 +-- .../test_mono/generated/list_append.txt | 18 +- .../generated/list_append_closure.txt | 18 +- .../generated/list_cannot_update_inplace.txt | 34 +-- .../compiler/test_mono/generated/list_get.txt | 28 +- .../compiler/test_mono/generated/list_len.txt | 8 +- .../generated/list_map_closure_borrows.txt | 98 +++--- .../generated/list_map_closure_owns.txt | 94 +++--- ...ist_map_take_capturing_or_noncapturing.txt | 86 +++--- .../generated/list_pass_to_function.txt | 32 +- .../test_mono/generated/list_sort_asc.txt | 12 +- .../test_mono/generated/quicksort_swap.txt | 56 ++-- .../test_mono/generated/record_update.txt | 32 +- ...function_and_union_with_inference_hole.txt | 72 ++--- .../compiler/test_mono/generated/rigids.txt | 56 ++-- ...not_duplicate_identical_concrete_types.txt | 72 ++--- ...types_without_unification_of_unifiable.txt | 128 ++++---- .../weakening_avoids_overspecialization.txt | 116 +++---- 44 files changed, 1386 insertions(+), 1386 deletions(-) diff --git a/crates/compiler/test_mono/generated/anonymous_closure_in_polymorphic_expression_issue_4717.txt b/crates/compiler/test_mono/generated/anonymous_closure_in_polymorphic_expression_issue_4717.txt index f8450369f3..83a5079000 100644 --- a/crates/compiler/test_mono/generated/anonymous_closure_in_polymorphic_expression_issue_4717.txt +++ b/crates/compiler/test_mono/generated/anonymous_closure_in_polymorphic_expression_issue_4717.txt @@ -2,81 +2,81 @@ procedure Bool.11 (#Attr.2, #Attr.3): let Bool.23 : Int1 = lowlevel Eq #Attr.2 #Attr.3; ret Bool.23; -procedure List.115 (List.562, List.563, List.564): - let List.683 : U64 = 0i64; - let List.684 : U64 = CallByName List.6 List.562; - let List.682 : [C U64, C U64] = CallByName List.80 List.562 List.563 List.564 List.683 List.684; - ret List.682; +procedure List.116 (List.563, List.564, List.565): + let List.693 : U64 = 0i64; + let List.694 : U64 = CallByName List.6 List.563; + let List.692 : [C U64, C U64] = CallByName List.80 List.563 List.564 List.565 List.693 List.694; + ret List.692; -procedure List.26 (List.212, List.213, List.214): - let List.676 : [C U64, C U64] = CallByName List.115 List.212 List.213 List.214; - let List.679 : U8 = 1i64; - let List.680 : U8 = GetTagId List.676; - let List.681 : Int1 = lowlevel Eq List.679 List.680; - if List.681 then - let List.215 : U64 = UnionAtIndex (Id 1) (Index 0) List.676; - ret List.215; - else - let List.216 : U64 = UnionAtIndex (Id 0) (Index 0) List.676; +procedure List.26 (List.213, List.214, List.215): + let List.686 : [C U64, C U64] = CallByName List.116 List.213 List.214 List.215; + let List.689 : U8 = 1i64; + let List.690 : U8 = GetTagId List.686; + let List.691 : Int1 = lowlevel Eq List.689 List.690; + if List.691 then + let List.216 : U64 = UnionAtIndex (Id 1) (Index 0) List.686; ret List.216; + else + let List.217 : U64 = UnionAtIndex (Id 0) (Index 0) List.686; + ret List.217; -procedure List.38 (List.400, List.401): - let List.675 : U64 = CallByName List.6 List.400; - let List.402 : U64 = CallByName Num.77 List.675 List.401; - let List.665 : List U8 = CallByName List.43 List.400 List.402; - ret List.665; +procedure List.38 (List.401, List.402): + let List.685 : U64 = CallByName List.6 List.401; + let List.403 : U64 = CallByName Num.77 List.685 List.402; + let List.675 : List U8 = CallByName List.43 List.401 List.403; + ret List.675; -procedure List.43 (List.398, List.399): - let List.673 : U64 = CallByName List.6 List.398; - let List.672 : U64 = CallByName Num.77 List.673 List.399; - let List.667 : {U64, U64} = Struct {List.399, List.672}; - let List.666 : List U8 = CallByName List.49 List.398 List.667; - ret List.666; +procedure List.43 (List.399, List.400): + let List.683 : U64 = CallByName List.6 List.399; + let List.682 : U64 = CallByName Num.77 List.683 List.400; + let List.677 : {U64, U64} = Struct {List.400, List.682}; + let List.676 : List U8 = CallByName List.49 List.399 List.677; + ret List.676; -procedure List.49 (List.476, List.477): - let List.669 : U64 = StructAtIndex 1 List.477; - let List.670 : U64 = StructAtIndex 0 List.477; - let List.668 : List U8 = CallByName List.72 List.476 List.669 List.670; - ret List.668; +procedure List.49 (List.477, List.478): + let List.679 : U64 = StructAtIndex 1 List.478; + let List.680 : U64 = StructAtIndex 0 List.478; + let List.678 : List U8 = CallByName List.72 List.477 List.679 List.680; + ret List.678; procedure List.6 (#Attr.2): - let List.674 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.674; + let List.684 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.684; procedure List.66 (#Attr.2, #Attr.3): - let List.697 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.697; + let List.707 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.707; procedure List.72 (#Attr.2, #Attr.3, #Attr.4): - let List.671 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.671; + let List.681 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; + ret List.681; procedure List.80 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2, #Derived_gen.3, #Derived_gen.4): - joinpoint List.685 List.565 List.566 List.567 List.568 List.569: - let List.687 : Int1 = CallByName Num.22 List.568 List.569; - if List.687 then - let List.696 : U8 = CallByName List.66 List.565 List.568; - let List.688 : [C U64, C U64] = CallByName Test.4 List.566 List.696; - let List.693 : U8 = 1i64; - let List.694 : U8 = GetTagId List.688; - let List.695 : Int1 = lowlevel Eq List.693 List.694; - if List.695 then - let List.570 : U64 = UnionAtIndex (Id 1) (Index 0) List.688; - let List.691 : U64 = 1i64; - let List.690 : U64 = CallByName Num.51 List.568 List.691; - jump List.685 List.565 List.570 List.567 List.690 List.569; + joinpoint List.695 List.566 List.567 List.568 List.569 List.570: + let List.697 : Int1 = CallByName Num.22 List.569 List.570; + if List.697 then + let List.706 : U8 = CallByName List.66 List.566 List.569; + let List.698 : [C U64, C U64] = CallByName Test.4 List.567 List.706; + let List.703 : U8 = 1i64; + let List.704 : U8 = GetTagId List.698; + let List.705 : Int1 = lowlevel Eq List.703 List.704; + if List.705 then + let List.571 : U64 = UnionAtIndex (Id 1) (Index 0) List.698; + let List.701 : U64 = 1i64; + let List.700 : U64 = CallByName Num.51 List.569 List.701; + jump List.695 List.566 List.571 List.568 List.700 List.570; else - dec List.565; - let List.571 : U64 = UnionAtIndex (Id 0) (Index 0) List.688; - let List.692 : [C U64, C U64] = TagId(0) List.571; - ret List.692; + dec List.566; + let List.572 : U64 = UnionAtIndex (Id 0) (Index 0) List.698; + let List.702 : [C U64, C U64] = TagId(0) List.572; + ret List.702; else - dec List.565; - let List.686 : [C U64, C U64] = TagId(1) List.566; - ret List.686; + dec List.566; + let List.696 : [C U64, C U64] = TagId(1) List.567; + ret List.696; in inc #Derived_gen.0; - jump List.685 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; + jump List.695 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; procedure Num.22 (#Attr.2, #Attr.3): let Num.286 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/call_function_in_empty_list.txt b/crates/compiler/test_mono/generated/call_function_in_empty_list.txt index 202ff21f0f..51eb352941 100644 --- a/crates/compiler/test_mono/generated/call_function_in_empty_list.txt +++ b/crates/compiler/test_mono/generated/call_function_in_empty_list.txt @@ -1,51 +1,51 @@ -procedure List.100 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2, #Derived_gen.3, #Derived_gen.4): - joinpoint List.671 List.174 List.175 List.176 List.177 List.178: - let List.673 : Int1 = CallByName Num.22 List.177 List.178; - if List.673 then - let List.677 : [] = CallByName List.66 List.174 List.177; - let List.179 : List {} = CallByName List.283 List.175 List.677 List.176; - let List.676 : U64 = 1i64; - let List.675 : U64 = CallByName Num.51 List.177 List.676; - jump List.671 List.174 List.179 List.176 List.675 List.178; +procedure List.101 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2, #Derived_gen.3, #Derived_gen.4): + joinpoint List.681 List.175 List.176 List.177 List.178 List.179: + let List.683 : Int1 = CallByName Num.22 List.178 List.179; + if List.683 then + let List.687 : [] = CallByName List.66 List.175 List.178; + let List.180 : List {} = CallByName List.284 List.176 List.687 List.177; + let List.686 : U64 = 1i64; + let List.685 : U64 = CallByName Num.51 List.178 List.686; + jump List.681 List.175 List.180 List.177 List.685 List.179; else - dec List.174; - ret List.175; + dec List.175; + ret List.176; in inc #Derived_gen.0; - jump List.671 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; + jump List.681 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; -procedure List.18 (List.171, List.172, List.173): - let List.669 : U64 = 0i64; - let List.670 : U64 = CallByName List.6 List.171; - let List.668 : List {} = CallByName List.100 List.171 List.172 List.173 List.669 List.670; - ret List.668; +procedure List.18 (List.172, List.173, List.174): + let List.679 : U64 = 0i64; + let List.680 : U64 = CallByName List.6 List.172; + let List.678 : List {} = CallByName List.101 List.172 List.173 List.174 List.679 List.680; + ret List.678; -procedure List.283 (List.284, List.285, List.281): - let List.682 : {} = CallByName Test.2 List.285; - let List.681 : List {} = CallByName List.71 List.284 List.682; - ret List.681; +procedure List.284 (List.285, List.286, List.282): + let List.692 : {} = CallByName Test.2 List.286; + let List.691 : List {} = CallByName List.71 List.285 List.692; + ret List.691; -procedure List.5 (List.280, List.281): - let List.282 : U64 = CallByName List.6 List.280; - let List.666 : List {} = CallByName List.68 List.282; - let List.665 : List {} = CallByName List.18 List.280 List.666 List.281; - ret List.665; +procedure List.5 (List.281, List.282): + let List.283 : U64 = CallByName List.6 List.281; + let List.676 : List {} = CallByName List.68 List.283; + let List.675 : List {} = CallByName List.18 List.281 List.676 List.282; + ret List.675; procedure List.6 (#Attr.2): - let List.679 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.679; + let List.689 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.689; procedure List.66 (#Attr.2, #Attr.3): - let List.678 : [] = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.678; + let List.688 : [] = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.688; procedure List.68 (#Attr.2): - let List.684 : List {} = lowlevel ListWithCapacity #Attr.2; - ret List.684; + let List.694 : List {} = lowlevel ListWithCapacity #Attr.2; + ret List.694; procedure List.71 (#Attr.2, #Attr.3): - let List.683 : List {} = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.683; + let List.693 : List {} = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.693; procedure Num.22 (#Attr.2, #Attr.3): let Num.284 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/call_function_in_empty_list_unbound.txt b/crates/compiler/test_mono/generated/call_function_in_empty_list_unbound.txt index fd6401ba7b..11ac4c443d 100644 --- a/crates/compiler/test_mono/generated/call_function_in_empty_list_unbound.txt +++ b/crates/compiler/test_mono/generated/call_function_in_empty_list_unbound.txt @@ -1,51 +1,51 @@ -procedure List.100 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2, #Derived_gen.3, #Derived_gen.4): - joinpoint List.671 List.174 List.175 List.176 List.177 List.178: - let List.673 : Int1 = CallByName Num.22 List.177 List.178; - if List.673 then - let List.677 : [] = CallByName List.66 List.174 List.177; - let List.179 : List [] = CallByName List.283 List.175 List.677 List.176; - let List.676 : U64 = 1i64; - let List.675 : U64 = CallByName Num.51 List.177 List.676; - jump List.671 List.174 List.179 List.176 List.675 List.178; +procedure List.101 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2, #Derived_gen.3, #Derived_gen.4): + joinpoint List.681 List.175 List.176 List.177 List.178 List.179: + let List.683 : Int1 = CallByName Num.22 List.178 List.179; + if List.683 then + let List.687 : [] = CallByName List.66 List.175 List.178; + let List.180 : List [] = CallByName List.284 List.176 List.687 List.177; + let List.686 : U64 = 1i64; + let List.685 : U64 = CallByName Num.51 List.178 List.686; + jump List.681 List.175 List.180 List.177 List.685 List.179; else - dec List.174; - ret List.175; + dec List.175; + ret List.176; in inc #Derived_gen.0; - jump List.671 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; + jump List.681 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; -procedure List.18 (List.171, List.172, List.173): - let List.669 : U64 = 0i64; - let List.670 : U64 = CallByName List.6 List.171; - let List.668 : List [] = CallByName List.100 List.171 List.172 List.173 List.669 List.670; - ret List.668; +procedure List.18 (List.172, List.173, List.174): + let List.679 : U64 = 0i64; + let List.680 : U64 = CallByName List.6 List.172; + let List.678 : List [] = CallByName List.101 List.172 List.173 List.174 List.679 List.680; + ret List.678; -procedure List.283 (List.284, List.285, List.281): - let List.682 : [] = CallByName Test.2 List.285; - let List.681 : List [] = CallByName List.71 List.284 List.682; - ret List.681; +procedure List.284 (List.285, List.286, List.282): + let List.692 : [] = CallByName Test.2 List.286; + let List.691 : List [] = CallByName List.71 List.285 List.692; + ret List.691; -procedure List.5 (List.280, List.281): - let List.282 : U64 = CallByName List.6 List.280; - let List.666 : List [] = CallByName List.68 List.282; - let List.665 : List [] = CallByName List.18 List.280 List.666 List.281; - ret List.665; +procedure List.5 (List.281, List.282): + let List.283 : U64 = CallByName List.6 List.281; + let List.676 : List [] = CallByName List.68 List.283; + let List.675 : List [] = CallByName List.18 List.281 List.676 List.282; + ret List.675; procedure List.6 (#Attr.2): - let List.679 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.679; + let List.689 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.689; procedure List.66 (#Attr.2, #Attr.3): - let List.678 : [] = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.678; + let List.688 : [] = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.688; procedure List.68 (#Attr.2): - let List.684 : List [] = lowlevel ListWithCapacity #Attr.2; - ret List.684; + let List.694 : List [] = lowlevel ListWithCapacity #Attr.2; + ret List.694; procedure List.71 (#Attr.2, #Attr.3): - let List.683 : List [] = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.683; + let List.693 : List [] = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.693; procedure Num.22 (#Attr.2, #Attr.3): let Num.284 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/capture_void_layout_task.txt b/crates/compiler/test_mono/generated/capture_void_layout_task.txt index ef79c76147..be67ed8577 100644 --- a/crates/compiler/test_mono/generated/capture_void_layout_task.txt +++ b/crates/compiler/test_mono/generated/capture_void_layout_task.txt @@ -1,32 +1,32 @@ -procedure List.100 (#Derived_gen.11, #Derived_gen.12, #Derived_gen.13, #Derived_gen.14, #Derived_gen.15): - joinpoint List.668 List.174 List.175 List.176 List.177 List.178: - let List.670 : Int1 = CallByName Num.22 List.177 List.178; - if List.670 then - let List.674 : [] = CallByName List.66 List.174 List.177; - let List.179 : [C {}, C *self {{}, []}] = CallByName Test.29 List.175 List.674 List.176; - let List.673 : U64 = 1i64; - let List.672 : U64 = CallByName Num.51 List.177 List.673; - jump List.668 List.174 List.179 List.176 List.672 List.178; +procedure List.101 (#Derived_gen.8, #Derived_gen.9, #Derived_gen.10, #Derived_gen.11, #Derived_gen.12): + joinpoint List.678 List.175 List.176 List.177 List.178 List.179: + let List.680 : Int1 = CallByName Num.22 List.178 List.179; + if List.680 then + let List.684 : [] = CallByName List.66 List.175 List.178; + let List.180 : [C {}, C *self {{}, []}] = CallByName Test.29 List.176 List.684 List.177; + let List.683 : U64 = 1i64; + let List.682 : U64 = CallByName Num.51 List.178 List.683; + jump List.678 List.175 List.180 List.177 List.682 List.179; else - dec List.174; - ret List.175; + dec List.175; + ret List.176; in - inc #Derived_gen.11; - jump List.668 #Derived_gen.11 #Derived_gen.12 #Derived_gen.13 #Derived_gen.14 #Derived_gen.15; + inc #Derived_gen.8; + jump List.678 #Derived_gen.8 #Derived_gen.9 #Derived_gen.10 #Derived_gen.11 #Derived_gen.12; -procedure List.18 (List.171, List.172, List.173): - let List.666 : U64 = 0i64; - let List.667 : U64 = CallByName List.6 List.171; - let List.665 : [C {}, C *self {{}, []}] = CallByName List.100 List.171 List.172 List.173 List.666 List.667; - ret List.665; +procedure List.18 (List.172, List.173, List.174): + let List.676 : U64 = 0i64; + let List.677 : U64 = CallByName List.6 List.172; + let List.675 : [C {}, C *self {{}, []}] = CallByName List.101 List.172 List.173 List.174 List.676 List.677; + ret List.675; procedure List.6 (#Attr.2): - let List.676 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.676; + let List.686 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.686; procedure List.66 (#Attr.2, #Attr.3): - let List.675 : [] = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.675; + let List.685 : [] = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.685; procedure Num.22 (#Attr.2, #Attr.3): let Num.284 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/closure_in_list.txt b/crates/compiler/test_mono/generated/closure_in_list.txt index b326b37918..7647083750 100644 --- a/crates/compiler/test_mono/generated/closure_in_list.txt +++ b/crates/compiler/test_mono/generated/closure_in_list.txt @@ -1,6 +1,6 @@ procedure List.6 (#Attr.2): - let List.665 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.665; + let List.675 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.675; procedure Test.1 (Test.5): let Test.2 : I64 = 41i64; diff --git a/crates/compiler/test_mono/generated/compose_recursive_lambda_set_productive_nullable_wrapped.txt b/crates/compiler/test_mono/generated/compose_recursive_lambda_set_productive_nullable_wrapped.txt index 7afd72ba2c..e06264f601 100644 --- a/crates/compiler/test_mono/generated/compose_recursive_lambda_set_productive_nullable_wrapped.txt +++ b/crates/compiler/test_mono/generated/compose_recursive_lambda_set_productive_nullable_wrapped.txt @@ -2,35 +2,35 @@ procedure Bool.2 (): let Bool.23 : Int1 = true; ret Bool.23; -procedure List.100 (#Derived_gen.3, #Derived_gen.4, #Derived_gen.5, #Derived_gen.6, #Derived_gen.7): - joinpoint List.668 List.174 List.175 List.176 List.177 List.178: - let List.670 : Int1 = CallByName Num.22 List.177 List.178; - if List.670 then - let List.674 : Int1 = CallByName List.66 List.174 List.177; - let List.179 : [, C *self Int1, C *self Int1] = CallByName Test.6 List.175 List.674 List.176; - let List.673 : U64 = 1i64; - let List.672 : U64 = CallByName Num.51 List.177 List.673; - jump List.668 List.174 List.179 List.176 List.672 List.178; +procedure List.101 (#Derived_gen.5, #Derived_gen.6, #Derived_gen.7, #Derived_gen.8, #Derived_gen.9): + joinpoint List.678 List.175 List.176 List.177 List.178 List.179: + let List.680 : Int1 = CallByName Num.22 List.178 List.179; + if List.680 then + let List.684 : Int1 = CallByName List.66 List.175 List.178; + let List.180 : [, C *self Int1, C *self Int1] = CallByName Test.6 List.176 List.684 List.177; + let List.683 : U64 = 1i64; + let List.682 : U64 = CallByName Num.51 List.178 List.683; + jump List.678 List.175 List.180 List.177 List.682 List.179; else - dec List.174; - ret List.175; + dec List.175; + ret List.176; in - inc #Derived_gen.3; - jump List.668 #Derived_gen.3 #Derived_gen.4 #Derived_gen.5 #Derived_gen.6 #Derived_gen.7; + inc #Derived_gen.5; + jump List.678 #Derived_gen.5 #Derived_gen.6 #Derived_gen.7 #Derived_gen.8 #Derived_gen.9; -procedure List.18 (List.171, List.172, List.173): - let List.666 : U64 = 0i64; - let List.667 : U64 = CallByName List.6 List.171; - let List.665 : [, C *self Int1, C *self Int1] = CallByName List.100 List.171 List.172 List.173 List.666 List.667; - ret List.665; +procedure List.18 (List.172, List.173, List.174): + let List.676 : U64 = 0i64; + let List.677 : U64 = CallByName List.6 List.172; + let List.675 : [, C *self Int1, C *self Int1] = CallByName List.101 List.172 List.173 List.174 List.676 List.677; + ret List.675; procedure List.6 (#Attr.2): - let List.676 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.676; + let List.686 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.686; procedure List.66 (#Attr.2, #Attr.3): - let List.675 : Int1 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.675; + let List.685 : Int1 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.685; procedure Num.22 (#Attr.2, #Attr.3): let Num.284 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/dict.txt b/crates/compiler/test_mono/generated/dict.txt index 67d35d2014..e550ff18e6 100644 --- a/crates/compiler/test_mono/generated/dict.txt +++ b/crates/compiler/test_mono/generated/dict.txt @@ -26,8 +26,8 @@ procedure Dict.52 (): ret Dict.744; procedure List.6 (#Attr.2): - let List.665 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.665; + let List.675 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.675; procedure Num.75 (#Attr.2, #Attr.3): let Num.283 : U8 = lowlevel NumSubWrap #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/empty_list_of_function_type.txt b/crates/compiler/test_mono/generated/empty_list_of_function_type.txt index 5ae351eca8..c9c316d0ff 100644 --- a/crates/compiler/test_mono/generated/empty_list_of_function_type.txt +++ b/crates/compiler/test_mono/generated/empty_list_of_function_type.txt @@ -2,25 +2,25 @@ procedure Bool.1 (): let Bool.23 : Int1 = false; ret Bool.23; -procedure List.2 (List.119, List.120): - let List.671 : U64 = CallByName List.6 List.119; - let List.667 : Int1 = CallByName Num.22 List.120 List.671; - if List.667 then - let List.669 : {} = CallByName List.66 List.119 List.120; - let List.668 : [C {}, C {}] = TagId(1) List.669; - ret List.668; +procedure List.2 (List.120, List.121): + let List.681 : U64 = CallByName List.6 List.120; + let List.677 : Int1 = CallByName Num.22 List.121 List.681; + if List.677 then + let List.679 : {} = CallByName List.66 List.120 List.121; + let List.678 : [C {}, C {}] = TagId(1) List.679; + ret List.678; else - let List.666 : {} = Struct {}; - let List.665 : [C {}, C {}] = TagId(0) List.666; - ret List.665; + let List.676 : {} = Struct {}; + let List.675 : [C {}, C {}] = TagId(0) List.676; + ret List.675; procedure List.6 (#Attr.2): - let List.672 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.672; + let List.682 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.682; procedure List.66 (#Attr.2, #Attr.3): - let List.670 : {} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.670; + let List.680 : {} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.680; procedure Num.22 (#Attr.2, #Attr.3): let Num.283 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/encode.txt b/crates/compiler/test_mono/generated/encode.txt index 0c482651dd..4a61bba9c3 100644 --- a/crates/compiler/test_mono/generated/encode.txt +++ b/crates/compiler/test_mono/generated/encode.txt @@ -1,16 +1,16 @@ -procedure List.4 (List.135, List.136): - let List.668 : U64 = 1i64; - let List.666 : List U8 = CallByName List.70 List.135 List.668; - let List.665 : List U8 = CallByName List.71 List.666 List.136; - ret List.665; +procedure List.4 (List.136, List.137): + let List.678 : U64 = 1i64; + let List.676 : List U8 = CallByName List.70 List.136 List.678; + let List.675 : List U8 = CallByName List.71 List.676 List.137; + ret List.675; procedure List.70 (#Attr.2, #Attr.3): - let List.669 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.669; + let List.679 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.679; procedure List.71 (#Attr.2, #Attr.3): - let List.667 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.667; + let List.677 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.677; procedure Test.23 (Test.24, Test.35, Test.22): let Test.37 : List U8 = CallByName List.4 Test.24 Test.22; diff --git a/crates/compiler/test_mono/generated/encode_derived_nested_record_string.txt b/crates/compiler/test_mono/generated/encode_derived_nested_record_string.txt index 31d18ca68d..eee404c564 100644 --- a/crates/compiler/test_mono/generated/encode_derived_nested_record_string.txt +++ b/crates/compiler/test_mono/generated/encode_derived_nested_record_string.txt @@ -67,85 +67,85 @@ procedure Encode.26 (Encode.107, Encode.108): let Encode.110 : List U8 = CallByName Encode.24 Encode.111 Encode.112 Encode.108; ret Encode.110; -procedure List.100 (#Derived_gen.26, #Derived_gen.27, #Derived_gen.28, #Derived_gen.29, #Derived_gen.30): - joinpoint List.694 List.174 List.175 List.176 List.177 List.178: - let List.696 : Int1 = CallByName Num.22 List.177 List.178; - if List.696 then - let List.700 : {Str, Str} = CallByName List.66 List.174 List.177; - inc List.700; - let List.179 : List U8 = CallByName Test.71 List.175 List.700; - let List.699 : U64 = 1i64; - let List.698 : U64 = CallByName Num.51 List.177 List.699; - jump List.694 List.174 List.179 List.176 List.698 List.178; +procedure List.101 (#Derived_gen.26, #Derived_gen.27, #Derived_gen.28, #Derived_gen.29, #Derived_gen.30): + joinpoint List.678 List.175 List.176 List.177 List.178 List.179: + let List.680 : Int1 = CallByName Num.22 List.178 List.179; + if List.680 then + let List.684 : {Str, Str} = CallByName List.66 List.175 List.178; + inc List.684; + let List.180 : List U8 = CallByName Test.71 List.176 List.684; + let List.683 : U64 = 1i64; + let List.682 : U64 = CallByName Num.51 List.178 List.683; + jump List.678 List.175 List.180 List.177 List.682 List.179; else - dec List.174; - ret List.175; + dec List.175; + ret List.176; in inc #Derived_gen.26; - jump List.694 #Derived_gen.26 #Derived_gen.27 #Derived_gen.28 #Derived_gen.29 #Derived_gen.30; - -procedure List.100 (#Derived_gen.34, #Derived_gen.35, #Derived_gen.36, #Derived_gen.37, #Derived_gen.38): - joinpoint List.668 List.174 List.175 List.176 List.177 List.178: - let List.670 : Int1 = CallByName Num.22 List.177 List.178; - if List.670 then - let List.674 : {Str, Str} = CallByName List.66 List.174 List.177; - inc List.674; - let List.179 : List U8 = CallByName Test.71 List.175 List.674; - let List.673 : U64 = 1i64; - let List.672 : U64 = CallByName Num.51 List.177 List.673; - jump List.668 List.174 List.179 List.176 List.672 List.178; + jump List.678 #Derived_gen.26 #Derived_gen.27 #Derived_gen.28 #Derived_gen.29 #Derived_gen.30; + +procedure List.101 (#Derived_gen.31, #Derived_gen.32, #Derived_gen.33, #Derived_gen.34, #Derived_gen.35): + joinpoint List.704 List.175 List.176 List.177 List.178 List.179: + let List.706 : Int1 = CallByName Num.22 List.178 List.179; + if List.706 then + let List.710 : {Str, Str} = CallByName List.66 List.175 List.178; + inc List.710; + let List.180 : List U8 = CallByName Test.71 List.176 List.710; + let List.709 : U64 = 1i64; + let List.708 : U64 = CallByName Num.51 List.178 List.709; + jump List.704 List.175 List.180 List.177 List.708 List.179; else - dec List.174; - ret List.175; + dec List.175; + ret List.176; in - inc #Derived_gen.34; - jump List.668 #Derived_gen.34 #Derived_gen.35 #Derived_gen.36 #Derived_gen.37 #Derived_gen.38; - -procedure List.18 (List.171, List.172, List.173): - let List.666 : U64 = 0i64; - let List.667 : U64 = CallByName List.6 List.171; - let List.665 : List U8 = CallByName List.100 List.171 List.172 List.173 List.666 List.667; - ret List.665; - -procedure List.18 (List.171, List.172, List.173): - let List.692 : U64 = 0i64; - let List.693 : U64 = CallByName List.6 List.171; - let List.691 : List U8 = CallByName List.100 List.171 List.172 List.173 List.692 List.693; - ret List.691; - -procedure List.4 (List.135, List.136): - let List.713 : U64 = 1i64; - let List.712 : List U8 = CallByName List.70 List.135 List.713; - let List.711 : List U8 = CallByName List.71 List.712 List.136; - ret List.711; + inc #Derived_gen.31; + jump List.704 #Derived_gen.31 #Derived_gen.32 #Derived_gen.33 #Derived_gen.34 #Derived_gen.35; + +procedure List.18 (List.172, List.173, List.174): + let List.676 : U64 = 0i64; + let List.677 : U64 = CallByName List.6 List.172; + let List.675 : List U8 = CallByName List.101 List.172 List.173 List.174 List.676 List.677; + ret List.675; + +procedure List.18 (List.172, List.173, List.174): + let List.702 : U64 = 0i64; + let List.703 : U64 = CallByName List.6 List.172; + let List.701 : List U8 = CallByName List.101 List.172 List.173 List.174 List.702 List.703; + ret List.701; + +procedure List.4 (List.136, List.137): + let List.723 : U64 = 1i64; + let List.722 : List U8 = CallByName List.70 List.136 List.723; + let List.721 : List U8 = CallByName List.71 List.722 List.137; + ret List.721; procedure List.6 (#Attr.2): - let List.690 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.690; + let List.700 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.700; procedure List.6 (#Attr.2): - let List.716 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.716; + let List.726 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.726; procedure List.66 (#Attr.2, #Attr.3): - let List.675 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.675; + let List.685 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.685; procedure List.66 (#Attr.2, #Attr.3): - let List.701 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.701; + let List.711 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.711; procedure List.70 (#Attr.2, #Attr.3): - let List.707 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.707; + let List.717 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.717; procedure List.71 (#Attr.2, #Attr.3): - let List.705 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.705; + let List.715 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.715; procedure List.8 (#Attr.2, #Attr.3): - let List.715 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.715; + let List.725 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.725; procedure Num.127 (#Attr.2): let Num.288 : U8 = lowlevel NumIntCast #Attr.2; diff --git a/crates/compiler/test_mono/generated/encode_derived_record_one_field_string.txt b/crates/compiler/test_mono/generated/encode_derived_record_one_field_string.txt index 8aa802ca3a..89317dea5e 100644 --- a/crates/compiler/test_mono/generated/encode_derived_record_one_field_string.txt +++ b/crates/compiler/test_mono/generated/encode_derived_record_one_field_string.txt @@ -39,54 +39,54 @@ procedure Encode.26 (Encode.107, Encode.108): let Encode.110 : List U8 = CallByName Encode.24 Encode.111 Encode.112 Encode.108; ret Encode.110; -procedure List.100 (#Derived_gen.16, #Derived_gen.17, #Derived_gen.18, #Derived_gen.19, #Derived_gen.20): - joinpoint List.668 List.174 List.175 List.176 List.177 List.178: - let List.670 : Int1 = CallByName Num.22 List.177 List.178; - if List.670 then - let List.674 : {Str, Str} = CallByName List.66 List.174 List.177; - inc List.674; - let List.179 : List U8 = CallByName Test.71 List.175 List.674; - let List.673 : U64 = 1i64; - let List.672 : U64 = CallByName Num.51 List.177 List.673; - jump List.668 List.174 List.179 List.176 List.672 List.178; +procedure List.101 (#Derived_gen.16, #Derived_gen.17, #Derived_gen.18, #Derived_gen.19, #Derived_gen.20): + joinpoint List.678 List.175 List.176 List.177 List.178 List.179: + let List.680 : Int1 = CallByName Num.22 List.178 List.179; + if List.680 then + let List.684 : {Str, Str} = CallByName List.66 List.175 List.178; + inc List.684; + let List.180 : List U8 = CallByName Test.71 List.176 List.684; + let List.683 : U64 = 1i64; + let List.682 : U64 = CallByName Num.51 List.178 List.683; + jump List.678 List.175 List.180 List.177 List.682 List.179; else - dec List.174; - ret List.175; + dec List.175; + ret List.176; in inc #Derived_gen.16; - jump List.668 #Derived_gen.16 #Derived_gen.17 #Derived_gen.18 #Derived_gen.19 #Derived_gen.20; - -procedure List.18 (List.171, List.172, List.173): - let List.666 : U64 = 0i64; - let List.667 : U64 = CallByName List.6 List.171; - let List.665 : List U8 = CallByName List.100 List.171 List.172 List.173 List.666 List.667; - ret List.665; - -procedure List.4 (List.135, List.136): - let List.687 : U64 = 1i64; - let List.686 : List U8 = CallByName List.70 List.135 List.687; - let List.685 : List U8 = CallByName List.71 List.686 List.136; - ret List.685; + jump List.678 #Derived_gen.16 #Derived_gen.17 #Derived_gen.18 #Derived_gen.19 #Derived_gen.20; + +procedure List.18 (List.172, List.173, List.174): + let List.676 : U64 = 0i64; + let List.677 : U64 = CallByName List.6 List.172; + let List.675 : List U8 = CallByName List.101 List.172 List.173 List.174 List.676 List.677; + ret List.675; + +procedure List.4 (List.136, List.137): + let List.697 : U64 = 1i64; + let List.696 : List U8 = CallByName List.70 List.136 List.697; + let List.695 : List U8 = CallByName List.71 List.696 List.137; + ret List.695; procedure List.6 (#Attr.2): - let List.690 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.690; + let List.700 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.700; procedure List.66 (#Attr.2, #Attr.3): - let List.675 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.675; + let List.685 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.685; procedure List.70 (#Attr.2, #Attr.3): - let List.681 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.681; + let List.691 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.691; procedure List.71 (#Attr.2, #Attr.3): - let List.679 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.679; + let List.689 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.689; procedure List.8 (#Attr.2, #Attr.3): - let List.689 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.689; + let List.699 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.699; procedure Num.127 (#Attr.2): let Num.284 : U8 = lowlevel NumIntCast #Attr.2; diff --git a/crates/compiler/test_mono/generated/encode_derived_record_two_field_strings.txt b/crates/compiler/test_mono/generated/encode_derived_record_two_field_strings.txt index 9ca5156043..4934cb386b 100644 --- a/crates/compiler/test_mono/generated/encode_derived_record_two_field_strings.txt +++ b/crates/compiler/test_mono/generated/encode_derived_record_two_field_strings.txt @@ -46,54 +46,54 @@ procedure Encode.26 (Encode.107, Encode.108): let Encode.110 : List U8 = CallByName Encode.24 Encode.111 Encode.112 Encode.108; ret Encode.110; -procedure List.100 (#Derived_gen.20, #Derived_gen.21, #Derived_gen.22, #Derived_gen.23, #Derived_gen.24): - joinpoint List.668 List.174 List.175 List.176 List.177 List.178: - let List.670 : Int1 = CallByName Num.22 List.177 List.178; - if List.670 then - let List.674 : {Str, Str} = CallByName List.66 List.174 List.177; - inc List.674; - let List.179 : List U8 = CallByName Test.71 List.175 List.674; - let List.673 : U64 = 1i64; - let List.672 : U64 = CallByName Num.51 List.177 List.673; - jump List.668 List.174 List.179 List.176 List.672 List.178; +procedure List.101 (#Derived_gen.20, #Derived_gen.21, #Derived_gen.22, #Derived_gen.23, #Derived_gen.24): + joinpoint List.678 List.175 List.176 List.177 List.178 List.179: + let List.680 : Int1 = CallByName Num.22 List.178 List.179; + if List.680 then + let List.684 : {Str, Str} = CallByName List.66 List.175 List.178; + inc List.684; + let List.180 : List U8 = CallByName Test.71 List.176 List.684; + let List.683 : U64 = 1i64; + let List.682 : U64 = CallByName Num.51 List.178 List.683; + jump List.678 List.175 List.180 List.177 List.682 List.179; else - dec List.174; - ret List.175; + dec List.175; + ret List.176; in inc #Derived_gen.20; - jump List.668 #Derived_gen.20 #Derived_gen.21 #Derived_gen.22 #Derived_gen.23 #Derived_gen.24; - -procedure List.18 (List.171, List.172, List.173): - let List.666 : U64 = 0i64; - let List.667 : U64 = CallByName List.6 List.171; - let List.665 : List U8 = CallByName List.100 List.171 List.172 List.173 List.666 List.667; - ret List.665; - -procedure List.4 (List.135, List.136): - let List.687 : U64 = 1i64; - let List.686 : List U8 = CallByName List.70 List.135 List.687; - let List.685 : List U8 = CallByName List.71 List.686 List.136; - ret List.685; + jump List.678 #Derived_gen.20 #Derived_gen.21 #Derived_gen.22 #Derived_gen.23 #Derived_gen.24; + +procedure List.18 (List.172, List.173, List.174): + let List.676 : U64 = 0i64; + let List.677 : U64 = CallByName List.6 List.172; + let List.675 : List U8 = CallByName List.101 List.172 List.173 List.174 List.676 List.677; + ret List.675; + +procedure List.4 (List.136, List.137): + let List.697 : U64 = 1i64; + let List.696 : List U8 = CallByName List.70 List.136 List.697; + let List.695 : List U8 = CallByName List.71 List.696 List.137; + ret List.695; procedure List.6 (#Attr.2): - let List.690 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.690; + let List.700 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.700; procedure List.66 (#Attr.2, #Attr.3): - let List.675 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.675; + let List.685 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.685; procedure List.70 (#Attr.2, #Attr.3): - let List.681 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.681; + let List.691 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.691; procedure List.71 (#Attr.2, #Attr.3): - let List.679 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.679; + let List.689 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.689; procedure List.8 (#Attr.2, #Attr.3): - let List.689 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.689; + let List.699 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.699; procedure Num.127 (#Attr.2): let Num.284 : U8 = lowlevel NumIntCast #Attr.2; diff --git a/crates/compiler/test_mono/generated/encode_derived_string.txt b/crates/compiler/test_mono/generated/encode_derived_string.txt index 265b622827..be968f298f 100644 --- a/crates/compiler/test_mono/generated/encode_derived_string.txt +++ b/crates/compiler/test_mono/generated/encode_derived_string.txt @@ -11,23 +11,23 @@ procedure Encode.26 (Encode.107, Encode.108): let Encode.110 : List U8 = CallByName Encode.24 Encode.111 Encode.112 Encode.108; ret Encode.110; -procedure List.4 (List.135, List.136): - let List.675 : U64 = 1i64; - let List.674 : List U8 = CallByName List.70 List.135 List.675; - let List.673 : List U8 = CallByName List.71 List.674 List.136; - ret List.673; +procedure List.4 (List.136, List.137): + let List.685 : U64 = 1i64; + let List.684 : List U8 = CallByName List.70 List.136 List.685; + let List.683 : List U8 = CallByName List.71 List.684 List.137; + ret List.683; procedure List.70 (#Attr.2, #Attr.3): - let List.669 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.669; + let List.679 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.679; procedure List.71 (#Attr.2, #Attr.3): - let List.667 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.667; + let List.677 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.677; procedure List.8 (#Attr.2, #Attr.3): - let List.677 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.677; + let List.687 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.687; procedure Num.127 (#Attr.2): let Num.284 : U8 = lowlevel NumIntCast #Attr.2; diff --git a/crates/compiler/test_mono/generated/encode_derived_tag_one_field_string.txt b/crates/compiler/test_mono/generated/encode_derived_tag_one_field_string.txt index 01194822d9..6f14951fea 100644 --- a/crates/compiler/test_mono/generated/encode_derived_tag_one_field_string.txt +++ b/crates/compiler/test_mono/generated/encode_derived_tag_one_field_string.txt @@ -40,58 +40,58 @@ procedure Encode.26 (Encode.107, Encode.108): let Encode.110 : List U8 = CallByName Encode.24 Encode.111 Encode.112 Encode.108; ret Encode.110; -procedure List.100 (#Derived_gen.10, #Derived_gen.11, #Derived_gen.12, #Derived_gen.13, #Derived_gen.14): - joinpoint List.668 List.174 List.175 List.176 List.177 List.178: - let List.670 : Int1 = CallByName Num.22 List.177 List.178; - if List.670 then - let List.674 : Str = CallByName List.66 List.174 List.177; - inc List.674; - let List.179 : List U8 = CallByName Test.64 List.175 List.674 List.176; - let List.673 : U64 = 1i64; - let List.672 : U64 = CallByName Num.51 List.177 List.673; - jump List.668 List.174 List.179 List.176 List.672 List.178; +procedure List.101 (#Derived_gen.10, #Derived_gen.11, #Derived_gen.12, #Derived_gen.13, #Derived_gen.14): + joinpoint List.678 List.175 List.176 List.177 List.178 List.179: + let List.680 : Int1 = CallByName Num.22 List.178 List.179; + if List.680 then + let List.684 : Str = CallByName List.66 List.175 List.178; + inc List.684; + let List.180 : List U8 = CallByName Test.64 List.176 List.684 List.177; + let List.683 : U64 = 1i64; + let List.682 : U64 = CallByName Num.51 List.178 List.683; + jump List.678 List.175 List.180 List.177 List.682 List.179; else - dec List.174; - ret List.175; + dec List.175; + ret List.176; in inc #Derived_gen.10; - jump List.668 #Derived_gen.10 #Derived_gen.11 #Derived_gen.12 #Derived_gen.13 #Derived_gen.14; + jump List.678 #Derived_gen.10 #Derived_gen.11 #Derived_gen.12 #Derived_gen.13 #Derived_gen.14; procedure List.13 (#Attr.2, #Attr.3): - let List.691 : List Str = lowlevel ListPrepend #Attr.2 #Attr.3; - ret List.691; + let List.701 : List Str = lowlevel ListPrepend #Attr.2 #Attr.3; + ret List.701; -procedure List.18 (List.171, List.172, List.173): - let List.666 : U64 = 0i64; - let List.667 : U64 = CallByName List.6 List.171; - let List.665 : List U8 = CallByName List.100 List.171 List.172 List.173 List.666 List.667; - ret List.665; +procedure List.18 (List.172, List.173, List.174): + let List.676 : U64 = 0i64; + let List.677 : U64 = CallByName List.6 List.172; + let List.675 : List U8 = CallByName List.101 List.172 List.173 List.174 List.676 List.677; + ret List.675; -procedure List.4 (List.135, List.136): - let List.687 : U64 = 1i64; - let List.686 : List U8 = CallByName List.70 List.135 List.687; - let List.685 : List U8 = CallByName List.71 List.686 List.136; - ret List.685; +procedure List.4 (List.136, List.137): + let List.697 : U64 = 1i64; + let List.696 : List U8 = CallByName List.70 List.136 List.697; + let List.695 : List U8 = CallByName List.71 List.696 List.137; + ret List.695; procedure List.6 (#Attr.2): - let List.690 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.690; + let List.700 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.700; procedure List.66 (#Attr.2, #Attr.3): - let List.675 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.675; + let List.685 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.685; procedure List.70 (#Attr.2, #Attr.3): - let List.681 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.681; + let List.691 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.691; procedure List.71 (#Attr.2, #Attr.3): - let List.679 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.679; + let List.689 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.689; procedure List.8 (#Attr.2, #Attr.3): - let List.689 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.689; + let List.699 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.699; procedure Num.127 (#Attr.2): let Num.284 : U8 = lowlevel NumIntCast #Attr.2; diff --git a/crates/compiler/test_mono/generated/encode_derived_tag_two_payloads_string.txt b/crates/compiler/test_mono/generated/encode_derived_tag_two_payloads_string.txt index 9dc0c45f64..5e331a1f00 100644 --- a/crates/compiler/test_mono/generated/encode_derived_tag_two_payloads_string.txt +++ b/crates/compiler/test_mono/generated/encode_derived_tag_two_payloads_string.txt @@ -43,58 +43,58 @@ procedure Encode.26 (Encode.107, Encode.108): let Encode.110 : List U8 = CallByName Encode.24 Encode.111 Encode.112 Encode.108; ret Encode.110; -procedure List.100 (#Derived_gen.20, #Derived_gen.21, #Derived_gen.22, #Derived_gen.23, #Derived_gen.24): - joinpoint List.668 List.174 List.175 List.176 List.177 List.178: - let List.670 : Int1 = CallByName Num.22 List.177 List.178; - if List.670 then - let List.674 : Str = CallByName List.66 List.174 List.177; - inc List.674; - let List.179 : List U8 = CallByName Test.64 List.175 List.674 List.176; - let List.673 : U64 = 1i64; - let List.672 : U64 = CallByName Num.51 List.177 List.673; - jump List.668 List.174 List.179 List.176 List.672 List.178; +procedure List.101 (#Derived_gen.20, #Derived_gen.21, #Derived_gen.22, #Derived_gen.23, #Derived_gen.24): + joinpoint List.678 List.175 List.176 List.177 List.178 List.179: + let List.680 : Int1 = CallByName Num.22 List.178 List.179; + if List.680 then + let List.684 : Str = CallByName List.66 List.175 List.178; + inc List.684; + let List.180 : List U8 = CallByName Test.64 List.176 List.684 List.177; + let List.683 : U64 = 1i64; + let List.682 : U64 = CallByName Num.51 List.178 List.683; + jump List.678 List.175 List.180 List.177 List.682 List.179; else - dec List.174; - ret List.175; + dec List.175; + ret List.176; in inc #Derived_gen.20; - jump List.668 #Derived_gen.20 #Derived_gen.21 #Derived_gen.22 #Derived_gen.23 #Derived_gen.24; + jump List.678 #Derived_gen.20 #Derived_gen.21 #Derived_gen.22 #Derived_gen.23 #Derived_gen.24; procedure List.13 (#Attr.2, #Attr.3): - let List.691 : List Str = lowlevel ListPrepend #Attr.2 #Attr.3; - ret List.691; + let List.701 : List Str = lowlevel ListPrepend #Attr.2 #Attr.3; + ret List.701; -procedure List.18 (List.171, List.172, List.173): - let List.666 : U64 = 0i64; - let List.667 : U64 = CallByName List.6 List.171; - let List.665 : List U8 = CallByName List.100 List.171 List.172 List.173 List.666 List.667; - ret List.665; +procedure List.18 (List.172, List.173, List.174): + let List.676 : U64 = 0i64; + let List.677 : U64 = CallByName List.6 List.172; + let List.675 : List U8 = CallByName List.101 List.172 List.173 List.174 List.676 List.677; + ret List.675; -procedure List.4 (List.135, List.136): - let List.687 : U64 = 1i64; - let List.686 : List U8 = CallByName List.70 List.135 List.687; - let List.685 : List U8 = CallByName List.71 List.686 List.136; - ret List.685; +procedure List.4 (List.136, List.137): + let List.697 : U64 = 1i64; + let List.696 : List U8 = CallByName List.70 List.136 List.697; + let List.695 : List U8 = CallByName List.71 List.696 List.137; + ret List.695; procedure List.6 (#Attr.2): - let List.690 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.690; + let List.700 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.700; procedure List.66 (#Attr.2, #Attr.3): - let List.675 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.675; + let List.685 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.685; procedure List.70 (#Attr.2, #Attr.3): - let List.681 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.681; + let List.691 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.691; procedure List.71 (#Attr.2, #Attr.3): - let List.679 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.679; + let List.689 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.689; procedure List.8 (#Attr.2, #Attr.3): - let List.689 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.689; + let List.699 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.699; procedure Num.127 (#Attr.2): let Num.284 : U8 = lowlevel NumIntCast #Attr.2; diff --git a/crates/compiler/test_mono/generated/inspect_derived_dict.txt b/crates/compiler/test_mono/generated/inspect_derived_dict.txt index 28569ff027..87ba855f30 100644 --- a/crates/compiler/test_mono/generated/inspect_derived_dict.txt +++ b/crates/compiler/test_mono/generated/inspect_derived_dict.txt @@ -312,7 +312,7 @@ procedure Dict.72 (Dict.413, Dict.414, Dict.415): let Dict.855 : {U64, U32} = CallByName Dict.73 Dict.413 Dict.418 Dict.417; ret Dict.855; -procedure Dict.73 (#Derived_gen.10, #Derived_gen.11, #Derived_gen.12): +procedure Dict.73 (#Derived_gen.15, #Derived_gen.16, #Derived_gen.17): joinpoint Dict.856 Dict.419 Dict.420 Dict.421: let Dict.422 : {U32, U32} = CallByName Dict.22 Dict.419 Dict.420; let Dict.863 : U32 = StructAtIndex 1 Dict.422; @@ -327,8 +327,8 @@ procedure Dict.73 (#Derived_gen.10, #Derived_gen.11, #Derived_gen.12): let Dict.857 : {U64, U32} = Struct {Dict.420, Dict.421}; ret Dict.857; in - inc #Derived_gen.10; - jump Dict.856 #Derived_gen.10 #Derived_gen.11 #Derived_gen.12; + inc #Derived_gen.15; + jump Dict.856 #Derived_gen.15 #Derived_gen.16 #Derived_gen.17; procedure Dict.74 (#Derived_gen.48, #Derived_gen.49, #Derived_gen.50): joinpoint Dict.762 Dict.423 Dict.424 Dict.425: @@ -902,171 +902,171 @@ procedure Inspect.63 (Inspect.295, Inspect.291): procedure Inspect.64 (Inspect.297): ret Inspect.297; -procedure List.100 (#Derived_gen.34, #Derived_gen.35, #Derived_gen.36, #Derived_gen.37, #Derived_gen.38): - joinpoint List.732 List.174 List.175 List.176 List.177 List.178: - let List.734 : Int1 = CallByName Num.22 List.177 List.178; - if List.734 then - let List.738 : {Str, I64} = CallByName List.66 List.174 List.177; - inc List.738; - let List.179 : {Str, Int1} = CallByName Dict.188 List.175 List.738 List.176; - let List.737 : U64 = 1i64; - let List.736 : U64 = CallByName Num.51 List.177 List.737; - jump List.732 List.174 List.179 List.176 List.736 List.178; +procedure List.101 (#Derived_gen.10, #Derived_gen.11, #Derived_gen.12, #Derived_gen.13, #Derived_gen.14): + joinpoint List.678 List.175 List.176 List.177 List.178 List.179: + let List.680 : Int1 = CallByName Num.22 List.178 List.179; + if List.680 then + let List.684 : {Str, I64} = CallByName List.66 List.175 List.178; + inc List.684; + let List.180 : {List {U32, U32}, List {Str, I64}, U64, Float32, U8} = CallByName Dict.159 List.176 List.684; + let List.683 : U64 = 1i64; + let List.682 : U64 = CallByName Num.51 List.178 List.683; + jump List.678 List.175 List.180 List.177 List.682 List.179; else - dec List.174; - ret List.175; + dec List.175; + ret List.176; in - inc #Derived_gen.34; - jump List.732 #Derived_gen.34 #Derived_gen.35 #Derived_gen.36 #Derived_gen.37 #Derived_gen.38; - -procedure List.100 (#Derived_gen.60, #Derived_gen.61, #Derived_gen.62, #Derived_gen.63, #Derived_gen.64): - joinpoint List.668 List.174 List.175 List.176 List.177 List.178: - let List.670 : Int1 = CallByName Num.22 List.177 List.178; - if List.670 then - let List.674 : {Str, I64} = CallByName List.66 List.174 List.177; - inc List.674; - let List.179 : {List {U32, U32}, List {Str, I64}, U64, Float32, U8} = CallByName Dict.159 List.175 List.674; - let List.673 : U64 = 1i64; - let List.672 : U64 = CallByName Num.51 List.177 List.673; - jump List.668 List.174 List.179 List.176 List.672 List.178; + inc #Derived_gen.10; + jump List.678 #Derived_gen.10 #Derived_gen.11 #Derived_gen.12 #Derived_gen.13 #Derived_gen.14; + +procedure List.101 (#Derived_gen.51, #Derived_gen.52, #Derived_gen.53, #Derived_gen.54, #Derived_gen.55): + joinpoint List.742 List.175 List.176 List.177 List.178 List.179: + let List.744 : Int1 = CallByName Num.22 List.178 List.179; + if List.744 then + let List.748 : {Str, I64} = CallByName List.66 List.175 List.178; + inc List.748; + let List.180 : {Str, Int1} = CallByName Dict.188 List.176 List.748 List.177; + let List.747 : U64 = 1i64; + let List.746 : U64 = CallByName Num.51 List.178 List.747; + jump List.742 List.175 List.180 List.177 List.746 List.179; else - dec List.174; - ret List.175; + dec List.175; + ret List.176; in - inc #Derived_gen.60; - jump List.668 #Derived_gen.60 #Derived_gen.61 #Derived_gen.62 #Derived_gen.63 #Derived_gen.64; - -procedure List.101 (#Derived_gen.15, #Derived_gen.16, #Derived_gen.17, #Derived_gen.18, #Derived_gen.19): - joinpoint List.707 List.183 List.184 List.185 List.186 List.187: - let List.709 : Int1 = CallByName Num.22 List.186 List.187; - if List.709 then - let List.713 : {Str, I64} = CallByName List.66 List.183 List.186; - inc List.713; - let List.188 : List {U32, U32} = CallByName Dict.407 List.184 List.713 List.186 List.185; - let List.712 : U64 = 1i64; - let List.711 : U64 = CallByName Num.51 List.186 List.712; - jump List.707 List.183 List.188 List.185 List.711 List.187; + inc #Derived_gen.51; + jump List.742 #Derived_gen.51 #Derived_gen.52 #Derived_gen.53 #Derived_gen.54 #Derived_gen.55; + +procedure List.102 (#Derived_gen.23, #Derived_gen.24, #Derived_gen.25, #Derived_gen.26, #Derived_gen.27): + joinpoint List.717 List.184 List.185 List.186 List.187 List.188: + let List.719 : Int1 = CallByName Num.22 List.187 List.188; + if List.719 then + let List.723 : {Str, I64} = CallByName List.66 List.184 List.187; + inc List.723; + let List.189 : List {U32, U32} = CallByName Dict.407 List.185 List.723 List.187 List.186; + let List.722 : U64 = 1i64; + let List.721 : U64 = CallByName Num.51 List.187 List.722; + jump List.717 List.184 List.189 List.186 List.721 List.188; else - dec List.183; - ret List.184; + dec List.184; + ret List.185; in - inc #Derived_gen.15; - jump List.707 #Derived_gen.15 #Derived_gen.16 #Derived_gen.17 #Derived_gen.18 #Derived_gen.19; - -procedure List.11 (List.149, List.150): - let List.727 : List {U32, U32} = CallByName List.68 List.150; - let List.726 : List {U32, U32} = CallByName List.98 List.149 List.150 List.727; - ret List.726; - -procedure List.18 (List.171, List.172, List.173): - let List.666 : U64 = 0i64; - let List.667 : U64 = CallByName List.6 List.171; - let List.665 : {List {U32, U32}, List {Str, I64}, U64, Float32, U8} = CallByName List.100 List.171 List.172 List.173 List.666 List.667; - ret List.665; - -procedure List.18 (List.171, List.172, List.173): - let List.730 : U64 = 0i64; - let List.731 : U64 = CallByName List.6 List.171; - let List.729 : {Str, Int1} = CallByName List.100 List.171 List.172 List.173 List.730 List.731; - ret List.729; - -procedure List.3 (List.127, List.128, List.129): - let List.691 : {List {U32, U32}, {U32, U32}} = CallByName List.64 List.127 List.128 List.129; - let List.690 : List {U32, U32} = StructAtIndex 0 List.691; - ret List.690; - -procedure List.3 (List.127, List.128, List.129): - let List.693 : {List {Str, I64}, {Str, I64}} = CallByName List.64 List.127 List.128 List.129; - let List.692 : List {Str, I64} = StructAtIndex 0 List.693; - let #Derived_gen.74 : {Str, I64} = StructAtIndex 1 List.693; + inc #Derived_gen.23; + jump List.717 #Derived_gen.23 #Derived_gen.24 #Derived_gen.25 #Derived_gen.26 #Derived_gen.27; + +procedure List.11 (List.150, List.151): + let List.737 : List {U32, U32} = CallByName List.68 List.151; + let List.736 : List {U32, U32} = CallByName List.99 List.150 List.151 List.737; + ret List.736; + +procedure List.18 (List.172, List.173, List.174): + let List.676 : U64 = 0i64; + let List.677 : U64 = CallByName List.6 List.172; + let List.675 : {List {U32, U32}, List {Str, I64}, U64, Float32, U8} = CallByName List.101 List.172 List.173 List.174 List.676 List.677; + ret List.675; + +procedure List.18 (List.172, List.173, List.174): + let List.740 : U64 = 0i64; + let List.741 : U64 = CallByName List.6 List.172; + let List.739 : {Str, Int1} = CallByName List.101 List.172 List.173 List.174 List.740 List.741; + ret List.739; + +procedure List.3 (List.128, List.129, List.130): + let List.701 : {List {U32, U32}, {U32, U32}} = CallByName List.64 List.128 List.129 List.130; + let List.700 : List {U32, U32} = StructAtIndex 0 List.701; + ret List.700; + +procedure List.3 (List.128, List.129, List.130): + let List.703 : {List {Str, I64}, {Str, I64}} = CallByName List.64 List.128 List.129 List.130; + let List.702 : List {Str, I64} = StructAtIndex 0 List.703; + let #Derived_gen.74 : {Str, I64} = StructAtIndex 1 List.703; dec #Derived_gen.74; - ret List.692; + ret List.702; -procedure List.4 (List.135, List.136): - let List.702 : U64 = 1i64; - let List.700 : List {Str, I64} = CallByName List.70 List.135 List.702; - let List.699 : List {Str, I64} = CallByName List.71 List.700 List.136; - ret List.699; +procedure List.4 (List.136, List.137): + let List.712 : U64 = 1i64; + let List.710 : List {Str, I64} = CallByName List.70 List.136 List.712; + let List.709 : List {Str, I64} = CallByName List.71 List.710 List.137; + ret List.709; procedure List.6 (#Attr.2): - let List.681 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.681; + let List.691 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.691; procedure List.6 (#Attr.2): - let List.728 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.728; + let List.738 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.738; procedure List.6 (#Attr.2): - let List.740 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.740; - -procedure List.64 (List.124, List.125, List.126): - let List.689 : U64 = CallByName List.6 List.124; - let List.686 : Int1 = CallByName Num.22 List.125 List.689; - if List.686 then - let List.687 : {List {U32, U32}, {U32, U32}} = CallByName List.67 List.124 List.125 List.126; - ret List.687; + let List.750 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.750; + +procedure List.64 (List.125, List.126, List.127): + let List.699 : U64 = CallByName List.6 List.125; + let List.696 : Int1 = CallByName Num.22 List.126 List.699; + if List.696 then + let List.697 : {List {U32, U32}, {U32, U32}} = CallByName List.67 List.125 List.126 List.127; + ret List.697; else - let List.685 : {List {U32, U32}, {U32, U32}} = Struct {List.124, List.126}; - ret List.685; - -procedure List.64 (List.124, List.125, List.126): - let List.698 : U64 = CallByName List.6 List.124; - let List.695 : Int1 = CallByName Num.22 List.125 List.698; - if List.695 then - let List.696 : {List {Str, I64}, {Str, I64}} = CallByName List.67 List.124 List.125 List.126; - ret List.696; + let List.695 : {List {U32, U32}, {U32, U32}} = Struct {List.125, List.127}; + ret List.695; + +procedure List.64 (List.125, List.126, List.127): + let List.708 : U64 = CallByName List.6 List.125; + let List.705 : Int1 = CallByName Num.22 List.126 List.708; + if List.705 then + let List.706 : {List {Str, I64}, {Str, I64}} = CallByName List.67 List.125 List.126 List.127; + ret List.706; else - let List.694 : {List {Str, I64}, {Str, I64}} = Struct {List.124, List.126}; - ret List.694; + let List.704 : {List {Str, I64}, {Str, I64}} = Struct {List.125, List.127}; + ret List.704; procedure List.66 (#Attr.2, #Attr.3): - let List.739 : {Str, I64} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.739; + let List.749 : {Str, I64} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.749; procedure List.67 (#Attr.2, #Attr.3, #Attr.4): - let List.688 : {List {U32, U32}, {U32, U32}} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; - ret List.688; + let List.698 : {List {U32, U32}, {U32, U32}} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; + ret List.698; procedure List.67 (#Attr.2, #Attr.3, #Attr.4): - let List.697 : {List {Str, I64}, {Str, I64}} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; - ret List.697; + let List.707 : {List {Str, I64}, {Str, I64}} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; + ret List.707; procedure List.68 (#Attr.2): - let List.725 : List {U32, U32} = lowlevel ListWithCapacity #Attr.2; - ret List.725; + let List.735 : List {U32, U32} = lowlevel ListWithCapacity #Attr.2; + ret List.735; procedure List.70 (#Attr.2, #Attr.3): - let List.703 : List {Str, I64} = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.703; + let List.713 : List {Str, I64} = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.713; procedure List.71 (#Attr.2, #Attr.3): - let List.701 : List {Str, I64} = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.701; + let List.711 : List {Str, I64} = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.711; procedure List.71 (#Attr.2, #Attr.3): - let List.722 : List {U32, U32} = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.722; - -procedure List.83 (List.180, List.181, List.182): - let List.705 : U64 = 0i64; - let List.706 : U64 = CallByName List.6 List.180; - let List.704 : List {U32, U32} = CallByName List.101 List.180 List.181 List.182 List.705 List.706; - ret List.704; - -procedure List.98 (#Derived_gen.22, #Derived_gen.23, #Derived_gen.24): - joinpoint List.716 List.151 List.152 List.153: - let List.724 : U64 = 0i64; - let List.718 : Int1 = CallByName Num.24 List.152 List.724; - if List.718 then - let List.723 : U64 = 1i64; - let List.720 : U64 = CallByName Num.75 List.152 List.723; - let List.721 : List {U32, U32} = CallByName List.71 List.153 List.151; - jump List.716 List.151 List.720 List.721; + let List.732 : List {U32, U32} = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.732; + +procedure List.83 (List.181, List.182, List.183): + let List.715 : U64 = 0i64; + let List.716 : U64 = CallByName List.6 List.181; + let List.714 : List {U32, U32} = CallByName List.102 List.181 List.182 List.183 List.715 List.716; + ret List.714; + +procedure List.99 (#Derived_gen.20, #Derived_gen.21, #Derived_gen.22): + joinpoint List.726 List.152 List.153 List.154: + let List.734 : U64 = 0i64; + let List.728 : Int1 = CallByName Num.24 List.153 List.734; + if List.728 then + let List.733 : U64 = 1i64; + let List.730 : U64 = CallByName Num.75 List.153 List.733; + let List.731 : List {U32, U32} = CallByName List.71 List.154 List.152; + jump List.726 List.152 List.730 List.731; else - ret List.153; + ret List.154; in - jump List.716 #Derived_gen.22 #Derived_gen.23 #Derived_gen.24; + jump List.726 #Derived_gen.20 #Derived_gen.21 #Derived_gen.22; procedure Num.131 (#Attr.2): let Num.291 : U32 = lowlevel NumIntCast #Attr.2; @@ -1279,7 +1279,7 @@ procedure Str.45 (Str.91, Str.92, Str.93): dec Str.344; ret Str.91; -procedure Str.56 (#Derived_gen.51, #Derived_gen.52, #Derived_gen.53, #Derived_gen.54): +procedure Str.56 (#Derived_gen.56, #Derived_gen.57, #Derived_gen.58, #Derived_gen.59): joinpoint Str.253 Str.96 Str.97 Str.98 Str.99: inc Str.97; let Str.254 : [C {}, C {Str, Str}] = CallByName Str.38 Str.97 Str.98; @@ -1303,9 +1303,9 @@ procedure Str.56 (#Derived_gen.51, #Derived_gen.52, #Derived_gen.53, #Derived_ge dec Str.97; ret Str.258; in - inc #Derived_gen.54; - inc #Derived_gen.53; - jump Str.253 #Derived_gen.51 #Derived_gen.52 #Derived_gen.53 #Derived_gen.54; + inc #Derived_gen.58; + inc #Derived_gen.59; + jump Str.253 #Derived_gen.56 #Derived_gen.57 #Derived_gen.58 #Derived_gen.59; procedure Str.57 (Str.121, Str.122): let Str.123 : U64 = CallByName Str.36 Str.121; @@ -1315,7 +1315,7 @@ procedure Str.57 (Str.121, Str.122): let Str.279 : [C , C U64] = CallByName Str.58 Str.121 Str.122 Str.280 Str.125; ret Str.279; -procedure Str.58 (#Derived_gen.28, #Derived_gen.29, #Derived_gen.30, #Derived_gen.31): +procedure Str.58 (#Derived_gen.33, #Derived_gen.34, #Derived_gen.35, #Derived_gen.36): joinpoint Str.281 Str.126 Str.127 Str.128 Str.129: let Str.283 : Int1 = CallByName Num.23 Str.128 Str.129; if Str.283 then @@ -1335,9 +1335,9 @@ procedure Str.58 (#Derived_gen.28, #Derived_gen.29, #Derived_gen.30, #Derived_ge let Str.282 : [C , C U64] = TagId(0) ; ret Str.282; in - inc #Derived_gen.29; - inc #Derived_gen.28; - jump Str.281 #Derived_gen.28 #Derived_gen.29 #Derived_gen.30 #Derived_gen.31; + inc #Derived_gen.34; + inc #Derived_gen.33; + jump Str.281 #Derived_gen.33 #Derived_gen.34 #Derived_gen.35 #Derived_gen.36; procedure Str.61 (Str.152, Str.153): let Str.311 : Int1 = CallByName Num.22 Str.152 Str.153; diff --git a/crates/compiler/test_mono/generated/inspect_derived_list.txt b/crates/compiler/test_mono/generated/inspect_derived_list.txt index 6ca8c75892..8fc98930c4 100644 --- a/crates/compiler/test_mono/generated/inspect_derived_list.txt +++ b/crates/compiler/test_mono/generated/inspect_derived_list.txt @@ -120,35 +120,35 @@ procedure Inspect.63 (Inspect.295, Inspect.291): procedure Inspect.64 (Inspect.297): ret Inspect.297; -procedure List.100 (#Derived_gen.8, #Derived_gen.9, #Derived_gen.10, #Derived_gen.11, #Derived_gen.12): - joinpoint List.668 List.174 List.175 List.176 List.177 List.178: - let List.670 : Int1 = CallByName Num.22 List.177 List.178; - if List.670 then - let List.674 : I64 = CallByName List.66 List.174 List.177; - let List.179 : {Str, Int1} = CallByName Inspect.160 List.175 List.674 List.176; - let List.673 : U64 = 1i64; - let List.672 : U64 = CallByName Num.51 List.177 List.673; - jump List.668 List.174 List.179 List.176 List.672 List.178; +procedure List.101 (#Derived_gen.11, #Derived_gen.12, #Derived_gen.13, #Derived_gen.14, #Derived_gen.15): + joinpoint List.678 List.175 List.176 List.177 List.178 List.179: + let List.680 : Int1 = CallByName Num.22 List.178 List.179; + if List.680 then + let List.684 : I64 = CallByName List.66 List.175 List.178; + let List.180 : {Str, Int1} = CallByName Inspect.160 List.176 List.684 List.177; + let List.683 : U64 = 1i64; + let List.682 : U64 = CallByName Num.51 List.178 List.683; + jump List.678 List.175 List.180 List.177 List.682 List.179; else - dec List.174; - ret List.175; + dec List.175; + ret List.176; in - inc #Derived_gen.8; - jump List.668 #Derived_gen.8 #Derived_gen.9 #Derived_gen.10 #Derived_gen.11 #Derived_gen.12; + inc #Derived_gen.11; + jump List.678 #Derived_gen.11 #Derived_gen.12 #Derived_gen.13 #Derived_gen.14 #Derived_gen.15; -procedure List.18 (List.171, List.172, List.173): - let List.666 : U64 = 0i64; - let List.667 : U64 = CallByName List.6 List.171; - let List.665 : {Str, Int1} = CallByName List.100 List.171 List.172 List.173 List.666 List.667; - ret List.665; +procedure List.18 (List.172, List.173, List.174): + let List.676 : U64 = 0i64; + let List.677 : U64 = CallByName List.6 List.172; + let List.675 : {Str, Int1} = CallByName List.101 List.172 List.173 List.174 List.676 List.677; + ret List.675; procedure List.6 (#Attr.2): - let List.676 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.676; + let List.686 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.686; procedure List.66 (#Attr.2, #Attr.3): - let List.675 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.675; + let List.685 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.685; procedure Num.22 (#Attr.2, #Attr.3): let Num.285 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/inspect_derived_nested_record_string.txt b/crates/compiler/test_mono/generated/inspect_derived_nested_record_string.txt index a01894af3c..25343efbcc 100644 --- a/crates/compiler/test_mono/generated/inspect_derived_nested_record_string.txt +++ b/crates/compiler/test_mono/generated/inspect_derived_nested_record_string.txt @@ -235,67 +235,67 @@ procedure Inspect.63 (Inspect.295, Inspect.291): procedure Inspect.64 (Inspect.297): ret Inspect.297; -procedure List.100 (#Derived_gen.20, #Derived_gen.21, #Derived_gen.22, #Derived_gen.23, #Derived_gen.24): - joinpoint List.668 List.174 List.175 List.176 List.177 List.178: - let List.670 : Int1 = CallByName Num.22 List.177 List.178; - if List.670 then - let List.674 : {Str, Str} = CallByName List.66 List.174 List.177; - inc List.674; - let List.179 : {Str, Int1} = CallByName Inspect.229 List.175 List.674; - let List.673 : U64 = 1i64; - let List.672 : U64 = CallByName Num.51 List.177 List.673; - jump List.668 List.174 List.179 List.176 List.672 List.178; +procedure List.101 (#Derived_gen.20, #Derived_gen.21, #Derived_gen.22, #Derived_gen.23, #Derived_gen.24): + joinpoint List.678 List.175 List.176 List.177 List.178 List.179: + let List.680 : Int1 = CallByName Num.22 List.178 List.179; + if List.680 then + let List.684 : {Str, Str} = CallByName List.66 List.175 List.178; + inc List.684; + let List.180 : {Str, Int1} = CallByName Inspect.229 List.176 List.684; + let List.683 : U64 = 1i64; + let List.682 : U64 = CallByName Num.51 List.178 List.683; + jump List.678 List.175 List.180 List.177 List.682 List.179; else - dec List.174; - ret List.175; + dec List.175; + ret List.176; in inc #Derived_gen.20; - jump List.668 #Derived_gen.20 #Derived_gen.21 #Derived_gen.22 #Derived_gen.23 #Derived_gen.24; - -procedure List.100 (#Derived_gen.42, #Derived_gen.43, #Derived_gen.44, #Derived_gen.45, #Derived_gen.46): - joinpoint List.680 List.174 List.175 List.176 List.177 List.178: - let List.682 : Int1 = CallByName Num.22 List.177 List.178; - if List.682 then - let List.686 : {Str, Str} = CallByName List.66 List.174 List.177; - inc List.686; - let List.179 : {Str, Int1} = CallByName Inspect.229 List.175 List.686; - let List.685 : U64 = 1i64; - let List.684 : U64 = CallByName Num.51 List.177 List.685; - jump List.680 List.174 List.179 List.176 List.684 List.178; + jump List.678 #Derived_gen.20 #Derived_gen.21 #Derived_gen.22 #Derived_gen.23 #Derived_gen.24; + +procedure List.101 (#Derived_gen.39, #Derived_gen.40, #Derived_gen.41, #Derived_gen.42, #Derived_gen.43): + joinpoint List.690 List.175 List.176 List.177 List.178 List.179: + let List.692 : Int1 = CallByName Num.22 List.178 List.179; + if List.692 then + let List.696 : {Str, Str} = CallByName List.66 List.175 List.178; + inc List.696; + let List.180 : {Str, Int1} = CallByName Inspect.229 List.176 List.696; + let List.695 : U64 = 1i64; + let List.694 : U64 = CallByName Num.51 List.178 List.695; + jump List.690 List.175 List.180 List.177 List.694 List.179; else - dec List.174; - ret List.175; + dec List.175; + ret List.176; in - inc #Derived_gen.42; - jump List.680 #Derived_gen.42 #Derived_gen.43 #Derived_gen.44 #Derived_gen.45 #Derived_gen.46; + inc #Derived_gen.39; + jump List.690 #Derived_gen.39 #Derived_gen.40 #Derived_gen.41 #Derived_gen.42 #Derived_gen.43; -procedure List.18 (List.171, List.172, List.173): - let List.666 : U64 = 0i64; - let List.667 : U64 = CallByName List.6 List.171; - let List.665 : {Str, Int1} = CallByName List.100 List.171 List.172 List.173 List.666 List.667; - ret List.665; +procedure List.18 (List.172, List.173, List.174): + let List.676 : U64 = 0i64; + let List.677 : U64 = CallByName List.6 List.172; + let List.675 : {Str, Int1} = CallByName List.101 List.172 List.173 List.174 List.676 List.677; + ret List.675; -procedure List.18 (List.171, List.172, List.173): - let List.678 : U64 = 0i64; - let List.679 : U64 = CallByName List.6 List.171; - let List.677 : {Str, Int1} = CallByName List.100 List.171 List.172 List.173 List.678 List.679; - ret List.677; +procedure List.18 (List.172, List.173, List.174): + let List.688 : U64 = 0i64; + let List.689 : U64 = CallByName List.6 List.172; + let List.687 : {Str, Int1} = CallByName List.101 List.172 List.173 List.174 List.688 List.689; + ret List.687; procedure List.6 (#Attr.2): - let List.676 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.676; + let List.686 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.686; procedure List.6 (#Attr.2): - let List.688 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.688; + let List.698 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.698; procedure List.66 (#Attr.2, #Attr.3): - let List.675 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.675; + let List.685 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.685; procedure List.66 (#Attr.2, #Attr.3): - let List.687 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.687; + let List.697 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.697; procedure Num.20 (#Attr.2, #Attr.3): let Num.290 : U64 = lowlevel NumSub #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/inspect_derived_record.txt b/crates/compiler/test_mono/generated/inspect_derived_record.txt index 565021f790..0c7d6db97f 100644 --- a/crates/compiler/test_mono/generated/inspect_derived_record.txt +++ b/crates/compiler/test_mono/generated/inspect_derived_record.txt @@ -150,36 +150,36 @@ procedure Inspect.63 (Inspect.295, Inspect.291): procedure Inspect.64 (Inspect.297): ret Inspect.297; -procedure List.100 (#Derived_gen.16, #Derived_gen.17, #Derived_gen.18, #Derived_gen.19, #Derived_gen.20): - joinpoint List.668 List.174 List.175 List.176 List.177 List.178: - let List.670 : Int1 = CallByName Num.22 List.177 List.178; - if List.670 then - let List.674 : {[C I64, C Decimal], Str} = CallByName List.66 List.174 List.177; - inc List.674; - let List.179 : {Str, Int1} = CallByName Inspect.229 List.175 List.674; - let List.673 : U64 = 1i64; - let List.672 : U64 = CallByName Num.51 List.177 List.673; - jump List.668 List.174 List.179 List.176 List.672 List.178; +procedure List.101 (#Derived_gen.18, #Derived_gen.19, #Derived_gen.20, #Derived_gen.21, #Derived_gen.22): + joinpoint List.678 List.175 List.176 List.177 List.178 List.179: + let List.680 : Int1 = CallByName Num.22 List.178 List.179; + if List.680 then + let List.684 : {[C I64, C Decimal], Str} = CallByName List.66 List.175 List.178; + inc List.684; + let List.180 : {Str, Int1} = CallByName Inspect.229 List.176 List.684; + let List.683 : U64 = 1i64; + let List.682 : U64 = CallByName Num.51 List.178 List.683; + jump List.678 List.175 List.180 List.177 List.682 List.179; else - dec List.174; - ret List.175; + dec List.175; + ret List.176; in - inc #Derived_gen.16; - jump List.668 #Derived_gen.16 #Derived_gen.17 #Derived_gen.18 #Derived_gen.19 #Derived_gen.20; + inc #Derived_gen.18; + jump List.678 #Derived_gen.18 #Derived_gen.19 #Derived_gen.20 #Derived_gen.21 #Derived_gen.22; -procedure List.18 (List.171, List.172, List.173): - let List.666 : U64 = 0i64; - let List.667 : U64 = CallByName List.6 List.171; - let List.665 : {Str, Int1} = CallByName List.100 List.171 List.172 List.173 List.666 List.667; - ret List.665; +procedure List.18 (List.172, List.173, List.174): + let List.676 : U64 = 0i64; + let List.677 : U64 = CallByName List.6 List.172; + let List.675 : {Str, Int1} = CallByName List.101 List.172 List.173 List.174 List.676 List.677; + ret List.675; procedure List.6 (#Attr.2): - let List.676 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.676; + let List.686 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.686; procedure List.66 (#Attr.2, #Attr.3): - let List.675 : {[C I64, C Decimal], Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.675; + let List.685 : {[C I64, C Decimal], Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.685; procedure Num.22 (#Attr.2, #Attr.3): let Num.286 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/inspect_derived_record_one_field_string.txt b/crates/compiler/test_mono/generated/inspect_derived_record_one_field_string.txt index 5ef69a0c67..8fa307c5a9 100644 --- a/crates/compiler/test_mono/generated/inspect_derived_record_one_field_string.txt +++ b/crates/compiler/test_mono/generated/inspect_derived_record_one_field_string.txt @@ -160,36 +160,36 @@ procedure Inspect.63 (Inspect.295, Inspect.291): procedure Inspect.64 (Inspect.297): ret Inspect.297; -procedure List.100 (#Derived_gen.12, #Derived_gen.13, #Derived_gen.14, #Derived_gen.15, #Derived_gen.16): - joinpoint List.668 List.174 List.175 List.176 List.177 List.178: - let List.670 : Int1 = CallByName Num.22 List.177 List.178; - if List.670 then - let List.674 : {Str, Str} = CallByName List.66 List.174 List.177; - inc List.674; - let List.179 : {Str, Int1} = CallByName Inspect.229 List.175 List.674; - let List.673 : U64 = 1i64; - let List.672 : U64 = CallByName Num.51 List.177 List.673; - jump List.668 List.174 List.179 List.176 List.672 List.178; +procedure List.101 (#Derived_gen.10, #Derived_gen.11, #Derived_gen.12, #Derived_gen.13, #Derived_gen.14): + joinpoint List.678 List.175 List.176 List.177 List.178 List.179: + let List.680 : Int1 = CallByName Num.22 List.178 List.179; + if List.680 then + let List.684 : {Str, Str} = CallByName List.66 List.175 List.178; + inc List.684; + let List.180 : {Str, Int1} = CallByName Inspect.229 List.176 List.684; + let List.683 : U64 = 1i64; + let List.682 : U64 = CallByName Num.51 List.178 List.683; + jump List.678 List.175 List.180 List.177 List.682 List.179; else - dec List.174; - ret List.175; + dec List.175; + ret List.176; in - inc #Derived_gen.12; - jump List.668 #Derived_gen.12 #Derived_gen.13 #Derived_gen.14 #Derived_gen.15 #Derived_gen.16; + inc #Derived_gen.10; + jump List.678 #Derived_gen.10 #Derived_gen.11 #Derived_gen.12 #Derived_gen.13 #Derived_gen.14; -procedure List.18 (List.171, List.172, List.173): - let List.666 : U64 = 0i64; - let List.667 : U64 = CallByName List.6 List.171; - let List.665 : {Str, Int1} = CallByName List.100 List.171 List.172 List.173 List.666 List.667; - ret List.665; +procedure List.18 (List.172, List.173, List.174): + let List.676 : U64 = 0i64; + let List.677 : U64 = CallByName List.6 List.172; + let List.675 : {Str, Int1} = CallByName List.101 List.172 List.173 List.174 List.676 List.677; + ret List.675; procedure List.6 (#Attr.2): - let List.676 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.676; + let List.686 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.686; procedure List.66 (#Attr.2, #Attr.3): - let List.675 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.675; + let List.685 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.685; procedure Num.20 (#Attr.2, #Attr.3): let Num.288 : U64 = lowlevel NumSub #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/inspect_derived_record_two_field_strings.txt b/crates/compiler/test_mono/generated/inspect_derived_record_two_field_strings.txt index 35d10ac89a..a872fbd68a 100644 --- a/crates/compiler/test_mono/generated/inspect_derived_record_two_field_strings.txt +++ b/crates/compiler/test_mono/generated/inspect_derived_record_two_field_strings.txt @@ -167,36 +167,36 @@ procedure Inspect.63 (Inspect.295, Inspect.291): procedure Inspect.64 (Inspect.297): ret Inspect.297; -procedure List.100 (#Derived_gen.16, #Derived_gen.17, #Derived_gen.18, #Derived_gen.19, #Derived_gen.20): - joinpoint List.668 List.174 List.175 List.176 List.177 List.178: - let List.670 : Int1 = CallByName Num.22 List.177 List.178; - if List.670 then - let List.674 : {Str, Str} = CallByName List.66 List.174 List.177; - inc List.674; - let List.179 : {Str, Int1} = CallByName Inspect.229 List.175 List.674; - let List.673 : U64 = 1i64; - let List.672 : U64 = CallByName Num.51 List.177 List.673; - jump List.668 List.174 List.179 List.176 List.672 List.178; +procedure List.101 (#Derived_gen.14, #Derived_gen.15, #Derived_gen.16, #Derived_gen.17, #Derived_gen.18): + joinpoint List.678 List.175 List.176 List.177 List.178 List.179: + let List.680 : Int1 = CallByName Num.22 List.178 List.179; + if List.680 then + let List.684 : {Str, Str} = CallByName List.66 List.175 List.178; + inc List.684; + let List.180 : {Str, Int1} = CallByName Inspect.229 List.176 List.684; + let List.683 : U64 = 1i64; + let List.682 : U64 = CallByName Num.51 List.178 List.683; + jump List.678 List.175 List.180 List.177 List.682 List.179; else - dec List.174; - ret List.175; + dec List.175; + ret List.176; in - inc #Derived_gen.16; - jump List.668 #Derived_gen.16 #Derived_gen.17 #Derived_gen.18 #Derived_gen.19 #Derived_gen.20; + inc #Derived_gen.14; + jump List.678 #Derived_gen.14 #Derived_gen.15 #Derived_gen.16 #Derived_gen.17 #Derived_gen.18; -procedure List.18 (List.171, List.172, List.173): - let List.666 : U64 = 0i64; - let List.667 : U64 = CallByName List.6 List.171; - let List.665 : {Str, Int1} = CallByName List.100 List.171 List.172 List.173 List.666 List.667; - ret List.665; +procedure List.18 (List.172, List.173, List.174): + let List.676 : U64 = 0i64; + let List.677 : U64 = CallByName List.6 List.172; + let List.675 : {Str, Int1} = CallByName List.101 List.172 List.173 List.174 List.676 List.677; + ret List.675; procedure List.6 (#Attr.2): - let List.676 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.676; + let List.686 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.686; procedure List.66 (#Attr.2, #Attr.3): - let List.675 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.675; + let List.685 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.685; procedure Num.20 (#Attr.2, #Attr.3): let Num.288 : U64 = lowlevel NumSub #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/inspect_derived_tag_one_field_string.txt b/crates/compiler/test_mono/generated/inspect_derived_tag_one_field_string.txt index 13c9fae8db..8cb8571757 100644 --- a/crates/compiler/test_mono/generated/inspect_derived_tag_one_field_string.txt +++ b/crates/compiler/test_mono/generated/inspect_derived_tag_one_field_string.txt @@ -156,43 +156,43 @@ procedure Inspect.63 (Inspect.295, Inspect.291): procedure Inspect.64 (Inspect.297): ret Inspect.297; -procedure List.1 (List.118): - let List.678 : U64 = CallByName List.6 List.118; - let List.679 : U64 = 0i64; - let List.677 : Int1 = CallByName Bool.11 List.678 List.679; - ret List.677; - -procedure List.100 (#Derived_gen.23, #Derived_gen.24, #Derived_gen.25, #Derived_gen.26, #Derived_gen.27): - joinpoint List.668 List.174 List.175 List.176 List.177 List.178: - let List.670 : Int1 = CallByName Num.22 List.177 List.178; - if List.670 then - let List.674 : Str = CallByName List.66 List.174 List.177; - inc List.674; - let List.179 : Str = CallByName Inspect.207 List.175 List.674; - dec List.674; - let List.673 : U64 = 1i64; - let List.672 : U64 = CallByName Num.51 List.177 List.673; - jump List.668 List.174 List.179 List.176 List.672 List.178; +procedure List.1 (List.119): + let List.688 : U64 = CallByName List.6 List.119; + let List.689 : U64 = 0i64; + let List.687 : Int1 = CallByName Bool.11 List.688 List.689; + ret List.687; + +procedure List.101 (#Derived_gen.11, #Derived_gen.12, #Derived_gen.13, #Derived_gen.14, #Derived_gen.15): + joinpoint List.678 List.175 List.176 List.177 List.178 List.179: + let List.680 : Int1 = CallByName Num.22 List.178 List.179; + if List.680 then + let List.684 : Str = CallByName List.66 List.175 List.178; + inc List.684; + let List.180 : Str = CallByName Inspect.207 List.176 List.684; + dec List.684; + let List.683 : U64 = 1i64; + let List.682 : U64 = CallByName Num.51 List.178 List.683; + jump List.678 List.175 List.180 List.177 List.682 List.179; else - dec List.174; - ret List.175; + dec List.175; + ret List.176; in - inc #Derived_gen.23; - jump List.668 #Derived_gen.23 #Derived_gen.24 #Derived_gen.25 #Derived_gen.26 #Derived_gen.27; + inc #Derived_gen.11; + jump List.678 #Derived_gen.11 #Derived_gen.12 #Derived_gen.13 #Derived_gen.14 #Derived_gen.15; -procedure List.18 (List.171, List.172, List.173): - let List.666 : U64 = 0i64; - let List.667 : U64 = CallByName List.6 List.171; - let List.665 : Str = CallByName List.100 List.171 List.172 List.173 List.666 List.667; - ret List.665; +procedure List.18 (List.172, List.173, List.174): + let List.676 : U64 = 0i64; + let List.677 : U64 = CallByName List.6 List.172; + let List.675 : Str = CallByName List.101 List.172 List.173 List.174 List.676 List.677; + ret List.675; procedure List.6 (#Attr.2): - let List.676 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.676; + let List.686 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.686; procedure List.66 (#Attr.2, #Attr.3): - let List.675 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.675; + let List.685 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.685; procedure Num.20 (#Attr.2, #Attr.3): let Num.288 : U64 = lowlevel NumSub #Attr.2 #Attr.3; @@ -290,7 +290,7 @@ procedure Str.45 (Str.91, Str.92, Str.93): dec Str.341; ret Str.91; -procedure Str.56 (#Derived_gen.19, #Derived_gen.20, #Derived_gen.21, #Derived_gen.22): +procedure Str.56 (#Derived_gen.24, #Derived_gen.25, #Derived_gen.26, #Derived_gen.27): joinpoint Str.250 Str.96 Str.97 Str.98 Str.99: inc Str.97; let Str.251 : [C {}, C {Str, Str}] = CallByName Str.38 Str.97 Str.98; @@ -314,9 +314,9 @@ procedure Str.56 (#Derived_gen.19, #Derived_gen.20, #Derived_gen.21, #Derived_ge dec Str.97; ret Str.255; in - inc #Derived_gen.21; - inc #Derived_gen.22; - jump Str.250 #Derived_gen.19 #Derived_gen.20 #Derived_gen.21 #Derived_gen.22; + inc #Derived_gen.27; + inc #Derived_gen.26; + jump Str.250 #Derived_gen.24 #Derived_gen.25 #Derived_gen.26 #Derived_gen.27; procedure Str.57 (Str.121, Str.122): let Str.123 : U64 = CallByName Str.36 Str.121; @@ -326,7 +326,7 @@ procedure Str.57 (Str.121, Str.122): let Str.276 : [C , C U64] = CallByName Str.58 Str.121 Str.122 Str.277 Str.125; ret Str.276; -procedure Str.58 (#Derived_gen.13, #Derived_gen.14, #Derived_gen.15, #Derived_gen.16): +procedure Str.58 (#Derived_gen.18, #Derived_gen.19, #Derived_gen.20, #Derived_gen.21): joinpoint Str.278 Str.126 Str.127 Str.128 Str.129: let Str.280 : Int1 = CallByName Num.23 Str.128 Str.129; if Str.280 then @@ -346,9 +346,9 @@ procedure Str.58 (#Derived_gen.13, #Derived_gen.14, #Derived_gen.15, #Derived_ge let Str.279 : [C , C U64] = TagId(0) ; ret Str.279; in - inc #Derived_gen.14; - inc #Derived_gen.13; - jump Str.278 #Derived_gen.13 #Derived_gen.14 #Derived_gen.15 #Derived_gen.16; + inc #Derived_gen.18; + inc #Derived_gen.19; + jump Str.278 #Derived_gen.18 #Derived_gen.19 #Derived_gen.20 #Derived_gen.21; procedure Str.61 (Str.152, Str.153): let Str.308 : Int1 = CallByName Num.22 Str.152 Str.153; diff --git a/crates/compiler/test_mono/generated/inspect_derived_tag_two_payloads_string.txt b/crates/compiler/test_mono/generated/inspect_derived_tag_two_payloads_string.txt index 0f01f412d7..b5d821a158 100644 --- a/crates/compiler/test_mono/generated/inspect_derived_tag_two_payloads_string.txt +++ b/crates/compiler/test_mono/generated/inspect_derived_tag_two_payloads_string.txt @@ -159,43 +159,43 @@ procedure Inspect.63 (Inspect.295, Inspect.291): procedure Inspect.64 (Inspect.297): ret Inspect.297; -procedure List.1 (List.118): - let List.678 : U64 = CallByName List.6 List.118; - let List.679 : U64 = 0i64; - let List.677 : Int1 = CallByName Bool.11 List.678 List.679; - ret List.677; - -procedure List.100 (#Derived_gen.18, #Derived_gen.19, #Derived_gen.20, #Derived_gen.21, #Derived_gen.22): - joinpoint List.668 List.174 List.175 List.176 List.177 List.178: - let List.670 : Int1 = CallByName Num.22 List.177 List.178; - if List.670 then - let List.674 : Str = CallByName List.66 List.174 List.177; - inc List.674; - let List.179 : Str = CallByName Inspect.207 List.175 List.674; - dec List.674; - let List.673 : U64 = 1i64; - let List.672 : U64 = CallByName Num.51 List.177 List.673; - jump List.668 List.174 List.179 List.176 List.672 List.178; +procedure List.1 (List.119): + let List.688 : U64 = CallByName List.6 List.119; + let List.689 : U64 = 0i64; + let List.687 : Int1 = CallByName Bool.11 List.688 List.689; + ret List.687; + +procedure List.101 (#Derived_gen.26, #Derived_gen.27, #Derived_gen.28, #Derived_gen.29, #Derived_gen.30): + joinpoint List.678 List.175 List.176 List.177 List.178 List.179: + let List.680 : Int1 = CallByName Num.22 List.178 List.179; + if List.680 then + let List.684 : Str = CallByName List.66 List.175 List.178; + inc List.684; + let List.180 : Str = CallByName Inspect.207 List.176 List.684; + dec List.684; + let List.683 : U64 = 1i64; + let List.682 : U64 = CallByName Num.51 List.178 List.683; + jump List.678 List.175 List.180 List.177 List.682 List.179; else - dec List.174; - ret List.175; + dec List.175; + ret List.176; in - inc #Derived_gen.18; - jump List.668 #Derived_gen.18 #Derived_gen.19 #Derived_gen.20 #Derived_gen.21 #Derived_gen.22; + inc #Derived_gen.26; + jump List.678 #Derived_gen.26 #Derived_gen.27 #Derived_gen.28 #Derived_gen.29 #Derived_gen.30; -procedure List.18 (List.171, List.172, List.173): - let List.666 : U64 = 0i64; - let List.667 : U64 = CallByName List.6 List.171; - let List.665 : Str = CallByName List.100 List.171 List.172 List.173 List.666 List.667; - ret List.665; +procedure List.18 (List.172, List.173, List.174): + let List.676 : U64 = 0i64; + let List.677 : U64 = CallByName List.6 List.172; + let List.675 : Str = CallByName List.101 List.172 List.173 List.174 List.676 List.677; + ret List.675; procedure List.6 (#Attr.2): - let List.676 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.676; + let List.686 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.686; procedure List.66 (#Attr.2, #Attr.3): - let List.675 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.675; + let List.685 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.685; procedure Num.20 (#Attr.2, #Attr.3): let Num.288 : U64 = lowlevel NumSub #Attr.2 #Attr.3; @@ -293,7 +293,7 @@ procedure Str.45 (Str.91, Str.92, Str.93): dec Str.385; ret Str.91; -procedure Str.56 (#Derived_gen.25, #Derived_gen.26, #Derived_gen.27, #Derived_gen.28): +procedure Str.56 (#Derived_gen.20, #Derived_gen.21, #Derived_gen.22, #Derived_gen.23): joinpoint Str.250 Str.96 Str.97 Str.98 Str.99: inc Str.97; let Str.251 : [C {}, C {Str, Str}] = CallByName Str.38 Str.97 Str.98; @@ -317,9 +317,9 @@ procedure Str.56 (#Derived_gen.25, #Derived_gen.26, #Derived_gen.27, #Derived_ge dec Str.97; ret Str.255; in - inc #Derived_gen.28; - inc #Derived_gen.27; - jump Str.250 #Derived_gen.25 #Derived_gen.26 #Derived_gen.27 #Derived_gen.28; + inc #Derived_gen.23; + inc #Derived_gen.22; + jump Str.250 #Derived_gen.20 #Derived_gen.21 #Derived_gen.22 #Derived_gen.23; procedure Str.57 (Str.121, Str.122): let Str.123 : U64 = CallByName Str.36 Str.121; diff --git a/crates/compiler/test_mono/generated/ir_int_add.txt b/crates/compiler/test_mono/generated/ir_int_add.txt index 3fbaf57ab4..47d8f5b00c 100644 --- a/crates/compiler/test_mono/generated/ir_int_add.txt +++ b/crates/compiler/test_mono/generated/ir_int_add.txt @@ -1,6 +1,6 @@ procedure List.6 (#Attr.2): - let List.665 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.665; + let List.675 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.675; procedure Num.19 (#Attr.2, #Attr.3): let Num.285 : U64 = lowlevel NumAdd #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/issue_2583_specialize_errors_behind_unified_branches.txt b/crates/compiler/test_mono/generated/issue_2583_specialize_errors_behind_unified_branches.txt index d62ad02bc3..d987197ab8 100644 --- a/crates/compiler/test_mono/generated/issue_2583_specialize_errors_behind_unified_branches.txt +++ b/crates/compiler/test_mono/generated/issue_2583_specialize_errors_behind_unified_branches.txt @@ -6,40 +6,40 @@ procedure Bool.2 (): let Bool.23 : Int1 = true; ret Bool.23; -procedure List.2 (List.119, List.120): - let List.679 : U64 = CallByName List.6 List.119; - let List.675 : Int1 = CallByName Num.22 List.120 List.679; - if List.675 then - let List.677 : I64 = CallByName List.66 List.119 List.120; - let List.676 : [C {}, C I64] = TagId(1) List.677; - ret List.676; +procedure List.2 (List.120, List.121): + let List.689 : U64 = CallByName List.6 List.120; + let List.685 : Int1 = CallByName Num.22 List.121 List.689; + if List.685 then + let List.687 : I64 = CallByName List.66 List.120 List.121; + let List.686 : [C {}, C I64] = TagId(1) List.687; + ret List.686; else - let List.674 : {} = Struct {}; - let List.673 : [C {}, C I64] = TagId(0) List.674; - ret List.673; + let List.684 : {} = Struct {}; + let List.683 : [C {}, C I64] = TagId(0) List.684; + ret List.683; procedure List.6 (#Attr.2): - let List.680 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.680; + let List.690 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.690; procedure List.66 (#Attr.2, #Attr.3): - let List.678 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.678; + let List.688 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.688; -procedure List.9 (List.391): - let List.672 : U64 = 0i64; - let List.665 : [C {}, C I64] = CallByName List.2 List.391 List.672; - let List.669 : U8 = 1i64; - let List.670 : U8 = GetTagId List.665; - let List.671 : Int1 = lowlevel Eq List.669 List.670; - if List.671 then - let List.392 : I64 = UnionAtIndex (Id 1) (Index 0) List.665; - let List.666 : [C Int1, C I64] = TagId(1) List.392; - ret List.666; +procedure List.9 (List.392): + let List.682 : U64 = 0i64; + let List.675 : [C {}, C I64] = CallByName List.2 List.392 List.682; + let List.679 : U8 = 1i64; + let List.680 : U8 = GetTagId List.675; + let List.681 : Int1 = lowlevel Eq List.679 List.680; + if List.681 then + let List.393 : I64 = UnionAtIndex (Id 1) (Index 0) List.675; + let List.676 : [C Int1, C I64] = TagId(1) List.393; + ret List.676; else - let List.668 : Int1 = true; - let List.667 : [C Int1, C I64] = TagId(0) List.668; - ret List.667; + let List.678 : Int1 = true; + let List.677 : [C Int1, C I64] = TagId(0) List.678; + ret List.677; procedure Num.22 (#Attr.2, #Attr.3): let Num.283 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/issue_4770.txt b/crates/compiler/test_mono/generated/issue_4770.txt index 9106e10f4f..d97ce3d233 100644 --- a/crates/compiler/test_mono/generated/issue_4770.txt +++ b/crates/compiler/test_mono/generated/issue_4770.txt @@ -6,118 +6,118 @@ procedure Bool.2 (): let Bool.24 : Int1 = true; ret Bool.24; -procedure List.105 (#Derived_gen.6, #Derived_gen.7, #Derived_gen.8, #Derived_gen.9, #Derived_gen.10, #Derived_gen.11): - joinpoint List.703 List.290 List.291 List.292 List.293 List.294 List.295: - let List.705 : Int1 = CallByName Num.22 List.294 List.295; - if List.705 then - let List.711 : [C I64, C List *self] = CallByName List.66 List.290 List.294; - inc List.711; - let List.712 : [C I64, C List *self] = CallByName List.66 List.291 List.294; - inc List.712; - let List.296 : {[C I64, C List *self], [C I64, C List *self]} = CallByName Test.15 List.711 List.712; - let List.707 : List {[C I64, C List *self], [C I64, C List *self]} = CallByName List.71 List.292 List.296; - let List.709 : U64 = 1i64; - let List.708 : U64 = CallByName Num.51 List.294 List.709; - jump List.703 List.290 List.291 List.707 List.293 List.708 List.295; +procedure List.106 (#Derived_gen.1, #Derived_gen.2, #Derived_gen.3, #Derived_gen.4, #Derived_gen.5, #Derived_gen.6): + joinpoint List.713 List.291 List.292 List.293 List.294 List.295 List.296: + let List.715 : Int1 = CallByName Num.22 List.295 List.296; + if List.715 then + let List.721 : [C I64, C List *self] = CallByName List.66 List.291 List.295; + inc List.721; + let List.722 : [C I64, C List *self] = CallByName List.66 List.292 List.295; + inc List.722; + let List.297 : {[C I64, C List *self], [C I64, C List *self]} = CallByName Test.15 List.721 List.722; + let List.717 : List {[C I64, C List *self], [C I64, C List *self]} = CallByName List.71 List.293 List.297; + let List.719 : U64 = 1i64; + let List.718 : U64 = CallByName Num.51 List.295 List.719; + jump List.713 List.291 List.292 List.717 List.294 List.718 List.296; else dec List.291; - dec List.290; - ret List.292; + dec List.292; + ret List.293; in - inc #Derived_gen.6; - inc #Derived_gen.7; - jump List.703 #Derived_gen.6 #Derived_gen.7 #Derived_gen.8 #Derived_gen.9 #Derived_gen.10 #Derived_gen.11; - -procedure List.115 (List.562, List.563, List.564): - let List.679 : U64 = 0i64; - let List.680 : U64 = CallByName List.6 List.562; - let List.678 : [C {}, C {}] = CallByName List.80 List.562 List.563 List.564 List.679 List.680; - ret List.678; - -procedure List.23 (List.286, List.287, List.288): - let List.715 : U64 = CallByName List.6 List.286; - let List.716 : U64 = CallByName List.6 List.287; - let List.289 : U64 = CallByName Num.148 List.715 List.716; - let List.701 : List {[C I64, C List *self], [C I64, C List *self]} = CallByName List.68 List.289; - let List.702 : U64 = 0i64; - let List.700 : List {[C I64, C List *self], [C I64, C List *self]} = CallByName List.105 List.286 List.287 List.701 List.288 List.702 List.289; - ret List.700; - -procedure List.247 (List.667, List.248, List.246): - let List.697 : Int1 = CallByName Test.1 List.248; - if List.697 then - let List.699 : {} = Struct {}; - let List.698 : [C {}, C {}] = TagId(1) List.699; - ret List.698; + inc #Derived_gen.1; + inc #Derived_gen.2; + jump List.713 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4 #Derived_gen.5 #Derived_gen.6; + +procedure List.116 (List.563, List.564, List.565): + let List.689 : U64 = 0i64; + let List.690 : U64 = CallByName List.6 List.563; + let List.688 : [C {}, C {}] = CallByName List.80 List.563 List.564 List.565 List.689 List.690; + ret List.688; + +procedure List.23 (List.287, List.288, List.289): + let List.725 : U64 = CallByName List.6 List.287; + let List.726 : U64 = CallByName List.6 List.288; + let List.290 : U64 = CallByName Num.148 List.725 List.726; + let List.711 : List {[C I64, C List *self], [C I64, C List *self]} = CallByName List.68 List.290; + let List.712 : U64 = 0i64; + let List.710 : List {[C I64, C List *self], [C I64, C List *self]} = CallByName List.106 List.287 List.288 List.711 List.289 List.712 List.290; + ret List.710; + +procedure List.248 (List.677, List.249, List.247): + let List.707 : Int1 = CallByName Test.1 List.249; + if List.707 then + let List.709 : {} = Struct {}; + let List.708 : [C {}, C {}] = TagId(1) List.709; + ret List.708; else - let List.696 : {} = Struct {}; - let List.695 : [C {}, C {}] = TagId(0) List.696; - ret List.695; - -procedure List.56 (List.245, List.246): - let List.676 : {} = Struct {}; - let List.668 : [C {}, C {}] = CallByName List.115 List.245 List.676 List.246; - let List.673 : U8 = 1i64; - let List.674 : U8 = GetTagId List.668; - let List.675 : Int1 = lowlevel Eq List.673 List.674; - if List.675 then - let List.669 : Int1 = CallByName Bool.2; - ret List.669; + let List.706 : {} = Struct {}; + let List.705 : [C {}, C {}] = TagId(0) List.706; + ret List.705; + +procedure List.56 (List.246, List.247): + let List.686 : {} = Struct {}; + let List.678 : [C {}, C {}] = CallByName List.116 List.246 List.686 List.247; + let List.683 : U8 = 1i64; + let List.684 : U8 = GetTagId List.678; + let List.685 : Int1 = lowlevel Eq List.683 List.684; + if List.685 then + let List.679 : Int1 = CallByName Bool.2; + ret List.679; else - let List.670 : Int1 = CallByName Bool.1; - ret List.670; + let List.680 : Int1 = CallByName Bool.1; + ret List.680; procedure List.6 (#Attr.2): - let List.666 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.666; + let List.676 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.676; procedure List.6 (#Attr.2): - let List.694 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.694; + let List.704 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.704; procedure List.66 (#Attr.2, #Attr.3): - let List.693 : {[C I64, C List *self], [C I64, C List *self]} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.693; + let List.703 : {[C I64, C List *self], [C I64, C List *self]} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.703; procedure List.66 (#Attr.2, #Attr.3): - let List.713 : [C I64, C List *self] = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.713; + let List.723 : [C I64, C List *self] = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.723; procedure List.68 (#Attr.2): - let List.714 : List {[C I64, C List *self], [C I64, C List *self]} = lowlevel ListWithCapacity #Attr.2; - ret List.714; + let List.724 : List {[C I64, C List *self], [C I64, C List *self]} = lowlevel ListWithCapacity #Attr.2; + ret List.724; procedure List.71 (#Attr.2, #Attr.3): - let List.710 : List {[C I64, C List *self], [C I64, C List *self]} = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.710; - -procedure List.80 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2, #Derived_gen.3, #Derived_gen.4): - joinpoint List.681 List.565 List.566 List.567 List.568 List.569: - let List.683 : Int1 = CallByName Num.22 List.568 List.569; - if List.683 then - let List.692 : {[C I64, C List *self], [C I64, C List *self]} = CallByName List.66 List.565 List.568; - inc List.692; - let List.684 : [C {}, C {}] = CallByName List.247 List.566 List.692 List.567; - let List.689 : U8 = 1i64; - let List.690 : U8 = GetTagId List.684; - let List.691 : Int1 = lowlevel Eq List.689 List.690; - if List.691 then - let List.570 : {} = UnionAtIndex (Id 1) (Index 0) List.684; - let List.687 : U64 = 1i64; - let List.686 : U64 = CallByName Num.51 List.568 List.687; - jump List.681 List.565 List.570 List.567 List.686 List.569; + let List.720 : List {[C I64, C List *self], [C I64, C List *self]} = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.720; + +procedure List.80 (#Derived_gen.7, #Derived_gen.8, #Derived_gen.9, #Derived_gen.10, #Derived_gen.11): + joinpoint List.691 List.566 List.567 List.568 List.569 List.570: + let List.693 : Int1 = CallByName Num.22 List.569 List.570; + if List.693 then + let List.702 : {[C I64, C List *self], [C I64, C List *self]} = CallByName List.66 List.566 List.569; + inc List.702; + let List.694 : [C {}, C {}] = CallByName List.248 List.567 List.702 List.568; + let List.699 : U8 = 1i64; + let List.700 : U8 = GetTagId List.694; + let List.701 : Int1 = lowlevel Eq List.699 List.700; + if List.701 then + let List.571 : {} = UnionAtIndex (Id 1) (Index 0) List.694; + let List.697 : U64 = 1i64; + let List.696 : U64 = CallByName Num.51 List.569 List.697; + jump List.691 List.566 List.571 List.568 List.696 List.570; else - dec List.565; - let List.571 : {} = UnionAtIndex (Id 0) (Index 0) List.684; - let List.688 : [C {}, C {}] = TagId(0) List.571; - ret List.688; + dec List.566; + let List.572 : {} = UnionAtIndex (Id 0) (Index 0) List.694; + let List.698 : [C {}, C {}] = TagId(0) List.572; + ret List.698; else - dec List.565; - let List.682 : [C {}, C {}] = TagId(1) List.566; - ret List.682; + dec List.566; + let List.692 : [C {}, C {}] = TagId(1) List.567; + ret List.692; in - inc #Derived_gen.0; - jump List.681 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; + inc #Derived_gen.7; + jump List.691 #Derived_gen.7 #Derived_gen.8 #Derived_gen.9 #Derived_gen.10 #Derived_gen.11; procedure Num.148 (Num.226, Num.227): let Num.290 : Int1 = CallByName Num.22 Num.226 Num.227; @@ -138,7 +138,7 @@ procedure Num.51 (#Attr.2, #Attr.3): let Num.286 : U64 = lowlevel NumAddWrap #Attr.2 #Attr.3; ret Num.286; -procedure Test.1 (#Derived_gen.5): +procedure Test.1 (#Derived_gen.0): joinpoint Test.26 Test.6: let Test.65 : [C I64, C List *self] = StructAtIndex 1 Test.6; let Test.66 : U8 = 0i64; @@ -220,7 +220,7 @@ procedure Test.1 (#Derived_gen.5): let Test.44 : {[C I64, C List *self], [C I64, C List *self]} = Struct {Test.45, Test.46}; jump Test.26 Test.44; in - jump Test.26 #Derived_gen.5; + jump Test.26 #Derived_gen.0; procedure Test.15 (Test.16, Test.17): let Test.36 : {[C I64, C List *self], [C I64, C List *self]} = Struct {Test.16, Test.17}; diff --git a/crates/compiler/test_mono/generated/layout_cache_structure_with_multiple_recursive_structures.txt b/crates/compiler/test_mono/generated/layout_cache_structure_with_multiple_recursive_structures.txt index 671993f128..179e13022d 100644 --- a/crates/compiler/test_mono/generated/layout_cache_structure_with_multiple_recursive_structures.txt +++ b/crates/compiler/test_mono/generated/layout_cache_structure_with_multiple_recursive_structures.txt @@ -1,33 +1,33 @@ -procedure List.100 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2, #Derived_gen.3, #Derived_gen.4): - joinpoint List.668 List.174 List.175 List.176 List.177 List.178: - let List.670 : Int1 = CallByName Num.22 List.177 List.178; - if List.670 then - let List.674 : [C *self, ] = CallByName List.66 List.174 List.177; - inc List.674; - let List.179 : [, C {[C *self, ], *self}] = CallByName Test.7 List.175 List.674; - let List.673 : U64 = 1i64; - let List.672 : U64 = CallByName Num.51 List.177 List.673; - jump List.668 List.174 List.179 List.176 List.672 List.178; +procedure List.101 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2, #Derived_gen.3, #Derived_gen.4): + joinpoint List.678 List.175 List.176 List.177 List.178 List.179: + let List.680 : Int1 = CallByName Num.22 List.178 List.179; + if List.680 then + let List.684 : [C *self, ] = CallByName List.66 List.175 List.178; + inc List.684; + let List.180 : [, C {[C *self, ], *self}] = CallByName Test.7 List.176 List.684; + let List.683 : U64 = 1i64; + let List.682 : U64 = CallByName Num.51 List.178 List.683; + jump List.678 List.175 List.180 List.177 List.682 List.179; else - dec List.174; - ret List.175; + dec List.175; + ret List.176; in inc #Derived_gen.0; - jump List.668 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; + jump List.678 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; -procedure List.18 (List.171, List.172, List.173): - let List.666 : U64 = 0i64; - let List.667 : U64 = CallByName List.6 List.171; - let List.665 : [, C {[C *self, ], *self}] = CallByName List.100 List.171 List.172 List.173 List.666 List.667; - ret List.665; +procedure List.18 (List.172, List.173, List.174): + let List.676 : U64 = 0i64; + let List.677 : U64 = CallByName List.6 List.172; + let List.675 : [, C {[C *self, ], *self}] = CallByName List.101 List.172 List.173 List.174 List.676 List.677; + ret List.675; procedure List.6 (#Attr.2): - let List.676 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.676; + let List.686 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.686; procedure List.66 (#Attr.2, #Attr.3): - let List.675 : [C *self, ] = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.675; + let List.685 : [C *self, ] = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.685; procedure Num.22 (#Attr.2, #Attr.3): let Num.284 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/list_append.txt b/crates/compiler/test_mono/generated/list_append.txt index 43dd147f54..04e1ddc8d0 100644 --- a/crates/compiler/test_mono/generated/list_append.txt +++ b/crates/compiler/test_mono/generated/list_append.txt @@ -1,16 +1,16 @@ -procedure List.4 (List.135, List.136): - let List.668 : U64 = 1i64; - let List.666 : List I64 = CallByName List.70 List.135 List.668; - let List.665 : List I64 = CallByName List.71 List.666 List.136; - ret List.665; +procedure List.4 (List.136, List.137): + let List.678 : U64 = 1i64; + let List.676 : List I64 = CallByName List.70 List.136 List.678; + let List.675 : List I64 = CallByName List.71 List.676 List.137; + ret List.675; procedure List.70 (#Attr.2, #Attr.3): - let List.669 : List I64 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.669; + let List.679 : List I64 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.679; procedure List.71 (#Attr.2, #Attr.3): - let List.667 : List I64 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.667; + let List.677 : List I64 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.677; procedure Test.0 (): let Test.2 : List I64 = Array [1i64]; diff --git a/crates/compiler/test_mono/generated/list_append_closure.txt b/crates/compiler/test_mono/generated/list_append_closure.txt index ba3983e362..b134771140 100644 --- a/crates/compiler/test_mono/generated/list_append_closure.txt +++ b/crates/compiler/test_mono/generated/list_append_closure.txt @@ -1,16 +1,16 @@ -procedure List.4 (List.135, List.136): - let List.668 : U64 = 1i64; - let List.666 : List I64 = CallByName List.70 List.135 List.668; - let List.665 : List I64 = CallByName List.71 List.666 List.136; - ret List.665; +procedure List.4 (List.136, List.137): + let List.678 : U64 = 1i64; + let List.676 : List I64 = CallByName List.70 List.136 List.678; + let List.675 : List I64 = CallByName List.71 List.676 List.137; + ret List.675; procedure List.70 (#Attr.2, #Attr.3): - let List.669 : List I64 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.669; + let List.679 : List I64 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.679; procedure List.71 (#Attr.2, #Attr.3): - let List.667 : List I64 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.667; + let List.677 : List I64 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.677; procedure Test.1 (Test.2): let Test.6 : I64 = 42i64; diff --git a/crates/compiler/test_mono/generated/list_cannot_update_inplace.txt b/crates/compiler/test_mono/generated/list_cannot_update_inplace.txt index 59f9355977..95a6278854 100644 --- a/crates/compiler/test_mono/generated/list_cannot_update_inplace.txt +++ b/crates/compiler/test_mono/generated/list_cannot_update_inplace.txt @@ -1,25 +1,25 @@ -procedure List.3 (List.127, List.128, List.129): - let List.668 : {List I64, I64} = CallByName List.64 List.127 List.128 List.129; - let List.667 : List I64 = StructAtIndex 0 List.668; - ret List.667; +procedure List.3 (List.128, List.129, List.130): + let List.678 : {List I64, I64} = CallByName List.64 List.128 List.129 List.130; + let List.677 : List I64 = StructAtIndex 0 List.678; + ret List.677; procedure List.6 (#Attr.2): - let List.666 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.666; - -procedure List.64 (List.124, List.125, List.126): - let List.673 : U64 = CallByName List.6 List.124; - let List.670 : Int1 = CallByName Num.22 List.125 List.673; - if List.670 then - let List.671 : {List I64, I64} = CallByName List.67 List.124 List.125 List.126; - ret List.671; + let List.676 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.676; + +procedure List.64 (List.125, List.126, List.127): + let List.683 : U64 = CallByName List.6 List.125; + let List.680 : Int1 = CallByName Num.22 List.126 List.683; + if List.680 then + let List.681 : {List I64, I64} = CallByName List.67 List.125 List.126 List.127; + ret List.681; else - let List.669 : {List I64, I64} = Struct {List.124, List.126}; - ret List.669; + let List.679 : {List I64, I64} = Struct {List.125, List.127}; + ret List.679; procedure List.67 (#Attr.2, #Attr.3, #Attr.4): - let List.672 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; - ret List.672; + let List.682 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; + ret List.682; procedure Num.19 (#Attr.2, #Attr.3): let Num.283 : U64 = lowlevel NumAdd #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/list_get.txt b/crates/compiler/test_mono/generated/list_get.txt index 3de2d201b2..fcc7192896 100644 --- a/crates/compiler/test_mono/generated/list_get.txt +++ b/crates/compiler/test_mono/generated/list_get.txt @@ -1,22 +1,22 @@ -procedure List.2 (List.119, List.120): - let List.671 : U64 = CallByName List.6 List.119; - let List.667 : Int1 = CallByName Num.22 List.120 List.671; - if List.667 then - let List.669 : I64 = CallByName List.66 List.119 List.120; - let List.668 : [C {}, C I64] = TagId(1) List.669; - ret List.668; +procedure List.2 (List.120, List.121): + let List.681 : U64 = CallByName List.6 List.120; + let List.677 : Int1 = CallByName Num.22 List.121 List.681; + if List.677 then + let List.679 : I64 = CallByName List.66 List.120 List.121; + let List.678 : [C {}, C I64] = TagId(1) List.679; + ret List.678; else - let List.666 : {} = Struct {}; - let List.665 : [C {}, C I64] = TagId(0) List.666; - ret List.665; + let List.676 : {} = Struct {}; + let List.675 : [C {}, C I64] = TagId(0) List.676; + ret List.675; procedure List.6 (#Attr.2): - let List.672 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.672; + let List.682 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.682; procedure List.66 (#Attr.2, #Attr.3): - let List.670 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.670; + let List.680 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.680; procedure Num.22 (#Attr.2, #Attr.3): let Num.283 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/list_len.txt b/crates/compiler/test_mono/generated/list_len.txt index 5fa13af048..17aadbfced 100644 --- a/crates/compiler/test_mono/generated/list_len.txt +++ b/crates/compiler/test_mono/generated/list_len.txt @@ -1,10 +1,10 @@ procedure List.6 (#Attr.2): - let List.665 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.665; + let List.675 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.675; procedure List.6 (#Attr.2): - let List.666 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.666; + let List.676 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.676; procedure Num.19 (#Attr.2, #Attr.3): let Num.283 : U64 = lowlevel NumAdd #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/list_map_closure_borrows.txt b/crates/compiler/test_mono/generated/list_map_closure_borrows.txt index 8205852849..223650051b 100644 --- a/crates/compiler/test_mono/generated/list_map_closure_borrows.txt +++ b/crates/compiler/test_mono/generated/list_map_closure_borrows.txt @@ -1,66 +1,66 @@ -procedure List.100 (#Derived_gen.3, #Derived_gen.4, #Derived_gen.5, #Derived_gen.6, #Derived_gen.7): - joinpoint List.679 List.174 List.175 List.176 List.177 List.178: - let List.681 : Int1 = CallByName Num.22 List.177 List.178; - if List.681 then - let List.685 : Str = CallByName List.66 List.174 List.177; - inc List.685; - let List.179 : List Str = CallByName List.283 List.175 List.685 List.176; - dec List.685; - let List.684 : U64 = 1i64; - let List.683 : U64 = CallByName Num.51 List.177 List.684; - jump List.679 List.174 List.179 List.176 List.683 List.178; +procedure List.101 (#Derived_gen.3, #Derived_gen.4, #Derived_gen.5, #Derived_gen.6, #Derived_gen.7): + joinpoint List.689 List.175 List.176 List.177 List.178 List.179: + let List.691 : Int1 = CallByName Num.22 List.178 List.179; + if List.691 then + let List.695 : Str = CallByName List.66 List.175 List.178; + inc List.695; + let List.180 : List Str = CallByName List.284 List.176 List.695 List.177; + dec List.695; + let List.694 : U64 = 1i64; + let List.693 : U64 = CallByName Num.51 List.178 List.694; + jump List.689 List.175 List.180 List.177 List.693 List.179; else - dec List.174; - ret List.175; + dec List.175; + ret List.176; in inc #Derived_gen.3; - jump List.679 #Derived_gen.3 #Derived_gen.4 #Derived_gen.5 #Derived_gen.6 #Derived_gen.7; - -procedure List.18 (List.171, List.172, List.173): - let List.677 : U64 = 0i64; - let List.678 : U64 = CallByName List.6 List.171; - let List.676 : List Str = CallByName List.100 List.171 List.172 List.173 List.677 List.678; - ret List.676; - -procedure List.2 (List.119, List.120): - let List.671 : U64 = CallByName List.6 List.119; - let List.667 : Int1 = CallByName Num.22 List.120 List.671; - if List.667 then - let List.669 : Str = CallByName List.66 List.119 List.120; - inc List.669; - let List.668 : [C {}, C Str] = TagId(1) List.669; - ret List.668; + jump List.689 #Derived_gen.3 #Derived_gen.4 #Derived_gen.5 #Derived_gen.6 #Derived_gen.7; + +procedure List.18 (List.172, List.173, List.174): + let List.687 : U64 = 0i64; + let List.688 : U64 = CallByName List.6 List.172; + let List.686 : List Str = CallByName List.101 List.172 List.173 List.174 List.687 List.688; + ret List.686; + +procedure List.2 (List.120, List.121): + let List.681 : U64 = CallByName List.6 List.120; + let List.677 : Int1 = CallByName Num.22 List.121 List.681; + if List.677 then + let List.679 : Str = CallByName List.66 List.120 List.121; + inc List.679; + let List.678 : [C {}, C Str] = TagId(1) List.679; + ret List.678; else - let List.666 : {} = Struct {}; - let List.665 : [C {}, C Str] = TagId(0) List.666; - ret List.665; + let List.676 : {} = Struct {}; + let List.675 : [C {}, C Str] = TagId(0) List.676; + ret List.675; -procedure List.283 (List.284, List.285, List.281): - let List.688 : Str = CallByName Test.3 List.285; - let List.687 : List Str = CallByName List.71 List.284 List.688; - ret List.687; +procedure List.284 (List.285, List.286, List.282): + let List.698 : Str = CallByName Test.3 List.286; + let List.697 : List Str = CallByName List.71 List.285 List.698; + ret List.697; -procedure List.5 (List.280, List.281): - let List.282 : U64 = CallByName List.6 List.280; - let List.674 : List Str = CallByName List.68 List.282; - let List.673 : List Str = CallByName List.18 List.280 List.674 List.281; - ret List.673; +procedure List.5 (List.281, List.282): + let List.283 : U64 = CallByName List.6 List.281; + let List.684 : List Str = CallByName List.68 List.283; + let List.683 : List Str = CallByName List.18 List.281 List.684 List.282; + ret List.683; procedure List.6 (#Attr.2): - let List.672 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.672; + let List.682 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.682; procedure List.66 (#Attr.2, #Attr.3): - let List.670 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.670; + let List.680 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.680; procedure List.68 (#Attr.2): - let List.690 : List Str = lowlevel ListWithCapacity #Attr.2; - ret List.690; + let List.700 : List Str = lowlevel ListWithCapacity #Attr.2; + ret List.700; procedure List.71 (#Attr.2, #Attr.3): - let List.689 : List Str = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.689; + let List.699 : List Str = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.699; procedure Num.22 (#Attr.2, #Attr.3): let Num.284 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/list_map_closure_owns.txt b/crates/compiler/test_mono/generated/list_map_closure_owns.txt index b40b7c1f59..ce02924c29 100644 --- a/crates/compiler/test_mono/generated/list_map_closure_owns.txt +++ b/crates/compiler/test_mono/generated/list_map_closure_owns.txt @@ -1,65 +1,65 @@ -procedure List.100 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2, #Derived_gen.3, #Derived_gen.4): - joinpoint List.679 List.174 List.175 List.176 List.177 List.178: - let List.681 : Int1 = CallByName Num.22 List.177 List.178; - if List.681 then - let List.685 : Str = CallByName List.66 List.174 List.177; - inc List.685; - let List.179 : List Str = CallByName List.283 List.175 List.685 List.176; - let List.684 : U64 = 1i64; - let List.683 : U64 = CallByName Num.51 List.177 List.684; - jump List.679 List.174 List.179 List.176 List.683 List.178; +procedure List.101 (#Derived_gen.3, #Derived_gen.4, #Derived_gen.5, #Derived_gen.6, #Derived_gen.7): + joinpoint List.689 List.175 List.176 List.177 List.178 List.179: + let List.691 : Int1 = CallByName Num.22 List.178 List.179; + if List.691 then + let List.695 : Str = CallByName List.66 List.175 List.178; + inc List.695; + let List.180 : List Str = CallByName List.284 List.176 List.695 List.177; + let List.694 : U64 = 1i64; + let List.693 : U64 = CallByName Num.51 List.178 List.694; + jump List.689 List.175 List.180 List.177 List.693 List.179; else - dec List.174; - ret List.175; + dec List.175; + ret List.176; in - inc #Derived_gen.0; - jump List.679 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; + inc #Derived_gen.3; + jump List.689 #Derived_gen.3 #Derived_gen.4 #Derived_gen.5 #Derived_gen.6 #Derived_gen.7; -procedure List.18 (List.171, List.172, List.173): - let List.677 : U64 = 0i64; - let List.678 : U64 = CallByName List.6 List.171; - let List.676 : List Str = CallByName List.100 List.171 List.172 List.173 List.677 List.678; - ret List.676; +procedure List.18 (List.172, List.173, List.174): + let List.687 : U64 = 0i64; + let List.688 : U64 = CallByName List.6 List.172; + let List.686 : List Str = CallByName List.101 List.172 List.173 List.174 List.687 List.688; + ret List.686; -procedure List.2 (List.119, List.120): - let List.671 : U64 = CallByName List.6 List.119; - let List.667 : Int1 = CallByName Num.22 List.120 List.671; - if List.667 then - let List.669 : Str = CallByName List.66 List.119 List.120; - inc List.669; - let List.668 : [C {}, C Str] = TagId(1) List.669; - ret List.668; +procedure List.2 (List.120, List.121): + let List.681 : U64 = CallByName List.6 List.120; + let List.677 : Int1 = CallByName Num.22 List.121 List.681; + if List.677 then + let List.679 : Str = CallByName List.66 List.120 List.121; + inc List.679; + let List.678 : [C {}, C Str] = TagId(1) List.679; + ret List.678; else - let List.666 : {} = Struct {}; - let List.665 : [C {}, C Str] = TagId(0) List.666; - ret List.665; + let List.676 : {} = Struct {}; + let List.675 : [C {}, C Str] = TagId(0) List.676; + ret List.675; -procedure List.283 (List.284, List.285, List.281): - let List.688 : Str = CallByName Test.3 List.285; - let List.687 : List Str = CallByName List.71 List.284 List.688; - ret List.687; +procedure List.284 (List.285, List.286, List.282): + let List.698 : Str = CallByName Test.3 List.286; + let List.697 : List Str = CallByName List.71 List.285 List.698; + ret List.697; -procedure List.5 (List.280, List.281): - let List.282 : U64 = CallByName List.6 List.280; - let List.674 : List Str = CallByName List.68 List.282; - let List.673 : List Str = CallByName List.18 List.280 List.674 List.281; - ret List.673; +procedure List.5 (List.281, List.282): + let List.283 : U64 = CallByName List.6 List.281; + let List.684 : List Str = CallByName List.68 List.283; + let List.683 : List Str = CallByName List.18 List.281 List.684 List.282; + ret List.683; procedure List.6 (#Attr.2): - let List.672 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.672; + let List.682 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.682; procedure List.66 (#Attr.2, #Attr.3): - let List.670 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.670; + let List.680 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.680; procedure List.68 (#Attr.2): - let List.690 : List Str = lowlevel ListWithCapacity #Attr.2; - ret List.690; + let List.700 : List Str = lowlevel ListWithCapacity #Attr.2; + ret List.700; procedure List.71 (#Attr.2, #Attr.3): - let List.689 : List Str = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.689; + let List.699 : List Str = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.699; procedure Num.22 (#Attr.2, #Attr.3): let Num.284 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/list_map_take_capturing_or_noncapturing.txt b/crates/compiler/test_mono/generated/list_map_take_capturing_or_noncapturing.txt index bc7ae93e6b..a2fd6b6055 100644 --- a/crates/compiler/test_mono/generated/list_map_take_capturing_or_noncapturing.txt +++ b/crates/compiler/test_mono/generated/list_map_take_capturing_or_noncapturing.txt @@ -1,66 +1,66 @@ -procedure List.100 (#Derived_gen.3, #Derived_gen.4, #Derived_gen.5, #Derived_gen.6, #Derived_gen.7): - joinpoint List.671 List.174 List.175 List.176 List.177 List.178: - let List.673 : Int1 = CallByName Num.22 List.177 List.178; - if List.673 then - let List.677 : U8 = CallByName List.66 List.174 List.177; - let List.179 : List U8 = CallByName List.283 List.175 List.677 List.176; - let List.676 : U64 = 1i64; - let List.675 : U64 = CallByName Num.51 List.177 List.676; - jump List.671 List.174 List.179 List.176 List.675 List.178; +procedure List.101 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2, #Derived_gen.3, #Derived_gen.4): + joinpoint List.681 List.175 List.176 List.177 List.178 List.179: + let List.683 : Int1 = CallByName Num.22 List.178 List.179; + if List.683 then + let List.687 : U8 = CallByName List.66 List.175 List.178; + let List.180 : List U8 = CallByName List.284 List.176 List.687 List.177; + let List.686 : U64 = 1i64; + let List.685 : U64 = CallByName Num.51 List.178 List.686; + jump List.681 List.175 List.180 List.177 List.685 List.179; else - dec List.174; - ret List.175; + dec List.175; + ret List.176; in - inc #Derived_gen.3; - jump List.671 #Derived_gen.3 #Derived_gen.4 #Derived_gen.5 #Derived_gen.6 #Derived_gen.7; + inc #Derived_gen.0; + jump List.681 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; -procedure List.18 (List.171, List.172, List.173): - let List.669 : U64 = 0i64; - let List.670 : U64 = CallByName List.6 List.171; - let List.668 : List U8 = CallByName List.100 List.171 List.172 List.173 List.669 List.670; - ret List.668; +procedure List.18 (List.172, List.173, List.174): + let List.679 : U64 = 0i64; + let List.680 : U64 = CallByName List.6 List.172; + let List.678 : List U8 = CallByName List.101 List.172 List.173 List.174 List.679 List.680; + ret List.678; -procedure List.283 (List.284, List.285, List.281): - let List.684 : U8 = GetTagId List.281; - joinpoint List.685 List.682: - let List.681 : List U8 = CallByName List.71 List.284 List.682; - ret List.681; +procedure List.284 (List.285, List.286, List.282): + let List.694 : U8 = GetTagId List.282; + joinpoint List.695 List.692: + let List.691 : List U8 = CallByName List.71 List.285 List.692; + ret List.691; in - switch List.684: + switch List.694: case 0: - let List.686 : U8 = CallByName Test.4 List.285 List.281; - jump List.685 List.686; + let List.696 : U8 = CallByName Test.4 List.286 List.282; + jump List.695 List.696; case 1: - let List.686 : U8 = CallByName Test.6 List.285 List.281; - jump List.685 List.686; + let List.696 : U8 = CallByName Test.6 List.286 List.282; + jump List.695 List.696; default: - let List.686 : U8 = CallByName Test.8 List.285; - jump List.685 List.686; + let List.696 : U8 = CallByName Test.8 List.286; + jump List.695 List.696; -procedure List.5 (List.280, List.281): - let List.282 : U64 = CallByName List.6 List.280; - let List.666 : List U8 = CallByName List.68 List.282; - let List.665 : List U8 = CallByName List.18 List.280 List.666 List.281; - ret List.665; +procedure List.5 (List.281, List.282): + let List.283 : U64 = CallByName List.6 List.281; + let List.676 : List U8 = CallByName List.68 List.283; + let List.675 : List U8 = CallByName List.18 List.281 List.676 List.282; + ret List.675; procedure List.6 (#Attr.2): - let List.679 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.679; + let List.689 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.689; procedure List.66 (#Attr.2, #Attr.3): - let List.678 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.678; + let List.688 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.688; procedure List.68 (#Attr.2): - let List.687 : List U8 = lowlevel ListWithCapacity #Attr.2; - ret List.687; + let List.697 : List U8 = lowlevel ListWithCapacity #Attr.2; + ret List.697; procedure List.71 (#Attr.2, #Attr.3): - let List.683 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.683; + let List.693 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.693; procedure Num.19 (#Attr.2, #Attr.3): let Num.285 : U8 = lowlevel NumAdd #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/list_pass_to_function.txt b/crates/compiler/test_mono/generated/list_pass_to_function.txt index 81d1d76c24..714f1ff97d 100644 --- a/crates/compiler/test_mono/generated/list_pass_to_function.txt +++ b/crates/compiler/test_mono/generated/list_pass_to_function.txt @@ -1,25 +1,25 @@ -procedure List.3 (List.127, List.128, List.129): - let List.666 : {List I64, I64} = CallByName List.64 List.127 List.128 List.129; - let List.665 : List I64 = StructAtIndex 0 List.666; - ret List.665; +procedure List.3 (List.128, List.129, List.130): + let List.676 : {List I64, I64} = CallByName List.64 List.128 List.129 List.130; + let List.675 : List I64 = StructAtIndex 0 List.676; + ret List.675; procedure List.6 (#Attr.2): - let List.672 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.672; + let List.682 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.682; -procedure List.64 (List.124, List.125, List.126): - let List.671 : U64 = CallByName List.6 List.124; - let List.668 : Int1 = CallByName Num.22 List.125 List.671; - if List.668 then - let List.669 : {List I64, I64} = CallByName List.67 List.124 List.125 List.126; - ret List.669; +procedure List.64 (List.125, List.126, List.127): + let List.681 : U64 = CallByName List.6 List.125; + let List.678 : Int1 = CallByName Num.22 List.126 List.681; + if List.678 then + let List.679 : {List I64, I64} = CallByName List.67 List.125 List.126 List.127; + ret List.679; else - let List.667 : {List I64, I64} = Struct {List.124, List.126}; - ret List.667; + let List.677 : {List I64, I64} = Struct {List.125, List.127}; + ret List.677; procedure List.67 (#Attr.2, #Attr.3, #Attr.4): - let List.670 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; - ret List.670; + let List.680 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; + ret List.680; procedure Num.22 (#Attr.2, #Attr.3): let Num.283 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/list_sort_asc.txt b/crates/compiler/test_mono/generated/list_sort_asc.txt index fb4bd333af..69deb96e46 100644 --- a/crates/compiler/test_mono/generated/list_sort_asc.txt +++ b/crates/compiler/test_mono/generated/list_sort_asc.txt @@ -1,11 +1,11 @@ procedure List.28 (#Attr.2, #Attr.3): - let List.667 : List I64 = lowlevel ListSortWith { xs: `#Attr.#arg1` } #Attr.2 Num.46 #Attr.3; - ret List.667; + let List.677 : List I64 = lowlevel ListSortWith { xs: `#Attr.#arg1` } #Attr.2 Num.46 #Attr.3; + ret List.677; -procedure List.59 (List.386): - let List.666 : {} = Struct {}; - let List.665 : List I64 = CallByName List.28 List.386 List.666; - ret List.665; +procedure List.59 (List.387): + let List.676 : {} = Struct {}; + let List.675 : List I64 = CallByName List.28 List.387 List.676; + ret List.675; procedure Num.46 (#Attr.2, #Attr.3): let Num.283 : U8 = lowlevel NumCompare #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/quicksort_swap.txt b/crates/compiler/test_mono/generated/quicksort_swap.txt index 9f84320505..4f023813fd 100644 --- a/crates/compiler/test_mono/generated/quicksort_swap.txt +++ b/crates/compiler/test_mono/generated/quicksort_swap.txt @@ -1,41 +1,41 @@ -procedure List.2 (List.119, List.120): - let List.687 : U64 = CallByName List.6 List.119; - let List.684 : Int1 = CallByName Num.22 List.120 List.687; - if List.684 then - let List.686 : I64 = CallByName List.66 List.119 List.120; - let List.685 : [C {}, C I64] = TagId(1) List.686; - ret List.685; +procedure List.2 (List.120, List.121): + let List.697 : U64 = CallByName List.6 List.120; + let List.694 : Int1 = CallByName Num.22 List.121 List.697; + if List.694 then + let List.696 : I64 = CallByName List.66 List.120 List.121; + let List.695 : [C {}, C I64] = TagId(1) List.696; + ret List.695; else - let List.683 : {} = Struct {}; - let List.682 : [C {}, C I64] = TagId(0) List.683; - ret List.682; + let List.693 : {} = Struct {}; + let List.692 : [C {}, C I64] = TagId(0) List.693; + ret List.692; -procedure List.3 (List.127, List.128, List.129): - let List.674 : {List I64, I64} = CallByName List.64 List.127 List.128 List.129; - let List.673 : List I64 = StructAtIndex 0 List.674; - ret List.673; +procedure List.3 (List.128, List.129, List.130): + let List.684 : {List I64, I64} = CallByName List.64 List.128 List.129 List.130; + let List.683 : List I64 = StructAtIndex 0 List.684; + ret List.683; procedure List.6 (#Attr.2): - let List.672 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.672; + let List.682 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.682; -procedure List.64 (List.124, List.125, List.126): - let List.671 : U64 = CallByName List.6 List.124; - let List.668 : Int1 = CallByName Num.22 List.125 List.671; - if List.668 then - let List.669 : {List I64, I64} = CallByName List.67 List.124 List.125 List.126; - ret List.669; +procedure List.64 (List.125, List.126, List.127): + let List.681 : U64 = CallByName List.6 List.125; + let List.678 : Int1 = CallByName Num.22 List.126 List.681; + if List.678 then + let List.679 : {List I64, I64} = CallByName List.67 List.125 List.126 List.127; + ret List.679; else - let List.667 : {List I64, I64} = Struct {List.124, List.126}; - ret List.667; + let List.677 : {List I64, I64} = Struct {List.125, List.127}; + ret List.677; procedure List.66 (#Attr.2, #Attr.3): - let List.680 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.680; + let List.690 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.690; procedure List.67 (#Attr.2, #Attr.3, #Attr.4): - let List.670 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; - ret List.670; + let List.680 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; + ret List.680; procedure Num.22 (#Attr.2, #Attr.3): let Num.285 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/record_update.txt b/crates/compiler/test_mono/generated/record_update.txt index 42d08fa11f..20b2ab3278 100644 --- a/crates/compiler/test_mono/generated/record_update.txt +++ b/crates/compiler/test_mono/generated/record_update.txt @@ -1,25 +1,25 @@ -procedure List.3 (List.127, List.128, List.129): - let List.674 : {List U64, U64} = CallByName List.64 List.127 List.128 List.129; - let List.673 : List U64 = StructAtIndex 0 List.674; - ret List.673; +procedure List.3 (List.128, List.129, List.130): + let List.684 : {List U64, U64} = CallByName List.64 List.128 List.129 List.130; + let List.683 : List U64 = StructAtIndex 0 List.684; + ret List.683; procedure List.6 (#Attr.2): - let List.672 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.672; + let List.682 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.682; -procedure List.64 (List.124, List.125, List.126): - let List.671 : U64 = CallByName List.6 List.124; - let List.668 : Int1 = CallByName Num.22 List.125 List.671; - if List.668 then - let List.669 : {List U64, U64} = CallByName List.67 List.124 List.125 List.126; - ret List.669; +procedure List.64 (List.125, List.126, List.127): + let List.681 : U64 = CallByName List.6 List.125; + let List.678 : Int1 = CallByName Num.22 List.126 List.681; + if List.678 then + let List.679 : {List U64, U64} = CallByName List.67 List.125 List.126 List.127; + ret List.679; else - let List.667 : {List U64, U64} = Struct {List.124, List.126}; - ret List.667; + let List.677 : {List U64, U64} = Struct {List.125, List.127}; + ret List.677; procedure List.67 (#Attr.2, #Attr.3, #Attr.4): - let List.670 : {List U64, U64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; - ret List.670; + let List.680 : {List U64, U64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; + ret List.680; procedure Num.22 (#Attr.2, #Attr.3): let Num.283 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/recursive_function_and_union_with_inference_hole.txt b/crates/compiler/test_mono/generated/recursive_function_and_union_with_inference_hole.txt index 33fa7a2b6b..7eb948ec2f 100644 --- a/crates/compiler/test_mono/generated/recursive_function_and_union_with_inference_hole.txt +++ b/crates/compiler/test_mono/generated/recursive_function_and_union_with_inference_hole.txt @@ -1,52 +1,52 @@ -procedure List.100 (#Derived_gen.4, #Derived_gen.5, #Derived_gen.6, #Derived_gen.7, #Derived_gen.8): - joinpoint List.671 List.174 List.175 List.176 List.177 List.178: - let List.673 : Int1 = CallByName Num.22 List.177 List.178; - if List.673 then - let List.677 : [C List *self] = CallByName List.66 List.174 List.177; - inc List.677; - let List.179 : List [C List *self] = CallByName List.283 List.175 List.677 List.176; - let List.676 : U64 = 1i64; - let List.675 : U64 = CallByName Num.51 List.177 List.676; - jump List.671 List.174 List.179 List.176 List.675 List.178; +procedure List.101 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2, #Derived_gen.3, #Derived_gen.4): + joinpoint List.681 List.175 List.176 List.177 List.178 List.179: + let List.683 : Int1 = CallByName Num.22 List.178 List.179; + if List.683 then + let List.687 : [C List *self] = CallByName List.66 List.175 List.178; + inc List.687; + let List.180 : List [C List *self] = CallByName List.284 List.176 List.687 List.177; + let List.686 : U64 = 1i64; + let List.685 : U64 = CallByName Num.51 List.178 List.686; + jump List.681 List.175 List.180 List.177 List.685 List.179; else - dec List.174; - ret List.175; + dec List.175; + ret List.176; in - inc #Derived_gen.4; - jump List.671 #Derived_gen.4 #Derived_gen.5 #Derived_gen.6 #Derived_gen.7 #Derived_gen.8; + inc #Derived_gen.0; + jump List.681 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; -procedure List.18 (List.171, List.172, List.173): - let List.669 : U64 = 0i64; - let List.670 : U64 = CallByName List.6 List.171; - let List.668 : List [C List *self] = CallByName List.100 List.171 List.172 List.173 List.669 List.670; - ret List.668; +procedure List.18 (List.172, List.173, List.174): + let List.679 : U64 = 0i64; + let List.680 : U64 = CallByName List.6 List.172; + let List.678 : List [C List *self] = CallByName List.101 List.172 List.173 List.174 List.679 List.680; + ret List.678; -procedure List.283 (List.284, List.285, List.281): - let List.682 : [C List *self] = CallByName Test.2 List.285; - let List.681 : List [C List *self] = CallByName List.71 List.284 List.682; - ret List.681; +procedure List.284 (List.285, List.286, List.282): + let List.692 : [C List *self] = CallByName Test.2 List.286; + let List.691 : List [C List *self] = CallByName List.71 List.285 List.692; + ret List.691; -procedure List.5 (List.280, List.281): - let List.282 : U64 = CallByName List.6 List.280; - let List.666 : List [C List *self] = CallByName List.68 List.282; - let List.665 : List [C List *self] = CallByName List.18 List.280 List.666 List.281; - ret List.665; +procedure List.5 (List.281, List.282): + let List.283 : U64 = CallByName List.6 List.281; + let List.676 : List [C List *self] = CallByName List.68 List.283; + let List.675 : List [C List *self] = CallByName List.18 List.281 List.676 List.282; + ret List.675; procedure List.6 (#Attr.2): - let List.679 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.679; + let List.689 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.689; procedure List.66 (#Attr.2, #Attr.3): - let List.678 : [C List *self] = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.678; + let List.688 : [C List *self] = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.688; procedure List.68 (#Attr.2): - let List.684 : List [C List *self] = lowlevel ListWithCapacity #Attr.2; - ret List.684; + let List.694 : List [C List *self] = lowlevel ListWithCapacity #Attr.2; + ret List.694; procedure List.71 (#Attr.2, #Attr.3): - let List.683 : List [C List *self] = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.683; + let List.693 : List [C List *self] = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.693; procedure Num.22 (#Attr.2, #Attr.3): let Num.284 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/rigids.txt b/crates/compiler/test_mono/generated/rigids.txt index 74121885bd..2bd7204567 100644 --- a/crates/compiler/test_mono/generated/rigids.txt +++ b/crates/compiler/test_mono/generated/rigids.txt @@ -1,41 +1,41 @@ -procedure List.2 (List.119, List.120): - let List.687 : U64 = CallByName List.6 List.119; - let List.684 : Int1 = CallByName Num.22 List.120 List.687; - if List.684 then - let List.686 : I64 = CallByName List.66 List.119 List.120; - let List.685 : [C {}, C I64] = TagId(1) List.686; - ret List.685; +procedure List.2 (List.120, List.121): + let List.697 : U64 = CallByName List.6 List.120; + let List.694 : Int1 = CallByName Num.22 List.121 List.697; + if List.694 then + let List.696 : I64 = CallByName List.66 List.120 List.121; + let List.695 : [C {}, C I64] = TagId(1) List.696; + ret List.695; else - let List.683 : {} = Struct {}; - let List.682 : [C {}, C I64] = TagId(0) List.683; - ret List.682; + let List.693 : {} = Struct {}; + let List.692 : [C {}, C I64] = TagId(0) List.693; + ret List.692; -procedure List.3 (List.127, List.128, List.129): - let List.674 : {List I64, I64} = CallByName List.64 List.127 List.128 List.129; - let List.673 : List I64 = StructAtIndex 0 List.674; - ret List.673; +procedure List.3 (List.128, List.129, List.130): + let List.684 : {List I64, I64} = CallByName List.64 List.128 List.129 List.130; + let List.683 : List I64 = StructAtIndex 0 List.684; + ret List.683; procedure List.6 (#Attr.2): - let List.672 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.672; + let List.682 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.682; -procedure List.64 (List.124, List.125, List.126): - let List.671 : U64 = CallByName List.6 List.124; - let List.668 : Int1 = CallByName Num.22 List.125 List.671; - if List.668 then - let List.669 : {List I64, I64} = CallByName List.67 List.124 List.125 List.126; - ret List.669; +procedure List.64 (List.125, List.126, List.127): + let List.681 : U64 = CallByName List.6 List.125; + let List.678 : Int1 = CallByName Num.22 List.126 List.681; + if List.678 then + let List.679 : {List I64, I64} = CallByName List.67 List.125 List.126 List.127; + ret List.679; else - let List.667 : {List I64, I64} = Struct {List.124, List.126}; - ret List.667; + let List.677 : {List I64, I64} = Struct {List.125, List.127}; + ret List.677; procedure List.66 (#Attr.2, #Attr.3): - let List.680 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.680; + let List.690 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.690; procedure List.67 (#Attr.2, #Attr.3, #Attr.4): - let List.670 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; - ret List.670; + let List.680 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; + ret List.680; procedure Num.22 (#Attr.2, #Attr.3): let Num.285 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/unspecialized_lambda_set_unification_does_not_duplicate_identical_concrete_types.txt b/crates/compiler/test_mono/generated/unspecialized_lambda_set_unification_does_not_duplicate_identical_concrete_types.txt index b977714063..0d803f15bd 100644 --- a/crates/compiler/test_mono/generated/unspecialized_lambda_set_unification_does_not_duplicate_identical_concrete_types.txt +++ b/crates/compiler/test_mono/generated/unspecialized_lambda_set_unification_does_not_duplicate_identical_concrete_types.txt @@ -29,58 +29,58 @@ procedure Encode.26 (Encode.107, Encode.108): let Encode.110 : List U8 = CallByName Encode.24 Encode.111 Encode.112 Encode.108; ret Encode.110; -procedure List.100 (#Derived_gen.6, #Derived_gen.7, #Derived_gen.8, #Derived_gen.9, #Derived_gen.10): - joinpoint List.668 List.174 List.175 List.176 List.177 List.178: - let List.670 : Int1 = CallByName Num.22 List.177 List.178; - if List.670 then - let List.674 : Str = CallByName List.66 List.174 List.177; - inc List.674; - let List.179 : List U8 = CallByName Test.66 List.175 List.674 List.176; - let List.673 : U64 = 1i64; - let List.672 : U64 = CallByName Num.51 List.177 List.673; - jump List.668 List.174 List.179 List.176 List.672 List.178; +procedure List.101 (#Derived_gen.12, #Derived_gen.13, #Derived_gen.14, #Derived_gen.15, #Derived_gen.16): + joinpoint List.678 List.175 List.176 List.177 List.178 List.179: + let List.680 : Int1 = CallByName Num.22 List.178 List.179; + if List.680 then + let List.684 : Str = CallByName List.66 List.175 List.178; + inc List.684; + let List.180 : List U8 = CallByName Test.66 List.176 List.684 List.177; + let List.683 : U64 = 1i64; + let List.682 : U64 = CallByName Num.51 List.178 List.683; + jump List.678 List.175 List.180 List.177 List.682 List.179; else - dec List.174; - ret List.175; + dec List.175; + ret List.176; in - inc #Derived_gen.6; - jump List.668 #Derived_gen.6 #Derived_gen.7 #Derived_gen.8 #Derived_gen.9 #Derived_gen.10; + inc #Derived_gen.12; + jump List.678 #Derived_gen.12 #Derived_gen.13 #Derived_gen.14 #Derived_gen.15 #Derived_gen.16; procedure List.13 (#Attr.2, #Attr.3): - let List.691 : List Str = lowlevel ListPrepend #Attr.2 #Attr.3; - ret List.691; + let List.701 : List Str = lowlevel ListPrepend #Attr.2 #Attr.3; + ret List.701; -procedure List.18 (List.171, List.172, List.173): - let List.666 : U64 = 0i64; - let List.667 : U64 = CallByName List.6 List.171; - let List.665 : List U8 = CallByName List.100 List.171 List.172 List.173 List.666 List.667; - ret List.665; +procedure List.18 (List.172, List.173, List.174): + let List.676 : U64 = 0i64; + let List.677 : U64 = CallByName List.6 List.172; + let List.675 : List U8 = CallByName List.101 List.172 List.173 List.174 List.676 List.677; + ret List.675; -procedure List.4 (List.135, List.136): - let List.687 : U64 = 1i64; - let List.686 : List U8 = CallByName List.70 List.135 List.687; - let List.685 : List U8 = CallByName List.71 List.686 List.136; - ret List.685; +procedure List.4 (List.136, List.137): + let List.697 : U64 = 1i64; + let List.696 : List U8 = CallByName List.70 List.136 List.697; + let List.695 : List U8 = CallByName List.71 List.696 List.137; + ret List.695; procedure List.6 (#Attr.2): - let List.690 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.690; + let List.700 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.700; procedure List.66 (#Attr.2, #Attr.3): - let List.675 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.675; + let List.685 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.685; procedure List.70 (#Attr.2, #Attr.3): - let List.681 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.681; + let List.691 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.691; procedure List.71 (#Attr.2, #Attr.3): - let List.679 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.679; + let List.689 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.689; procedure List.8 (#Attr.2, #Attr.3): - let List.689 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.689; + let List.699 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.699; procedure Num.127 (#Attr.2): let Num.284 : U8 = lowlevel NumIntCast #Attr.2; diff --git a/crates/compiler/test_mono/generated/unspecialized_lambda_set_unification_keeps_all_concrete_types_without_unification_of_unifiable.txt b/crates/compiler/test_mono/generated/unspecialized_lambda_set_unification_keeps_all_concrete_types_without_unification_of_unifiable.txt index 974cea5e21..6744f9ca1b 100644 --- a/crates/compiler/test_mono/generated/unspecialized_lambda_set_unification_keeps_all_concrete_types_without_unification_of_unifiable.txt +++ b/crates/compiler/test_mono/generated/unspecialized_lambda_set_unification_keeps_all_concrete_types_without_unification_of_unifiable.txt @@ -87,93 +87,93 @@ procedure Encode.26 (Encode.107, Encode.108): let Encode.110 : List U8 = CallByName Encode.24 Encode.111 Encode.112 Encode.108; ret Encode.110; -procedure List.100 (#Derived_gen.29, #Derived_gen.30, #Derived_gen.31, #Derived_gen.32, #Derived_gen.33): - joinpoint List.695 List.174 List.175 List.176 List.177 List.178: - let List.697 : Int1 = CallByName Num.22 List.177 List.178; - if List.697 then - let List.701 : Str = CallByName List.66 List.174 List.177; - inc List.701; - let List.179 : List U8 = CallByName Test.66 List.175 List.701 List.176; - let List.700 : U64 = 1i64; - let List.699 : U64 = CallByName Num.51 List.177 List.700; - jump List.695 List.174 List.179 List.176 List.699 List.178; +procedure List.101 (#Derived_gen.26, #Derived_gen.27, #Derived_gen.28, #Derived_gen.29, #Derived_gen.30): + joinpoint List.678 List.175 List.176 List.177 List.178 List.179: + let List.680 : Int1 = CallByName Num.22 List.178 List.179; + if List.680 then + let List.684 : [C {}, C {}, C Str] = CallByName List.66 List.175 List.178; + inc List.684; + let List.180 : List U8 = CallByName Test.66 List.176 List.684 List.177; + let List.683 : U64 = 1i64; + let List.682 : U64 = CallByName Num.51 List.178 List.683; + jump List.678 List.175 List.180 List.177 List.682 List.179; else - dec List.174; - ret List.175; + dec List.175; + ret List.176; in - inc #Derived_gen.29; - jump List.695 #Derived_gen.29 #Derived_gen.30 #Derived_gen.31 #Derived_gen.32 #Derived_gen.33; - -procedure List.100 (#Derived_gen.49, #Derived_gen.50, #Derived_gen.51, #Derived_gen.52, #Derived_gen.53): - joinpoint List.668 List.174 List.175 List.176 List.177 List.178: - let List.670 : Int1 = CallByName Num.22 List.177 List.178; - if List.670 then - let List.674 : [C {}, C {}, C Str] = CallByName List.66 List.174 List.177; - inc List.674; - let List.179 : List U8 = CallByName Test.66 List.175 List.674 List.176; - let List.673 : U64 = 1i64; - let List.672 : U64 = CallByName Num.51 List.177 List.673; - jump List.668 List.174 List.179 List.176 List.672 List.178; + inc #Derived_gen.26; + jump List.678 #Derived_gen.26 #Derived_gen.27 #Derived_gen.28 #Derived_gen.29 #Derived_gen.30; + +procedure List.101 (#Derived_gen.49, #Derived_gen.50, #Derived_gen.51, #Derived_gen.52, #Derived_gen.53): + joinpoint List.705 List.175 List.176 List.177 List.178 List.179: + let List.707 : Int1 = CallByName Num.22 List.178 List.179; + if List.707 then + let List.711 : Str = CallByName List.66 List.175 List.178; + inc List.711; + let List.180 : List U8 = CallByName Test.66 List.176 List.711 List.177; + let List.710 : U64 = 1i64; + let List.709 : U64 = CallByName Num.51 List.178 List.710; + jump List.705 List.175 List.180 List.177 List.709 List.179; else - dec List.174; - ret List.175; + dec List.175; + ret List.176; in inc #Derived_gen.49; - jump List.668 #Derived_gen.49 #Derived_gen.50 #Derived_gen.51 #Derived_gen.52 #Derived_gen.53; + jump List.705 #Derived_gen.49 #Derived_gen.50 #Derived_gen.51 #Derived_gen.52 #Derived_gen.53; procedure List.13 (#Attr.2, #Attr.3): - let List.691 : List [C {}, C {}, C Str] = lowlevel ListPrepend #Attr.2 #Attr.3; - ret List.691; + let List.701 : List [C {}, C {}, C Str] = lowlevel ListPrepend #Attr.2 #Attr.3; + ret List.701; procedure List.13 (#Attr.2, #Attr.3): - let List.719 : List Str = lowlevel ListPrepend #Attr.2 #Attr.3; - ret List.719; - -procedure List.18 (List.171, List.172, List.173): - let List.666 : U64 = 0i64; - let List.667 : U64 = CallByName List.6 List.171; - let List.665 : List U8 = CallByName List.100 List.171 List.172 List.173 List.666 List.667; - ret List.665; - -procedure List.18 (List.171, List.172, List.173): - let List.693 : U64 = 0i64; - let List.694 : U64 = CallByName List.6 List.171; - let List.692 : List U8 = CallByName List.100 List.171 List.172 List.173 List.693 List.694; - ret List.692; - -procedure List.4 (List.135, List.136): - let List.714 : U64 = 1i64; - let List.713 : List U8 = CallByName List.70 List.135 List.714; - let List.712 : List U8 = CallByName List.71 List.713 List.136; - ret List.712; + let List.729 : List Str = lowlevel ListPrepend #Attr.2 #Attr.3; + ret List.729; + +procedure List.18 (List.172, List.173, List.174): + let List.676 : U64 = 0i64; + let List.677 : U64 = CallByName List.6 List.172; + let List.675 : List U8 = CallByName List.101 List.172 List.173 List.174 List.676 List.677; + ret List.675; + +procedure List.18 (List.172, List.173, List.174): + let List.703 : U64 = 0i64; + let List.704 : U64 = CallByName List.6 List.172; + let List.702 : List U8 = CallByName List.101 List.172 List.173 List.174 List.703 List.704; + ret List.702; + +procedure List.4 (List.136, List.137): + let List.724 : U64 = 1i64; + let List.723 : List U8 = CallByName List.70 List.136 List.724; + let List.722 : List U8 = CallByName List.71 List.723 List.137; + ret List.722; procedure List.6 (#Attr.2): - let List.690 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.690; + let List.700 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.700; procedure List.6 (#Attr.2): - let List.717 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.717; + let List.727 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.727; procedure List.66 (#Attr.2, #Attr.3): - let List.675 : [C {}, C {}, C Str] = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.675; + let List.685 : [C {}, C {}, C Str] = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.685; procedure List.66 (#Attr.2, #Attr.3): - let List.702 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.702; + let List.712 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.712; procedure List.70 (#Attr.2, #Attr.3): - let List.708 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.708; + let List.718 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.718; procedure List.71 (#Attr.2, #Attr.3): - let List.706 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.706; + let List.716 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.716; procedure List.8 (#Attr.2, #Attr.3): - let List.716 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.716; + let List.726 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.726; procedure Num.127 (#Attr.2): let Num.288 : U8 = lowlevel NumIntCast #Attr.2; diff --git a/crates/compiler/test_mono/generated/weakening_avoids_overspecialization.txt b/crates/compiler/test_mono/generated/weakening_avoids_overspecialization.txt index e5499da3ef..476c9b0343 100644 --- a/crates/compiler/test_mono/generated/weakening_avoids_overspecialization.txt +++ b/crates/compiler/test_mono/generated/weakening_avoids_overspecialization.txt @@ -2,81 +2,81 @@ procedure Bool.11 (#Attr.2, #Attr.3): let Bool.23 : Int1 = lowlevel Eq #Attr.2 #Attr.3; ret Bool.23; -procedure List.115 (List.562, List.563, List.564): - let List.683 : U64 = 0i64; - let List.684 : U64 = CallByName List.6 List.562; - let List.682 : [C U64, C U64] = CallByName List.80 List.562 List.563 List.564 List.683 List.684; - ret List.682; +procedure List.116 (List.563, List.564, List.565): + let List.693 : U64 = 0i64; + let List.694 : U64 = CallByName List.6 List.563; + let List.692 : [C U64, C U64] = CallByName List.80 List.563 List.564 List.565 List.693 List.694; + ret List.692; -procedure List.26 (List.212, List.213, List.214): - let List.676 : [C U64, C U64] = CallByName List.115 List.212 List.213 List.214; - let List.679 : U8 = 1i64; - let List.680 : U8 = GetTagId List.676; - let List.681 : Int1 = lowlevel Eq List.679 List.680; - if List.681 then - let List.215 : U64 = UnionAtIndex (Id 1) (Index 0) List.676; - ret List.215; - else - let List.216 : U64 = UnionAtIndex (Id 0) (Index 0) List.676; +procedure List.26 (List.213, List.214, List.215): + let List.686 : [C U64, C U64] = CallByName List.116 List.213 List.214 List.215; + let List.689 : U8 = 1i64; + let List.690 : U8 = GetTagId List.686; + let List.691 : Int1 = lowlevel Eq List.689 List.690; + if List.691 then + let List.216 : U64 = UnionAtIndex (Id 1) (Index 0) List.686; ret List.216; + else + let List.217 : U64 = UnionAtIndex (Id 0) (Index 0) List.686; + ret List.217; -procedure List.38 (List.400, List.401): - let List.675 : U64 = CallByName List.6 List.400; - let List.402 : U64 = CallByName Num.77 List.675 List.401; - let List.665 : List U8 = CallByName List.43 List.400 List.402; - ret List.665; +procedure List.38 (List.401, List.402): + let List.685 : U64 = CallByName List.6 List.401; + let List.403 : U64 = CallByName Num.77 List.685 List.402; + let List.675 : List U8 = CallByName List.43 List.401 List.403; + ret List.675; -procedure List.43 (List.398, List.399): - let List.673 : U64 = CallByName List.6 List.398; - let List.672 : U64 = CallByName Num.77 List.673 List.399; - let List.667 : {U64, U64} = Struct {List.399, List.672}; - let List.666 : List U8 = CallByName List.49 List.398 List.667; - ret List.666; +procedure List.43 (List.399, List.400): + let List.683 : U64 = CallByName List.6 List.399; + let List.682 : U64 = CallByName Num.77 List.683 List.400; + let List.677 : {U64, U64} = Struct {List.400, List.682}; + let List.676 : List U8 = CallByName List.49 List.399 List.677; + ret List.676; -procedure List.49 (List.476, List.477): - let List.669 : U64 = StructAtIndex 1 List.477; - let List.670 : U64 = StructAtIndex 0 List.477; - let List.668 : List U8 = CallByName List.72 List.476 List.669 List.670; - ret List.668; +procedure List.49 (List.477, List.478): + let List.679 : U64 = StructAtIndex 1 List.478; + let List.680 : U64 = StructAtIndex 0 List.478; + let List.678 : List U8 = CallByName List.72 List.477 List.679 List.680; + ret List.678; procedure List.6 (#Attr.2): - let List.674 : U64 = lowlevel ListLenU64 #Attr.2; - ret List.674; + let List.684 : U64 = lowlevel ListLenU64 #Attr.2; + ret List.684; procedure List.66 (#Attr.2, #Attr.3): - let List.697 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.697; + let List.707 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.707; procedure List.72 (#Attr.2, #Attr.3, #Attr.4): - let List.671 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.671; + let List.681 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; + ret List.681; procedure List.80 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2, #Derived_gen.3, #Derived_gen.4): - joinpoint List.685 List.565 List.566 List.567 List.568 List.569: - let List.687 : Int1 = CallByName Num.22 List.568 List.569; - if List.687 then - let List.696 : U8 = CallByName List.66 List.565 List.568; - let List.688 : [C U64, C U64] = CallByName Test.3 List.566 List.696; - let List.693 : U8 = 1i64; - let List.694 : U8 = GetTagId List.688; - let List.695 : Int1 = lowlevel Eq List.693 List.694; - if List.695 then - let List.570 : U64 = UnionAtIndex (Id 1) (Index 0) List.688; - let List.691 : U64 = 1i64; - let List.690 : U64 = CallByName Num.51 List.568 List.691; - jump List.685 List.565 List.570 List.567 List.690 List.569; + joinpoint List.695 List.566 List.567 List.568 List.569 List.570: + let List.697 : Int1 = CallByName Num.22 List.569 List.570; + if List.697 then + let List.706 : U8 = CallByName List.66 List.566 List.569; + let List.698 : [C U64, C U64] = CallByName Test.3 List.567 List.706; + let List.703 : U8 = 1i64; + let List.704 : U8 = GetTagId List.698; + let List.705 : Int1 = lowlevel Eq List.703 List.704; + if List.705 then + let List.571 : U64 = UnionAtIndex (Id 1) (Index 0) List.698; + let List.701 : U64 = 1i64; + let List.700 : U64 = CallByName Num.51 List.569 List.701; + jump List.695 List.566 List.571 List.568 List.700 List.570; else - dec List.565; - let List.571 : U64 = UnionAtIndex (Id 0) (Index 0) List.688; - let List.692 : [C U64, C U64] = TagId(0) List.571; - ret List.692; + dec List.566; + let List.572 : U64 = UnionAtIndex (Id 0) (Index 0) List.698; + let List.702 : [C U64, C U64] = TagId(0) List.572; + ret List.702; else - dec List.565; - let List.686 : [C U64, C U64] = TagId(1) List.566; - ret List.686; + dec List.566; + let List.696 : [C U64, C U64] = TagId(1) List.567; + ret List.696; in inc #Derived_gen.0; - jump List.685 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; + jump List.695 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; procedure Num.22 (#Attr.2, #Attr.3): let Num.286 : Int1 = lowlevel NumLt #Attr.2 #Attr.3;