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 b676e206577..53805f71633 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,88 +2,88 @@ procedure Bool.11 (#Attr.2, #Attr.3): let Bool.24 : Int1 = lowlevel Eq #Attr.2 #Attr.3; ret Bool.24; -procedure List.26 (List.173, List.174, List.175): - let List.560 : [C U64, C U64] = CallByName List.97 List.173 List.174 List.175; - let List.563 : U8 = 1i64; - let List.564 : U8 = GetTagId List.560; - let List.565 : Int1 = lowlevel Eq List.563 List.564; - if List.565 then - let List.176 : U64 = UnionAtIndex (Id 1) (Index 0) List.560; - ret List.176; +procedure List.26 (List.181, List.182, List.183): + let List.568 : [C U64, C U64] = CallByName List.99 List.181 List.182 List.183; + let List.571 : U8 = 1i64; + let List.572 : U8 = GetTagId List.568; + let List.573 : Int1 = lowlevel Eq List.571 List.572; + if List.573 then + let List.184 : U64 = UnionAtIndex (Id 1) (Index 0) List.568; + ret List.184; else - let List.177 : U64 = UnionAtIndex (Id 0) (Index 0) List.560; - ret List.177; + let List.185 : U64 = UnionAtIndex (Id 0) (Index 0) List.568; + ret List.185; -procedure List.38 (List.316, List.317): - let List.559 : U64 = CallByName List.6 List.316; - let List.318 : U64 = CallByName Num.77 List.559 List.317; - let List.545 : List U8 = CallByName List.43 List.316 List.318; - ret List.545; +procedure List.38 (List.324, List.325): + let List.567 : U64 = CallByName List.6 List.324; + let List.326 : U64 = CallByName Num.77 List.567 List.325; + let List.553 : List U8 = CallByName List.43 List.324 List.326; + ret List.553; -procedure List.43 (List.314, List.315): - let List.557 : U64 = CallByName List.6 List.314; - let List.556 : U64 = CallByName Num.77 List.557 List.315; - let List.547 : {U64, U64} = Struct {List.315, List.556}; - let List.546 : List U8 = CallByName List.49 List.314 List.547; - ret List.546; +procedure List.43 (List.322, List.323): + let List.565 : U64 = CallByName List.6 List.322; + let List.564 : U64 = CallByName Num.77 List.565 List.323; + let List.555 : {U64, U64} = Struct {List.323, List.564}; + let List.554 : List U8 = CallByName List.49 List.322 List.555; + ret List.554; -procedure List.49 (List.392, List.393): - let List.554 : U64 = StructAtIndex 0 List.393; - let List.555 : U64 = 0i64; - let List.552 : Int1 = CallByName Bool.11 List.554 List.555; - if List.552 then - dec List.392; - let List.553 : List U8 = Array []; - ret List.553; +procedure List.49 (List.400, List.401): + let List.562 : U64 = StructAtIndex 0 List.401; + let List.563 : U64 = 0i64; + let List.560 : Int1 = CallByName Bool.11 List.562 List.563; + if List.560 then + dec List.400; + let List.561 : List U8 = Array []; + ret List.561; else - let List.549 : U64 = StructAtIndex 1 List.393; - let List.550 : U64 = StructAtIndex 0 List.393; - let List.548 : List U8 = CallByName List.72 List.392 List.549 List.550; - ret List.548; + let List.557 : U64 = StructAtIndex 1 List.401; + let List.558 : U64 = StructAtIndex 0 List.401; + let List.556 : List U8 = CallByName List.72 List.400 List.557 List.558; + ret List.556; procedure List.6 (#Attr.2): - let List.558 : U64 = lowlevel ListLen #Attr.2; - ret List.558; + let List.566 : U64 = lowlevel ListLen #Attr.2; + ret List.566; procedure List.66 (#Attr.2, #Attr.3): - let List.581 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.581; + let List.589 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.589; procedure List.72 (#Attr.2, #Attr.3, #Attr.4): - let List.551 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.551; + let List.559 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; + ret List.559; procedure List.80 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2, #Derived_gen.3, #Derived_gen.4): - joinpoint List.569 List.463 List.464 List.465 List.466 List.467: - let List.571 : Int1 = CallByName Num.22 List.466 List.467; - if List.571 then - let List.580 : U8 = CallByName List.66 List.463 List.466; - let List.572 : [C U64, C U64] = CallByName Test.4 List.464 List.580; - let List.577 : U8 = 1i64; - let List.578 : U8 = GetTagId List.572; - let List.579 : Int1 = lowlevel Eq List.577 List.578; - if List.579 then - let List.468 : U64 = UnionAtIndex (Id 1) (Index 0) List.572; - let List.575 : U64 = 1i64; - let List.574 : U64 = CallByName Num.51 List.466 List.575; - jump List.569 List.463 List.468 List.465 List.574 List.467; + joinpoint List.577 List.471 List.472 List.473 List.474 List.475: + let List.579 : Int1 = CallByName Num.22 List.474 List.475; + if List.579 then + let List.588 : U8 = CallByName List.66 List.471 List.474; + let List.580 : [C U64, C U64] = CallByName Test.4 List.472 List.588; + let List.585 : U8 = 1i64; + let List.586 : U8 = GetTagId List.580; + let List.587 : Int1 = lowlevel Eq List.585 List.586; + if List.587 then + let List.476 : U64 = UnionAtIndex (Id 1) (Index 0) List.580; + let List.583 : U64 = 1i64; + let List.582 : U64 = CallByName Num.51 List.474 List.583; + jump List.577 List.471 List.476 List.473 List.582 List.475; else - dec List.463; - let List.469 : U64 = UnionAtIndex (Id 0) (Index 0) List.572; - let List.576 : [C U64, C U64] = TagId(0) List.469; - ret List.576; + dec List.471; + let List.477 : U64 = UnionAtIndex (Id 0) (Index 0) List.580; + let List.584 : [C U64, C U64] = TagId(0) List.477; + ret List.584; else - dec List.463; - let List.570 : [C U64, C U64] = TagId(1) List.464; - ret List.570; + dec List.471; + let List.578 : [C U64, C U64] = TagId(1) List.472; + ret List.578; in - jump List.569 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; + jump List.577 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; -procedure List.97 (List.460, List.461, List.462): - let List.567 : U64 = 0i64; - let List.568 : U64 = CallByName List.6 List.460; - let List.566 : [C U64, C U64] = CallByName List.80 List.460 List.461 List.462 List.567 List.568; - ret List.566; +procedure List.99 (List.468, List.469, List.470): + let List.575 : U64 = 0i64; + let List.576 : U64 = CallByName List.6 List.468; + let List.574 : [C U64, C U64] = CallByName List.80 List.468 List.469 List.470 List.575 List.576; + ret List.574; procedure Num.22 (#Attr.2, #Attr.3): let Num.294 : 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 20ef3a7f161..5b7029eac18 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,7 +1,7 @@ procedure List.5 (#Attr.2, #Attr.3): - let List.545 : List {} = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.2 #Attr.3; + let List.553 : List {} = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.2 #Attr.3; decref #Attr.2; - ret List.545; + ret List.553; procedure Test.2 (Test.3): let Test.7 : {} = Struct {}; 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 2383916b182..e025fdcc306 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,7 +1,7 @@ procedure List.5 (#Attr.2, #Attr.3): - let List.545 : List [] = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.2 #Attr.3; + let List.553 : List [] = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.2 #Attr.3; decref #Attr.2; - ret List.545; + ret List.553; procedure Test.2 (Test.3): let Test.7 : {} = Struct {}; 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 c6f96867204..627dc58436b 100644 --- a/crates/compiler/test_mono/generated/capture_void_layout_task.txt +++ b/crates/compiler/test_mono/generated/capture_void_layout_task.txt @@ -1,31 +1,31 @@ -procedure List.18 (List.146, List.147, List.148): - let List.546 : U64 = 0i64; - let List.547 : U64 = CallByName List.6 List.146; - let List.545 : [C {}, C *self {{}, []}] = CallByName List.86 List.146 List.147 List.148 List.546 List.547; - ret List.545; +procedure List.18 (List.154, List.155, List.156): + let List.554 : U64 = 0i64; + let List.555 : U64 = CallByName List.6 List.154; + let List.553 : [C {}, C *self {{}, []}] = CallByName List.88 List.154 List.155 List.156 List.554 List.555; + ret List.553; procedure List.6 (#Attr.2): - let List.556 : U64 = lowlevel ListLen #Attr.2; - ret List.556; + let List.564 : U64 = lowlevel ListLen #Attr.2; + ret List.564; procedure List.66 (#Attr.2, #Attr.3): - let List.555 : [] = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.555; - -procedure List.86 (#Derived_gen.13, #Derived_gen.14, #Derived_gen.15, #Derived_gen.16, #Derived_gen.17): - joinpoint List.548 List.149 List.150 List.151 List.152 List.153: - let List.550 : Int1 = CallByName Num.22 List.152 List.153; - if List.550 then - let List.554 : [] = CallByName List.66 List.149 List.152; - let List.154 : [C {}, C *self {{}, []}] = CallByName Test.29 List.150 List.554 List.151; - let List.553 : U64 = 1i64; - let List.552 : U64 = CallByName Num.51 List.152 List.553; - jump List.548 List.149 List.154 List.151 List.552 List.153; + let List.563 : [] = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.563; + +procedure List.88 (#Derived_gen.3, #Derived_gen.4, #Derived_gen.5, #Derived_gen.6, #Derived_gen.7): + joinpoint List.556 List.157 List.158 List.159 List.160 List.161: + let List.558 : Int1 = CallByName Num.22 List.160 List.161; + if List.558 then + let List.562 : [] = CallByName List.66 List.157 List.160; + let List.162 : [C {}, C *self {{}, []}] = CallByName Test.29 List.158 List.562 List.159; + let List.561 : U64 = 1i64; + let List.560 : U64 = CallByName Num.51 List.160 List.561; + jump List.556 List.157 List.162 List.159 List.560 List.161; else - dec List.149; - ret List.150; + dec List.157; + ret List.158; in - jump List.548 #Derived_gen.13 #Derived_gen.14 #Derived_gen.15 #Derived_gen.16 #Derived_gen.17; + jump List.556 #Derived_gen.3 #Derived_gen.4 #Derived_gen.5 #Derived_gen.6 #Derived_gen.7; procedure Num.22 (#Attr.2, #Attr.3): let Num.292 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/choose_correct_recursion_var_under_record.txt b/crates/compiler/test_mono/generated/choose_correct_recursion_var_under_record.txt index 4daa9ce3ed1..2d83961daf3 100644 --- a/crates/compiler/test_mono/generated/choose_correct_recursion_var_under_record.txt +++ b/crates/compiler/test_mono/generated/choose_correct_recursion_var_under_record.txt @@ -2,49 +2,49 @@ procedure Bool.1 (): let Bool.24 : Int1 = false; ret Bool.24; -procedure List.2 (List.101, List.102): - let List.559 : U64 = CallByName List.6 List.101; - let List.555 : Int1 = CallByName Num.22 List.102 List.559; - if List.555 then - let List.557 : Str = CallByName List.66 List.101 List.102; - inc List.557; - dec List.101; - let List.556 : [C {}, C Str] = TagId(1) List.557; - ret List.556; +procedure List.2 (List.103, List.104): + let List.567 : U64 = CallByName List.6 List.103; + let List.563 : Int1 = CallByName Num.22 List.104 List.567; + if List.563 then + let List.565 : Str = CallByName List.66 List.103 List.104; + inc List.565; + dec List.103; + let List.564 : [C {}, C Str] = TagId(1) List.565; + ret List.564; else - dec List.101; - let List.554 : {} = Struct {}; - let List.553 : [C {}, C Str] = TagId(0) List.554; - ret List.553; + dec List.103; + let List.562 : {} = Struct {}; + let List.561 : [C {}, C Str] = TagId(0) List.562; + ret List.561; procedure List.5 (#Attr.2, #Attr.3): - let List.561 : List Str = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.10 #Attr.3; + let List.569 : List Str = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.10 #Attr.3; decref #Attr.2; - ret List.561; + ret List.569; procedure List.6 (#Attr.2): - let List.560 : U64 = lowlevel ListLen #Attr.2; - ret List.560; + let List.568 : U64 = lowlevel ListLen #Attr.2; + ret List.568; procedure List.66 (#Attr.2, #Attr.3): - let List.558 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.558; + let List.566 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.566; -procedure List.9 (List.307): - let List.552 : U64 = 0i64; - let List.545 : [C {}, C Str] = CallByName List.2 List.307 List.552; - let List.549 : U8 = 1i64; - let List.550 : U8 = GetTagId List.545; - let List.551 : Int1 = lowlevel Eq List.549 List.550; - if List.551 then - let List.308 : Str = UnionAtIndex (Id 1) (Index 0) List.545; - let List.546 : [C {}, C Str] = TagId(1) List.308; - ret List.546; +procedure List.9 (List.315): + let List.560 : U64 = 0i64; + let List.553 : [C {}, C Str] = CallByName List.2 List.315 List.560; + let List.557 : U8 = 1i64; + let List.558 : U8 = GetTagId List.553; + let List.559 : Int1 = lowlevel Eq List.557 List.558; + if List.559 then + let List.316 : Str = UnionAtIndex (Id 1) (Index 0) List.553; + let List.554 : [C {}, C Str] = TagId(1) List.316; + ret List.554; else - dec List.545; - let List.548 : {} = Struct {}; - let List.547 : [C {}, C Str] = TagId(0) List.548; - ret List.547; + dec List.553; + let List.556 : {} = Struct {}; + let List.555 : [C {}, C Str] = TagId(0) List.556; + ret List.555; procedure Num.22 (#Attr.2, #Attr.3): let Num.291 : 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 ae21589d90f..0cc0eab4f52 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.545 : U64 = lowlevel ListLen #Attr.2; - ret List.545; + let List.553 : U64 = lowlevel ListLen #Attr.2; + ret List.553; 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 0a39ed63b51..e3386f58675 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,34 +2,34 @@ procedure Bool.2 (): let Bool.23 : Int1 = true; ret Bool.23; -procedure List.18 (List.146, List.147, List.148): - let List.546 : U64 = 0i64; - let List.547 : U64 = CallByName List.6 List.146; - let List.545 : [, C *self Int1, C *self Int1] = CallByName List.86 List.146 List.147 List.148 List.546 List.547; - ret List.545; +procedure List.18 (List.154, List.155, List.156): + let List.554 : U64 = 0i64; + let List.555 : U64 = CallByName List.6 List.154; + let List.553 : [, C *self Int1, C *self Int1] = CallByName List.88 List.154 List.155 List.156 List.554 List.555; + ret List.553; procedure List.6 (#Attr.2): - let List.556 : U64 = lowlevel ListLen #Attr.2; - ret List.556; + let List.564 : U64 = lowlevel ListLen #Attr.2; + ret List.564; procedure List.66 (#Attr.2, #Attr.3): - let List.555 : Int1 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.555; + let List.563 : Int1 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.563; -procedure List.86 (#Derived_gen.3, #Derived_gen.4, #Derived_gen.5, #Derived_gen.6, #Derived_gen.7): - joinpoint List.548 List.149 List.150 List.151 List.152 List.153: - let List.550 : Int1 = CallByName Num.22 List.152 List.153; - if List.550 then - let List.554 : Int1 = CallByName List.66 List.149 List.152; - let List.154 : [, C *self Int1, C *self Int1] = CallByName Test.6 List.150 List.554 List.151; - let List.553 : U64 = 1i64; - let List.552 : U64 = CallByName Num.51 List.152 List.553; - jump List.548 List.149 List.154 List.151 List.552 List.153; +procedure List.88 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2, #Derived_gen.3, #Derived_gen.4): + joinpoint List.556 List.157 List.158 List.159 List.160 List.161: + let List.558 : Int1 = CallByName Num.22 List.160 List.161; + if List.558 then + let List.562 : Int1 = CallByName List.66 List.157 List.160; + let List.162 : [, C *self Int1, C *self Int1] = CallByName Test.6 List.158 List.562 List.159; + let List.561 : U64 = 1i64; + let List.560 : U64 = CallByName Num.51 List.160 List.561; + jump List.556 List.157 List.162 List.159 List.560 List.161; else - dec List.149; - ret List.150; + dec List.157; + ret List.158; in - jump List.548 #Derived_gen.3 #Derived_gen.4 #Derived_gen.5 #Derived_gen.6 #Derived_gen.7; + jump List.556 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; procedure Num.22 (#Attr.2, #Attr.3): let Num.292 : 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 27e8f85948a..f654e628b5d 100644 --- a/crates/compiler/test_mono/generated/dict.txt +++ b/crates/compiler/test_mono/generated/dict.txt @@ -24,59 +24,59 @@ procedure Dict.4 (Dict.560): dec #Derived_gen.6; ret Dict.101; -procedure List.11 (List.125, List.126): - let List.546 : List I8 = CallByName List.68 List.126; - let List.545 : List I8 = CallByName List.84 List.125 List.126 List.546; - ret List.545; +procedure List.11 (List.133, List.134): + let List.554 : List I8 = CallByName List.68 List.134; + let List.553 : List I8 = CallByName List.86 List.133 List.134 List.554; + ret List.553; -procedure List.11 (List.125, List.126): - let List.558 : List U64 = CallByName List.68 List.126; - let List.557 : List U64 = CallByName List.84 List.125 List.126 List.558; - ret List.557; +procedure List.11 (List.133, List.134): + let List.566 : List U64 = CallByName List.68 List.134; + let List.565 : List U64 = CallByName List.86 List.133 List.134 List.566; + ret List.565; procedure List.68 (#Attr.2): - let List.556 : List I8 = lowlevel ListWithCapacity #Attr.2; - ret List.556; + let List.564 : List I8 = lowlevel ListWithCapacity #Attr.2; + ret List.564; procedure List.68 (#Attr.2): - let List.568 : List U64 = lowlevel ListWithCapacity #Attr.2; - ret List.568; + let List.576 : List U64 = lowlevel ListWithCapacity #Attr.2; + ret List.576; procedure List.71 (#Attr.2, #Attr.3): - let List.553 : List I8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.553; + let List.561 : List I8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.561; procedure List.71 (#Attr.2, #Attr.3): - let List.565 : List U64 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.565; + let List.573 : List U64 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.573; -procedure List.84 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2): - joinpoint List.547 List.127 List.128 List.129: - let List.555 : U64 = 0i64; - let List.549 : Int1 = CallByName Num.24 List.128 List.555; - if List.549 then - let List.554 : U64 = 1i64; - let List.551 : U64 = CallByName Num.75 List.128 List.554; - let List.552 : List I8 = CallByName List.71 List.129 List.127; - jump List.547 List.127 List.551 List.552; +procedure List.86 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2): + joinpoint List.555 List.135 List.136 List.137: + let List.563 : U64 = 0i64; + let List.557 : Int1 = CallByName Num.24 List.136 List.563; + if List.557 then + let List.562 : U64 = 1i64; + let List.559 : U64 = CallByName Num.75 List.136 List.562; + let List.560 : List I8 = CallByName List.71 List.137 List.135; + jump List.555 List.135 List.559 List.560; else - ret List.129; + ret List.137; in - jump List.547 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2; + jump List.555 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2; -procedure List.84 (#Derived_gen.3, #Derived_gen.4, #Derived_gen.5): - joinpoint List.559 List.127 List.128 List.129: - let List.567 : U64 = 0i64; - let List.561 : Int1 = CallByName Num.24 List.128 List.567; - if List.561 then - let List.566 : U64 = 1i64; - let List.563 : U64 = CallByName Num.75 List.128 List.566; - let List.564 : List U64 = CallByName List.71 List.129 List.127; - jump List.559 List.127 List.563 List.564; +procedure List.86 (#Derived_gen.3, #Derived_gen.4, #Derived_gen.5): + joinpoint List.567 List.135 List.136 List.137: + let List.575 : U64 = 0i64; + let List.569 : Int1 = CallByName Num.24 List.136 List.575; + if List.569 then + let List.574 : U64 = 1i64; + let List.571 : U64 = CallByName Num.75 List.136 List.574; + let List.572 : List U64 = CallByName List.71 List.137 List.135; + jump List.567 List.135 List.571 List.572; else - ret List.129; + ret List.137; in - jump List.559 #Derived_gen.3 #Derived_gen.4 #Derived_gen.5; + jump List.567 #Derived_gen.3 #Derived_gen.4 #Derived_gen.5; procedure Num.24 (#Attr.2, #Attr.3): let Num.294 : Int1 = lowlevel NumGt #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 f2bbdae0172..8b5bf633313 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,27 +2,27 @@ procedure Bool.1 (): let Bool.23 : Int1 = false; ret Bool.23; -procedure List.2 (List.101, List.102): - let List.551 : U64 = CallByName List.6 List.101; - let List.547 : Int1 = CallByName Num.22 List.102 List.551; - if List.547 then - let List.549 : {} = CallByName List.66 List.101 List.102; - dec List.101; - let List.548 : [C {}, C {}] = TagId(1) List.549; - ret List.548; +procedure List.2 (List.103, List.104): + let List.559 : U64 = CallByName List.6 List.103; + let List.555 : Int1 = CallByName Num.22 List.104 List.559; + if List.555 then + let List.557 : {} = CallByName List.66 List.103 List.104; + dec List.103; + let List.556 : [C {}, C {}] = TagId(1) List.557; + ret List.556; else - dec List.101; - let List.546 : {} = Struct {}; - let List.545 : [C {}, C {}] = TagId(0) List.546; - ret List.545; + dec List.103; + let List.554 : {} = Struct {}; + let List.553 : [C {}, C {}] = TagId(0) List.554; + ret List.553; procedure List.6 (#Attr.2): - let List.552 : U64 = lowlevel ListLen #Attr.2; - ret List.552; + let List.560 : U64 = lowlevel ListLen #Attr.2; + ret List.560; procedure List.66 (#Attr.2, #Attr.3): - let List.550 : {} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.550; + let List.558 : {} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.558; procedure Num.22 (#Attr.2, #Attr.3): let Num.291 : 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 9d31cd0790f..633387ef87f 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.117, List.118): - let List.548 : U64 = 1i64; - let List.546 : List U8 = CallByName List.70 List.117 List.548; - let List.545 : List U8 = CallByName List.71 List.546 List.118; - ret List.545; +procedure List.4 (List.119, List.120): + let List.556 : U64 = 1i64; + let List.554 : List U8 = CallByName List.70 List.119 List.556; + let List.553 : List U8 = CallByName List.71 List.554 List.120; + ret List.553; procedure List.70 (#Attr.2, #Attr.3): - let List.549 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.549; + let List.557 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.557; procedure List.71 (#Attr.2, #Attr.3): - let List.547 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.547; + let List.555 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.555; 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 4f09c86083a..753621fe242 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 @@ -78,257 +78,257 @@ procedure Encode.26 (Encode.105, Encode.106): ret Encode.108; procedure List.13 (#Attr.2, #Attr.3): - let List.713 : List Str = lowlevel ListPrepend #Attr.2 #Attr.3; - ret List.713; - -procedure List.18 (List.146, List.147, List.148): - let List.575 : U64 = 0i64; - let List.576 : U64 = CallByName List.6 List.146; - let List.574 : {List U8, U64} = CallByName List.86 List.146 List.147 List.148 List.575 List.576; - ret List.574; - -procedure List.18 (List.146, List.147, List.148): - let List.647 : U64 = 0i64; - let List.648 : U64 = CallByName List.6 List.146; - let List.646 : {List U8, U64} = CallByName List.86 List.146 List.147 List.148 List.647 List.648; - ret List.646; - -procedure List.18 (List.146, List.147, List.148): - let List.659 : U64 = 0i64; - let List.660 : U64 = CallByName List.6 List.146; - let List.658 : List U8 = CallByName List.86 List.146 List.147 List.148 List.659 List.660; - ret List.658; - -procedure List.26 (List.173, List.174, List.175): - let List.730 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.97 List.173 List.174 List.175; - let List.733 : U8 = 1i64; - let List.734 : U8 = GetTagId List.730; - let List.735 : Int1 = lowlevel Eq List.733 List.734; - if List.735 then - let List.176 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.730; - ret List.176; + let List.721 : List Str = lowlevel ListPrepend #Attr.2 #Attr.3; + ret List.721; + +procedure List.18 (List.154, List.155, List.156): + let List.583 : U64 = 0i64; + let List.584 : U64 = CallByName List.6 List.154; + let List.582 : {List U8, U64} = CallByName List.88 List.154 List.155 List.156 List.583 List.584; + ret List.582; + +procedure List.18 (List.154, List.155, List.156): + let List.655 : U64 = 0i64; + let List.656 : U64 = CallByName List.6 List.154; + let List.654 : {List U8, U64} = CallByName List.88 List.154 List.155 List.156 List.655 List.656; + ret List.654; + +procedure List.18 (List.154, List.155, List.156): + let List.667 : U64 = 0i64; + let List.668 : U64 = CallByName List.6 List.154; + let List.666 : List U8 = CallByName List.88 List.154 List.155 List.156 List.667 List.668; + ret List.666; + +procedure List.26 (List.181, List.182, List.183): + let List.738 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.99 List.181 List.182 List.183; + let List.741 : U8 = 1i64; + let List.742 : U8 = GetTagId List.738; + let List.743 : Int1 = lowlevel Eq List.741 List.742; + if List.743 then + let List.184 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.738; + ret List.184; else - let List.177 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.730; - ret List.177; - -procedure List.38 (List.316, List.317): - let List.703 : U64 = CallByName List.6 List.316; - let List.318 : U64 = CallByName Num.77 List.703 List.317; - let List.702 : List Str = CallByName List.43 List.316 List.318; - ret List.702; - -procedure List.4 (List.117, List.118): - let List.642 : U64 = 1i64; - let List.641 : List Str = CallByName List.70 List.117 List.642; - let List.640 : List Str = CallByName List.71 List.641 List.118; - ret List.640; - -procedure List.4 (List.117, List.118): - let List.645 : U64 = 1i64; - let List.644 : List U8 = CallByName List.70 List.117 List.645; - let List.643 : List U8 = CallByName List.71 List.644 List.118; - ret List.643; - -procedure List.43 (List.314, List.315): - let List.693 : U64 = CallByName List.6 List.314; - let List.692 : U64 = CallByName Num.77 List.693 List.315; - let List.683 : {U64, U64} = Struct {List.315, List.692}; - let List.682 : List Str = CallByName List.49 List.314 List.683; - ret List.682; - -procedure List.49 (List.392, List.393): - let List.690 : U64 = StructAtIndex 0 List.393; - let List.691 : U64 = 0i64; - let List.688 : Int1 = CallByName Bool.11 List.690 List.691; - if List.688 then - dec List.392; - let List.689 : List Str = Array []; - ret List.689; + let List.185 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.738; + ret List.185; + +procedure List.38 (List.324, List.325): + let List.711 : U64 = CallByName List.6 List.324; + let List.326 : U64 = CallByName Num.77 List.711 List.325; + let List.710 : List Str = CallByName List.43 List.324 List.326; + ret List.710; + +procedure List.4 (List.119, List.120): + let List.650 : U64 = 1i64; + let List.649 : List Str = CallByName List.70 List.119 List.650; + let List.648 : List Str = CallByName List.71 List.649 List.120; + ret List.648; + +procedure List.4 (List.119, List.120): + let List.653 : U64 = 1i64; + let List.652 : List U8 = CallByName List.70 List.119 List.653; + let List.651 : List U8 = CallByName List.71 List.652 List.120; + ret List.651; + +procedure List.43 (List.322, List.323): + let List.701 : U64 = CallByName List.6 List.322; + let List.700 : U64 = CallByName Num.77 List.701 List.323; + let List.691 : {U64, U64} = Struct {List.323, List.700}; + let List.690 : List Str = CallByName List.49 List.322 List.691; + ret List.690; + +procedure List.49 (List.400, List.401): + let List.698 : U64 = StructAtIndex 0 List.401; + let List.699 : U64 = 0i64; + let List.696 : Int1 = CallByName Bool.11 List.698 List.699; + if List.696 then + dec List.400; + let List.697 : List Str = Array []; + ret List.697; else - let List.685 : U64 = StructAtIndex 1 List.393; - let List.686 : U64 = StructAtIndex 0 List.393; - let List.684 : List Str = CallByName List.72 List.392 List.685 List.686; - ret List.684; - -procedure List.49 (List.392, List.393): - let List.722 : U64 = StructAtIndex 0 List.393; - let List.723 : U64 = 0i64; - let List.720 : Int1 = CallByName Bool.11 List.722 List.723; - if List.720 then - dec List.392; - let List.721 : List U8 = Array []; - ret List.721; + let List.693 : U64 = StructAtIndex 1 List.401; + let List.694 : U64 = StructAtIndex 0 List.401; + let List.692 : List Str = CallByName List.72 List.400 List.693 List.694; + ret List.692; + +procedure List.49 (List.400, List.401): + let List.730 : U64 = StructAtIndex 0 List.401; + let List.731 : U64 = 0i64; + let List.728 : Int1 = CallByName Bool.11 List.730 List.731; + if List.728 then + dec List.400; + let List.729 : List U8 = Array []; + ret List.729; else - let List.717 : U64 = StructAtIndex 1 List.393; - let List.718 : U64 = StructAtIndex 0 List.393; - let List.716 : List U8 = CallByName List.72 List.392 List.717 List.718; - ret List.716; - -procedure List.52 (List.407, List.408): - let List.409 : U64 = CallByName List.6 List.407; - joinpoint List.728 List.410: - let List.726 : U64 = 0i64; - let List.725 : {U64, U64} = Struct {List.410, List.726}; - inc List.407; - let List.411 : List U8 = CallByName List.49 List.407 List.725; - let List.724 : U64 = CallByName Num.75 List.409 List.410; - let List.715 : {U64, U64} = Struct {List.724, List.410}; - let List.412 : List U8 = CallByName List.49 List.407 List.715; - let List.714 : {List U8, List U8} = Struct {List.411, List.412}; - ret List.714; + let List.725 : U64 = StructAtIndex 1 List.401; + let List.726 : U64 = StructAtIndex 0 List.401; + let List.724 : List U8 = CallByName List.72 List.400 List.725 List.726; + ret List.724; + +procedure List.52 (List.415, List.416): + let List.417 : U64 = CallByName List.6 List.415; + joinpoint List.736 List.418: + let List.734 : U64 = 0i64; + let List.733 : {U64, U64} = Struct {List.418, List.734}; + inc List.415; + let List.419 : List U8 = CallByName List.49 List.415 List.733; + let List.732 : U64 = CallByName Num.75 List.417 List.418; + let List.723 : {U64, U64} = Struct {List.732, List.418}; + let List.420 : List U8 = CallByName List.49 List.415 List.723; + let List.722 : {List U8, List U8} = Struct {List.419, List.420}; + ret List.722; in - let List.729 : Int1 = CallByName Num.24 List.409 List.408; - if List.729 then - jump List.728 List.408; + let List.737 : Int1 = CallByName Num.24 List.417 List.416; + if List.737 then + jump List.736 List.416; else - jump List.728 List.409; + jump List.736 List.417; procedure List.6 (#Attr.2): - let List.616 : U64 = lowlevel ListLen #Attr.2; - ret List.616; + let List.624 : U64 = lowlevel ListLen #Attr.2; + ret List.624; procedure List.6 (#Attr.2): - let List.709 : U64 = lowlevel ListLen #Attr.2; - ret List.709; + let List.717 : U64 = lowlevel ListLen #Attr.2; + ret List.717; procedure List.6 (#Attr.2): - let List.710 : U64 = lowlevel ListLen #Attr.2; - ret List.710; + let List.718 : U64 = lowlevel ListLen #Attr.2; + ret List.718; procedure List.6 (#Attr.2): - let List.712 : U64 = lowlevel ListLen #Attr.2; - ret List.712; + let List.720 : U64 = lowlevel ListLen #Attr.2; + ret List.720; procedure List.66 (#Attr.2, #Attr.3): - let List.584 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.584; + let List.592 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.592; procedure List.66 (#Attr.2, #Attr.3): - let List.656 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.656; + let List.664 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.664; procedure List.66 (#Attr.2, #Attr.3): - let List.668 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.668; + let List.676 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.676; procedure List.68 (#Attr.2): - let List.705 : List Str = lowlevel ListWithCapacity #Attr.2; - ret List.705; + let List.713 : List Str = lowlevel ListWithCapacity #Attr.2; + ret List.713; procedure List.68 (#Attr.2): - let List.707 : List U8 = lowlevel ListWithCapacity #Attr.2; - ret List.707; + let List.715 : List U8 = lowlevel ListWithCapacity #Attr.2; + ret List.715; procedure List.70 (#Attr.2, #Attr.3): - let List.622 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.622; + let List.630 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.630; procedure List.70 (#Attr.2, #Attr.3): - let List.639 : List Str = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.639; + let List.647 : List Str = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.647; procedure List.71 (#Attr.2, #Attr.3): - let List.620 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.620; + let List.628 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.628; procedure List.71 (#Attr.2, #Attr.3): - let List.637 : List Str = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.637; + let List.645 : List Str = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.645; procedure List.72 (#Attr.2, #Attr.3, #Attr.4): - let List.687 : List Str = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.687; + let List.695 : List Str = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; + ret List.695; procedure List.72 (#Attr.2, #Attr.3, #Attr.4): - let List.719 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.719; + let List.727 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; + ret List.727; procedure List.8 (#Attr.2, #Attr.3): - let List.672 : List Str = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.672; + let List.680 : List Str = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.680; procedure List.8 (#Attr.2, #Attr.3): - let List.680 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.680; + let List.688 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.688; procedure List.80 (#Derived_gen.20, #Derived_gen.21, #Derived_gen.22, #Derived_gen.23, #Derived_gen.24): - joinpoint List.739 List.463 List.464 List.465 List.466 List.467: - let List.741 : Int1 = CallByName Num.22 List.466 List.467; - if List.741 then - let List.750 : U8 = CallByName List.66 List.463 List.466; - let List.742 : [C {U64, Int1}, C {U64, Int1}] = CallByName TotallyNotJson.189 List.464 List.750; - let List.747 : U8 = 1i64; - let List.748 : U8 = GetTagId List.742; - let List.749 : Int1 = lowlevel Eq List.747 List.748; - if List.749 then - let List.468 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.742; - let List.745 : U64 = 1i64; - let List.744 : U64 = CallByName Num.51 List.466 List.745; - jump List.739 List.463 List.468 List.465 List.744 List.467; + joinpoint List.747 List.471 List.472 List.473 List.474 List.475: + let List.749 : Int1 = CallByName Num.22 List.474 List.475; + if List.749 then + let List.758 : U8 = CallByName List.66 List.471 List.474; + let List.750 : [C {U64, Int1}, C {U64, Int1}] = CallByName TotallyNotJson.189 List.472 List.758; + let List.755 : U8 = 1i64; + let List.756 : U8 = GetTagId List.750; + let List.757 : Int1 = lowlevel Eq List.755 List.756; + if List.757 then + let List.476 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.750; + let List.753 : U64 = 1i64; + let List.752 : U64 = CallByName Num.51 List.474 List.753; + jump List.747 List.471 List.476 List.473 List.752 List.475; else - dec List.463; - let List.469 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.742; - let List.746 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) List.469; - ret List.746; + dec List.471; + let List.477 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.750; + let List.754 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) List.477; + ret List.754; else - dec List.463; - let List.740 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.464; - ret List.740; + dec List.471; + let List.748 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.472; + ret List.748; in - jump List.739 #Derived_gen.20 #Derived_gen.21 #Derived_gen.22 #Derived_gen.23 #Derived_gen.24; - -procedure List.86 (#Derived_gen.25, #Derived_gen.26, #Derived_gen.27, #Derived_gen.28, #Derived_gen.29): - joinpoint List.649 List.149 List.150 List.151 List.152 List.153: - let List.651 : Int1 = CallByName Num.22 List.152 List.153; - if List.651 then - let List.655 : {Str, Str} = CallByName List.66 List.149 List.152; - inc List.655; - let List.154 : {List U8, U64} = CallByName TotallyNotJson.237 List.150 List.655 List.151; - let List.654 : U64 = 1i64; - let List.653 : U64 = CallByName Num.51 List.152 List.654; - jump List.649 List.149 List.154 List.151 List.653 List.153; + jump List.747 #Derived_gen.20 #Derived_gen.21 #Derived_gen.22 #Derived_gen.23 #Derived_gen.24; + +procedure List.88 (#Derived_gen.28, #Derived_gen.29, #Derived_gen.30, #Derived_gen.31, #Derived_gen.32): + joinpoint List.585 List.157 List.158 List.159 List.160 List.161: + let List.587 : Int1 = CallByName Num.22 List.160 List.161; + if List.587 then + let List.591 : {Str, Str} = CallByName List.66 List.157 List.160; + inc List.591; + let List.162 : {List U8, U64} = CallByName TotallyNotJson.237 List.158 List.591 List.159; + let List.590 : U64 = 1i64; + let List.589 : U64 = CallByName Num.51 List.160 List.590; + jump List.585 List.157 List.162 List.159 List.589 List.161; else - dec List.149; - ret List.150; + dec List.157; + ret List.158; in - jump List.649 #Derived_gen.25 #Derived_gen.26 #Derived_gen.27 #Derived_gen.28 #Derived_gen.29; - -procedure List.86 (#Derived_gen.40, #Derived_gen.41, #Derived_gen.42, #Derived_gen.43, #Derived_gen.44): - joinpoint List.577 List.149 List.150 List.151 List.152 List.153: - let List.579 : Int1 = CallByName Num.22 List.152 List.153; - if List.579 then - let List.583 : {Str, Str} = CallByName List.66 List.149 List.152; - inc List.583; - let List.154 : {List U8, U64} = CallByName TotallyNotJson.237 List.150 List.583 List.151; - let List.582 : U64 = 1i64; - let List.581 : U64 = CallByName Num.51 List.152 List.582; - jump List.577 List.149 List.154 List.151 List.581 List.153; + jump List.585 #Derived_gen.28 #Derived_gen.29 #Derived_gen.30 #Derived_gen.31 #Derived_gen.32; + +procedure List.88 (#Derived_gen.40, #Derived_gen.41, #Derived_gen.42, #Derived_gen.43, #Derived_gen.44): + joinpoint List.669 List.157 List.158 List.159 List.160 List.161: + let List.671 : Int1 = CallByName Num.22 List.160 List.161; + if List.671 then + let List.675 : U8 = CallByName List.66 List.157 List.160; + let List.162 : List U8 = CallByName TotallyNotJson.215 List.158 List.675; + let List.674 : U64 = 1i64; + let List.673 : U64 = CallByName Num.51 List.160 List.674; + jump List.669 List.157 List.162 List.159 List.673 List.161; else - dec List.149; - ret List.150; + dec List.157; + ret List.158; in - jump List.577 #Derived_gen.40 #Derived_gen.41 #Derived_gen.42 #Derived_gen.43 #Derived_gen.44; - -procedure List.86 (#Derived_gen.48, #Derived_gen.49, #Derived_gen.50, #Derived_gen.51, #Derived_gen.52): - joinpoint List.661 List.149 List.150 List.151 List.152 List.153: - let List.663 : Int1 = CallByName Num.22 List.152 List.153; - if List.663 then - let List.667 : U8 = CallByName List.66 List.149 List.152; - let List.154 : List U8 = CallByName TotallyNotJson.215 List.150 List.667; - let List.666 : U64 = 1i64; - let List.665 : U64 = CallByName Num.51 List.152 List.666; - jump List.661 List.149 List.154 List.151 List.665 List.153; + jump List.669 #Derived_gen.40 #Derived_gen.41 #Derived_gen.42 #Derived_gen.43 #Derived_gen.44; + +procedure List.88 (#Derived_gen.48, #Derived_gen.49, #Derived_gen.50, #Derived_gen.51, #Derived_gen.52): + joinpoint List.657 List.157 List.158 List.159 List.160 List.161: + let List.659 : Int1 = CallByName Num.22 List.160 List.161; + if List.659 then + let List.663 : {Str, Str} = CallByName List.66 List.157 List.160; + inc List.663; + let List.162 : {List U8, U64} = CallByName TotallyNotJson.237 List.158 List.663 List.159; + let List.662 : U64 = 1i64; + let List.661 : U64 = CallByName Num.51 List.160 List.662; + jump List.657 List.157 List.162 List.159 List.661 List.161; else - dec List.149; - ret List.150; + dec List.157; + ret List.158; in - jump List.661 #Derived_gen.48 #Derived_gen.49 #Derived_gen.50 #Derived_gen.51 #Derived_gen.52; + jump List.657 #Derived_gen.48 #Derived_gen.49 #Derived_gen.50 #Derived_gen.51 #Derived_gen.52; -procedure List.97 (List.460, List.461, List.462): - let List.737 : U64 = 0i64; - let List.738 : U64 = CallByName List.6 List.460; - let List.736 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.80 List.460 List.461 List.462 List.737 List.738; - ret List.736; +procedure List.99 (List.468, List.469, List.470): + let List.745 : U64 = 0i64; + let List.746 : U64 = CallByName List.6 List.468; + let List.744 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.80 List.468 List.469 List.470 List.745 List.746; + ret List.744; procedure Num.127 (#Attr.2): let Num.312 : 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 43b418018c0..5698df48a07 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 @@ -51,227 +51,227 @@ procedure Encode.26 (Encode.105, Encode.106): ret Encode.108; procedure List.13 (#Attr.2, #Attr.3): - let List.641 : List Str = lowlevel ListPrepend #Attr.2 #Attr.3; - ret List.641; - -procedure List.18 (List.146, List.147, List.148): - let List.575 : U64 = 0i64; - let List.576 : U64 = CallByName List.6 List.146; - let List.574 : {List U8, U64} = CallByName List.86 List.146 List.147 List.148 List.575 List.576; - ret List.574; - -procedure List.18 (List.146, List.147, List.148): - let List.587 : U64 = 0i64; - let List.588 : U64 = CallByName List.6 List.146; - let List.586 : List U8 = CallByName List.86 List.146 List.147 List.148 List.587 List.588; - ret List.586; - -procedure List.26 (List.173, List.174, List.175): - let List.658 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.97 List.173 List.174 List.175; - let List.661 : U8 = 1i64; - let List.662 : U8 = GetTagId List.658; - let List.663 : Int1 = lowlevel Eq List.661 List.662; - if List.663 then - let List.176 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.658; - ret List.176; + let List.649 : List Str = lowlevel ListPrepend #Attr.2 #Attr.3; + ret List.649; + +procedure List.18 (List.154, List.155, List.156): + let List.583 : U64 = 0i64; + let List.584 : U64 = CallByName List.6 List.154; + let List.582 : {List U8, U64} = CallByName List.88 List.154 List.155 List.156 List.583 List.584; + ret List.582; + +procedure List.18 (List.154, List.155, List.156): + let List.595 : U64 = 0i64; + let List.596 : U64 = CallByName List.6 List.154; + let List.594 : List U8 = CallByName List.88 List.154 List.155 List.156 List.595 List.596; + ret List.594; + +procedure List.26 (List.181, List.182, List.183): + let List.666 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.99 List.181 List.182 List.183; + let List.669 : U8 = 1i64; + let List.670 : U8 = GetTagId List.666; + let List.671 : Int1 = lowlevel Eq List.669 List.670; + if List.671 then + let List.184 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.666; + ret List.184; else - let List.177 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.658; - ret List.177; - -procedure List.38 (List.316, List.317): - let List.631 : U64 = CallByName List.6 List.316; - let List.318 : U64 = CallByName Num.77 List.631 List.317; - let List.630 : List Str = CallByName List.43 List.316 List.318; - ret List.630; - -procedure List.4 (List.117, List.118): - let List.570 : U64 = 1i64; - let List.569 : List Str = CallByName List.70 List.117 List.570; - let List.568 : List Str = CallByName List.71 List.569 List.118; - ret List.568; - -procedure List.4 (List.117, List.118): - let List.573 : U64 = 1i64; - let List.572 : List U8 = CallByName List.70 List.117 List.573; - let List.571 : List U8 = CallByName List.71 List.572 List.118; - ret List.571; - -procedure List.43 (List.314, List.315): - let List.621 : U64 = CallByName List.6 List.314; - let List.620 : U64 = CallByName Num.77 List.621 List.315; - let List.611 : {U64, U64} = Struct {List.315, List.620}; - let List.610 : List Str = CallByName List.49 List.314 List.611; - ret List.610; - -procedure List.49 (List.392, List.393): - let List.618 : U64 = StructAtIndex 0 List.393; - let List.619 : U64 = 0i64; - let List.616 : Int1 = CallByName Bool.11 List.618 List.619; - if List.616 then - dec List.392; - let List.617 : List Str = Array []; - ret List.617; + let List.185 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.666; + ret List.185; + +procedure List.38 (List.324, List.325): + let List.639 : U64 = CallByName List.6 List.324; + let List.326 : U64 = CallByName Num.77 List.639 List.325; + let List.638 : List Str = CallByName List.43 List.324 List.326; + ret List.638; + +procedure List.4 (List.119, List.120): + let List.578 : U64 = 1i64; + let List.577 : List Str = CallByName List.70 List.119 List.578; + let List.576 : List Str = CallByName List.71 List.577 List.120; + ret List.576; + +procedure List.4 (List.119, List.120): + let List.581 : U64 = 1i64; + let List.580 : List U8 = CallByName List.70 List.119 List.581; + let List.579 : List U8 = CallByName List.71 List.580 List.120; + ret List.579; + +procedure List.43 (List.322, List.323): + let List.629 : U64 = CallByName List.6 List.322; + let List.628 : U64 = CallByName Num.77 List.629 List.323; + let List.619 : {U64, U64} = Struct {List.323, List.628}; + let List.618 : List Str = CallByName List.49 List.322 List.619; + ret List.618; + +procedure List.49 (List.400, List.401): + let List.626 : U64 = StructAtIndex 0 List.401; + let List.627 : U64 = 0i64; + let List.624 : Int1 = CallByName Bool.11 List.626 List.627; + if List.624 then + dec List.400; + let List.625 : List Str = Array []; + ret List.625; else - let List.613 : U64 = StructAtIndex 1 List.393; - let List.614 : U64 = StructAtIndex 0 List.393; - let List.612 : List Str = CallByName List.72 List.392 List.613 List.614; - ret List.612; - -procedure List.49 (List.392, List.393): - let List.650 : U64 = StructAtIndex 0 List.393; - let List.651 : U64 = 0i64; - let List.648 : Int1 = CallByName Bool.11 List.650 List.651; - if List.648 then - dec List.392; - let List.649 : List U8 = Array []; - ret List.649; + let List.621 : U64 = StructAtIndex 1 List.401; + let List.622 : U64 = StructAtIndex 0 List.401; + let List.620 : List Str = CallByName List.72 List.400 List.621 List.622; + ret List.620; + +procedure List.49 (List.400, List.401): + let List.658 : U64 = StructAtIndex 0 List.401; + let List.659 : U64 = 0i64; + let List.656 : Int1 = CallByName Bool.11 List.658 List.659; + if List.656 then + dec List.400; + let List.657 : List U8 = Array []; + ret List.657; else - let List.645 : U64 = StructAtIndex 1 List.393; - let List.646 : U64 = StructAtIndex 0 List.393; - let List.644 : List U8 = CallByName List.72 List.392 List.645 List.646; - ret List.644; - -procedure List.52 (List.407, List.408): - let List.409 : U64 = CallByName List.6 List.407; - joinpoint List.656 List.410: - let List.654 : U64 = 0i64; - let List.653 : {U64, U64} = Struct {List.410, List.654}; - inc List.407; - let List.411 : List U8 = CallByName List.49 List.407 List.653; - let List.652 : U64 = CallByName Num.75 List.409 List.410; - let List.643 : {U64, U64} = Struct {List.652, List.410}; - let List.412 : List U8 = CallByName List.49 List.407 List.643; - let List.642 : {List U8, List U8} = Struct {List.411, List.412}; - ret List.642; + let List.653 : U64 = StructAtIndex 1 List.401; + let List.654 : U64 = StructAtIndex 0 List.401; + let List.652 : List U8 = CallByName List.72 List.400 List.653 List.654; + ret List.652; + +procedure List.52 (List.415, List.416): + let List.417 : U64 = CallByName List.6 List.415; + joinpoint List.664 List.418: + let List.662 : U64 = 0i64; + let List.661 : {U64, U64} = Struct {List.418, List.662}; + inc List.415; + let List.419 : List U8 = CallByName List.49 List.415 List.661; + let List.660 : U64 = CallByName Num.75 List.417 List.418; + let List.651 : {U64, U64} = Struct {List.660, List.418}; + let List.420 : List U8 = CallByName List.49 List.415 List.651; + let List.650 : {List U8, List U8} = Struct {List.419, List.420}; + ret List.650; in - let List.657 : Int1 = CallByName Num.24 List.409 List.408; - if List.657 then - jump List.656 List.408; + let List.665 : Int1 = CallByName Num.24 List.417 List.416; + if List.665 then + jump List.664 List.416; else - jump List.656 List.409; + jump List.664 List.417; procedure List.6 (#Attr.2): - let List.637 : U64 = lowlevel ListLen #Attr.2; - ret List.637; + let List.645 : U64 = lowlevel ListLen #Attr.2; + ret List.645; procedure List.6 (#Attr.2): - let List.638 : U64 = lowlevel ListLen #Attr.2; - ret List.638; + let List.646 : U64 = lowlevel ListLen #Attr.2; + ret List.646; procedure List.6 (#Attr.2): - let List.640 : U64 = lowlevel ListLen #Attr.2; - ret List.640; + let List.648 : U64 = lowlevel ListLen #Attr.2; + ret List.648; procedure List.66 (#Attr.2, #Attr.3): - let List.584 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.584; + let List.592 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.592; procedure List.66 (#Attr.2, #Attr.3): - let List.596 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.596; + let List.604 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.604; procedure List.68 (#Attr.2): - let List.633 : List Str = lowlevel ListWithCapacity #Attr.2; - ret List.633; + let List.641 : List Str = lowlevel ListWithCapacity #Attr.2; + ret List.641; procedure List.68 (#Attr.2): - let List.635 : List U8 = lowlevel ListWithCapacity #Attr.2; - ret List.635; + let List.643 : List U8 = lowlevel ListWithCapacity #Attr.2; + ret List.643; procedure List.70 (#Attr.2, #Attr.3): - let List.550 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.550; + let List.558 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.558; procedure List.70 (#Attr.2, #Attr.3): - let List.567 : List Str = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.567; + let List.575 : List Str = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.575; procedure List.71 (#Attr.2, #Attr.3): - let List.548 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.548; + let List.556 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.556; procedure List.71 (#Attr.2, #Attr.3): - let List.565 : List Str = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.565; + let List.573 : List Str = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.573; procedure List.72 (#Attr.2, #Attr.3, #Attr.4): - let List.615 : List Str = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.615; + let List.623 : List Str = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; + ret List.623; procedure List.72 (#Attr.2, #Attr.3, #Attr.4): - let List.647 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.647; + let List.655 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; + ret List.655; procedure List.8 (#Attr.2, #Attr.3): - let List.600 : List Str = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.600; + let List.608 : List Str = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.608; procedure List.8 (#Attr.2, #Attr.3): - let List.608 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.608; + let List.616 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.616; procedure List.80 (#Derived_gen.10, #Derived_gen.11, #Derived_gen.12, #Derived_gen.13, #Derived_gen.14): - joinpoint List.667 List.463 List.464 List.465 List.466 List.467: - let List.669 : Int1 = CallByName Num.22 List.466 List.467; - if List.669 then - let List.678 : U8 = CallByName List.66 List.463 List.466; - let List.670 : [C {U64, Int1}, C {U64, Int1}] = CallByName TotallyNotJson.189 List.464 List.678; - let List.675 : U8 = 1i64; - let List.676 : U8 = GetTagId List.670; - let List.677 : Int1 = lowlevel Eq List.675 List.676; - if List.677 then - let List.468 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.670; - let List.673 : U64 = 1i64; - let List.672 : U64 = CallByName Num.51 List.466 List.673; - jump List.667 List.463 List.468 List.465 List.672 List.467; + joinpoint List.675 List.471 List.472 List.473 List.474 List.475: + let List.677 : Int1 = CallByName Num.22 List.474 List.475; + if List.677 then + let List.686 : U8 = CallByName List.66 List.471 List.474; + let List.678 : [C {U64, Int1}, C {U64, Int1}] = CallByName TotallyNotJson.189 List.472 List.686; + 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.476 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.678; + let List.681 : U64 = 1i64; + let List.680 : U64 = CallByName Num.51 List.474 List.681; + jump List.675 List.471 List.476 List.473 List.680 List.475; else - dec List.463; - let List.469 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.670; - let List.674 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) List.469; - ret List.674; + dec List.471; + let List.477 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.678; + let List.682 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) List.477; + ret List.682; else - dec List.463; - let List.668 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.464; - ret List.668; + dec List.471; + let List.676 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.472; + ret List.676; in - jump List.667 #Derived_gen.10 #Derived_gen.11 #Derived_gen.12 #Derived_gen.13 #Derived_gen.14; - -procedure List.86 (#Derived_gen.26, #Derived_gen.27, #Derived_gen.28, #Derived_gen.29, #Derived_gen.30): - joinpoint List.589 List.149 List.150 List.151 List.152 List.153: - let List.591 : Int1 = CallByName Num.22 List.152 List.153; - if List.591 then - let List.595 : U8 = CallByName List.66 List.149 List.152; - let List.154 : List U8 = CallByName TotallyNotJson.215 List.150 List.595; - let List.594 : U64 = 1i64; - let List.593 : U64 = CallByName Num.51 List.152 List.594; - jump List.589 List.149 List.154 List.151 List.593 List.153; + jump List.675 #Derived_gen.10 #Derived_gen.11 #Derived_gen.12 #Derived_gen.13 #Derived_gen.14; + +procedure List.88 (#Derived_gen.16, #Derived_gen.17, #Derived_gen.18, #Derived_gen.19, #Derived_gen.20): + joinpoint List.585 List.157 List.158 List.159 List.160 List.161: + let List.587 : Int1 = CallByName Num.22 List.160 List.161; + if List.587 then + let List.591 : {Str, Str} = CallByName List.66 List.157 List.160; + inc List.591; + let List.162 : {List U8, U64} = CallByName TotallyNotJson.237 List.158 List.591 List.159; + let List.590 : U64 = 1i64; + let List.589 : U64 = CallByName Num.51 List.160 List.590; + jump List.585 List.157 List.162 List.159 List.589 List.161; else - dec List.149; - ret List.150; + dec List.157; + ret List.158; in - jump List.589 #Derived_gen.26 #Derived_gen.27 #Derived_gen.28 #Derived_gen.29 #Derived_gen.30; - -procedure List.86 (#Derived_gen.31, #Derived_gen.32, #Derived_gen.33, #Derived_gen.34, #Derived_gen.35): - joinpoint List.577 List.149 List.150 List.151 List.152 List.153: - let List.579 : Int1 = CallByName Num.22 List.152 List.153; - if List.579 then - let List.583 : {Str, Str} = CallByName List.66 List.149 List.152; - inc List.583; - let List.154 : {List U8, U64} = CallByName TotallyNotJson.237 List.150 List.583 List.151; - let List.582 : U64 = 1i64; - let List.581 : U64 = CallByName Num.51 List.152 List.582; - jump List.577 List.149 List.154 List.151 List.581 List.153; + jump List.585 #Derived_gen.16 #Derived_gen.17 #Derived_gen.18 #Derived_gen.19 #Derived_gen.20; + +procedure List.88 (#Derived_gen.31, #Derived_gen.32, #Derived_gen.33, #Derived_gen.34, #Derived_gen.35): + joinpoint List.597 List.157 List.158 List.159 List.160 List.161: + let List.599 : Int1 = CallByName Num.22 List.160 List.161; + if List.599 then + let List.603 : U8 = CallByName List.66 List.157 List.160; + let List.162 : List U8 = CallByName TotallyNotJson.215 List.158 List.603; + let List.602 : U64 = 1i64; + let List.601 : U64 = CallByName Num.51 List.160 List.602; + jump List.597 List.157 List.162 List.159 List.601 List.161; else - dec List.149; - ret List.150; + dec List.157; + ret List.158; in - jump List.577 #Derived_gen.31 #Derived_gen.32 #Derived_gen.33 #Derived_gen.34 #Derived_gen.35; + jump List.597 #Derived_gen.31 #Derived_gen.32 #Derived_gen.33 #Derived_gen.34 #Derived_gen.35; -procedure List.97 (List.460, List.461, List.462): - let List.665 : U64 = 0i64; - let List.666 : U64 = CallByName List.6 List.460; - let List.664 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.80 List.460 List.461 List.462 List.665 List.666; - ret List.664; +procedure List.99 (List.468, List.469, List.470): + let List.673 : U64 = 0i64; + let List.674 : U64 = CallByName List.6 List.468; + let List.672 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.80 List.468 List.469 List.470 List.673 List.674; + ret List.672; procedure Num.127 (#Attr.2): let Num.296 : U8 = lowlevel NumIntCast #Attr.2; @@ -1296,7 +1296,7 @@ procedure TotallyNotJson.95 (TotallyNotJson.829): dec TotallyNotJson.1492; ret TotallyNotJson.1491; -procedure TotallyNotJson.96 (#Derived_gen.25): +procedure TotallyNotJson.96 (#Derived_gen.30): joinpoint TotallyNotJson.1499 TotallyNotJson.1168: let TotallyNotJson.834 : List Str = StructAtIndex 0 TotallyNotJson.1168; let TotallyNotJson.833 : List Str = StructAtIndex 1 TotallyNotJson.1168; @@ -1334,7 +1334,7 @@ procedure TotallyNotJson.96 (#Derived_gen.25): let TotallyNotJson.1500 : {List Str, List Str} = Struct {TotallyNotJson.834, TotallyNotJson.833}; ret TotallyNotJson.1500; in - jump TotallyNotJson.1499 #Derived_gen.25; + jump TotallyNotJson.1499 #Derived_gen.30; procedure TotallyNotJson.97 (TotallyNotJson.837): let TotallyNotJson.838 : List Str = CallByName Str.55 TotallyNotJson.837; 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 73863e6e601..ac3b7d85b5a 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 @@ -58,227 +58,227 @@ procedure Encode.26 (Encode.105, Encode.106): ret Encode.108; procedure List.13 (#Attr.2, #Attr.3): - let List.641 : List Str = lowlevel ListPrepend #Attr.2 #Attr.3; - ret List.641; - -procedure List.18 (List.146, List.147, List.148): - let List.575 : U64 = 0i64; - let List.576 : U64 = CallByName List.6 List.146; - let List.574 : {List U8, U64} = CallByName List.86 List.146 List.147 List.148 List.575 List.576; - ret List.574; - -procedure List.18 (List.146, List.147, List.148): - let List.587 : U64 = 0i64; - let List.588 : U64 = CallByName List.6 List.146; - let List.586 : List U8 = CallByName List.86 List.146 List.147 List.148 List.587 List.588; - ret List.586; - -procedure List.26 (List.173, List.174, List.175): - let List.658 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.97 List.173 List.174 List.175; - let List.661 : U8 = 1i64; - let List.662 : U8 = GetTagId List.658; - let List.663 : Int1 = lowlevel Eq List.661 List.662; - if List.663 then - let List.176 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.658; - ret List.176; + let List.649 : List Str = lowlevel ListPrepend #Attr.2 #Attr.3; + ret List.649; + +procedure List.18 (List.154, List.155, List.156): + let List.583 : U64 = 0i64; + let List.584 : U64 = CallByName List.6 List.154; + let List.582 : {List U8, U64} = CallByName List.88 List.154 List.155 List.156 List.583 List.584; + ret List.582; + +procedure List.18 (List.154, List.155, List.156): + let List.595 : U64 = 0i64; + let List.596 : U64 = CallByName List.6 List.154; + let List.594 : List U8 = CallByName List.88 List.154 List.155 List.156 List.595 List.596; + ret List.594; + +procedure List.26 (List.181, List.182, List.183): + let List.666 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.99 List.181 List.182 List.183; + let List.669 : U8 = 1i64; + let List.670 : U8 = GetTagId List.666; + let List.671 : Int1 = lowlevel Eq List.669 List.670; + if List.671 then + let List.184 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.666; + ret List.184; else - let List.177 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.658; - ret List.177; - -procedure List.38 (List.316, List.317): - let List.631 : U64 = CallByName List.6 List.316; - let List.318 : U64 = CallByName Num.77 List.631 List.317; - let List.630 : List Str = CallByName List.43 List.316 List.318; - ret List.630; - -procedure List.4 (List.117, List.118): - let List.570 : U64 = 1i64; - let List.569 : List Str = CallByName List.70 List.117 List.570; - let List.568 : List Str = CallByName List.71 List.569 List.118; - ret List.568; - -procedure List.4 (List.117, List.118): - let List.573 : U64 = 1i64; - let List.572 : List U8 = CallByName List.70 List.117 List.573; - let List.571 : List U8 = CallByName List.71 List.572 List.118; - ret List.571; - -procedure List.43 (List.314, List.315): - let List.621 : U64 = CallByName List.6 List.314; - let List.620 : U64 = CallByName Num.77 List.621 List.315; - let List.611 : {U64, U64} = Struct {List.315, List.620}; - let List.610 : List Str = CallByName List.49 List.314 List.611; - ret List.610; - -procedure List.49 (List.392, List.393): - let List.618 : U64 = StructAtIndex 0 List.393; - let List.619 : U64 = 0i64; - let List.616 : Int1 = CallByName Bool.11 List.618 List.619; - if List.616 then - dec List.392; - let List.617 : List Str = Array []; - ret List.617; + let List.185 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.666; + ret List.185; + +procedure List.38 (List.324, List.325): + let List.639 : U64 = CallByName List.6 List.324; + let List.326 : U64 = CallByName Num.77 List.639 List.325; + let List.638 : List Str = CallByName List.43 List.324 List.326; + ret List.638; + +procedure List.4 (List.119, List.120): + let List.578 : U64 = 1i64; + let List.577 : List Str = CallByName List.70 List.119 List.578; + let List.576 : List Str = CallByName List.71 List.577 List.120; + ret List.576; + +procedure List.4 (List.119, List.120): + let List.581 : U64 = 1i64; + let List.580 : List U8 = CallByName List.70 List.119 List.581; + let List.579 : List U8 = CallByName List.71 List.580 List.120; + ret List.579; + +procedure List.43 (List.322, List.323): + let List.629 : U64 = CallByName List.6 List.322; + let List.628 : U64 = CallByName Num.77 List.629 List.323; + let List.619 : {U64, U64} = Struct {List.323, List.628}; + let List.618 : List Str = CallByName List.49 List.322 List.619; + ret List.618; + +procedure List.49 (List.400, List.401): + let List.626 : U64 = StructAtIndex 0 List.401; + let List.627 : U64 = 0i64; + let List.624 : Int1 = CallByName Bool.11 List.626 List.627; + if List.624 then + dec List.400; + let List.625 : List Str = Array []; + ret List.625; else - let List.613 : U64 = StructAtIndex 1 List.393; - let List.614 : U64 = StructAtIndex 0 List.393; - let List.612 : List Str = CallByName List.72 List.392 List.613 List.614; - ret List.612; - -procedure List.49 (List.392, List.393): - let List.650 : U64 = StructAtIndex 0 List.393; - let List.651 : U64 = 0i64; - let List.648 : Int1 = CallByName Bool.11 List.650 List.651; - if List.648 then - dec List.392; - let List.649 : List U8 = Array []; - ret List.649; + let List.621 : U64 = StructAtIndex 1 List.401; + let List.622 : U64 = StructAtIndex 0 List.401; + let List.620 : List Str = CallByName List.72 List.400 List.621 List.622; + ret List.620; + +procedure List.49 (List.400, List.401): + let List.658 : U64 = StructAtIndex 0 List.401; + let List.659 : U64 = 0i64; + let List.656 : Int1 = CallByName Bool.11 List.658 List.659; + if List.656 then + dec List.400; + let List.657 : List U8 = Array []; + ret List.657; else - let List.645 : U64 = StructAtIndex 1 List.393; - let List.646 : U64 = StructAtIndex 0 List.393; - let List.644 : List U8 = CallByName List.72 List.392 List.645 List.646; - ret List.644; - -procedure List.52 (List.407, List.408): - let List.409 : U64 = CallByName List.6 List.407; - joinpoint List.656 List.410: - let List.654 : U64 = 0i64; - let List.653 : {U64, U64} = Struct {List.410, List.654}; - inc List.407; - let List.411 : List U8 = CallByName List.49 List.407 List.653; - let List.652 : U64 = CallByName Num.75 List.409 List.410; - let List.643 : {U64, U64} = Struct {List.652, List.410}; - let List.412 : List U8 = CallByName List.49 List.407 List.643; - let List.642 : {List U8, List U8} = Struct {List.411, List.412}; - ret List.642; + let List.653 : U64 = StructAtIndex 1 List.401; + let List.654 : U64 = StructAtIndex 0 List.401; + let List.652 : List U8 = CallByName List.72 List.400 List.653 List.654; + ret List.652; + +procedure List.52 (List.415, List.416): + let List.417 : U64 = CallByName List.6 List.415; + joinpoint List.664 List.418: + let List.662 : U64 = 0i64; + let List.661 : {U64, U64} = Struct {List.418, List.662}; + inc List.415; + let List.419 : List U8 = CallByName List.49 List.415 List.661; + let List.660 : U64 = CallByName Num.75 List.417 List.418; + let List.651 : {U64, U64} = Struct {List.660, List.418}; + let List.420 : List U8 = CallByName List.49 List.415 List.651; + let List.650 : {List U8, List U8} = Struct {List.419, List.420}; + ret List.650; in - let List.657 : Int1 = CallByName Num.24 List.409 List.408; - if List.657 then - jump List.656 List.408; + let List.665 : Int1 = CallByName Num.24 List.417 List.416; + if List.665 then + jump List.664 List.416; else - jump List.656 List.409; + jump List.664 List.417; procedure List.6 (#Attr.2): - let List.637 : U64 = lowlevel ListLen #Attr.2; - ret List.637; + let List.645 : U64 = lowlevel ListLen #Attr.2; + ret List.645; procedure List.6 (#Attr.2): - let List.638 : U64 = lowlevel ListLen #Attr.2; - ret List.638; + let List.646 : U64 = lowlevel ListLen #Attr.2; + ret List.646; procedure List.6 (#Attr.2): - let List.640 : U64 = lowlevel ListLen #Attr.2; - ret List.640; + let List.648 : U64 = lowlevel ListLen #Attr.2; + ret List.648; procedure List.66 (#Attr.2, #Attr.3): - let List.584 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.584; + let List.592 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.592; procedure List.66 (#Attr.2, #Attr.3): - let List.596 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.596; + let List.604 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.604; procedure List.68 (#Attr.2): - let List.633 : List Str = lowlevel ListWithCapacity #Attr.2; - ret List.633; + let List.641 : List Str = lowlevel ListWithCapacity #Attr.2; + ret List.641; procedure List.68 (#Attr.2): - let List.635 : List U8 = lowlevel ListWithCapacity #Attr.2; - ret List.635; + let List.643 : List U8 = lowlevel ListWithCapacity #Attr.2; + ret List.643; procedure List.70 (#Attr.2, #Attr.3): - let List.550 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.550; + let List.558 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.558; procedure List.70 (#Attr.2, #Attr.3): - let List.567 : List Str = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.567; + let List.575 : List Str = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.575; procedure List.71 (#Attr.2, #Attr.3): - let List.548 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.548; + let List.556 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.556; procedure List.71 (#Attr.2, #Attr.3): - let List.565 : List Str = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.565; + let List.573 : List Str = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.573; procedure List.72 (#Attr.2, #Attr.3, #Attr.4): - let List.615 : List Str = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.615; + let List.623 : List Str = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; + ret List.623; procedure List.72 (#Attr.2, #Attr.3, #Attr.4): - let List.647 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.647; + let List.655 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; + ret List.655; procedure List.8 (#Attr.2, #Attr.3): - let List.600 : List Str = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.600; + let List.608 : List Str = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.608; procedure List.8 (#Attr.2, #Attr.3): - let List.608 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.608; + let List.616 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.616; procedure List.80 (#Derived_gen.14, #Derived_gen.15, #Derived_gen.16, #Derived_gen.17, #Derived_gen.18): - joinpoint List.667 List.463 List.464 List.465 List.466 List.467: - let List.669 : Int1 = CallByName Num.22 List.466 List.467; - if List.669 then - let List.678 : U8 = CallByName List.66 List.463 List.466; - let List.670 : [C {U64, Int1}, C {U64, Int1}] = CallByName TotallyNotJson.189 List.464 List.678; - let List.675 : U8 = 1i64; - let List.676 : U8 = GetTagId List.670; - let List.677 : Int1 = lowlevel Eq List.675 List.676; - if List.677 then - let List.468 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.670; - let List.673 : U64 = 1i64; - let List.672 : U64 = CallByName Num.51 List.466 List.673; - jump List.667 List.463 List.468 List.465 List.672 List.467; + joinpoint List.675 List.471 List.472 List.473 List.474 List.475: + let List.677 : Int1 = CallByName Num.22 List.474 List.475; + if List.677 then + let List.686 : U8 = CallByName List.66 List.471 List.474; + let List.678 : [C {U64, Int1}, C {U64, Int1}] = CallByName TotallyNotJson.189 List.472 List.686; + 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.476 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.678; + let List.681 : U64 = 1i64; + let List.680 : U64 = CallByName Num.51 List.474 List.681; + jump List.675 List.471 List.476 List.473 List.680 List.475; else - dec List.463; - let List.469 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.670; - let List.674 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) List.469; - ret List.674; + dec List.471; + let List.477 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.678; + let List.682 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) List.477; + ret List.682; else - dec List.463; - let List.668 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.464; - ret List.668; + dec List.471; + let List.676 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.472; + ret List.676; in - jump List.667 #Derived_gen.14 #Derived_gen.15 #Derived_gen.16 #Derived_gen.17 #Derived_gen.18; - -procedure List.86 (#Derived_gen.30, #Derived_gen.31, #Derived_gen.32, #Derived_gen.33, #Derived_gen.34): - joinpoint List.589 List.149 List.150 List.151 List.152 List.153: - let List.591 : Int1 = CallByName Num.22 List.152 List.153; - if List.591 then - let List.595 : U8 = CallByName List.66 List.149 List.152; - let List.154 : List U8 = CallByName TotallyNotJson.215 List.150 List.595; - let List.594 : U64 = 1i64; - let List.593 : U64 = CallByName Num.51 List.152 List.594; - jump List.589 List.149 List.154 List.151 List.593 List.153; + jump List.675 #Derived_gen.14 #Derived_gen.15 #Derived_gen.16 #Derived_gen.17 #Derived_gen.18; + +procedure List.88 (#Derived_gen.20, #Derived_gen.21, #Derived_gen.22, #Derived_gen.23, #Derived_gen.24): + joinpoint List.585 List.157 List.158 List.159 List.160 List.161: + let List.587 : Int1 = CallByName Num.22 List.160 List.161; + if List.587 then + let List.591 : {Str, Str} = CallByName List.66 List.157 List.160; + inc List.591; + let List.162 : {List U8, U64} = CallByName TotallyNotJson.237 List.158 List.591 List.159; + let List.590 : U64 = 1i64; + let List.589 : U64 = CallByName Num.51 List.160 List.590; + jump List.585 List.157 List.162 List.159 List.589 List.161; else - dec List.149; - ret List.150; + dec List.157; + ret List.158; in - jump List.589 #Derived_gen.30 #Derived_gen.31 #Derived_gen.32 #Derived_gen.33 #Derived_gen.34; - -procedure List.86 (#Derived_gen.35, #Derived_gen.36, #Derived_gen.37, #Derived_gen.38, #Derived_gen.39): - joinpoint List.577 List.149 List.150 List.151 List.152 List.153: - let List.579 : Int1 = CallByName Num.22 List.152 List.153; - if List.579 then - let List.583 : {Str, Str} = CallByName List.66 List.149 List.152; - inc List.583; - let List.154 : {List U8, U64} = CallByName TotallyNotJson.237 List.150 List.583 List.151; - let List.582 : U64 = 1i64; - let List.581 : U64 = CallByName Num.51 List.152 List.582; - jump List.577 List.149 List.154 List.151 List.581 List.153; + jump List.585 #Derived_gen.20 #Derived_gen.21 #Derived_gen.22 #Derived_gen.23 #Derived_gen.24; + +procedure List.88 (#Derived_gen.35, #Derived_gen.36, #Derived_gen.37, #Derived_gen.38, #Derived_gen.39): + joinpoint List.597 List.157 List.158 List.159 List.160 List.161: + let List.599 : Int1 = CallByName Num.22 List.160 List.161; + if List.599 then + let List.603 : U8 = CallByName List.66 List.157 List.160; + let List.162 : List U8 = CallByName TotallyNotJson.215 List.158 List.603; + let List.602 : U64 = 1i64; + let List.601 : U64 = CallByName Num.51 List.160 List.602; + jump List.597 List.157 List.162 List.159 List.601 List.161; else - dec List.149; - ret List.150; + dec List.157; + ret List.158; in - jump List.577 #Derived_gen.35 #Derived_gen.36 #Derived_gen.37 #Derived_gen.38 #Derived_gen.39; + jump List.597 #Derived_gen.35 #Derived_gen.36 #Derived_gen.37 #Derived_gen.38 #Derived_gen.39; -procedure List.97 (List.460, List.461, List.462): - let List.665 : U64 = 0i64; - let List.666 : U64 = CallByName List.6 List.460; - let List.664 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.80 List.460 List.461 List.462 List.665 List.666; - ret List.664; +procedure List.99 (List.468, List.469, List.470): + let List.673 : U64 = 0i64; + let List.674 : U64 = CallByName List.6 List.468; + let List.672 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.80 List.468 List.469 List.470 List.673 List.674; + ret List.672; procedure Num.127 (#Attr.2): let Num.296 : U8 = lowlevel NumIntCast #Attr.2; @@ -1303,7 +1303,7 @@ procedure TotallyNotJson.95 (TotallyNotJson.829): dec TotallyNotJson.1492; ret TotallyNotJson.1491; -procedure TotallyNotJson.96 (#Derived_gen.29): +procedure TotallyNotJson.96 (#Derived_gen.34): joinpoint TotallyNotJson.1499 TotallyNotJson.1168: let TotallyNotJson.834 : List Str = StructAtIndex 0 TotallyNotJson.1168; let TotallyNotJson.833 : List Str = StructAtIndex 1 TotallyNotJson.1168; @@ -1341,7 +1341,7 @@ procedure TotallyNotJson.96 (#Derived_gen.29): let TotallyNotJson.1500 : {List Str, List Str} = Struct {TotallyNotJson.834, TotallyNotJson.833}; ret TotallyNotJson.1500; in - jump TotallyNotJson.1499 #Derived_gen.29; + jump TotallyNotJson.1499 #Derived_gen.34; procedure TotallyNotJson.97 (TotallyNotJson.837): let TotallyNotJson.838 : List Str = CallByName Str.55 TotallyNotJson.837; diff --git a/crates/compiler/test_mono/generated/encode_derived_string.txt b/crates/compiler/test_mono/generated/encode_derived_string.txt index 784857fc8d3..98bb86a7d4c 100644 --- a/crates/compiler/test_mono/generated/encode_derived_string.txt +++ b/crates/compiler/test_mono/generated/encode_derived_string.txt @@ -15,123 +15,123 @@ procedure Encode.26 (Encode.105, Encode.106): let Encode.108 : List U8 = CallByName Encode.24 Encode.109 Encode.110 Encode.106; ret Encode.108; -procedure List.18 (List.146, List.147, List.148): - let List.559 : U64 = 0i64; - let List.560 : U64 = CallByName List.6 List.146; - let List.558 : List U8 = CallByName List.86 List.146 List.147 List.148 List.559 List.560; - ret List.558; - -procedure List.26 (List.173, List.174, List.175): - let List.585 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.97 List.173 List.174 List.175; - let List.588 : U8 = 1i64; - let List.589 : U8 = GetTagId List.585; - let List.590 : Int1 = lowlevel Eq List.588 List.589; - if List.590 then - let List.176 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.585; - ret List.176; +procedure List.18 (List.154, List.155, List.156): + let List.567 : U64 = 0i64; + let List.568 : U64 = CallByName List.6 List.154; + let List.566 : List U8 = CallByName List.88 List.154 List.155 List.156 List.567 List.568; + ret List.566; + +procedure List.26 (List.181, List.182, List.183): + let List.593 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.99 List.181 List.182 List.183; + let List.596 : U8 = 1i64; + let List.597 : U8 = GetTagId List.593; + let List.598 : Int1 = lowlevel Eq List.596 List.597; + if List.598 then + let List.184 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.593; + ret List.184; else - let List.177 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.585; - ret List.177; - -procedure List.49 (List.392, List.393): - let List.577 : U64 = StructAtIndex 0 List.393; - let List.578 : U64 = 0i64; - let List.575 : Int1 = CallByName Bool.11 List.577 List.578; - if List.575 then - dec List.392; - let List.576 : List U8 = Array []; - ret List.576; + let List.185 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.593; + ret List.185; + +procedure List.49 (List.400, List.401): + let List.585 : U64 = StructAtIndex 0 List.401; + let List.586 : U64 = 0i64; + let List.583 : Int1 = CallByName Bool.11 List.585 List.586; + if List.583 then + dec List.400; + let List.584 : List U8 = Array []; + ret List.584; else - let List.572 : U64 = StructAtIndex 1 List.393; - let List.573 : U64 = StructAtIndex 0 List.393; - let List.571 : List U8 = CallByName List.72 List.392 List.572 List.573; - ret List.571; - -procedure List.52 (List.407, List.408): - let List.409 : U64 = CallByName List.6 List.407; - joinpoint List.583 List.410: - let List.581 : U64 = 0i64; - let List.580 : {U64, U64} = Struct {List.410, List.581}; - inc List.407; - let List.411 : List U8 = CallByName List.49 List.407 List.580; - let List.579 : U64 = CallByName Num.75 List.409 List.410; - let List.570 : {U64, U64} = Struct {List.579, List.410}; - let List.412 : List U8 = CallByName List.49 List.407 List.570; - let List.569 : {List U8, List U8} = Struct {List.411, List.412}; - ret List.569; + let List.580 : U64 = StructAtIndex 1 List.401; + let List.581 : U64 = StructAtIndex 0 List.401; + let List.579 : List U8 = CallByName List.72 List.400 List.580 List.581; + ret List.579; + +procedure List.52 (List.415, List.416): + let List.417 : U64 = CallByName List.6 List.415; + joinpoint List.591 List.418: + let List.589 : U64 = 0i64; + let List.588 : {U64, U64} = Struct {List.418, List.589}; + inc List.415; + let List.419 : List U8 = CallByName List.49 List.415 List.588; + let List.587 : U64 = CallByName Num.75 List.417 List.418; + let List.578 : {U64, U64} = Struct {List.587, List.418}; + let List.420 : List U8 = CallByName List.49 List.415 List.578; + let List.577 : {List U8, List U8} = Struct {List.419, List.420}; + ret List.577; in - let List.584 : Int1 = CallByName Num.24 List.409 List.408; - if List.584 then - jump List.583 List.408; + let List.592 : Int1 = CallByName Num.24 List.417 List.416; + if List.592 then + jump List.591 List.416; else - jump List.583 List.409; + jump List.591 List.417; procedure List.6 (#Attr.2): - let List.557 : U64 = lowlevel ListLen #Attr.2; - ret List.557; + let List.565 : U64 = lowlevel ListLen #Attr.2; + ret List.565; procedure List.66 (#Attr.2, #Attr.3): - let List.568 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.568; + let List.576 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.576; procedure List.68 (#Attr.2): - let List.555 : List U8 = lowlevel ListWithCapacity #Attr.2; - ret List.555; + let List.563 : List U8 = lowlevel ListWithCapacity #Attr.2; + ret List.563; procedure List.72 (#Attr.2, #Attr.3, #Attr.4): - let List.574 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.574; + let List.582 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; + ret List.582; procedure List.8 (#Attr.2, #Attr.3): - let List.553 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.553; + let List.561 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.561; procedure List.80 (#Derived_gen.8, #Derived_gen.9, #Derived_gen.10, #Derived_gen.11, #Derived_gen.12): - joinpoint List.594 List.463 List.464 List.465 List.466 List.467: - let List.596 : Int1 = CallByName Num.22 List.466 List.467; - if List.596 then - let List.605 : U8 = CallByName List.66 List.463 List.466; - let List.597 : [C {U64, Int1}, C {U64, Int1}] = CallByName TotallyNotJson.189 List.464 List.605; - let List.602 : U8 = 1i64; - let List.603 : U8 = GetTagId List.597; - let List.604 : Int1 = lowlevel Eq List.602 List.603; - if List.604 then - let List.468 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.597; - let List.600 : U64 = 1i64; - let List.599 : U64 = CallByName Num.51 List.466 List.600; - jump List.594 List.463 List.468 List.465 List.599 List.467; + joinpoint List.602 List.471 List.472 List.473 List.474 List.475: + let List.604 : Int1 = CallByName Num.22 List.474 List.475; + if List.604 then + let List.613 : U8 = CallByName List.66 List.471 List.474; + let List.605 : [C {U64, Int1}, C {U64, Int1}] = CallByName TotallyNotJson.189 List.472 List.613; + let List.610 : U8 = 1i64; + let List.611 : U8 = GetTagId List.605; + let List.612 : Int1 = lowlevel Eq List.610 List.611; + if List.612 then + let List.476 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.605; + let List.608 : U64 = 1i64; + let List.607 : U64 = CallByName Num.51 List.474 List.608; + jump List.602 List.471 List.476 List.473 List.607 List.475; else - dec List.463; - let List.469 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.597; - let List.601 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) List.469; - ret List.601; + dec List.471; + let List.477 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.605; + let List.609 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) List.477; + ret List.609; else - dec List.463; - let List.595 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.464; - ret List.595; + dec List.471; + let List.603 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.472; + ret List.603; in - jump List.594 #Derived_gen.8 #Derived_gen.9 #Derived_gen.10 #Derived_gen.11 #Derived_gen.12; - -procedure List.86 (#Derived_gen.3, #Derived_gen.4, #Derived_gen.5, #Derived_gen.6, #Derived_gen.7): - joinpoint List.561 List.149 List.150 List.151 List.152 List.153: - let List.563 : Int1 = CallByName Num.22 List.152 List.153; - if List.563 then - let List.567 : U8 = CallByName List.66 List.149 List.152; - let List.154 : List U8 = CallByName TotallyNotJson.215 List.150 List.567; - let List.566 : U64 = 1i64; - let List.565 : U64 = CallByName Num.51 List.152 List.566; - jump List.561 List.149 List.154 List.151 List.565 List.153; + jump List.602 #Derived_gen.8 #Derived_gen.9 #Derived_gen.10 #Derived_gen.11 #Derived_gen.12; + +procedure List.88 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2, #Derived_gen.3, #Derived_gen.4): + joinpoint List.569 List.157 List.158 List.159 List.160 List.161: + let List.571 : Int1 = CallByName Num.22 List.160 List.161; + if List.571 then + let List.575 : U8 = CallByName List.66 List.157 List.160; + let List.162 : List U8 = CallByName TotallyNotJson.215 List.158 List.575; + let List.574 : U64 = 1i64; + let List.573 : U64 = CallByName Num.51 List.160 List.574; + jump List.569 List.157 List.162 List.159 List.573 List.161; else - dec List.149; - ret List.150; + dec List.157; + ret List.158; in - jump List.561 #Derived_gen.3 #Derived_gen.4 #Derived_gen.5 #Derived_gen.6 #Derived_gen.7; + jump List.569 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; -procedure List.97 (List.460, List.461, List.462): - let List.592 : U64 = 0i64; - let List.593 : U64 = CallByName List.6 List.460; - let List.591 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.80 List.460 List.461 List.462 List.592 List.593; - ret List.591; +procedure List.99 (List.468, List.469, List.470): + let List.600 : U64 = 0i64; + let List.601 : U64 = CallByName List.6 List.468; + let List.599 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.80 List.468 List.469 List.470 List.600 List.601; + ret List.599; procedure Num.19 (#Attr.2, #Attr.3): let Num.292 : U64 = lowlevel NumAdd #Attr.2 #Attr.3; 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 a84c46cc32e..ebbb5bf8b4c 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 @@ -44,167 +44,167 @@ procedure Encode.26 (Encode.105, Encode.106): let Encode.108 : List U8 = CallByName Encode.24 Encode.109 Encode.110 Encode.106; ret Encode.108; -procedure List.18 (List.146, List.147, List.148): - let List.573 : U64 = 0i64; - let List.574 : U64 = CallByName List.6 List.146; - let List.572 : {List U8, U64} = CallByName List.86 List.146 List.147 List.148 List.573 List.574; - ret List.572; - -procedure List.18 (List.146, List.147, List.148): - let List.585 : U64 = 0i64; - let List.586 : U64 = CallByName List.6 List.146; - let List.584 : List U8 = CallByName List.86 List.146 List.147 List.148 List.585 List.586; - ret List.584; - -procedure List.26 (List.173, List.174, List.175): - let List.626 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.97 List.173 List.174 List.175; - let List.629 : U8 = 1i64; - let List.630 : U8 = GetTagId List.626; - let List.631 : Int1 = lowlevel Eq List.629 List.630; - if List.631 then - let List.176 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.626; - ret List.176; +procedure List.18 (List.154, List.155, List.156): + let List.581 : U64 = 0i64; + let List.582 : U64 = CallByName List.6 List.154; + let List.580 : {List U8, U64} = CallByName List.88 List.154 List.155 List.156 List.581 List.582; + ret List.580; + +procedure List.18 (List.154, List.155, List.156): + let List.593 : U64 = 0i64; + let List.594 : U64 = CallByName List.6 List.154; + let List.592 : List U8 = CallByName List.88 List.154 List.155 List.156 List.593 List.594; + ret List.592; + +procedure List.26 (List.181, List.182, List.183): + let List.634 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.99 List.181 List.182 List.183; + let List.637 : U8 = 1i64; + let List.638 : U8 = GetTagId List.634; + let List.639 : Int1 = lowlevel Eq List.637 List.638; + if List.639 then + let List.184 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.634; + ret List.184; else - let List.177 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.626; - ret List.177; - -procedure List.4 (List.117, List.118): - let List.571 : U64 = 1i64; - let List.570 : List U8 = CallByName List.70 List.117 List.571; - let List.569 : List U8 = CallByName List.71 List.570 List.118; - ret List.569; - -procedure List.49 (List.392, List.393): - let List.618 : U64 = StructAtIndex 0 List.393; - let List.619 : U64 = 0i64; - let List.616 : Int1 = CallByName Bool.11 List.618 List.619; - if List.616 then - dec List.392; - let List.617 : List U8 = Array []; - ret List.617; + let List.185 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.634; + ret List.185; + +procedure List.4 (List.119, List.120): + let List.579 : U64 = 1i64; + let List.578 : List U8 = CallByName List.70 List.119 List.579; + let List.577 : List U8 = CallByName List.71 List.578 List.120; + ret List.577; + +procedure List.49 (List.400, List.401): + let List.626 : U64 = StructAtIndex 0 List.401; + let List.627 : U64 = 0i64; + let List.624 : Int1 = CallByName Bool.11 List.626 List.627; + if List.624 then + dec List.400; + let List.625 : List U8 = Array []; + ret List.625; else - let List.613 : U64 = StructAtIndex 1 List.393; - let List.614 : U64 = StructAtIndex 0 List.393; - let List.612 : List U8 = CallByName List.72 List.392 List.613 List.614; - ret List.612; - -procedure List.52 (List.407, List.408): - let List.409 : U64 = CallByName List.6 List.407; - joinpoint List.624 List.410: - let List.622 : U64 = 0i64; - let List.621 : {U64, U64} = Struct {List.410, List.622}; - inc List.407; - let List.411 : List U8 = CallByName List.49 List.407 List.621; - let List.620 : U64 = CallByName Num.75 List.409 List.410; - let List.611 : {U64, U64} = Struct {List.620, List.410}; - let List.412 : List U8 = CallByName List.49 List.407 List.611; - let List.610 : {List U8, List U8} = Struct {List.411, List.412}; - ret List.610; + let List.621 : U64 = StructAtIndex 1 List.401; + let List.622 : U64 = StructAtIndex 0 List.401; + let List.620 : List U8 = CallByName List.72 List.400 List.621 List.622; + ret List.620; + +procedure List.52 (List.415, List.416): + let List.417 : U64 = CallByName List.6 List.415; + joinpoint List.632 List.418: + let List.630 : U64 = 0i64; + let List.629 : {U64, U64} = Struct {List.418, List.630}; + inc List.415; + let List.419 : List U8 = CallByName List.49 List.415 List.629; + let List.628 : U64 = CallByName Num.75 List.417 List.418; + let List.619 : {U64, U64} = Struct {List.628, List.418}; + let List.420 : List U8 = CallByName List.49 List.415 List.619; + let List.618 : {List U8, List U8} = Struct {List.419, List.420}; + ret List.618; in - let List.625 : Int1 = CallByName Num.24 List.409 List.408; - if List.625 then - jump List.624 List.408; + let List.633 : Int1 = CallByName Num.24 List.417 List.416; + if List.633 then + jump List.632 List.416; else - jump List.624 List.409; + jump List.632 List.417; procedure List.6 (#Attr.2): - let List.596 : U64 = lowlevel ListLen #Attr.2; - ret List.596; + let List.604 : U64 = lowlevel ListLen #Attr.2; + ret List.604; procedure List.6 (#Attr.2): - let List.598 : U64 = lowlevel ListLen #Attr.2; - ret List.598; + let List.606 : U64 = lowlevel ListLen #Attr.2; + ret List.606; procedure List.66 (#Attr.2, #Attr.3): - let List.582 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.582; + let List.590 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.590; procedure List.66 (#Attr.2, #Attr.3): - let List.594 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.594; + let List.602 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.602; procedure List.68 (#Attr.2): - let List.609 : List U8 = lowlevel ListWithCapacity #Attr.2; - ret List.609; + let List.617 : List U8 = lowlevel ListWithCapacity #Attr.2; + ret List.617; procedure List.70 (#Attr.2, #Attr.3): - let List.550 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.550; + let List.558 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.558; procedure List.71 (#Attr.2, #Attr.3): - let List.548 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.548; + let List.556 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.556; procedure List.72 (#Attr.2, #Attr.3, #Attr.4): - let List.615 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.615; + let List.623 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; + ret List.623; procedure List.8 (#Attr.2, #Attr.3): - let List.607 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.607; - -procedure List.80 (#Derived_gen.16, #Derived_gen.17, #Derived_gen.18, #Derived_gen.19, #Derived_gen.20): - joinpoint List.635 List.463 List.464 List.465 List.466 List.467: - let List.637 : Int1 = CallByName Num.22 List.466 List.467; - if List.637 then - let List.646 : U8 = CallByName List.66 List.463 List.466; - let List.638 : [C {U64, Int1}, C {U64, Int1}] = CallByName TotallyNotJson.189 List.464 List.646; - let List.643 : U8 = 1i64; - let List.644 : U8 = GetTagId List.638; - let List.645 : Int1 = lowlevel Eq List.643 List.644; - if List.645 then - let List.468 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.638; - let List.641 : U64 = 1i64; - let List.640 : U64 = CallByName Num.51 List.466 List.641; - jump List.635 List.463 List.468 List.465 List.640 List.467; + let List.615 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.615; + +procedure List.80 (#Derived_gen.26, #Derived_gen.27, #Derived_gen.28, #Derived_gen.29, #Derived_gen.30): + joinpoint List.643 List.471 List.472 List.473 List.474 List.475: + let List.645 : Int1 = CallByName Num.22 List.474 List.475; + if List.645 then + let List.654 : U8 = CallByName List.66 List.471 List.474; + let List.646 : [C {U64, Int1}, C {U64, Int1}] = CallByName TotallyNotJson.189 List.472 List.654; + let List.651 : U8 = 1i64; + let List.652 : U8 = GetTagId List.646; + let List.653 : Int1 = lowlevel Eq List.651 List.652; + if List.653 then + let List.476 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.646; + let List.649 : U64 = 1i64; + let List.648 : U64 = CallByName Num.51 List.474 List.649; + jump List.643 List.471 List.476 List.473 List.648 List.475; else - dec List.463; - let List.469 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.638; - let List.642 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) List.469; - ret List.642; + dec List.471; + let List.477 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.646; + let List.650 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) List.477; + ret List.650; else - dec List.463; - let List.636 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.464; - ret List.636; + dec List.471; + let List.644 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.472; + ret List.644; in - jump List.635 #Derived_gen.16 #Derived_gen.17 #Derived_gen.18 #Derived_gen.19 #Derived_gen.20; - -procedure List.86 (#Derived_gen.21, #Derived_gen.22, #Derived_gen.23, #Derived_gen.24, #Derived_gen.25): - joinpoint List.587 List.149 List.150 List.151 List.152 List.153: - let List.589 : Int1 = CallByName Num.22 List.152 List.153; - if List.589 then - let List.593 : U8 = CallByName List.66 List.149 List.152; - let List.154 : List U8 = CallByName TotallyNotJson.215 List.150 List.593; - let List.592 : U64 = 1i64; - let List.591 : U64 = CallByName Num.51 List.152 List.592; - jump List.587 List.149 List.154 List.151 List.591 List.153; + jump List.643 #Derived_gen.26 #Derived_gen.27 #Derived_gen.28 #Derived_gen.29 #Derived_gen.30; + +procedure List.88 (#Derived_gen.10, #Derived_gen.11, #Derived_gen.12, #Derived_gen.13, #Derived_gen.14): + joinpoint List.583 List.157 List.158 List.159 List.160 List.161: + let List.585 : Int1 = CallByName Num.22 List.160 List.161; + if List.585 then + let List.589 : Str = CallByName List.66 List.157 List.160; + inc List.589; + let List.162 : {List U8, U64} = CallByName TotallyNotJson.267 List.158 List.589 List.159; + let List.588 : U64 = 1i64; + let List.587 : U64 = CallByName Num.51 List.160 List.588; + jump List.583 List.157 List.162 List.159 List.587 List.161; else - dec List.149; - ret List.150; + dec List.157; + ret List.158; in - jump List.587 #Derived_gen.21 #Derived_gen.22 #Derived_gen.23 #Derived_gen.24 #Derived_gen.25; - -procedure List.86 (#Derived_gen.26, #Derived_gen.27, #Derived_gen.28, #Derived_gen.29, #Derived_gen.30): - joinpoint List.575 List.149 List.150 List.151 List.152 List.153: - let List.577 : Int1 = CallByName Num.22 List.152 List.153; - if List.577 then - let List.581 : Str = CallByName List.66 List.149 List.152; - inc List.581; - let List.154 : {List U8, U64} = CallByName TotallyNotJson.267 List.150 List.581 List.151; - let List.580 : U64 = 1i64; - let List.579 : U64 = CallByName Num.51 List.152 List.580; - jump List.575 List.149 List.154 List.151 List.579 List.153; + jump List.583 #Derived_gen.10 #Derived_gen.11 #Derived_gen.12 #Derived_gen.13 #Derived_gen.14; + +procedure List.88 (#Derived_gen.21, #Derived_gen.22, #Derived_gen.23, #Derived_gen.24, #Derived_gen.25): + joinpoint List.595 List.157 List.158 List.159 List.160 List.161: + let List.597 : Int1 = CallByName Num.22 List.160 List.161; + if List.597 then + let List.601 : U8 = CallByName List.66 List.157 List.160; + let List.162 : List U8 = CallByName TotallyNotJson.215 List.158 List.601; + let List.600 : U64 = 1i64; + let List.599 : U64 = CallByName Num.51 List.160 List.600; + jump List.595 List.157 List.162 List.159 List.599 List.161; else - dec List.149; - ret List.150; + dec List.157; + ret List.158; in - jump List.575 #Derived_gen.26 #Derived_gen.27 #Derived_gen.28 #Derived_gen.29 #Derived_gen.30; + jump List.595 #Derived_gen.21 #Derived_gen.22 #Derived_gen.23 #Derived_gen.24 #Derived_gen.25; -procedure List.97 (List.460, List.461, List.462): - let List.633 : U64 = 0i64; - let List.634 : U64 = CallByName List.6 List.460; - let List.632 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.80 List.460 List.461 List.462 List.633 List.634; - ret List.632; +procedure List.99 (List.468, List.469, List.470): + let List.641 : U64 = 0i64; + let List.642 : U64 = CallByName List.6 List.468; + let List.640 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.80 List.468 List.469 List.470 List.641 List.642; + ret List.640; procedure Num.127 (#Attr.2): let Num.298 : 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 90067dcbfa7..628bbe19403 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 @@ -47,167 +47,167 @@ procedure Encode.26 (Encode.105, Encode.106): let Encode.108 : List U8 = CallByName Encode.24 Encode.109 Encode.110 Encode.106; ret Encode.108; -procedure List.18 (List.146, List.147, List.148): - let List.573 : U64 = 0i64; - let List.574 : U64 = CallByName List.6 List.146; - let List.572 : {List U8, U64} = CallByName List.86 List.146 List.147 List.148 List.573 List.574; - ret List.572; - -procedure List.18 (List.146, List.147, List.148): - let List.585 : U64 = 0i64; - let List.586 : U64 = CallByName List.6 List.146; - let List.584 : List U8 = CallByName List.86 List.146 List.147 List.148 List.585 List.586; - ret List.584; - -procedure List.26 (List.173, List.174, List.175): - let List.626 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.97 List.173 List.174 List.175; - let List.629 : U8 = 1i64; - let List.630 : U8 = GetTagId List.626; - let List.631 : Int1 = lowlevel Eq List.629 List.630; - if List.631 then - let List.176 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.626; - ret List.176; +procedure List.18 (List.154, List.155, List.156): + let List.581 : U64 = 0i64; + let List.582 : U64 = CallByName List.6 List.154; + let List.580 : {List U8, U64} = CallByName List.88 List.154 List.155 List.156 List.581 List.582; + ret List.580; + +procedure List.18 (List.154, List.155, List.156): + let List.593 : U64 = 0i64; + let List.594 : U64 = CallByName List.6 List.154; + let List.592 : List U8 = CallByName List.88 List.154 List.155 List.156 List.593 List.594; + ret List.592; + +procedure List.26 (List.181, List.182, List.183): + let List.634 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.99 List.181 List.182 List.183; + let List.637 : U8 = 1i64; + let List.638 : U8 = GetTagId List.634; + let List.639 : Int1 = lowlevel Eq List.637 List.638; + if List.639 then + let List.184 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.634; + ret List.184; else - let List.177 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.626; - ret List.177; - -procedure List.4 (List.117, List.118): - let List.571 : U64 = 1i64; - let List.570 : List U8 = CallByName List.70 List.117 List.571; - let List.569 : List U8 = CallByName List.71 List.570 List.118; - ret List.569; - -procedure List.49 (List.392, List.393): - let List.618 : U64 = StructAtIndex 0 List.393; - let List.619 : U64 = 0i64; - let List.616 : Int1 = CallByName Bool.11 List.618 List.619; - if List.616 then - dec List.392; - let List.617 : List U8 = Array []; - ret List.617; + let List.185 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.634; + ret List.185; + +procedure List.4 (List.119, List.120): + let List.579 : U64 = 1i64; + let List.578 : List U8 = CallByName List.70 List.119 List.579; + let List.577 : List U8 = CallByName List.71 List.578 List.120; + ret List.577; + +procedure List.49 (List.400, List.401): + let List.626 : U64 = StructAtIndex 0 List.401; + let List.627 : U64 = 0i64; + let List.624 : Int1 = CallByName Bool.11 List.626 List.627; + if List.624 then + dec List.400; + let List.625 : List U8 = Array []; + ret List.625; else - let List.613 : U64 = StructAtIndex 1 List.393; - let List.614 : U64 = StructAtIndex 0 List.393; - let List.612 : List U8 = CallByName List.72 List.392 List.613 List.614; - ret List.612; - -procedure List.52 (List.407, List.408): - let List.409 : U64 = CallByName List.6 List.407; - joinpoint List.624 List.410: - let List.622 : U64 = 0i64; - let List.621 : {U64, U64} = Struct {List.410, List.622}; - inc List.407; - let List.411 : List U8 = CallByName List.49 List.407 List.621; - let List.620 : U64 = CallByName Num.75 List.409 List.410; - let List.611 : {U64, U64} = Struct {List.620, List.410}; - let List.412 : List U8 = CallByName List.49 List.407 List.611; - let List.610 : {List U8, List U8} = Struct {List.411, List.412}; - ret List.610; + let List.621 : U64 = StructAtIndex 1 List.401; + let List.622 : U64 = StructAtIndex 0 List.401; + let List.620 : List U8 = CallByName List.72 List.400 List.621 List.622; + ret List.620; + +procedure List.52 (List.415, List.416): + let List.417 : U64 = CallByName List.6 List.415; + joinpoint List.632 List.418: + let List.630 : U64 = 0i64; + let List.629 : {U64, U64} = Struct {List.418, List.630}; + inc List.415; + let List.419 : List U8 = CallByName List.49 List.415 List.629; + let List.628 : U64 = CallByName Num.75 List.417 List.418; + let List.619 : {U64, U64} = Struct {List.628, List.418}; + let List.420 : List U8 = CallByName List.49 List.415 List.619; + let List.618 : {List U8, List U8} = Struct {List.419, List.420}; + ret List.618; in - let List.625 : Int1 = CallByName Num.24 List.409 List.408; - if List.625 then - jump List.624 List.408; + let List.633 : Int1 = CallByName Num.24 List.417 List.416; + if List.633 then + jump List.632 List.416; else - jump List.624 List.409; + jump List.632 List.417; procedure List.6 (#Attr.2): - let List.596 : U64 = lowlevel ListLen #Attr.2; - ret List.596; + let List.604 : U64 = lowlevel ListLen #Attr.2; + ret List.604; procedure List.6 (#Attr.2): - let List.598 : U64 = lowlevel ListLen #Attr.2; - ret List.598; + let List.606 : U64 = lowlevel ListLen #Attr.2; + ret List.606; procedure List.66 (#Attr.2, #Attr.3): - let List.582 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.582; + let List.590 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.590; procedure List.66 (#Attr.2, #Attr.3): - let List.594 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.594; + let List.602 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.602; procedure List.68 (#Attr.2): - let List.609 : List U8 = lowlevel ListWithCapacity #Attr.2; - ret List.609; + let List.617 : List U8 = lowlevel ListWithCapacity #Attr.2; + ret List.617; procedure List.70 (#Attr.2, #Attr.3): - let List.550 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.550; + let List.558 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.558; procedure List.71 (#Attr.2, #Attr.3): - let List.548 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.548; + let List.556 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.556; procedure List.72 (#Attr.2, #Attr.3, #Attr.4): - let List.615 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.615; + let List.623 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; + ret List.623; procedure List.8 (#Attr.2, #Attr.3): - let List.607 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.607; - -procedure List.80 (#Derived_gen.14, #Derived_gen.15, #Derived_gen.16, #Derived_gen.17, #Derived_gen.18): - joinpoint List.635 List.463 List.464 List.465 List.466 List.467: - let List.637 : Int1 = CallByName Num.22 List.466 List.467; - if List.637 then - let List.646 : U8 = CallByName List.66 List.463 List.466; - let List.638 : [C {U64, Int1}, C {U64, Int1}] = CallByName TotallyNotJson.189 List.464 List.646; - let List.643 : U8 = 1i64; - let List.644 : U8 = GetTagId List.638; - let List.645 : Int1 = lowlevel Eq List.643 List.644; - if List.645 then - let List.468 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.638; - let List.641 : U64 = 1i64; - let List.640 : U64 = CallByName Num.51 List.466 List.641; - jump List.635 List.463 List.468 List.465 List.640 List.467; + let List.615 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.615; + +procedure List.80 (#Derived_gen.19, #Derived_gen.20, #Derived_gen.21, #Derived_gen.22, #Derived_gen.23): + joinpoint List.643 List.471 List.472 List.473 List.474 List.475: + let List.645 : Int1 = CallByName Num.22 List.474 List.475; + if List.645 then + let List.654 : U8 = CallByName List.66 List.471 List.474; + let List.646 : [C {U64, Int1}, C {U64, Int1}] = CallByName TotallyNotJson.189 List.472 List.654; + let List.651 : U8 = 1i64; + let List.652 : U8 = GetTagId List.646; + let List.653 : Int1 = lowlevel Eq List.651 List.652; + if List.653 then + let List.476 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.646; + let List.649 : U64 = 1i64; + let List.648 : U64 = CallByName Num.51 List.474 List.649; + jump List.643 List.471 List.476 List.473 List.648 List.475; else - dec List.463; - let List.469 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.638; - let List.642 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) List.469; - ret List.642; + dec List.471; + let List.477 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.646; + let List.650 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) List.477; + ret List.650; else - dec List.463; - let List.636 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.464; - ret List.636; + dec List.471; + let List.644 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.472; + ret List.644; in - jump List.635 #Derived_gen.14 #Derived_gen.15 #Derived_gen.16 #Derived_gen.17 #Derived_gen.18; - -procedure List.86 (#Derived_gen.19, #Derived_gen.20, #Derived_gen.21, #Derived_gen.22, #Derived_gen.23): - joinpoint List.575 List.149 List.150 List.151 List.152 List.153: - let List.577 : Int1 = CallByName Num.22 List.152 List.153; - if List.577 then - let List.581 : Str = CallByName List.66 List.149 List.152; - inc List.581; - let List.154 : {List U8, U64} = CallByName TotallyNotJson.267 List.150 List.581 List.151; - let List.580 : U64 = 1i64; - let List.579 : U64 = CallByName Num.51 List.152 List.580; - jump List.575 List.149 List.154 List.151 List.579 List.153; + jump List.643 #Derived_gen.19 #Derived_gen.20 #Derived_gen.21 #Derived_gen.22 #Derived_gen.23; + +procedure List.88 (#Derived_gen.11, #Derived_gen.12, #Derived_gen.13, #Derived_gen.14, #Derived_gen.15): + joinpoint List.595 List.157 List.158 List.159 List.160 List.161: + let List.597 : Int1 = CallByName Num.22 List.160 List.161; + if List.597 then + let List.601 : U8 = CallByName List.66 List.157 List.160; + let List.162 : List U8 = CallByName TotallyNotJson.215 List.158 List.601; + let List.600 : U64 = 1i64; + let List.599 : U64 = CallByName Num.51 List.160 List.600; + jump List.595 List.157 List.162 List.159 List.599 List.161; else - dec List.149; - ret List.150; + dec List.157; + ret List.158; in - jump List.575 #Derived_gen.19 #Derived_gen.20 #Derived_gen.21 #Derived_gen.22 #Derived_gen.23; - -procedure List.86 (#Derived_gen.27, #Derived_gen.28, #Derived_gen.29, #Derived_gen.30, #Derived_gen.31): - joinpoint List.587 List.149 List.150 List.151 List.152 List.153: - let List.589 : Int1 = CallByName Num.22 List.152 List.153; - if List.589 then - let List.593 : U8 = CallByName List.66 List.149 List.152; - let List.154 : List U8 = CallByName TotallyNotJson.215 List.150 List.593; - let List.592 : U64 = 1i64; - let List.591 : U64 = CallByName Num.51 List.152 List.592; - jump List.587 List.149 List.154 List.151 List.591 List.153; + jump List.595 #Derived_gen.11 #Derived_gen.12 #Derived_gen.13 #Derived_gen.14 #Derived_gen.15; + +procedure List.88 (#Derived_gen.27, #Derived_gen.28, #Derived_gen.29, #Derived_gen.30, #Derived_gen.31): + joinpoint List.583 List.157 List.158 List.159 List.160 List.161: + let List.585 : Int1 = CallByName Num.22 List.160 List.161; + if List.585 then + let List.589 : Str = CallByName List.66 List.157 List.160; + inc List.589; + let List.162 : {List U8, U64} = CallByName TotallyNotJson.267 List.158 List.589 List.159; + let List.588 : U64 = 1i64; + let List.587 : U64 = CallByName Num.51 List.160 List.588; + jump List.583 List.157 List.162 List.159 List.587 List.161; else - dec List.149; - ret List.150; + dec List.157; + ret List.158; in - jump List.587 #Derived_gen.27 #Derived_gen.28 #Derived_gen.29 #Derived_gen.30 #Derived_gen.31; + jump List.583 #Derived_gen.27 #Derived_gen.28 #Derived_gen.29 #Derived_gen.30 #Derived_gen.31; -procedure List.97 (List.460, List.461, List.462): - let List.633 : U64 = 0i64; - let List.634 : U64 = CallByName List.6 List.460; - let List.632 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.80 List.460 List.461 List.462 List.633 List.634; - ret List.632; +procedure List.99 (List.468, List.469, List.470): + let List.641 : U64 = 0i64; + let List.642 : U64 = CallByName List.6 List.468; + let List.640 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.80 List.468 List.469 List.470 List.641 List.642; + ret List.640; procedure Num.127 (#Attr.2): let Num.298 : U8 = lowlevel NumIntCast #Attr.2; diff --git a/crates/compiler/test_mono/generated/ir_int_add.txt b/crates/compiler/test_mono/generated/ir_int_add.txt index c975251debf..0a5abcf8e01 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.545 : U64 = lowlevel ListLen #Attr.2; - ret List.545; + let List.553 : U64 = lowlevel ListLen #Attr.2; + ret List.553; procedure Num.19 (#Attr.2, #Attr.3): let Num.293 : 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 f7f83e608a2..a3a0659c206 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,42 +6,42 @@ procedure Bool.2 (): let Bool.23 : Int1 = true; ret Bool.23; -procedure List.2 (List.101, List.102): - let List.559 : U64 = CallByName List.6 List.101; - let List.555 : Int1 = CallByName Num.22 List.102 List.559; - if List.555 then - let List.557 : I64 = CallByName List.66 List.101 List.102; - dec List.101; - let List.556 : [C {}, C I64] = TagId(1) List.557; - ret List.556; +procedure List.2 (List.103, List.104): + let List.567 : U64 = CallByName List.6 List.103; + let List.563 : Int1 = CallByName Num.22 List.104 List.567; + if List.563 then + let List.565 : I64 = CallByName List.66 List.103 List.104; + dec List.103; + let List.564 : [C {}, C I64] = TagId(1) List.565; + ret List.564; else - dec List.101; - let List.554 : {} = Struct {}; - let List.553 : [C {}, C I64] = TagId(0) List.554; - ret List.553; + dec List.103; + let List.562 : {} = Struct {}; + let List.561 : [C {}, C I64] = TagId(0) List.562; + ret List.561; procedure List.6 (#Attr.2): - let List.560 : U64 = lowlevel ListLen #Attr.2; - ret List.560; + let List.568 : U64 = lowlevel ListLen #Attr.2; + ret List.568; procedure List.66 (#Attr.2, #Attr.3): - let List.558 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.558; + let List.566 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.566; -procedure List.9 (List.307): - let List.552 : U64 = 0i64; - let List.545 : [C {}, C I64] = CallByName List.2 List.307 List.552; - let List.549 : U8 = 1i64; - let List.550 : U8 = GetTagId List.545; - let List.551 : Int1 = lowlevel Eq List.549 List.550; - if List.551 then - let List.308 : I64 = UnionAtIndex (Id 1) (Index 0) List.545; - let List.546 : [C Int1, C I64] = TagId(1) List.308; - ret List.546; +procedure List.9 (List.315): + let List.560 : U64 = 0i64; + let List.553 : [C {}, C I64] = CallByName List.2 List.315 List.560; + let List.557 : U8 = 1i64; + let List.558 : U8 = GetTagId List.553; + let List.559 : Int1 = lowlevel Eq List.557 List.558; + if List.559 then + let List.316 : I64 = UnionAtIndex (Id 1) (Index 0) List.553; + let List.554 : [C Int1, C I64] = TagId(1) List.316; + ret List.554; else - let List.548 : Int1 = true; - let List.547 : [C Int1, C I64] = TagId(0) List.548; - ret List.547; + let List.556 : Int1 = true; + let List.555 : [C Int1, C I64] = TagId(0) List.556; + ret List.555; procedure Num.22 (#Attr.2, #Attr.3): let Num.291 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/issue_4749.txt b/crates/compiler/test_mono/generated/issue_4749.txt index 429701638c0..09245badf75 100644 --- a/crates/compiler/test_mono/generated/issue_4749.txt +++ b/crates/compiler/test_mono/generated/issue_4749.txt @@ -64,127 +64,127 @@ procedure Decode.27 (Decode.107, Decode.108): let Decode.123 : [C [C List U8, C ], C Str] = TagId(0) Decode.124; ret Decode.123; -procedure List.1 (List.100): - let List.611 : U64 = CallByName List.6 List.100; - dec List.100; - let List.612 : U64 = 0i64; - let List.610 : Int1 = CallByName Bool.11 List.611 List.612; - ret List.610; - -procedure List.2 (List.101, List.102): - let List.594 : U64 = CallByName List.6 List.101; - let List.591 : Int1 = CallByName Num.22 List.102 List.594; - if List.591 then - let List.593 : U8 = CallByName List.66 List.101 List.102; - dec List.101; - let List.592 : [C {}, C U8] = TagId(1) List.593; - ret List.592; +procedure List.1 (List.102): + let List.619 : U64 = CallByName List.6 List.102; + dec List.102; + let List.620 : U64 = 0i64; + let List.618 : Int1 = CallByName Bool.11 List.619 List.620; + ret List.618; + +procedure List.2 (List.103, List.104): + let List.602 : U64 = CallByName List.6 List.103; + let List.599 : Int1 = CallByName Num.22 List.104 List.602; + if List.599 then + let List.601 : U8 = CallByName List.66 List.103 List.104; + dec List.103; + let List.600 : [C {}, C U8] = TagId(1) List.601; + ret List.600; else - dec List.101; - let List.590 : {} = Struct {}; - let List.589 : [C {}, C U8] = TagId(0) List.590; - ret List.589; - -procedure List.26 (List.173, List.174, List.175): - let List.613 : [C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64], C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64]] = CallByName List.97 List.173 List.174 List.175; - let List.616 : U8 = 1i64; - let List.617 : U8 = GetTagId List.613; - let List.618 : Int1 = lowlevel Eq List.616 List.617; - if List.618 then - let List.176 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = UnionAtIndex (Id 1) (Index 0) List.613; - ret List.176; + dec List.103; + let List.598 : {} = Struct {}; + let List.597 : [C {}, C U8] = TagId(0) List.598; + ret List.597; + +procedure List.26 (List.181, List.182, List.183): + let List.621 : [C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64], C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64]] = CallByName List.99 List.181 List.182 List.183; + let List.624 : U8 = 1i64; + let List.625 : U8 = GetTagId List.621; + let List.626 : Int1 = lowlevel Eq List.624 List.625; + if List.626 then + let List.184 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = UnionAtIndex (Id 1) (Index 0) List.621; + ret List.184; else - let List.177 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = UnionAtIndex (Id 0) (Index 0) List.613; - ret List.177; - -procedure List.38 (List.316, List.317): - let List.571 : U64 = CallByName List.6 List.316; - let List.318 : U64 = CallByName Num.77 List.571 List.317; - let List.570 : List U8 = CallByName List.43 List.316 List.318; - ret List.570; - -procedure List.4 (List.117, List.118): - let List.581 : U64 = 1i64; - let List.580 : List U8 = CallByName List.70 List.117 List.581; - let List.579 : List U8 = CallByName List.71 List.580 List.118; - ret List.579; - -procedure List.43 (List.314, List.315): - let List.561 : U64 = CallByName List.6 List.314; - let List.560 : U64 = CallByName Num.77 List.561 List.315; - let List.551 : {U64, U64} = Struct {List.315, List.560}; - let List.550 : List U8 = CallByName List.49 List.314 List.551; - ret List.550; - -procedure List.49 (List.392, List.393): - let List.607 : U64 = StructAtIndex 0 List.393; - let List.608 : U64 = 0i64; - let List.605 : Int1 = CallByName Bool.11 List.607 List.608; - if List.605 then - dec List.392; - let List.606 : List U8 = Array []; - ret List.606; + let List.185 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = UnionAtIndex (Id 0) (Index 0) List.621; + ret List.185; + +procedure List.38 (List.324, List.325): + let List.579 : U64 = CallByName List.6 List.324; + let List.326 : U64 = CallByName Num.77 List.579 List.325; + let List.578 : List U8 = CallByName List.43 List.324 List.326; + ret List.578; + +procedure List.4 (List.119, List.120): + let List.589 : U64 = 1i64; + let List.588 : List U8 = CallByName List.70 List.119 List.589; + let List.587 : List U8 = CallByName List.71 List.588 List.120; + ret List.587; + +procedure List.43 (List.322, List.323): + let List.569 : U64 = CallByName List.6 List.322; + let List.568 : U64 = CallByName Num.77 List.569 List.323; + let List.559 : {U64, U64} = Struct {List.323, List.568}; + let List.558 : List U8 = CallByName List.49 List.322 List.559; + ret List.558; + +procedure List.49 (List.400, List.401): + let List.615 : U64 = StructAtIndex 0 List.401; + let List.616 : U64 = 0i64; + let List.613 : Int1 = CallByName Bool.11 List.615 List.616; + if List.613 then + dec List.400; + let List.614 : List U8 = Array []; + ret List.614; else - let List.603 : U64 = StructAtIndex 1 List.393; - let List.604 : U64 = StructAtIndex 0 List.393; - let List.602 : List U8 = CallByName List.72 List.392 List.603 List.604; - ret List.602; + let List.611 : U64 = StructAtIndex 1 List.401; + let List.612 : U64 = StructAtIndex 0 List.401; + let List.610 : List U8 = CallByName List.72 List.400 List.611 List.612; + ret List.610; procedure List.6 (#Attr.2): - let List.634 : U64 = lowlevel ListLen #Attr.2; - ret List.634; + let List.642 : U64 = lowlevel ListLen #Attr.2; + ret List.642; procedure List.66 (#Attr.2, #Attr.3): - let List.587 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.587; + let List.595 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.595; procedure List.70 (#Attr.2, #Attr.3): - let List.578 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.578; + let List.586 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.586; procedure List.71 (#Attr.2, #Attr.3): - let List.576 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.576; + let List.584 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.584; procedure List.72 (#Attr.2, #Attr.3, #Attr.4): - let List.555 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.555; + let List.563 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; + ret List.563; procedure List.8 (#Attr.2, #Attr.3): - let List.573 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.573; + let List.581 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.581; procedure List.80 (#Derived_gen.1, #Derived_gen.2, #Derived_gen.3, #Derived_gen.4, #Derived_gen.5): - joinpoint List.622 List.463 List.464 List.465 List.466 List.467: - let List.624 : Int1 = CallByName Num.22 List.466 List.467; - if List.624 then - let List.633 : U8 = CallByName List.66 List.463 List.466; - let List.625 : [C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64], C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64]] = CallByName TotallyNotJson.62 List.464 List.633; - let List.630 : U8 = 1i64; - let List.631 : U8 = GetTagId List.625; - let List.632 : Int1 = lowlevel Eq List.630 List.631; - if List.632 then - let List.468 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = UnionAtIndex (Id 1) (Index 0) List.625; - let List.628 : U64 = 1i64; - let List.627 : U64 = CallByName Num.51 List.466 List.628; - jump List.622 List.463 List.468 List.465 List.627 List.467; + joinpoint List.630 List.471 List.472 List.473 List.474 List.475: + let List.632 : Int1 = CallByName Num.22 List.474 List.475; + if List.632 then + let List.641 : U8 = CallByName List.66 List.471 List.474; + let List.633 : [C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64], C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64]] = CallByName TotallyNotJson.62 List.472 List.641; + let List.638 : U8 = 1i64; + let List.639 : U8 = GetTagId List.633; + let List.640 : Int1 = lowlevel Eq List.638 List.639; + if List.640 then + let List.476 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = UnionAtIndex (Id 1) (Index 0) List.633; + let List.636 : U64 = 1i64; + let List.635 : U64 = CallByName Num.51 List.474 List.636; + jump List.630 List.471 List.476 List.473 List.635 List.475; else - dec List.463; - let List.469 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = UnionAtIndex (Id 0) (Index 0) List.625; - let List.629 : [C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64], C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64]] = TagId(0) List.469; - ret List.629; + dec List.471; + let List.477 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = UnionAtIndex (Id 0) (Index 0) List.633; + let List.637 : [C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64], C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64]] = TagId(0) List.477; + ret List.637; else - dec List.463; - let List.623 : [C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64], C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64]] = TagId(1) List.464; - ret List.623; + dec List.471; + let List.631 : [C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64], C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64]] = TagId(1) List.472; + ret List.631; in - jump List.622 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4 #Derived_gen.5; + jump List.630 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4 #Derived_gen.5; -procedure List.97 (List.460, List.461, List.462): - let List.620 : U64 = 0i64; - let List.621 : U64 = CallByName List.6 List.460; - let List.619 : [C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64], C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64]] = CallByName List.80 List.460 List.461 List.462 List.620 List.621; - ret List.619; +procedure List.99 (List.468, List.469, List.470): + let List.628 : U64 = 0i64; + let List.629 : U64 = CallByName List.6 List.468; + let List.627 : [C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64], C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64]] = CallByName List.80 List.468 List.469 List.470 List.628 List.629; + ret List.627; procedure Num.19 (#Attr.2, #Attr.3): let Num.294 : U8 = lowlevel NumAdd #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 24aec02cb6b..9cd75dd4412 100644 --- a/crates/compiler/test_mono/generated/issue_4770.txt +++ b/crates/compiler/test_mono/generated/issue_4770.txt @@ -6,80 +6,80 @@ procedure Bool.2 (): let Bool.24 : Int1 = true; ret Bool.24; -procedure List.208 (List.547, List.209, List.207): - let List.577 : Int1 = CallByName Test.1 List.209; - if List.577 then - let List.579 : {} = Struct {}; - let List.578 : [C {}, C {}] = TagId(1) List.579; - ret List.578; +procedure List.216 (List.555, List.217, List.215): + let List.585 : Int1 = CallByName Test.1 List.217; + if List.585 then + let List.587 : {} = Struct {}; + let List.586 : [C {}, C {}] = TagId(1) List.587; + ret List.586; else - let List.576 : {} = Struct {}; - let List.575 : [C {}, C {}] = TagId(0) List.576; - ret List.575; + let List.584 : {} = Struct {}; + let List.583 : [C {}, C {}] = TagId(0) List.584; + ret List.583; procedure List.23 (#Attr.2, #Attr.3, #Attr.4): - let List.580 : List {[C I64, C List *self], [C I64, C List *self]} = lowlevel ListMap2 { xs: `#Attr.#arg1`, ys: `#Attr.#arg2` } #Attr.2 #Attr.3 Test.15 #Attr.4; + let List.588 : List {[C I64, C List *self], [C I64, C List *self]} = lowlevel ListMap2 { xs: `#Attr.#arg1`, ys: `#Attr.#arg2` } #Attr.2 #Attr.3 Test.15 #Attr.4; decref #Attr.3; decref #Attr.2; - ret List.580; + ret List.588; -procedure List.56 (List.206, List.207): - let List.556 : {} = Struct {}; - let List.548 : [C {}, C {}] = CallByName List.97 List.206 List.556 List.207; - let List.553 : U8 = 1i64; - let List.554 : U8 = GetTagId List.548; - let List.555 : Int1 = lowlevel Eq List.553 List.554; - if List.555 then - let List.549 : Int1 = CallByName Bool.2; - ret List.549; +procedure List.56 (List.214, List.215): + let List.564 : {} = Struct {}; + let List.556 : [C {}, C {}] = CallByName List.99 List.214 List.564 List.215; + let List.561 : U8 = 1i64; + let List.562 : U8 = GetTagId List.556; + let List.563 : Int1 = lowlevel Eq List.561 List.562; + if List.563 then + let List.557 : Int1 = CallByName Bool.2; + ret List.557; else - let List.550 : Int1 = CallByName Bool.1; - ret List.550; + let List.558 : Int1 = CallByName Bool.1; + ret List.558; procedure List.6 (#Attr.2): - let List.546 : U64 = lowlevel ListLen #Attr.2; - ret List.546; + let List.554 : U64 = lowlevel ListLen #Attr.2; + ret List.554; procedure List.6 (#Attr.2): - let List.574 : U64 = lowlevel ListLen #Attr.2; - ret List.574; + let List.582 : U64 = lowlevel ListLen #Attr.2; + ret List.582; procedure List.66 (#Attr.2, #Attr.3): - let List.573 : {[C I64, C List *self], [C I64, C List *self]} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.573; + let List.581 : {[C I64, C List *self], [C I64, C List *self]} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.581; procedure List.80 (#Derived_gen.1, #Derived_gen.2, #Derived_gen.3, #Derived_gen.4, #Derived_gen.5): - joinpoint List.561 List.463 List.464 List.465 List.466 List.467: - let List.563 : Int1 = CallByName Num.22 List.466 List.467; - if List.563 then - let List.572 : {[C I64, C List *self], [C I64, C List *self]} = CallByName List.66 List.463 List.466; - inc List.572; - let List.564 : [C {}, C {}] = CallByName List.208 List.464 List.572 List.465; - let List.569 : U8 = 1i64; - let List.570 : U8 = GetTagId List.564; - let List.571 : Int1 = lowlevel Eq List.569 List.570; - if List.571 then - let List.468 : {} = UnionAtIndex (Id 1) (Index 0) List.564; - let List.567 : U64 = 1i64; - let List.566 : U64 = CallByName Num.51 List.466 List.567; - jump List.561 List.463 List.468 List.465 List.566 List.467; + joinpoint List.569 List.471 List.472 List.473 List.474 List.475: + let List.571 : Int1 = CallByName Num.22 List.474 List.475; + if List.571 then + let List.580 : {[C I64, C List *self], [C I64, C List *self]} = CallByName List.66 List.471 List.474; + inc List.580; + let List.572 : [C {}, C {}] = CallByName List.216 List.472 List.580 List.473; + let List.577 : U8 = 1i64; + let List.578 : U8 = GetTagId List.572; + let List.579 : Int1 = lowlevel Eq List.577 List.578; + if List.579 then + let List.476 : {} = UnionAtIndex (Id 1) (Index 0) List.572; + let List.575 : U64 = 1i64; + let List.574 : U64 = CallByName Num.51 List.474 List.575; + jump List.569 List.471 List.476 List.473 List.574 List.475; else - dec List.463; - let List.469 : {} = UnionAtIndex (Id 0) (Index 0) List.564; - let List.568 : [C {}, C {}] = TagId(0) List.469; - ret List.568; + dec List.471; + let List.477 : {} = UnionAtIndex (Id 0) (Index 0) List.572; + let List.576 : [C {}, C {}] = TagId(0) List.477; + ret List.576; else - dec List.463; - let List.562 : [C {}, C {}] = TagId(1) List.464; - ret List.562; + dec List.471; + let List.570 : [C {}, C {}] = TagId(1) List.472; + ret List.570; in - jump List.561 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4 #Derived_gen.5; + jump List.569 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4 #Derived_gen.5; -procedure List.97 (List.460, List.461, List.462): - let List.559 : U64 = 0i64; - let List.560 : U64 = CallByName List.6 List.460; - let List.558 : [C {}, C {}] = CallByName List.80 List.460 List.461 List.462 List.559 List.560; - ret List.558; +procedure List.99 (List.468, List.469, List.470): + let List.567 : U64 = 0i64; + let List.568 : U64 = CallByName List.6 List.468; + let List.566 : [C {}, C {}] = CallByName List.80 List.468 List.469 List.470 List.567 List.568; + ret List.566; procedure Num.22 (#Attr.2, #Attr.3): let Num.291 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/issue_4772_weakened_monomorphic_destructure.txt b/crates/compiler/test_mono/generated/issue_4772_weakened_monomorphic_destructure.txt index 4e8ef9e0aa3..f3ca3911aed 100644 --- a/crates/compiler/test_mono/generated/issue_4772_weakened_monomorphic_destructure.txt +++ b/crates/compiler/test_mono/generated/issue_4772_weakened_monomorphic_destructure.txt @@ -38,127 +38,127 @@ procedure Decode.26 (Decode.105, Decode.106): let Decode.122 : {List U8, [C {}, C Str]} = CallByName Decode.25 Decode.105 Decode.123 Decode.106; ret Decode.122; -procedure List.1 (List.100): - let List.607 : U64 = CallByName List.6 List.100; - dec List.100; - let List.608 : U64 = 0i64; - let List.606 : Int1 = CallByName Bool.11 List.607 List.608; - ret List.606; - -procedure List.2 (List.101, List.102): - let List.590 : U64 = CallByName List.6 List.101; - let List.587 : Int1 = CallByName Num.22 List.102 List.590; - if List.587 then - let List.589 : U8 = CallByName List.66 List.101 List.102; - dec List.101; - let List.588 : [C {}, C U8] = TagId(1) List.589; - ret List.588; +procedure List.1 (List.102): + let List.615 : U64 = CallByName List.6 List.102; + dec List.102; + let List.616 : U64 = 0i64; + let List.614 : Int1 = CallByName Bool.11 List.615 List.616; + ret List.614; + +procedure List.2 (List.103, List.104): + let List.598 : U64 = CallByName List.6 List.103; + let List.595 : Int1 = CallByName Num.22 List.104 List.598; + if List.595 then + let List.597 : U8 = CallByName List.66 List.103 List.104; + dec List.103; + let List.596 : [C {}, C U8] = TagId(1) List.597; + ret List.596; else - dec List.101; - let List.586 : {} = Struct {}; - let List.585 : [C {}, C U8] = TagId(0) List.586; - ret List.585; - -procedure List.26 (List.173, List.174, List.175): - let List.609 : [C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64], C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64]] = CallByName List.97 List.173 List.174 List.175; - let List.612 : U8 = 1i64; - let List.613 : U8 = GetTagId List.609; - let List.614 : Int1 = lowlevel Eq List.612 List.613; - if List.614 then - let List.176 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = UnionAtIndex (Id 1) (Index 0) List.609; - ret List.176; + dec List.103; + let List.594 : {} = Struct {}; + let List.593 : [C {}, C U8] = TagId(0) List.594; + ret List.593; + +procedure List.26 (List.181, List.182, List.183): + let List.617 : [C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64], C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64]] = CallByName List.99 List.181 List.182 List.183; + let List.620 : U8 = 1i64; + let List.621 : U8 = GetTagId List.617; + let List.622 : Int1 = lowlevel Eq List.620 List.621; + if List.622 then + let List.184 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = UnionAtIndex (Id 1) (Index 0) List.617; + ret List.184; else - let List.177 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = UnionAtIndex (Id 0) (Index 0) List.609; - ret List.177; - -procedure List.38 (List.316, List.317): - let List.567 : U64 = CallByName List.6 List.316; - let List.318 : U64 = CallByName Num.77 List.567 List.317; - let List.566 : List U8 = CallByName List.43 List.316 List.318; - ret List.566; - -procedure List.4 (List.117, List.118): - let List.577 : U64 = 1i64; - let List.576 : List U8 = CallByName List.70 List.117 List.577; - let List.575 : List U8 = CallByName List.71 List.576 List.118; - ret List.575; - -procedure List.43 (List.314, List.315): - let List.557 : U64 = CallByName List.6 List.314; - let List.556 : U64 = CallByName Num.77 List.557 List.315; - let List.547 : {U64, U64} = Struct {List.315, List.556}; - let List.546 : List U8 = CallByName List.49 List.314 List.547; - ret List.546; - -procedure List.49 (List.392, List.393): - let List.603 : U64 = StructAtIndex 0 List.393; - let List.604 : U64 = 0i64; - let List.601 : Int1 = CallByName Bool.11 List.603 List.604; - if List.601 then - dec List.392; - let List.602 : List U8 = Array []; - ret List.602; + let List.185 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = UnionAtIndex (Id 0) (Index 0) List.617; + ret List.185; + +procedure List.38 (List.324, List.325): + let List.575 : U64 = CallByName List.6 List.324; + let List.326 : U64 = CallByName Num.77 List.575 List.325; + let List.574 : List U8 = CallByName List.43 List.324 List.326; + ret List.574; + +procedure List.4 (List.119, List.120): + let List.585 : U64 = 1i64; + let List.584 : List U8 = CallByName List.70 List.119 List.585; + let List.583 : List U8 = CallByName List.71 List.584 List.120; + ret List.583; + +procedure List.43 (List.322, List.323): + let List.565 : U64 = CallByName List.6 List.322; + let List.564 : U64 = CallByName Num.77 List.565 List.323; + let List.555 : {U64, U64} = Struct {List.323, List.564}; + let List.554 : List U8 = CallByName List.49 List.322 List.555; + ret List.554; + +procedure List.49 (List.400, List.401): + let List.611 : U64 = StructAtIndex 0 List.401; + let List.612 : U64 = 0i64; + let List.609 : Int1 = CallByName Bool.11 List.611 List.612; + if List.609 then + dec List.400; + let List.610 : List U8 = Array []; + ret List.610; else - let List.599 : U64 = StructAtIndex 1 List.393; - let List.600 : U64 = StructAtIndex 0 List.393; - let List.598 : List U8 = CallByName List.72 List.392 List.599 List.600; - ret List.598; + let List.607 : U64 = StructAtIndex 1 List.401; + let List.608 : U64 = StructAtIndex 0 List.401; + let List.606 : List U8 = CallByName List.72 List.400 List.607 List.608; + ret List.606; procedure List.6 (#Attr.2): - let List.630 : U64 = lowlevel ListLen #Attr.2; - ret List.630; + let List.638 : U64 = lowlevel ListLen #Attr.2; + ret List.638; procedure List.66 (#Attr.2, #Attr.3): - let List.583 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.583; + let List.591 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.591; procedure List.70 (#Attr.2, #Attr.3): - let List.574 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.574; + let List.582 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.582; procedure List.71 (#Attr.2, #Attr.3): - let List.572 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.572; + let List.580 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.580; procedure List.72 (#Attr.2, #Attr.3, #Attr.4): - let List.551 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.551; + let List.559 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; + ret List.559; procedure List.8 (#Attr.2, #Attr.3): - let List.569 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.569; + let List.577 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.577; procedure List.80 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2, #Derived_gen.3, #Derived_gen.4): - joinpoint List.618 List.463 List.464 List.465 List.466 List.467: - let List.620 : Int1 = CallByName Num.22 List.466 List.467; - if List.620 then - let List.629 : U8 = CallByName List.66 List.463 List.466; - let List.621 : [C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64], C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64]] = CallByName TotallyNotJson.62 List.464 List.629; - let List.626 : U8 = 1i64; - let List.627 : U8 = GetTagId List.621; - let List.628 : Int1 = lowlevel Eq List.626 List.627; - if List.628 then - let List.468 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = UnionAtIndex (Id 1) (Index 0) List.621; - let List.624 : U64 = 1i64; - let List.623 : U64 = CallByName Num.51 List.466 List.624; - jump List.618 List.463 List.468 List.465 List.623 List.467; + joinpoint List.626 List.471 List.472 List.473 List.474 List.475: + let List.628 : Int1 = CallByName Num.22 List.474 List.475; + if List.628 then + let List.637 : U8 = CallByName List.66 List.471 List.474; + let List.629 : [C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64], C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64]] = CallByName TotallyNotJson.62 List.472 List.637; + let List.634 : U8 = 1i64; + let List.635 : U8 = GetTagId List.629; + let List.636 : Int1 = lowlevel Eq List.634 List.635; + if List.636 then + let List.476 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = UnionAtIndex (Id 1) (Index 0) List.629; + let List.632 : U64 = 1i64; + let List.631 : U64 = CallByName Num.51 List.474 List.632; + jump List.626 List.471 List.476 List.473 List.631 List.475; else - dec List.463; - let List.469 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = UnionAtIndex (Id 0) (Index 0) List.621; - let List.625 : [C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64], C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64]] = TagId(0) List.469; - ret List.625; + dec List.471; + let List.477 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = UnionAtIndex (Id 0) (Index 0) List.629; + let List.633 : [C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64], C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64]] = TagId(0) List.477; + ret List.633; else - dec List.463; - let List.619 : [C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64], C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64]] = TagId(1) List.464; - ret List.619; + dec List.471; + let List.627 : [C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64], C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64]] = TagId(1) List.472; + ret List.627; in - jump List.618 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; + jump List.626 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; -procedure List.97 (List.460, List.461, List.462): - let List.616 : U64 = 0i64; - let List.617 : U64 = CallByName List.6 List.460; - let List.615 : [C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64], C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64]] = CallByName List.80 List.460 List.461 List.462 List.616 List.617; - ret List.615; +procedure List.99 (List.468, List.469, List.470): + let List.624 : U64 = 0i64; + let List.625 : U64 = CallByName List.6 List.468; + let List.623 : [C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64], C [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64]] = CallByName List.80 List.468 List.469 List.470 List.624 List.625; + ret List.623; procedure Num.19 (#Attr.2, #Attr.3): let Num.294 : U8 = lowlevel NumAdd #Attr.2 #Attr.3; 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 31e0b1454f2..02aa6f86cca 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,32 +1,32 @@ -procedure List.18 (List.146, List.147, List.148): - let List.546 : U64 = 0i64; - let List.547 : U64 = CallByName List.6 List.146; - let List.545 : [, C {[C *self, ], *self}] = CallByName List.86 List.146 List.147 List.148 List.546 List.547; - ret List.545; +procedure List.18 (List.154, List.155, List.156): + let List.554 : U64 = 0i64; + let List.555 : U64 = CallByName List.6 List.154; + let List.553 : [, C {[C *self, ], *self}] = CallByName List.88 List.154 List.155 List.156 List.554 List.555; + ret List.553; procedure List.6 (#Attr.2): - let List.556 : U64 = lowlevel ListLen #Attr.2; - ret List.556; + let List.564 : U64 = lowlevel ListLen #Attr.2; + ret List.564; procedure List.66 (#Attr.2, #Attr.3): - let List.555 : [C *self, ] = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.555; + let List.563 : [C *self, ] = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.563; -procedure List.86 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2, #Derived_gen.3, #Derived_gen.4): - joinpoint List.548 List.149 List.150 List.151 List.152 List.153: - let List.550 : Int1 = CallByName Num.22 List.152 List.153; - if List.550 then - let List.554 : [C *self, ] = CallByName List.66 List.149 List.152; - inc List.554; - let List.154 : [, C {[C *self, ], *self}] = CallByName Test.7 List.150 List.554; - let List.553 : U64 = 1i64; - let List.552 : U64 = CallByName Num.51 List.152 List.553; - jump List.548 List.149 List.154 List.151 List.552 List.153; +procedure List.88 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2, #Derived_gen.3, #Derived_gen.4): + joinpoint List.556 List.157 List.158 List.159 List.160 List.161: + let List.558 : Int1 = CallByName Num.22 List.160 List.161; + if List.558 then + let List.562 : [C *self, ] = CallByName List.66 List.157 List.160; + inc List.562; + let List.162 : [, C {[C *self, ], *self}] = CallByName Test.7 List.158 List.562; + let List.561 : U64 = 1i64; + let List.560 : U64 = CallByName Num.51 List.160 List.561; + jump List.556 List.157 List.162 List.159 List.560 List.161; else - dec List.149; - ret List.150; + dec List.157; + ret List.158; in - jump List.548 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; + jump List.556 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; procedure Num.22 (#Attr.2, #Attr.3): let Num.292 : 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 a1fe7012a35..68165ad8652 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.117, List.118): - let List.548 : U64 = 1i64; - let List.546 : List I64 = CallByName List.70 List.117 List.548; - let List.545 : List I64 = CallByName List.71 List.546 List.118; - ret List.545; +procedure List.4 (List.119, List.120): + let List.556 : U64 = 1i64; + let List.554 : List I64 = CallByName List.70 List.119 List.556; + let List.553 : List I64 = CallByName List.71 List.554 List.120; + ret List.553; procedure List.70 (#Attr.2, #Attr.3): - let List.549 : List I64 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.549; + let List.557 : List I64 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.557; procedure List.71 (#Attr.2, #Attr.3): - let List.547 : List I64 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.547; + let List.555 : List I64 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.555; 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 6f180e33733..11a5ca5b962 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.117, List.118): - let List.548 : U64 = 1i64; - let List.546 : List I64 = CallByName List.70 List.117 List.548; - let List.545 : List I64 = CallByName List.71 List.546 List.118; - ret List.545; +procedure List.4 (List.119, List.120): + let List.556 : U64 = 1i64; + let List.554 : List I64 = CallByName List.70 List.119 List.556; + let List.553 : List I64 = CallByName List.71 List.554 List.120; + ret List.553; procedure List.70 (#Attr.2, #Attr.3): - let List.549 : List I64 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.549; + let List.557 : List I64 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.557; procedure List.71 (#Attr.2, #Attr.3): - let List.547 : List I64 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.547; + let List.555 : List I64 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.555; 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 9729304f33f..6038c09534a 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.109, List.110, List.111): - let List.548 : {List I64, I64} = CallByName List.64 List.109 List.110 List.111; - let List.547 : List I64 = StructAtIndex 0 List.548; - ret List.547; +procedure List.3 (List.111, List.112, List.113): + let List.556 : {List I64, I64} = CallByName List.64 List.111 List.112 List.113; + let List.555 : List I64 = StructAtIndex 0 List.556; + ret List.555; procedure List.6 (#Attr.2): - let List.546 : U64 = lowlevel ListLen #Attr.2; - ret List.546; - -procedure List.64 (List.106, List.107, List.108): - let List.553 : U64 = CallByName List.6 List.106; - let List.550 : Int1 = CallByName Num.22 List.107 List.553; - if List.550 then - let List.551 : {List I64, I64} = CallByName List.67 List.106 List.107 List.108; - ret List.551; + let List.554 : U64 = lowlevel ListLen #Attr.2; + ret List.554; + +procedure List.64 (List.108, List.109, List.110): + let List.561 : U64 = CallByName List.6 List.108; + let List.558 : Int1 = CallByName Num.22 List.109 List.561; + if List.558 then + let List.559 : {List I64, I64} = CallByName List.67 List.108 List.109 List.110; + ret List.559; else - let List.549 : {List I64, I64} = Struct {List.106, List.108}; - ret List.549; + let List.557 : {List I64, I64} = Struct {List.108, List.110}; + ret List.557; procedure List.67 (#Attr.2, #Attr.3, #Attr.4): - let List.552 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; - ret List.552; + let List.560 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; + ret List.560; procedure Num.19 (#Attr.2, #Attr.3): let Num.291 : 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 26c8b097e6e..8c1e4b395a9 100644 --- a/crates/compiler/test_mono/generated/list_get.txt +++ b/crates/compiler/test_mono/generated/list_get.txt @@ -1,24 +1,24 @@ -procedure List.2 (List.101, List.102): - let List.551 : U64 = CallByName List.6 List.101; - let List.547 : Int1 = CallByName Num.22 List.102 List.551; - if List.547 then - let List.549 : I64 = CallByName List.66 List.101 List.102; - dec List.101; - let List.548 : [C {}, C I64] = TagId(1) List.549; - ret List.548; +procedure List.2 (List.103, List.104): + let List.559 : U64 = CallByName List.6 List.103; + let List.555 : Int1 = CallByName Num.22 List.104 List.559; + if List.555 then + let List.557 : I64 = CallByName List.66 List.103 List.104; + dec List.103; + let List.556 : [C {}, C I64] = TagId(1) List.557; + ret List.556; else - dec List.101; - let List.546 : {} = Struct {}; - let List.545 : [C {}, C I64] = TagId(0) List.546; - ret List.545; + dec List.103; + let List.554 : {} = Struct {}; + let List.553 : [C {}, C I64] = TagId(0) List.554; + ret List.553; procedure List.6 (#Attr.2): - let List.552 : U64 = lowlevel ListLen #Attr.2; - ret List.552; + let List.560 : U64 = lowlevel ListLen #Attr.2; + ret List.560; procedure List.66 (#Attr.2, #Attr.3): - let List.550 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.550; + let List.558 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.558; procedure Num.22 (#Attr.2, #Attr.3): let Num.291 : 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 326debe024b..8d011e3bb80 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.545 : U64 = lowlevel ListLen #Attr.2; - ret List.545; + let List.553 : U64 = lowlevel ListLen #Attr.2; + ret List.553; procedure List.6 (#Attr.2): - let List.546 : U64 = lowlevel ListLen #Attr.2; - ret List.546; + let List.554 : U64 = lowlevel ListLen #Attr.2; + ret List.554; procedure Num.19 (#Attr.2, #Attr.3): let Num.291 : 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 6e346fc07c3..92ed7cb7f8b 100644 --- a/crates/compiler/test_mono/generated/list_map_closure_borrows.txt +++ b/crates/compiler/test_mono/generated/list_map_closure_borrows.txt @@ -1,30 +1,30 @@ -procedure List.2 (List.101, List.102): - let List.551 : U64 = CallByName List.6 List.101; - let List.547 : Int1 = CallByName Num.22 List.102 List.551; - if List.547 then - let List.549 : Str = CallByName List.66 List.101 List.102; - inc List.549; - dec List.101; - let List.548 : [C {}, C Str] = TagId(1) List.549; - ret List.548; +procedure List.2 (List.103, List.104): + let List.559 : U64 = CallByName List.6 List.103; + let List.555 : Int1 = CallByName Num.22 List.104 List.559; + if List.555 then + let List.557 : Str = CallByName List.66 List.103 List.104; + inc List.557; + dec List.103; + let List.556 : [C {}, C Str] = TagId(1) List.557; + ret List.556; else - dec List.101; - let List.546 : {} = Struct {}; - let List.545 : [C {}, C Str] = TagId(0) List.546; - ret List.545; + dec List.103; + let List.554 : {} = Struct {}; + let List.553 : [C {}, C Str] = TagId(0) List.554; + ret List.553; procedure List.5 (#Attr.2, #Attr.3): - let List.553 : List Str = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.3 #Attr.3; + let List.561 : List Str = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.3 #Attr.3; decref #Attr.2; - ret List.553; + ret List.561; procedure List.6 (#Attr.2): - let List.552 : U64 = lowlevel ListLen #Attr.2; - ret List.552; + let List.560 : U64 = lowlevel ListLen #Attr.2; + ret List.560; procedure List.66 (#Attr.2, #Attr.3): - let List.550 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.550; + let List.558 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.558; procedure Num.22 (#Attr.2, #Attr.3): let Num.291 : 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 df5bb754167..ce29fe588db 100644 --- a/crates/compiler/test_mono/generated/list_map_closure_owns.txt +++ b/crates/compiler/test_mono/generated/list_map_closure_owns.txt @@ -1,30 +1,30 @@ -procedure List.2 (List.101, List.102): - let List.551 : U64 = CallByName List.6 List.101; - let List.547 : Int1 = CallByName Num.22 List.102 List.551; - if List.547 then - let List.549 : Str = CallByName List.66 List.101 List.102; - inc List.549; - dec List.101; - let List.548 : [C {}, C Str] = TagId(1) List.549; - ret List.548; +procedure List.2 (List.103, List.104): + let List.559 : U64 = CallByName List.6 List.103; + let List.555 : Int1 = CallByName Num.22 List.104 List.559; + if List.555 then + let List.557 : Str = CallByName List.66 List.103 List.104; + inc List.557; + dec List.103; + let List.556 : [C {}, C Str] = TagId(1) List.557; + ret List.556; else - dec List.101; - let List.546 : {} = Struct {}; - let List.545 : [C {}, C Str] = TagId(0) List.546; - ret List.545; + dec List.103; + let List.554 : {} = Struct {}; + let List.553 : [C {}, C Str] = TagId(0) List.554; + ret List.553; procedure List.5 (#Attr.2, #Attr.3): - let List.553 : List Str = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.3 #Attr.3; + let List.561 : List Str = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.3 #Attr.3; decref #Attr.2; - ret List.553; + ret List.561; procedure List.6 (#Attr.2): - let List.552 : U64 = lowlevel ListLen #Attr.2; - ret List.552; + let List.560 : U64 = lowlevel ListLen #Attr.2; + ret List.560; procedure List.66 (#Attr.2, #Attr.3): - let List.550 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.550; + let List.558 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.558; procedure Num.22 (#Attr.2, #Attr.3): let Num.291 : 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 b03497022ba..149fc14bbf4 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,23 +1,23 @@ procedure List.5 (#Attr.2, #Attr.3): - let List.546 : U8 = GetTagId #Attr.3; - joinpoint List.547 List.545: - ret List.545; + let List.554 : U8 = GetTagId #Attr.3; + joinpoint List.555 List.553: + ret List.553; in - switch List.546: + switch List.554: case 0: - let List.548 : List U8 = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.4 #Attr.3; + let List.556 : List U8 = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.4 #Attr.3; decref #Attr.2; - jump List.547 List.548; + jump List.555 List.556; case 1: - let List.549 : List U8 = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.6 #Attr.3; + let List.557 : List U8 = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.6 #Attr.3; decref #Attr.2; - jump List.547 List.549; + jump List.555 List.557; default: - let List.550 : List U8 = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.8 #Attr.3; + let List.558 : List U8 = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.8 #Attr.3; decref #Attr.2; - jump List.547 List.550; + jump List.555 List.558; procedure Num.19 (#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 98cad2e54fb..1e8fb3e67e0 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.109, List.110, List.111): - let List.546 : {List I64, I64} = CallByName List.64 List.109 List.110 List.111; - let List.545 : List I64 = StructAtIndex 0 List.546; - ret List.545; +procedure List.3 (List.111, List.112, List.113): + let List.554 : {List I64, I64} = CallByName List.64 List.111 List.112 List.113; + let List.553 : List I64 = StructAtIndex 0 List.554; + ret List.553; procedure List.6 (#Attr.2): - let List.552 : U64 = lowlevel ListLen #Attr.2; - ret List.552; + let List.560 : U64 = lowlevel ListLen #Attr.2; + ret List.560; -procedure List.64 (List.106, List.107, List.108): - let List.551 : U64 = CallByName List.6 List.106; - let List.548 : Int1 = CallByName Num.22 List.107 List.551; - if List.548 then - let List.549 : {List I64, I64} = CallByName List.67 List.106 List.107 List.108; - ret List.549; +procedure List.64 (List.108, List.109, List.110): + let List.559 : U64 = CallByName List.6 List.108; + let List.556 : Int1 = CallByName Num.22 List.109 List.559; + if List.556 then + let List.557 : {List I64, I64} = CallByName List.67 List.108 List.109 List.110; + ret List.557; else - let List.547 : {List I64, I64} = Struct {List.106, List.108}; - ret List.547; + let List.555 : {List I64, I64} = Struct {List.108, List.110}; + ret List.555; procedure List.67 (#Attr.2, #Attr.3, #Attr.4): - let List.550 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; - ret List.550; + let List.558 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; + ret List.558; procedure Num.22 (#Attr.2, #Attr.3): let Num.291 : 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 889c40543b9..30ce74da82e 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.547 : List I64 = lowlevel ListSortWith { xs: `#Attr.#arg1` } #Attr.2 Num.46 #Attr.3; - ret List.547; + let List.555 : List I64 = lowlevel ListSortWith { xs: `#Attr.#arg1` } #Attr.2 Num.46 #Attr.3; + ret List.555; -procedure List.59 (List.302): - let List.546 : {} = Struct {}; - let List.545 : List I64 = CallByName List.28 List.302 List.546; - ret List.545; +procedure List.59 (List.310): + let List.554 : {} = Struct {}; + let List.553 : List I64 = CallByName List.28 List.310 List.554; + ret List.553; procedure Num.46 (#Attr.2, #Attr.3): let Num.291 : 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 78eb4e7193c..b22f35c6aa5 100644 --- a/crates/compiler/test_mono/generated/quicksort_swap.txt +++ b/crates/compiler/test_mono/generated/quicksort_swap.txt @@ -1,43 +1,43 @@ -procedure List.2 (List.101, List.102): - let List.567 : U64 = CallByName List.6 List.101; - let List.564 : Int1 = CallByName Num.22 List.102 List.567; - if List.564 then - let List.566 : I64 = CallByName List.66 List.101 List.102; - dec List.101; - let List.565 : [C {}, C I64] = TagId(1) List.566; - ret List.565; +procedure List.2 (List.103, List.104): + let List.575 : U64 = CallByName List.6 List.103; + let List.572 : Int1 = CallByName Num.22 List.104 List.575; + if List.572 then + let List.574 : I64 = CallByName List.66 List.103 List.104; + dec List.103; + let List.573 : [C {}, C I64] = TagId(1) List.574; + ret List.573; else - dec List.101; - let List.563 : {} = Struct {}; - let List.562 : [C {}, C I64] = TagId(0) List.563; - ret List.562; + dec List.103; + let List.571 : {} = Struct {}; + let List.570 : [C {}, C I64] = TagId(0) List.571; + ret List.570; -procedure List.3 (List.109, List.110, List.111): - let List.554 : {List I64, I64} = CallByName List.64 List.109 List.110 List.111; - let List.553 : List I64 = StructAtIndex 0 List.554; - ret List.553; +procedure List.3 (List.111, List.112, List.113): + let List.562 : {List I64, I64} = CallByName List.64 List.111 List.112 List.113; + let List.561 : List I64 = StructAtIndex 0 List.562; + ret List.561; procedure List.6 (#Attr.2): - let List.552 : U64 = lowlevel ListLen #Attr.2; - ret List.552; + let List.560 : U64 = lowlevel ListLen #Attr.2; + ret List.560; -procedure List.64 (List.106, List.107, List.108): - let List.551 : U64 = CallByName List.6 List.106; - let List.548 : Int1 = CallByName Num.22 List.107 List.551; - if List.548 then - let List.549 : {List I64, I64} = CallByName List.67 List.106 List.107 List.108; - ret List.549; +procedure List.64 (List.108, List.109, List.110): + let List.559 : U64 = CallByName List.6 List.108; + let List.556 : Int1 = CallByName Num.22 List.109 List.559; + if List.556 then + let List.557 : {List I64, I64} = CallByName List.67 List.108 List.109 List.110; + ret List.557; else - let List.547 : {List I64, I64} = Struct {List.106, List.108}; - ret List.547; + let List.555 : {List I64, I64} = Struct {List.108, List.110}; + ret List.555; procedure List.66 (#Attr.2, #Attr.3): - let List.560 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.560; + let List.568 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.568; procedure List.67 (#Attr.2, #Attr.3, #Attr.4): - let List.550 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; - ret List.550; + let List.558 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; + ret List.558; procedure Num.22 (#Attr.2, #Attr.3): let Num.293 : 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 3696dadb6fe..a6b9900defd 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.109, List.110, List.111): - let List.554 : {List U64, U64} = CallByName List.64 List.109 List.110 List.111; - let List.553 : List U64 = StructAtIndex 0 List.554; - ret List.553; +procedure List.3 (List.111, List.112, List.113): + let List.562 : {List U64, U64} = CallByName List.64 List.111 List.112 List.113; + let List.561 : List U64 = StructAtIndex 0 List.562; + ret List.561; procedure List.6 (#Attr.2): - let List.552 : U64 = lowlevel ListLen #Attr.2; - ret List.552; + let List.560 : U64 = lowlevel ListLen #Attr.2; + ret List.560; -procedure List.64 (List.106, List.107, List.108): - let List.551 : U64 = CallByName List.6 List.106; - let List.548 : Int1 = CallByName Num.22 List.107 List.551; - if List.548 then - let List.549 : {List U64, U64} = CallByName List.67 List.106 List.107 List.108; - ret List.549; +procedure List.64 (List.108, List.109, List.110): + let List.559 : U64 = CallByName List.6 List.108; + let List.556 : Int1 = CallByName Num.22 List.109 List.559; + if List.556 then + let List.557 : {List U64, U64} = CallByName List.67 List.108 List.109 List.110; + ret List.557; else - let List.547 : {List U64, U64} = Struct {List.106, List.108}; - ret List.547; + let List.555 : {List U64, U64} = Struct {List.108, List.110}; + ret List.555; procedure List.67 (#Attr.2, #Attr.3, #Attr.4): - let List.550 : {List U64, U64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; - ret List.550; + let List.558 : {List U64, U64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; + ret List.558; procedure Num.22 (#Attr.2, #Attr.3): let Num.291 : 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 fc058d6c487..28ab73bf6d4 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,7 +1,7 @@ procedure List.5 (#Attr.2, #Attr.3): - let List.545 : List [C List *self] = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.2 #Attr.3; + let List.553 : List [C List *self] = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.2 #Attr.3; decref #Attr.2; - ret List.545; + ret List.553; procedure Test.2 (Test.5): let Test.6 : List [C List *self] = UnionAtIndex (Id 0) (Index 0) Test.5; diff --git a/crates/compiler/test_mono/generated/rigids.txt b/crates/compiler/test_mono/generated/rigids.txt index 7f73e8451a9..313ba111dd3 100644 --- a/crates/compiler/test_mono/generated/rigids.txt +++ b/crates/compiler/test_mono/generated/rigids.txt @@ -1,43 +1,43 @@ -procedure List.2 (List.101, List.102): - let List.567 : U64 = CallByName List.6 List.101; - let List.564 : Int1 = CallByName Num.22 List.102 List.567; - if List.564 then - let List.566 : I64 = CallByName List.66 List.101 List.102; - dec List.101; - let List.565 : [C {}, C I64] = TagId(1) List.566; - ret List.565; +procedure List.2 (List.103, List.104): + let List.575 : U64 = CallByName List.6 List.103; + let List.572 : Int1 = CallByName Num.22 List.104 List.575; + if List.572 then + let List.574 : I64 = CallByName List.66 List.103 List.104; + dec List.103; + let List.573 : [C {}, C I64] = TagId(1) List.574; + ret List.573; else - dec List.101; - let List.563 : {} = Struct {}; - let List.562 : [C {}, C I64] = TagId(0) List.563; - ret List.562; + dec List.103; + let List.571 : {} = Struct {}; + let List.570 : [C {}, C I64] = TagId(0) List.571; + ret List.570; -procedure List.3 (List.109, List.110, List.111): - let List.554 : {List I64, I64} = CallByName List.64 List.109 List.110 List.111; - let List.553 : List I64 = StructAtIndex 0 List.554; - ret List.553; +procedure List.3 (List.111, List.112, List.113): + let List.562 : {List I64, I64} = CallByName List.64 List.111 List.112 List.113; + let List.561 : List I64 = StructAtIndex 0 List.562; + ret List.561; procedure List.6 (#Attr.2): - let List.552 : U64 = lowlevel ListLen #Attr.2; - ret List.552; + let List.560 : U64 = lowlevel ListLen #Attr.2; + ret List.560; -procedure List.64 (List.106, List.107, List.108): - let List.551 : U64 = CallByName List.6 List.106; - let List.548 : Int1 = CallByName Num.22 List.107 List.551; - if List.548 then - let List.549 : {List I64, I64} = CallByName List.67 List.106 List.107 List.108; - ret List.549; +procedure List.64 (List.108, List.109, List.110): + let List.559 : U64 = CallByName List.6 List.108; + let List.556 : Int1 = CallByName Num.22 List.109 List.559; + if List.556 then + let List.557 : {List I64, I64} = CallByName List.67 List.108 List.109 List.110; + ret List.557; else - let List.547 : {List I64, I64} = Struct {List.106, List.108}; - ret List.547; + let List.555 : {List I64, I64} = Struct {List.108, List.110}; + ret List.555; procedure List.66 (#Attr.2, #Attr.3): - let List.560 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.560; + let List.568 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.568; procedure List.67 (#Attr.2, #Attr.3, #Attr.4): - let List.550 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; - ret List.550; + let List.558 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; + ret List.558; procedure Num.22 (#Attr.2, #Attr.3): let Num.293 : 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 850bce71802..9bfa27aaeb5 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 @@ -33,167 +33,167 @@ procedure Encode.26 (Encode.105, Encode.106): let Encode.108 : List U8 = CallByName Encode.24 Encode.109 Encode.110 Encode.106; ret Encode.108; -procedure List.18 (List.146, List.147, List.148): - let List.572 : U64 = 0i64; - let List.573 : U64 = CallByName List.6 List.146; - let List.571 : {List U8, U64} = CallByName List.86 List.146 List.147 List.148 List.572 List.573; - ret List.571; - -procedure List.18 (List.146, List.147, List.148): - let List.584 : U64 = 0i64; - let List.585 : U64 = CallByName List.6 List.146; - let List.583 : List U8 = CallByName List.86 List.146 List.147 List.148 List.584 List.585; - ret List.583; - -procedure List.26 (List.173, List.174, List.175): - let List.625 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.97 List.173 List.174 List.175; - let List.628 : U8 = 1i64; - let List.629 : U8 = GetTagId List.625; - let List.630 : Int1 = lowlevel Eq List.628 List.629; - if List.630 then - let List.176 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.625; - ret List.176; +procedure List.18 (List.154, List.155, List.156): + let List.580 : U64 = 0i64; + let List.581 : U64 = CallByName List.6 List.154; + let List.579 : {List U8, U64} = CallByName List.88 List.154 List.155 List.156 List.580 List.581; + ret List.579; + +procedure List.18 (List.154, List.155, List.156): + let List.592 : U64 = 0i64; + let List.593 : U64 = CallByName List.6 List.154; + let List.591 : List U8 = CallByName List.88 List.154 List.155 List.156 List.592 List.593; + ret List.591; + +procedure List.26 (List.181, List.182, List.183): + let List.633 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.99 List.181 List.182 List.183; + let List.636 : U8 = 1i64; + let List.637 : U8 = GetTagId List.633; + let List.638 : Int1 = lowlevel Eq List.636 List.637; + if List.638 then + let List.184 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.633; + ret List.184; else - let List.177 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.625; - ret List.177; - -procedure List.4 (List.117, List.118): - let List.570 : U64 = 1i64; - let List.569 : List U8 = CallByName List.70 List.117 List.570; - let List.568 : List U8 = CallByName List.71 List.569 List.118; - ret List.568; - -procedure List.49 (List.392, List.393): - let List.617 : U64 = StructAtIndex 0 List.393; - let List.618 : U64 = 0i64; - let List.615 : Int1 = CallByName Bool.11 List.617 List.618; - if List.615 then - dec List.392; - let List.616 : List U8 = Array []; - ret List.616; + let List.185 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.633; + ret List.185; + +procedure List.4 (List.119, List.120): + let List.578 : U64 = 1i64; + let List.577 : List U8 = CallByName List.70 List.119 List.578; + let List.576 : List U8 = CallByName List.71 List.577 List.120; + ret List.576; + +procedure List.49 (List.400, List.401): + let List.625 : U64 = StructAtIndex 0 List.401; + let List.626 : U64 = 0i64; + let List.623 : Int1 = CallByName Bool.11 List.625 List.626; + if List.623 then + dec List.400; + let List.624 : List U8 = Array []; + ret List.624; else - let List.612 : U64 = StructAtIndex 1 List.393; - let List.613 : U64 = StructAtIndex 0 List.393; - let List.611 : List U8 = CallByName List.72 List.392 List.612 List.613; - ret List.611; - -procedure List.52 (List.407, List.408): - let List.409 : U64 = CallByName List.6 List.407; - joinpoint List.623 List.410: - let List.621 : U64 = 0i64; - let List.620 : {U64, U64} = Struct {List.410, List.621}; - inc List.407; - let List.411 : List U8 = CallByName List.49 List.407 List.620; - let List.619 : U64 = CallByName Num.75 List.409 List.410; - let List.610 : {U64, U64} = Struct {List.619, List.410}; - let List.412 : List U8 = CallByName List.49 List.407 List.610; - let List.609 : {List U8, List U8} = Struct {List.411, List.412}; - ret List.609; + let List.620 : U64 = StructAtIndex 1 List.401; + let List.621 : U64 = StructAtIndex 0 List.401; + let List.619 : List U8 = CallByName List.72 List.400 List.620 List.621; + ret List.619; + +procedure List.52 (List.415, List.416): + let List.417 : U64 = CallByName List.6 List.415; + joinpoint List.631 List.418: + let List.629 : U64 = 0i64; + let List.628 : {U64, U64} = Struct {List.418, List.629}; + inc List.415; + let List.419 : List U8 = CallByName List.49 List.415 List.628; + let List.627 : U64 = CallByName Num.75 List.417 List.418; + let List.618 : {U64, U64} = Struct {List.627, List.418}; + let List.420 : List U8 = CallByName List.49 List.415 List.618; + let List.617 : {List U8, List U8} = Struct {List.419, List.420}; + ret List.617; in - let List.624 : Int1 = CallByName Num.24 List.409 List.408; - if List.624 then - jump List.623 List.408; + let List.632 : Int1 = CallByName Num.24 List.417 List.416; + if List.632 then + jump List.631 List.416; else - jump List.623 List.409; + jump List.631 List.417; procedure List.6 (#Attr.2): - let List.595 : U64 = lowlevel ListLen #Attr.2; - ret List.595; + let List.603 : U64 = lowlevel ListLen #Attr.2; + ret List.603; procedure List.6 (#Attr.2): - let List.597 : U64 = lowlevel ListLen #Attr.2; - ret List.597; + let List.605 : U64 = lowlevel ListLen #Attr.2; + ret List.605; procedure List.66 (#Attr.2, #Attr.3): - let List.581 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.581; + let List.589 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.589; procedure List.66 (#Attr.2, #Attr.3): - let List.593 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.593; + let List.601 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.601; procedure List.68 (#Attr.2): - let List.608 : List U8 = lowlevel ListWithCapacity #Attr.2; - ret List.608; + let List.616 : List U8 = lowlevel ListWithCapacity #Attr.2; + ret List.616; procedure List.70 (#Attr.2, #Attr.3): - let List.549 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.549; + let List.557 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.557; procedure List.71 (#Attr.2, #Attr.3): - let List.547 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.547; + let List.555 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.555; procedure List.72 (#Attr.2, #Attr.3, #Attr.4): - let List.614 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.614; + let List.622 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; + ret List.622; procedure List.8 (#Attr.2, #Attr.3): - let List.606 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.606; - -procedure List.80 (#Derived_gen.8, #Derived_gen.9, #Derived_gen.10, #Derived_gen.11, #Derived_gen.12): - joinpoint List.634 List.463 List.464 List.465 List.466 List.467: - let List.636 : Int1 = CallByName Num.22 List.466 List.467; - if List.636 then - let List.645 : U8 = CallByName List.66 List.463 List.466; - let List.637 : [C {U64, Int1}, C {U64, Int1}] = CallByName TotallyNotJson.189 List.464 List.645; - let List.642 : U8 = 1i64; - let List.643 : U8 = GetTagId List.637; - let List.644 : Int1 = lowlevel Eq List.642 List.643; - if List.644 then - let List.468 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.637; - let List.640 : U64 = 1i64; - let List.639 : U64 = CallByName Num.51 List.466 List.640; - jump List.634 List.463 List.468 List.465 List.639 List.467; + let List.614 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.614; + +procedure List.80 (#Derived_gen.13, #Derived_gen.14, #Derived_gen.15, #Derived_gen.16, #Derived_gen.17): + joinpoint List.642 List.471 List.472 List.473 List.474 List.475: + let List.644 : Int1 = CallByName Num.22 List.474 List.475; + if List.644 then + let List.653 : U8 = CallByName List.66 List.471 List.474; + let List.645 : [C {U64, Int1}, C {U64, Int1}] = CallByName TotallyNotJson.189 List.472 List.653; + let List.650 : U8 = 1i64; + let List.651 : U8 = GetTagId List.645; + let List.652 : Int1 = lowlevel Eq List.650 List.651; + if List.652 then + let List.476 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.645; + let List.648 : U64 = 1i64; + let List.647 : U64 = CallByName Num.51 List.474 List.648; + jump List.642 List.471 List.476 List.473 List.647 List.475; else - dec List.463; - let List.469 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.637; - let List.641 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) List.469; - ret List.641; + dec List.471; + let List.477 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.645; + let List.649 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) List.477; + ret List.649; else - dec List.463; - let List.635 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.464; - ret List.635; + dec List.471; + let List.643 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.472; + ret List.643; in - jump List.634 #Derived_gen.8 #Derived_gen.9 #Derived_gen.10 #Derived_gen.11 #Derived_gen.12; - -procedure List.86 (#Derived_gen.13, #Derived_gen.14, #Derived_gen.15, #Derived_gen.16, #Derived_gen.17): - joinpoint List.586 List.149 List.150 List.151 List.152 List.153: - let List.588 : Int1 = CallByName Num.22 List.152 List.153; - if List.588 then - let List.592 : U8 = CallByName List.66 List.149 List.152; - let List.154 : List U8 = CallByName TotallyNotJson.215 List.150 List.592; - let List.591 : U64 = 1i64; - let List.590 : U64 = CallByName Num.51 List.152 List.591; - jump List.586 List.149 List.154 List.151 List.590 List.153; + jump List.642 #Derived_gen.13 #Derived_gen.14 #Derived_gen.15 #Derived_gen.16 #Derived_gen.17; + +procedure List.88 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2, #Derived_gen.3, #Derived_gen.4): + joinpoint List.582 List.157 List.158 List.159 List.160 List.161: + let List.584 : Int1 = CallByName Num.22 List.160 List.161; + if List.584 then + let List.588 : Str = CallByName List.66 List.157 List.160; + inc List.588; + let List.162 : {List U8, U64} = CallByName TotallyNotJson.267 List.158 List.588 List.159; + let List.587 : U64 = 1i64; + let List.586 : U64 = CallByName Num.51 List.160 List.587; + jump List.582 List.157 List.162 List.159 List.586 List.161; else - dec List.149; - ret List.150; + dec List.157; + ret List.158; in - jump List.586 #Derived_gen.13 #Derived_gen.14 #Derived_gen.15 #Derived_gen.16 #Derived_gen.17; - -procedure List.86 (#Derived_gen.3, #Derived_gen.4, #Derived_gen.5, #Derived_gen.6, #Derived_gen.7): - joinpoint List.574 List.149 List.150 List.151 List.152 List.153: - let List.576 : Int1 = CallByName Num.22 List.152 List.153; - if List.576 then - let List.580 : Str = CallByName List.66 List.149 List.152; - inc List.580; - let List.154 : {List U8, U64} = CallByName TotallyNotJson.267 List.150 List.580 List.151; - let List.579 : U64 = 1i64; - let List.578 : U64 = CallByName Num.51 List.152 List.579; - jump List.574 List.149 List.154 List.151 List.578 List.153; + jump List.582 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; + +procedure List.88 (#Derived_gen.8, #Derived_gen.9, #Derived_gen.10, #Derived_gen.11, #Derived_gen.12): + joinpoint List.594 List.157 List.158 List.159 List.160 List.161: + let List.596 : Int1 = CallByName Num.22 List.160 List.161; + if List.596 then + let List.600 : U8 = CallByName List.66 List.157 List.160; + let List.162 : List U8 = CallByName TotallyNotJson.215 List.158 List.600; + let List.599 : U64 = 1i64; + let List.598 : U64 = CallByName Num.51 List.160 List.599; + jump List.594 List.157 List.162 List.159 List.598 List.161; else - dec List.149; - ret List.150; + dec List.157; + ret List.158; in - jump List.574 #Derived_gen.3 #Derived_gen.4 #Derived_gen.5 #Derived_gen.6 #Derived_gen.7; + jump List.594 #Derived_gen.8 #Derived_gen.9 #Derived_gen.10 #Derived_gen.11 #Derived_gen.12; -procedure List.97 (List.460, List.461, List.462): - let List.632 : U64 = 0i64; - let List.633 : U64 = CallByName List.6 List.460; - let List.631 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.80 List.460 List.461 List.462 List.632 List.633; - ret List.631; +procedure List.99 (List.468, List.469, List.470): + let List.640 : U64 = 0i64; + let List.641 : U64 = CallByName List.6 List.468; + let List.639 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.80 List.468 List.469 List.470 List.640 List.641; + ret List.639; procedure Num.127 (#Attr.2): let Num.298 : 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 44490c79b24..c492774c628 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 @@ -81,81 +81,81 @@ procedure Encode.26 (Encode.105, Encode.106): let Encode.108 : List U8 = CallByName Encode.24 Encode.109 Encode.110 Encode.106; ret Encode.108; -procedure List.18 (List.146, List.147, List.148): - let List.572 : U64 = 0i64; - let List.573 : U64 = CallByName List.6 List.146; - let List.571 : {List U8, U64} = CallByName List.86 List.146 List.147 List.148 List.572 List.573; - ret List.571; - -procedure List.18 (List.146, List.147, List.148): - let List.612 : U64 = 0i64; - let List.613 : U64 = CallByName List.6 List.146; - let List.611 : {List U8, U64} = CallByName List.86 List.146 List.147 List.148 List.612 List.613; - ret List.611; - -procedure List.4 (List.117, List.118): - let List.610 : U64 = 1i64; - let List.609 : List U8 = CallByName List.70 List.117 List.610; - let List.608 : List U8 = CallByName List.71 List.609 List.118; - ret List.608; +procedure List.18 (List.154, List.155, List.156): + let List.580 : U64 = 0i64; + let List.581 : U64 = CallByName List.6 List.154; + let List.579 : {List U8, U64} = CallByName List.88 List.154 List.155 List.156 List.580 List.581; + ret List.579; + +procedure List.18 (List.154, List.155, List.156): + let List.620 : U64 = 0i64; + let List.621 : U64 = CallByName List.6 List.154; + let List.619 : {List U8, U64} = CallByName List.88 List.154 List.155 List.156 List.620 List.621; + ret List.619; + +procedure List.4 (List.119, List.120): + let List.618 : U64 = 1i64; + let List.617 : List U8 = CallByName List.70 List.119 List.618; + let List.616 : List U8 = CallByName List.71 List.617 List.120; + ret List.616; procedure List.6 (#Attr.2): - let List.583 : U64 = lowlevel ListLen #Attr.2; - ret List.583; + let List.591 : U64 = lowlevel ListLen #Attr.2; + ret List.591; procedure List.6 (#Attr.2): - let List.623 : U64 = lowlevel ListLen #Attr.2; - ret List.623; + let List.631 : U64 = lowlevel ListLen #Attr.2; + ret List.631; procedure List.66 (#Attr.2, #Attr.3): - let List.581 : [C {}, C {}] = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.581; + let List.589 : [C {}, C {}] = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.589; procedure List.66 (#Attr.2, #Attr.3): - let List.621 : [] = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.621; + let List.629 : [] = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.629; procedure List.70 (#Attr.2, #Attr.3): - let List.589 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.589; + let List.597 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.597; procedure List.71 (#Attr.2, #Attr.3): - let List.587 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.587; + let List.595 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.595; procedure List.8 (#Attr.2, #Attr.3): - let List.624 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.624; - -procedure List.86 (#Derived_gen.20, #Derived_gen.21, #Derived_gen.22, #Derived_gen.23, #Derived_gen.24): - joinpoint List.574 List.149 List.150 List.151 List.152 List.153: - let List.576 : Int1 = CallByName Num.22 List.152 List.153; - if List.576 then - let List.580 : [C {}, C {}] = CallByName List.66 List.149 List.152; - let List.154 : {List U8, U64} = CallByName TotallyNotJson.267 List.150 List.580 List.151; - let List.579 : U64 = 1i64; - let List.578 : U64 = CallByName Num.51 List.152 List.579; - jump List.574 List.149 List.154 List.151 List.578 List.153; + let List.632 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.632; + +procedure List.88 (#Derived_gen.29, #Derived_gen.30, #Derived_gen.31, #Derived_gen.32, #Derived_gen.33): + joinpoint List.622 List.157 List.158 List.159 List.160 List.161: + let List.624 : Int1 = CallByName Num.22 List.160 List.161; + if List.624 then + let List.628 : [] = CallByName List.66 List.157 List.160; + let List.162 : {List U8, U64} = CallByName TotallyNotJson.267 List.158 List.628 List.159; + let List.627 : U64 = 1i64; + let List.626 : U64 = CallByName Num.51 List.160 List.627; + jump List.622 List.157 List.162 List.159 List.626 List.161; else - dec List.149; - ret List.150; + dec List.157; + ret List.158; in - jump List.574 #Derived_gen.20 #Derived_gen.21 #Derived_gen.22 #Derived_gen.23 #Derived_gen.24; - -procedure List.86 (#Derived_gen.34, #Derived_gen.35, #Derived_gen.36, #Derived_gen.37, #Derived_gen.38): - joinpoint List.614 List.149 List.150 List.151 List.152 List.153: - let List.616 : Int1 = CallByName Num.22 List.152 List.153; - if List.616 then - let List.620 : [] = CallByName List.66 List.149 List.152; - let List.154 : {List U8, U64} = CallByName TotallyNotJson.267 List.150 List.620 List.151; - let List.619 : U64 = 1i64; - let List.618 : U64 = CallByName Num.51 List.152 List.619; - jump List.614 List.149 List.154 List.151 List.618 List.153; + jump List.622 #Derived_gen.29 #Derived_gen.30 #Derived_gen.31 #Derived_gen.32 #Derived_gen.33; + +procedure List.88 (#Derived_gen.37, #Derived_gen.38, #Derived_gen.39, #Derived_gen.40, #Derived_gen.41): + joinpoint List.582 List.157 List.158 List.159 List.160 List.161: + let List.584 : Int1 = CallByName Num.22 List.160 List.161; + if List.584 then + let List.588 : [C {}, C {}] = CallByName List.66 List.157 List.160; + let List.162 : {List U8, U64} = CallByName TotallyNotJson.267 List.158 List.588 List.159; + let List.587 : U64 = 1i64; + let List.586 : U64 = CallByName Num.51 List.160 List.587; + jump List.582 List.157 List.162 List.159 List.586 List.161; else - dec List.149; - ret List.150; + dec List.157; + ret List.158; in - jump List.614 #Derived_gen.34 #Derived_gen.35 #Derived_gen.36 #Derived_gen.37 #Derived_gen.38; + jump List.582 #Derived_gen.37 #Derived_gen.38 #Derived_gen.39 #Derived_gen.40 #Derived_gen.41; procedure Num.127 (#Attr.2): let Num.310 : 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 8621885ae15..7edfa983147 100644 --- a/crates/compiler/test_mono/generated/weakening_avoids_overspecialization.txt +++ b/crates/compiler/test_mono/generated/weakening_avoids_overspecialization.txt @@ -2,88 +2,88 @@ procedure Bool.11 (#Attr.2, #Attr.3): let Bool.24 : Int1 = lowlevel Eq #Attr.2 #Attr.3; ret Bool.24; -procedure List.26 (List.173, List.174, List.175): - let List.560 : [C U64, C U64] = CallByName List.97 List.173 List.174 List.175; - let List.563 : U8 = 1i64; - let List.564 : U8 = GetTagId List.560; - let List.565 : Int1 = lowlevel Eq List.563 List.564; - if List.565 then - let List.176 : U64 = UnionAtIndex (Id 1) (Index 0) List.560; - ret List.176; +procedure List.26 (List.181, List.182, List.183): + let List.568 : [C U64, C U64] = CallByName List.99 List.181 List.182 List.183; + let List.571 : U8 = 1i64; + let List.572 : U8 = GetTagId List.568; + let List.573 : Int1 = lowlevel Eq List.571 List.572; + if List.573 then + let List.184 : U64 = UnionAtIndex (Id 1) (Index 0) List.568; + ret List.184; else - let List.177 : U64 = UnionAtIndex (Id 0) (Index 0) List.560; - ret List.177; + let List.185 : U64 = UnionAtIndex (Id 0) (Index 0) List.568; + ret List.185; -procedure List.38 (List.316, List.317): - let List.559 : U64 = CallByName List.6 List.316; - let List.318 : U64 = CallByName Num.77 List.559 List.317; - let List.545 : List U8 = CallByName List.43 List.316 List.318; - ret List.545; +procedure List.38 (List.324, List.325): + let List.567 : U64 = CallByName List.6 List.324; + let List.326 : U64 = CallByName Num.77 List.567 List.325; + let List.553 : List U8 = CallByName List.43 List.324 List.326; + ret List.553; -procedure List.43 (List.314, List.315): - let List.557 : U64 = CallByName List.6 List.314; - let List.556 : U64 = CallByName Num.77 List.557 List.315; - let List.547 : {U64, U64} = Struct {List.315, List.556}; - let List.546 : List U8 = CallByName List.49 List.314 List.547; - ret List.546; +procedure List.43 (List.322, List.323): + let List.565 : U64 = CallByName List.6 List.322; + let List.564 : U64 = CallByName Num.77 List.565 List.323; + let List.555 : {U64, U64} = Struct {List.323, List.564}; + let List.554 : List U8 = CallByName List.49 List.322 List.555; + ret List.554; -procedure List.49 (List.392, List.393): - let List.554 : U64 = StructAtIndex 0 List.393; - let List.555 : U64 = 0i64; - let List.552 : Int1 = CallByName Bool.11 List.554 List.555; - if List.552 then - dec List.392; - let List.553 : List U8 = Array []; - ret List.553; +procedure List.49 (List.400, List.401): + let List.562 : U64 = StructAtIndex 0 List.401; + let List.563 : U64 = 0i64; + let List.560 : Int1 = CallByName Bool.11 List.562 List.563; + if List.560 then + dec List.400; + let List.561 : List U8 = Array []; + ret List.561; else - let List.549 : U64 = StructAtIndex 1 List.393; - let List.550 : U64 = StructAtIndex 0 List.393; - let List.548 : List U8 = CallByName List.72 List.392 List.549 List.550; - ret List.548; + let List.557 : U64 = StructAtIndex 1 List.401; + let List.558 : U64 = StructAtIndex 0 List.401; + let List.556 : List U8 = CallByName List.72 List.400 List.557 List.558; + ret List.556; procedure List.6 (#Attr.2): - let List.558 : U64 = lowlevel ListLen #Attr.2; - ret List.558; + let List.566 : U64 = lowlevel ListLen #Attr.2; + ret List.566; procedure List.66 (#Attr.2, #Attr.3): - let List.581 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.581; + let List.589 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.589; procedure List.72 (#Attr.2, #Attr.3, #Attr.4): - let List.551 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.551; + let List.559 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; + ret List.559; procedure List.80 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2, #Derived_gen.3, #Derived_gen.4): - joinpoint List.569 List.463 List.464 List.465 List.466 List.467: - let List.571 : Int1 = CallByName Num.22 List.466 List.467; - if List.571 then - let List.580 : U8 = CallByName List.66 List.463 List.466; - let List.572 : [C U64, C U64] = CallByName Test.3 List.464 List.580; - let List.577 : U8 = 1i64; - let List.578 : U8 = GetTagId List.572; - let List.579 : Int1 = lowlevel Eq List.577 List.578; - if List.579 then - let List.468 : U64 = UnionAtIndex (Id 1) (Index 0) List.572; - let List.575 : U64 = 1i64; - let List.574 : U64 = CallByName Num.51 List.466 List.575; - jump List.569 List.463 List.468 List.465 List.574 List.467; + joinpoint List.577 List.471 List.472 List.473 List.474 List.475: + let List.579 : Int1 = CallByName Num.22 List.474 List.475; + if List.579 then + let List.588 : U8 = CallByName List.66 List.471 List.474; + let List.580 : [C U64, C U64] = CallByName Test.3 List.472 List.588; + let List.585 : U8 = 1i64; + let List.586 : U8 = GetTagId List.580; + let List.587 : Int1 = lowlevel Eq List.585 List.586; + if List.587 then + let List.476 : U64 = UnionAtIndex (Id 1) (Index 0) List.580; + let List.583 : U64 = 1i64; + let List.582 : U64 = CallByName Num.51 List.474 List.583; + jump List.577 List.471 List.476 List.473 List.582 List.475; else - dec List.463; - let List.469 : U64 = UnionAtIndex (Id 0) (Index 0) List.572; - let List.576 : [C U64, C U64] = TagId(0) List.469; - ret List.576; + dec List.471; + let List.477 : U64 = UnionAtIndex (Id 0) (Index 0) List.580; + let List.584 : [C U64, C U64] = TagId(0) List.477; + ret List.584; else - dec List.463; - let List.570 : [C U64, C U64] = TagId(1) List.464; - ret List.570; + dec List.471; + let List.578 : [C U64, C U64] = TagId(1) List.472; + ret List.578; in - jump List.569 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; + jump List.577 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; -procedure List.97 (List.460, List.461, List.462): - let List.567 : U64 = 0i64; - let List.568 : U64 = CallByName List.6 List.460; - let List.566 : [C U64, C U64] = CallByName List.80 List.460 List.461 List.462 List.567 List.568; - ret List.566; +procedure List.99 (List.468, List.469, List.470): + let List.575 : U64 = 0i64; + let List.576 : U64 = CallByName List.6 List.468; + let List.574 : [C U64, C U64] = CallByName List.80 List.468 List.469 List.470 List.575 List.576; + ret List.574; procedure Num.22 (#Attr.2, #Attr.3): let Num.294 : Int1 = lowlevel NumLt #Attr.2 #Attr.3;