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 21119c76401..1e502ae9e57 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.172, List.173, List.174): - let List.550 : [C U64, C U64] = CallByName List.96 List.172 List.173 List.174; - let List.553 : U8 = 1i64; - let List.554 : U8 = GetTagId List.550; - let List.555 : Int1 = lowlevel Eq List.553 List.554; - if List.555 then - let List.175 : U64 = UnionAtIndex (Id 1) (Index 0) List.550; - ret List.175; +procedure List.26 (List.174, List.175, List.176): + let List.560 : [C U64, C U64] = CallByName List.98 List.174 List.175 List.176; + 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.177 : U64 = UnionAtIndex (Id 1) (Index 0) List.560; + ret List.177; else - let List.176 : U64 = UnionAtIndex (Id 0) (Index 0) List.550; - ret List.176; + let List.178 : U64 = UnionAtIndex (Id 0) (Index 0) List.560; + ret List.178; -procedure List.29 (List.317, List.318): - let List.549 : U64 = CallByName List.6 List.317; - let List.319 : U64 = CallByName Num.77 List.549 List.318; - let List.535 : List U8 = CallByName List.43 List.317 List.319; - ret List.535; +procedure List.29 (List.319, List.320): + let List.559 : U64 = CallByName List.6 List.319; + let List.321 : U64 = CallByName Num.77 List.559 List.320; + let List.545 : List U8 = CallByName List.43 List.319 List.321; + ret List.545; -procedure List.43 (List.315, List.316): - let List.547 : U64 = CallByName List.6 List.315; - let List.546 : U64 = CallByName Num.77 List.547 List.316; - let List.537 : {U64, U64} = Struct {List.316, List.546}; - let List.536 : List U8 = CallByName List.49 List.315 List.537; - ret List.536; +procedure List.43 (List.317, List.318): + let List.557 : U64 = CallByName List.6 List.317; + let List.556 : U64 = CallByName Num.77 List.557 List.318; + let List.547 : {U64, U64} = Struct {List.318, List.556}; + let List.546 : List U8 = CallByName List.49 List.317 List.547; + ret List.546; -procedure List.49 (List.390, List.391): - let List.544 : U64 = StructAtIndex 0 List.391; - let List.545 : U64 = 0i64; - let List.542 : Int1 = CallByName Bool.11 List.544 List.545; - if List.542 then - dec List.390; - let List.543 : List U8 = Array []; - ret List.543; +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; else - let List.539 : U64 = StructAtIndex 1 List.391; - let List.540 : U64 = StructAtIndex 0 List.391; - let List.538 : List U8 = CallByName List.72 List.390 List.539 List.540; - ret List.538; + 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; procedure List.6 (#Attr.2): - let List.548 : U64 = lowlevel ListLen #Attr.2; - ret List.548; + let List.558 : U64 = lowlevel ListLen #Attr.2; + ret List.558; procedure List.66 (#Attr.2, #Attr.3): - let List.571 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.571; + let List.581 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.581; procedure List.72 (#Attr.2, #Attr.3, #Attr.4): - let List.541 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.541; + let List.551 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; + ret List.551; procedure List.80 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2, #Derived_gen.3, #Derived_gen.4): - joinpoint List.559 List.453 List.454 List.455 List.456 List.457: - let List.561 : Int1 = CallByName Num.22 List.456 List.457; - if List.561 then - let List.570 : U8 = CallByName List.66 List.453 List.456; - let List.562 : [C U64, C U64] = CallByName Test.4 List.454 List.570; - let List.567 : U8 = 1i64; - let List.568 : U8 = GetTagId List.562; - let List.569 : Int1 = lowlevel Eq List.567 List.568; - if List.569 then - let List.458 : U64 = UnionAtIndex (Id 1) (Index 0) List.562; - let List.565 : U64 = 1i64; - let List.564 : U64 = CallByName Num.51 List.456 List.565; - jump List.559 List.453 List.458 List.455 List.564 List.457; + 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; else - dec List.453; - let List.459 : U64 = UnionAtIndex (Id 0) (Index 0) List.562; - let List.566 : [C U64, C U64] = TagId(0) List.459; - ret List.566; + 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; else - dec List.453; - let List.560 : [C U64, C U64] = TagId(1) List.454; - ret List.560; + dec List.463; + let List.570 : [C U64, C U64] = TagId(1) List.464; + ret List.570; in - jump List.559 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; + jump List.569 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; -procedure List.96 (List.450, List.451, List.452): - let List.557 : U64 = 0i64; - let List.558 : U64 = CallByName List.6 List.450; - let List.556 : [C U64, C U64] = CallByName List.80 List.450 List.451 List.452 List.557 List.558; - ret List.556; +procedure List.98 (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 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 37a77978b7d..20ef3a7f161 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.535 : List {} = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.2 #Attr.3; + let List.545 : List {} = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.2 #Attr.3; decref #Attr.2; - ret List.535; + ret List.545; 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 8028068b672..2383916b182 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.535 : List [] = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.2 #Attr.3; + let List.545 : List [] = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.2 #Attr.3; decref #Attr.2; - ret List.535; + ret List.545; 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 f290b645eca..ec0ddeee23d 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.145, List.146, List.147): - let List.536 : U64 = 0i64; - let List.537 : U64 = CallByName List.6 List.145; - let List.535 : [C {}, C *self {{}, []}] = CallByName List.86 List.145 List.146 List.147 List.536 List.537; - ret List.535; +procedure List.18 (List.147, List.148, List.149): + let List.546 : U64 = 0i64; + let List.547 : U64 = CallByName List.6 List.147; + let List.545 : [C {}, C *self {{}, []}] = CallByName List.87 List.147 List.148 List.149 List.546 List.547; + ret List.545; procedure List.6 (#Attr.2): - let List.546 : U64 = lowlevel ListLen #Attr.2; - ret List.546; + let List.556 : U64 = lowlevel ListLen #Attr.2; + ret List.556; procedure List.66 (#Attr.2, #Attr.3): - let List.545 : [] = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.545; - -procedure List.86 (#Derived_gen.13, #Derived_gen.14, #Derived_gen.15, #Derived_gen.16, #Derived_gen.17): - joinpoint List.538 List.148 List.149 List.150 List.151 List.152: - let List.540 : Int1 = CallByName Num.22 List.151 List.152; - if List.540 then - let List.544 : [] = CallByName List.66 List.148 List.151; - let List.153 : [C {}, C *self {{}, []}] = CallByName Test.29 List.149 List.544 List.150; - let List.543 : U64 = 1i64; - let List.542 : U64 = CallByName Num.51 List.151 List.543; - jump List.538 List.148 List.153 List.150 List.542 List.152; + let List.555 : [] = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.555; + +procedure List.87 (#Derived_gen.13, #Derived_gen.14, #Derived_gen.15, #Derived_gen.16, #Derived_gen.17): + joinpoint List.548 List.150 List.151 List.152 List.153 List.154: + let List.550 : Int1 = CallByName Num.22 List.153 List.154; + if List.550 then + let List.554 : [] = CallByName List.66 List.150 List.153; + let List.155 : [C {}, C *self {{}, []}] = CallByName Test.29 List.151 List.554 List.152; + let List.553 : U64 = 1i64; + let List.552 : U64 = CallByName Num.51 List.153 List.553; + jump List.548 List.150 List.155 List.152 List.552 List.154; else - dec List.148; - ret List.149; + dec List.150; + ret List.151; in - jump List.538 #Derived_gen.13 #Derived_gen.14 #Derived_gen.15 #Derived_gen.16 #Derived_gen.17; + jump List.548 #Derived_gen.13 #Derived_gen.14 #Derived_gen.15 #Derived_gen.16 #Derived_gen.17; 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 ec6699fa987..dcf9dd45fb5 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.100, List.101): - let List.549 : U64 = CallByName List.6 List.100; - let List.545 : Int1 = CallByName Num.22 List.101 List.549; - if List.545 then - let List.547 : Str = CallByName List.66 List.100 List.101; - inc List.547; - dec List.100; - let List.546 : [C {}, C Str] = TagId(1) List.547; - ret List.546; +procedure List.2 (List.102, List.103): + let List.559 : U64 = CallByName List.6 List.102; + let List.555 : Int1 = CallByName Num.22 List.103 List.559; + if List.555 then + let List.557 : Str = CallByName List.66 List.102 List.103; + inc List.557; + dec List.102; + let List.556 : [C {}, C Str] = TagId(1) List.557; + ret List.556; else - dec List.100; - let List.544 : {} = Struct {}; - let List.543 : [C {}, C Str] = TagId(0) List.544; - ret List.543; + dec List.102; + 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.551 : List Str = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.10 #Attr.3; + let List.561 : List Str = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.10 #Attr.3; decref #Attr.2; - ret List.551; + ret List.561; procedure List.6 (#Attr.2): - let List.550 : U64 = lowlevel ListLen #Attr.2; - ret List.550; + let List.560 : U64 = lowlevel ListLen #Attr.2; + ret List.560; procedure List.66 (#Attr.2, #Attr.3): - let List.548 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.548; + let List.558 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.558; -procedure List.9 (List.306): - let List.542 : U64 = 0i64; - let List.535 : [C {}, C Str] = CallByName List.2 List.306 List.542; - let List.539 : U8 = 1i64; - let List.540 : U8 = GetTagId List.535; - let List.541 : Int1 = lowlevel Eq List.539 List.540; - if List.541 then - let List.307 : Str = UnionAtIndex (Id 1) (Index 0) List.535; - let List.536 : [C {}, C Str] = TagId(1) List.307; - ret List.536; +procedure List.9 (List.308): + let List.552 : U64 = 0i64; + let List.545 : [C {}, C Str] = CallByName List.2 List.308 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.309 : Str = UnionAtIndex (Id 1) (Index 0) List.545; + let List.546 : [C {}, C Str] = TagId(1) List.309; + ret List.546; else - dec List.535; - let List.538 : {} = Struct {}; - let List.537 : [C {}, C Str] = TagId(0) List.538; - ret List.537; + dec List.545; + let List.548 : {} = Struct {}; + let List.547 : [C {}, C Str] = TagId(0) List.548; + ret List.547; 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 41cd34065e3..ae21589d90f 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.535 : U64 = lowlevel ListLen #Attr.2; - ret List.535; + let List.545 : U64 = lowlevel ListLen #Attr.2; + ret List.545; 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 f3a41ef8ab5..d9f51ebc465 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.145, List.146, List.147): - let List.536 : U64 = 0i64; - let List.537 : U64 = CallByName List.6 List.145; - let List.535 : [, C *self Int1, C *self Int1] = CallByName List.86 List.145 List.146 List.147 List.536 List.537; - ret List.535; +procedure List.18 (List.147, List.148, List.149): + let List.546 : U64 = 0i64; + let List.547 : U64 = CallByName List.6 List.147; + let List.545 : [, C *self Int1, C *self Int1] = CallByName List.87 List.147 List.148 List.149 List.546 List.547; + ret List.545; procedure List.6 (#Attr.2): - let List.546 : U64 = lowlevel ListLen #Attr.2; - ret List.546; + let List.556 : U64 = lowlevel ListLen #Attr.2; + ret List.556; procedure List.66 (#Attr.2, #Attr.3): - let List.545 : Int1 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.545; + let List.555 : Int1 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.555; -procedure List.86 (#Derived_gen.3, #Derived_gen.4, #Derived_gen.5, #Derived_gen.6, #Derived_gen.7): - joinpoint List.538 List.148 List.149 List.150 List.151 List.152: - let List.540 : Int1 = CallByName Num.22 List.151 List.152; - if List.540 then - let List.544 : Int1 = CallByName List.66 List.148 List.151; - let List.153 : [, C *self Int1, C *self Int1] = CallByName Test.6 List.149 List.544 List.150; - let List.543 : U64 = 1i64; - let List.542 : U64 = CallByName Num.51 List.151 List.543; - jump List.538 List.148 List.153 List.150 List.542 List.152; +procedure List.87 (#Derived_gen.5, #Derived_gen.6, #Derived_gen.7, #Derived_gen.8, #Derived_gen.9): + joinpoint List.548 List.150 List.151 List.152 List.153 List.154: + let List.550 : Int1 = CallByName Num.22 List.153 List.154; + if List.550 then + let List.554 : Int1 = CallByName List.66 List.150 List.153; + let List.155 : [, C *self Int1, C *self Int1] = CallByName Test.6 List.151 List.554 List.152; + let List.553 : U64 = 1i64; + let List.552 : U64 = CallByName Num.51 List.153 List.553; + jump List.548 List.150 List.155 List.152 List.552 List.154; else - dec List.148; - ret List.149; + dec List.150; + ret List.151; in - jump List.538 #Derived_gen.3 #Derived_gen.4 #Derived_gen.5 #Derived_gen.6 #Derived_gen.7; + jump List.548 #Derived_gen.5 #Derived_gen.6 #Derived_gen.7 #Derived_gen.8 #Derived_gen.9; procedure Num.22 (#Attr.2, #Attr.3): let Num.292 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; @@ -46,7 +46,7 @@ procedure Str.3 (#Attr.2, #Attr.3): procedure Test.1 (Test.5): ret Test.5; -procedure Test.11 (#Derived_gen.8, #Derived_gen.9): +procedure Test.11 (#Derived_gen.3, #Derived_gen.4): joinpoint Test.27 Test.12 #Attr.12: let Test.34 : Int1 = UnionAtIndex (Id 2) (Index 1) #Attr.12; let Test.33 : [, C *self Int1, C *self Int1] = UnionAtIndex (Id 2) (Index 0) #Attr.12; @@ -86,7 +86,7 @@ procedure Test.11 (#Derived_gen.8, #Derived_gen.9): decref #Attr.12; jump #Derived_gen.12; in - jump Test.27 #Derived_gen.8 #Derived_gen.9; + jump Test.27 #Derived_gen.3 #Derived_gen.4; procedure Test.2 (Test.13): ret Test.13; diff --git a/crates/compiler/test_mono/generated/dict.txt b/crates/compiler/test_mono/generated/dict.txt index d8a76addfbb..045a2c960e2 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.124, List.125): - let List.536 : List I8 = CallByName List.68 List.125; - let List.535 : List I8 = CallByName List.84 List.124 List.125 List.536; - ret List.535; +procedure List.11 (List.126, List.127): + let List.546 : List I8 = CallByName List.68 List.127; + let List.545 : List I8 = CallByName List.85 List.126 List.127 List.546; + ret List.545; -procedure List.11 (List.124, List.125): - let List.548 : List U64 = CallByName List.68 List.125; - let List.547 : List U64 = CallByName List.84 List.124 List.125 List.548; - ret List.547; +procedure List.11 (List.126, List.127): + let List.558 : List U64 = CallByName List.68 List.127; + let List.557 : List U64 = CallByName List.85 List.126 List.127 List.558; + ret List.557; procedure List.68 (#Attr.2): - let List.546 : List I8 = lowlevel ListWithCapacity #Attr.2; - ret List.546; + let List.556 : List I8 = lowlevel ListWithCapacity #Attr.2; + ret List.556; procedure List.68 (#Attr.2): - let List.558 : List U64 = lowlevel ListWithCapacity #Attr.2; - ret List.558; + let List.568 : List U64 = lowlevel ListWithCapacity #Attr.2; + ret List.568; procedure List.71 (#Attr.2, #Attr.3): - let List.543 : List I8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.543; + let List.553 : List I8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.553; procedure List.71 (#Attr.2, #Attr.3): - let List.555 : List U64 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.555; + let List.565 : List U64 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.565; -procedure List.84 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2): - joinpoint List.537 List.126 List.127 List.128: - let List.545 : U64 = 0i64; - let List.539 : Int1 = CallByName Num.24 List.127 List.545; - if List.539 then - let List.544 : U64 = 1i64; - let List.541 : U64 = CallByName Num.75 List.127 List.544; - let List.542 : List I8 = CallByName List.71 List.128 List.126; - jump List.537 List.126 List.541 List.542; +procedure List.85 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2): + joinpoint List.559 List.128 List.129 List.130: + let List.567 : U64 = 0i64; + let List.561 : Int1 = CallByName Num.24 List.129 List.567; + if List.561 then + let List.566 : U64 = 1i64; + let List.563 : U64 = CallByName Num.75 List.129 List.566; + let List.564 : List U64 = CallByName List.71 List.130 List.128; + jump List.559 List.128 List.563 List.564; else - ret List.128; + ret List.130; in - jump List.537 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2; + jump List.559 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2; -procedure List.84 (#Derived_gen.3, #Derived_gen.4, #Derived_gen.5): - joinpoint List.549 List.126 List.127 List.128: - let List.557 : U64 = 0i64; - let List.551 : Int1 = CallByName Num.24 List.127 List.557; - if List.551 then - let List.556 : U64 = 1i64; - let List.553 : U64 = CallByName Num.75 List.127 List.556; - let List.554 : List U64 = CallByName List.71 List.128 List.126; - jump List.549 List.126 List.553 List.554; +procedure List.85 (#Derived_gen.3, #Derived_gen.4, #Derived_gen.5): + joinpoint List.547 List.128 List.129 List.130: + let List.555 : U64 = 0i64; + let List.549 : Int1 = CallByName Num.24 List.129 List.555; + if List.549 then + let List.554 : U64 = 1i64; + let List.551 : U64 = CallByName Num.75 List.129 List.554; + let List.552 : List I8 = CallByName List.71 List.130 List.128; + jump List.547 List.128 List.551 List.552; else - ret List.128; + ret List.130; in - jump List.549 #Derived_gen.3 #Derived_gen.4 #Derived_gen.5; + jump List.547 #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 0105713526d..3eba7315811 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.100, List.101): - let List.541 : U64 = CallByName List.6 List.100; - let List.537 : Int1 = CallByName Num.22 List.101 List.541; - if List.537 then - let List.539 : {} = CallByName List.66 List.100 List.101; - dec List.100; - let List.538 : [C {}, C {}] = TagId(1) List.539; - ret List.538; +procedure List.2 (List.102, List.103): + let List.551 : U64 = CallByName List.6 List.102; + let List.547 : Int1 = CallByName Num.22 List.103 List.551; + if List.547 then + let List.549 : {} = CallByName List.66 List.102 List.103; + dec List.102; + let List.548 : [C {}, C {}] = TagId(1) List.549; + ret List.548; else - dec List.100; - let List.536 : {} = Struct {}; - let List.535 : [C {}, C {}] = TagId(0) List.536; - ret List.535; + dec List.102; + let List.546 : {} = Struct {}; + let List.545 : [C {}, C {}] = TagId(0) List.546; + ret List.545; procedure List.6 (#Attr.2): - let List.542 : U64 = lowlevel ListLen #Attr.2; - ret List.542; + let List.552 : U64 = lowlevel ListLen #Attr.2; + ret List.552; procedure List.66 (#Attr.2, #Attr.3): - let List.540 : {} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.540; + let List.550 : {} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.550; 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 2bb6e433d60..c14e0f4b5d2 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.116, List.117): - let List.538 : U64 = 1i64; - let List.536 : List U8 = CallByName List.70 List.116 List.538; - let List.535 : List U8 = CallByName List.71 List.536 List.117; - ret List.535; +procedure List.4 (List.118, List.119): + let List.548 : U64 = 1i64; + let List.546 : List U8 = CallByName List.70 List.118 List.548; + let List.545 : List U8 = CallByName List.71 List.546 List.119; + ret List.545; procedure List.70 (#Attr.2, #Attr.3): - let List.539 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.539; + let List.549 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.549; procedure List.71 (#Attr.2, #Attr.3): - let List.537 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.537; + let List.547 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.547; 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 cd73580ae74..380cdd5e59e 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,235 +78,235 @@ procedure Encode.26 (Encode.105, Encode.106): ret Encode.108; procedure List.13 (#Attr.2, #Attr.3): - let List.679 : List Str = lowlevel ListPrepend #Attr.2 #Attr.3; - ret List.679; - -procedure List.18 (List.145, List.146, List.147): - let List.565 : U64 = 0i64; - let List.566 : U64 = CallByName List.6 List.145; - let List.564 : {List U8, U64} = CallByName List.86 List.145 List.146 List.147 List.565 List.566; - ret List.564; - -procedure List.18 (List.145, List.146, List.147): - let List.625 : U64 = 0i64; - let List.626 : U64 = CallByName List.6 List.145; - let List.624 : {List U8, U64} = CallByName List.86 List.145 List.146 List.147 List.625 List.626; - ret List.624; - -procedure List.18 (List.145, List.146, List.147): - let List.637 : U64 = 0i64; - let List.638 : U64 = CallByName List.6 List.145; - let List.636 : List U8 = CallByName List.86 List.145 List.146 List.147 List.637 List.638; - ret List.636; - -procedure List.26 (List.172, List.173, List.174): - let List.696 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.96 List.172 List.173 List.174; - let List.699 : U8 = 1i64; - let List.700 : U8 = GetTagId List.696; - let List.701 : Int1 = lowlevel Eq List.699 List.700; - if List.701 then - let List.175 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.696; - ret List.175; + let List.689 : List Str = lowlevel ListPrepend #Attr.2 #Attr.3; + ret List.689; + +procedure List.18 (List.147, List.148, List.149): + let List.575 : U64 = 0i64; + let List.576 : U64 = CallByName List.6 List.147; + let List.574 : {List U8, U64} = CallByName List.87 List.147 List.148 List.149 List.575 List.576; + ret List.574; + +procedure List.18 (List.147, List.148, List.149): + let List.635 : U64 = 0i64; + let List.636 : U64 = CallByName List.6 List.147; + let List.634 : {List U8, U64} = CallByName List.87 List.147 List.148 List.149 List.635 List.636; + ret List.634; + +procedure List.18 (List.147, List.148, List.149): + let List.647 : U64 = 0i64; + let List.648 : U64 = CallByName List.6 List.147; + let List.646 : List U8 = CallByName List.87 List.147 List.148 List.149 List.647 List.648; + ret List.646; + +procedure List.26 (List.174, List.175, List.176): + let List.706 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.98 List.174 List.175 List.176; + let List.709 : U8 = 1i64; + let List.710 : U8 = GetTagId List.706; + let List.711 : Int1 = lowlevel Eq List.709 List.710; + if List.711 then + let List.177 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.706; + ret List.177; else - let List.176 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.696; - ret List.176; + let List.178 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.706; + ret List.178; procedure List.31 (#Attr.2, #Attr.3): - let List.661 : List Str = lowlevel ListDropAt #Attr.2 #Attr.3; - ret List.661; + let List.671 : List Str = lowlevel ListDropAt #Attr.2 #Attr.3; + ret List.671; -procedure List.38 (List.311): - let List.669 : U64 = 0i64; - let List.668 : List Str = CallByName List.31 List.311 List.669; - ret List.668; +procedure List.38 (List.313): + let List.679 : U64 = 0i64; + let List.678 : List Str = CallByName List.31 List.313 List.679; + ret List.678; -procedure List.4 (List.116, List.117): - let List.620 : U64 = 1i64; - let List.619 : List Str = CallByName List.70 List.116 List.620; - let List.618 : List Str = CallByName List.71 List.619 List.117; - ret List.618; - -procedure List.4 (List.116, List.117): - let List.623 : U64 = 1i64; - let List.622 : List U8 = CallByName List.70 List.116 List.623; - let List.621 : List U8 = CallByName List.71 List.622 List.117; - ret List.621; - -procedure List.49 (List.390, List.391): - let List.688 : U64 = StructAtIndex 0 List.391; - let List.689 : U64 = 0i64; - let List.686 : Int1 = CallByName Bool.11 List.688 List.689; - if List.686 then - dec List.390; - let List.687 : List U8 = Array []; - ret List.687; +procedure List.4 (List.118, List.119): + let List.630 : U64 = 1i64; + let List.629 : List Str = CallByName List.70 List.118 List.630; + let List.628 : List Str = CallByName List.71 List.629 List.119; + ret List.628; + +procedure List.4 (List.118, List.119): + let List.633 : U64 = 1i64; + let List.632 : List U8 = CallByName List.70 List.118 List.633; + let List.631 : List U8 = CallByName List.71 List.632 List.119; + ret List.631; + +procedure List.49 (List.392, List.393): + let List.698 : U64 = StructAtIndex 0 List.393; + let List.699 : U64 = 0i64; + let List.696 : Int1 = CallByName Bool.11 List.698 List.699; + if List.696 then + dec List.392; + let List.697 : List U8 = Array []; + ret List.697; else - let List.683 : U64 = StructAtIndex 1 List.391; - let List.684 : U64 = StructAtIndex 0 List.391; - let List.682 : List U8 = CallByName List.72 List.390 List.683 List.684; - ret List.682; - -procedure List.52 (List.405, List.406): - let List.407 : U64 = CallByName List.6 List.405; - joinpoint List.694 List.408: - let List.692 : U64 = 0i64; - let List.691 : {U64, U64} = Struct {List.408, List.692}; - inc List.405; - let List.409 : List U8 = CallByName List.49 List.405 List.691; - let List.690 : U64 = CallByName Num.75 List.407 List.408; - let List.681 : {U64, U64} = Struct {List.690, List.408}; - let List.410 : List U8 = CallByName List.49 List.405 List.681; - let List.680 : {List U8, List U8} = Struct {List.409, List.410}; - ret List.680; + let List.693 : U64 = StructAtIndex 1 List.393; + let List.694 : U64 = StructAtIndex 0 List.393; + let List.692 : List U8 = CallByName List.72 List.392 List.693 List.694; + ret List.692; + +procedure List.52 (List.407, List.408): + let List.409 : U64 = CallByName List.6 List.407; + joinpoint List.704 List.410: + let List.702 : U64 = 0i64; + let List.701 : {U64, U64} = Struct {List.410, List.702}; + inc List.407; + let List.411 : List U8 = CallByName List.49 List.407 List.701; + let List.700 : U64 = CallByName Num.75 List.409 List.410; + let List.691 : {U64, U64} = Struct {List.700, List.410}; + let List.412 : List U8 = CallByName List.49 List.407 List.691; + let List.690 : {List U8, List U8} = Struct {List.411, List.412}; + ret List.690; in - let List.695 : Int1 = CallByName Num.24 List.407 List.406; - if List.695 then - jump List.694 List.406; + let List.705 : Int1 = CallByName Num.24 List.409 List.408; + if List.705 then + jump List.704 List.408; else - jump List.694 List.407; + jump List.704 List.409; procedure List.6 (#Attr.2): - let List.594 : U64 = lowlevel ListLen #Attr.2; - ret List.594; + let List.604 : U64 = lowlevel ListLen #Attr.2; + ret List.604; procedure List.6 (#Attr.2): - let List.675 : U64 = lowlevel ListLen #Attr.2; - ret List.675; + let List.685 : U64 = lowlevel ListLen #Attr.2; + ret List.685; procedure List.6 (#Attr.2): - let List.676 : U64 = lowlevel ListLen #Attr.2; - ret List.676; + let List.686 : U64 = lowlevel ListLen #Attr.2; + ret List.686; procedure List.6 (#Attr.2): - let List.678 : U64 = lowlevel ListLen #Attr.2; - ret List.678; + let List.688 : U64 = lowlevel ListLen #Attr.2; + ret List.688; procedure List.66 (#Attr.2, #Attr.3): - let List.574 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.574; + let List.584 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.584; procedure List.66 (#Attr.2, #Attr.3): - let List.634 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.634; + let List.644 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.644; procedure List.66 (#Attr.2, #Attr.3): - let List.646 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.646; + let List.656 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.656; procedure List.68 (#Attr.2): - let List.671 : List Str = lowlevel ListWithCapacity #Attr.2; - ret List.671; + let List.681 : List Str = lowlevel ListWithCapacity #Attr.2; + ret List.681; procedure List.68 (#Attr.2): - let List.673 : List U8 = lowlevel ListWithCapacity #Attr.2; - ret List.673; + let List.683 : List U8 = lowlevel ListWithCapacity #Attr.2; + ret List.683; procedure List.70 (#Attr.2, #Attr.3): - let List.600 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.600; + let List.610 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.610; procedure List.70 (#Attr.2, #Attr.3): - let List.617 : List Str = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.617; + let List.627 : List Str = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.627; procedure List.71 (#Attr.2, #Attr.3): - let List.598 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.598; + let List.608 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.608; procedure List.71 (#Attr.2, #Attr.3): - let List.615 : List Str = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.615; + let List.625 : List Str = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.625; procedure List.72 (#Attr.2, #Attr.3, #Attr.4): - let List.685 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.685; + let List.695 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; + ret List.695; procedure List.8 (#Attr.2, #Attr.3): - let List.650 : List Str = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.650; + let List.660 : List Str = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.660; procedure List.8 (#Attr.2, #Attr.3): - let List.658 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.658; - -procedure List.80 (#Derived_gen.30, #Derived_gen.31, #Derived_gen.32, #Derived_gen.33, #Derived_gen.34): - joinpoint List.705 List.453 List.454 List.455 List.456 List.457: - let List.707 : Int1 = CallByName Num.22 List.456 List.457; - if List.707 then - let List.716 : U8 = CallByName List.66 List.453 List.456; - let List.708 : [C {U64, Int1}, C {U64, Int1}] = CallByName TotallyNotJson.189 List.454 List.716; - let List.713 : U8 = 1i64; - let List.714 : U8 = GetTagId List.708; - let List.715 : Int1 = lowlevel Eq List.713 List.714; - if List.715 then - let List.458 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.708; - let List.711 : U64 = 1i64; - let List.710 : U64 = CallByName Num.51 List.456 List.711; - jump List.705 List.453 List.458 List.455 List.710 List.457; + let List.668 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.668; + +procedure List.80 (#Derived_gen.35, #Derived_gen.36, #Derived_gen.37, #Derived_gen.38, #Derived_gen.39): + joinpoint List.715 List.463 List.464 List.465 List.466 List.467: + let List.717 : Int1 = CallByName Num.22 List.466 List.467; + if List.717 then + let List.726 : U8 = CallByName List.66 List.463 List.466; + let List.718 : [C {U64, Int1}, C {U64, Int1}] = CallByName TotallyNotJson.189 List.464 List.726; + let List.723 : U8 = 1i64; + let List.724 : U8 = GetTagId List.718; + let List.725 : Int1 = lowlevel Eq List.723 List.724; + if List.725 then + let List.468 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.718; + let List.721 : U64 = 1i64; + let List.720 : U64 = CallByName Num.51 List.466 List.721; + jump List.715 List.463 List.468 List.465 List.720 List.467; else - dec List.453; - let List.459 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.708; - let List.712 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) List.459; - ret List.712; + dec List.463; + let List.469 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.718; + let List.722 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) List.469; + ret List.722; else - dec List.453; - let List.706 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.454; - ret List.706; + dec List.463; + let List.716 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.464; + ret List.716; in - jump List.705 #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.567 List.148 List.149 List.150 List.151 List.152: - let List.569 : Int1 = CallByName Num.22 List.151 List.152; - if List.569 then - let List.573 : {Str, Str} = CallByName List.66 List.148 List.151; - inc List.573; - let List.153 : {List U8, U64} = CallByName TotallyNotJson.237 List.149 List.573 List.150; - let List.572 : U64 = 1i64; - let List.571 : U64 = CallByName Num.51 List.151 List.572; - jump List.567 List.148 List.153 List.150 List.571 List.152; + jump List.715 #Derived_gen.35 #Derived_gen.36 #Derived_gen.37 #Derived_gen.38 #Derived_gen.39; + +procedure List.87 (#Derived_gen.23, #Derived_gen.24, #Derived_gen.25, #Derived_gen.26, #Derived_gen.27): + joinpoint List.649 List.150 List.151 List.152 List.153 List.154: + let List.651 : Int1 = CallByName Num.22 List.153 List.154; + if List.651 then + let List.655 : U8 = CallByName List.66 List.150 List.153; + let List.155 : List U8 = CallByName TotallyNotJson.215 List.151 List.655; + let List.654 : U64 = 1i64; + let List.653 : U64 = CallByName Num.51 List.153 List.654; + jump List.649 List.150 List.155 List.152 List.653 List.154; else - dec List.148; - ret List.149; + dec List.150; + ret List.151; in - jump List.567 #Derived_gen.35 #Derived_gen.36 #Derived_gen.37 #Derived_gen.38 #Derived_gen.39; - -procedure List.86 (#Derived_gen.46, #Derived_gen.47, #Derived_gen.48, #Derived_gen.49, #Derived_gen.50): - joinpoint List.639 List.148 List.149 List.150 List.151 List.152: - let List.641 : Int1 = CallByName Num.22 List.151 List.152; - if List.641 then - let List.645 : U8 = CallByName List.66 List.148 List.151; - let List.153 : List U8 = CallByName TotallyNotJson.215 List.149 List.645; - let List.644 : U64 = 1i64; - let List.643 : U64 = CallByName Num.51 List.151 List.644; - jump List.639 List.148 List.153 List.150 List.643 List.152; + jump List.649 #Derived_gen.23 #Derived_gen.24 #Derived_gen.25 #Derived_gen.26 #Derived_gen.27; + +procedure List.87 (#Derived_gen.40, #Derived_gen.41, #Derived_gen.42, #Derived_gen.43, #Derived_gen.44): + joinpoint List.577 List.150 List.151 List.152 List.153 List.154: + let List.579 : Int1 = CallByName Num.22 List.153 List.154; + if List.579 then + let List.583 : {Str, Str} = CallByName List.66 List.150 List.153; + inc List.583; + let List.155 : {List U8, U64} = CallByName TotallyNotJson.237 List.151 List.583 List.152; + let List.582 : U64 = 1i64; + let List.581 : U64 = CallByName Num.51 List.153 List.582; + jump List.577 List.150 List.155 List.152 List.581 List.154; else - dec List.148; - ret List.149; + dec List.150; + ret List.151; in - jump List.639 #Derived_gen.46 #Derived_gen.47 #Derived_gen.48 #Derived_gen.49 #Derived_gen.50; - -procedure List.86 (#Derived_gen.52, #Derived_gen.53, #Derived_gen.54, #Derived_gen.55, #Derived_gen.56): - joinpoint List.627 List.148 List.149 List.150 List.151 List.152: - let List.629 : Int1 = CallByName Num.22 List.151 List.152; - if List.629 then - let List.633 : {Str, Str} = CallByName List.66 List.148 List.151; - inc List.633; - let List.153 : {List U8, U64} = CallByName TotallyNotJson.237 List.149 List.633 List.150; - let List.632 : U64 = 1i64; - let List.631 : U64 = CallByName Num.51 List.151 List.632; - jump List.627 List.148 List.153 List.150 List.631 List.152; + jump List.577 #Derived_gen.40 #Derived_gen.41 #Derived_gen.42 #Derived_gen.43 #Derived_gen.44; + +procedure List.87 (#Derived_gen.51, #Derived_gen.52, #Derived_gen.53, #Derived_gen.54, #Derived_gen.55): + joinpoint List.637 List.150 List.151 List.152 List.153 List.154: + let List.639 : Int1 = CallByName Num.22 List.153 List.154; + if List.639 then + let List.643 : {Str, Str} = CallByName List.66 List.150 List.153; + inc List.643; + let List.155 : {List U8, U64} = CallByName TotallyNotJson.237 List.151 List.643 List.152; + let List.642 : U64 = 1i64; + let List.641 : U64 = CallByName Num.51 List.153 List.642; + jump List.637 List.150 List.155 List.152 List.641 List.154; else - dec List.148; - ret List.149; + dec List.150; + ret List.151; in - jump List.627 #Derived_gen.52 #Derived_gen.53 #Derived_gen.54 #Derived_gen.55 #Derived_gen.56; + jump List.637 #Derived_gen.51 #Derived_gen.52 #Derived_gen.53 #Derived_gen.54 #Derived_gen.55; -procedure List.96 (List.450, List.451, List.452): - let List.703 : U64 = 0i64; - let List.704 : U64 = CallByName List.6 List.450; - let List.702 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.80 List.450 List.451 List.452 List.703 List.704; - ret List.702; +procedure List.98 (List.460, List.461, List.462): + let List.713 : U64 = 0i64; + let List.714 : U64 = CallByName List.6 List.460; + let List.712 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.80 List.460 List.461 List.462 List.713 List.714; + ret List.712; procedure Num.127 (#Attr.2): let Num.306 : U8 = lowlevel NumIntCast #Attr.2; @@ -1377,7 +1377,7 @@ procedure TotallyNotJson.95 (TotallyNotJson.829): dec TotallyNotJson.1840; ret TotallyNotJson.1839; -procedure TotallyNotJson.96 (#Derived_gen.51): +procedure TotallyNotJson.96 (#Derived_gen.56): joinpoint TotallyNotJson.1847 TotallyNotJson.1168: let TotallyNotJson.834 : List Str = StructAtIndex 0 TotallyNotJson.1168; let TotallyNotJson.833 : List Str = StructAtIndex 1 TotallyNotJson.1168; @@ -1413,7 +1413,7 @@ procedure TotallyNotJson.96 (#Derived_gen.51): let TotallyNotJson.1848 : {List Str, List Str} = Struct {TotallyNotJson.834, TotallyNotJson.833}; ret TotallyNotJson.1848; in - jump TotallyNotJson.1847 #Derived_gen.51; + jump TotallyNotJson.1847 #Derived_gen.56; procedure TotallyNotJson.97 (TotallyNotJson.837): let TotallyNotJson.838 : List Str = CallByName Str.55 TotallyNotJson.837; @@ -1430,7 +1430,7 @@ procedure TotallyNotJson.97 (TotallyNotJson.837): dec TotallyNotJson.1562; ret TotallyNotJson.1560; -procedure TotallyNotJson.98 (#Derived_gen.29): +procedure TotallyNotJson.98 (#Derived_gen.34): joinpoint TotallyNotJson.1568 TotallyNotJson.1169: let TotallyNotJson.842 : List Str = StructAtIndex 0 TotallyNotJson.1169; let TotallyNotJson.841 : List Str = StructAtIndex 1 TotallyNotJson.1169; @@ -1466,7 +1466,7 @@ procedure TotallyNotJson.98 (#Derived_gen.29): let TotallyNotJson.1569 : {List Str, List Str} = Struct {TotallyNotJson.842, TotallyNotJson.841}; ret TotallyNotJson.1569; in - jump TotallyNotJson.1568 #Derived_gen.29; + jump TotallyNotJson.1568 #Derived_gen.34; procedure Test.0 (): let Test.12 : Str = "bar"; 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 2368726ce89..964ee8bb77e 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,205 +51,205 @@ procedure Encode.26 (Encode.105, Encode.106): ret Encode.108; procedure List.13 (#Attr.2, #Attr.3): - let List.619 : List Str = lowlevel ListPrepend #Attr.2 #Attr.3; - ret List.619; - -procedure List.18 (List.145, List.146, List.147): - let List.565 : U64 = 0i64; - let List.566 : U64 = CallByName List.6 List.145; - let List.564 : {List U8, U64} = CallByName List.86 List.145 List.146 List.147 List.565 List.566; - ret List.564; - -procedure List.18 (List.145, List.146, List.147): - let List.577 : U64 = 0i64; - let List.578 : U64 = CallByName List.6 List.145; - let List.576 : List U8 = CallByName List.86 List.145 List.146 List.147 List.577 List.578; - ret List.576; - -procedure List.26 (List.172, List.173, List.174): - let List.636 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.96 List.172 List.173 List.174; - let List.639 : U8 = 1i64; - let List.640 : U8 = GetTagId List.636; - let List.641 : Int1 = lowlevel Eq List.639 List.640; - if List.641 then - let List.175 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.636; - ret List.175; + let List.629 : List Str = lowlevel ListPrepend #Attr.2 #Attr.3; + ret List.629; + +procedure List.18 (List.147, List.148, List.149): + let List.575 : U64 = 0i64; + let List.576 : U64 = CallByName List.6 List.147; + let List.574 : {List U8, U64} = CallByName List.87 List.147 List.148 List.149 List.575 List.576; + ret List.574; + +procedure List.18 (List.147, List.148, List.149): + let List.587 : U64 = 0i64; + let List.588 : U64 = CallByName List.6 List.147; + let List.586 : List U8 = CallByName List.87 List.147 List.148 List.149 List.587 List.588; + ret List.586; + +procedure List.26 (List.174, List.175, List.176): + let List.646 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.98 List.174 List.175 List.176; + let List.649 : U8 = 1i64; + let List.650 : U8 = GetTagId List.646; + let List.651 : Int1 = lowlevel Eq List.649 List.650; + if List.651 then + let List.177 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.646; + ret List.177; else - let List.176 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.636; - ret List.176; + let List.178 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.646; + ret List.178; procedure List.31 (#Attr.2, #Attr.3): - let List.601 : List Str = lowlevel ListDropAt #Attr.2 #Attr.3; - ret List.601; + let List.611 : List Str = lowlevel ListDropAt #Attr.2 #Attr.3; + ret List.611; -procedure List.38 (List.311): - let List.609 : U64 = 0i64; - let List.608 : List Str = CallByName List.31 List.311 List.609; - ret List.608; +procedure List.38 (List.313): + let List.619 : U64 = 0i64; + let List.618 : List Str = CallByName List.31 List.313 List.619; + ret List.618; -procedure List.4 (List.116, List.117): - let List.560 : U64 = 1i64; - let List.559 : List Str = CallByName List.70 List.116 List.560; - let List.558 : List Str = CallByName List.71 List.559 List.117; - ret List.558; - -procedure List.4 (List.116, List.117): - let List.563 : U64 = 1i64; - let List.562 : List U8 = CallByName List.70 List.116 List.563; - let List.561 : List U8 = CallByName List.71 List.562 List.117; - ret List.561; - -procedure List.49 (List.390, List.391): - let List.628 : U64 = StructAtIndex 0 List.391; - let List.629 : U64 = 0i64; - let List.626 : Int1 = CallByName Bool.11 List.628 List.629; - if List.626 then - dec List.390; - let List.627 : List U8 = Array []; - ret List.627; +procedure List.4 (List.118, List.119): + let List.570 : U64 = 1i64; + let List.569 : List Str = CallByName List.70 List.118 List.570; + let List.568 : List Str = CallByName List.71 List.569 List.119; + ret List.568; + +procedure List.4 (List.118, List.119): + let List.573 : U64 = 1i64; + let List.572 : List U8 = CallByName List.70 List.118 List.573; + let List.571 : List U8 = CallByName List.71 List.572 List.119; + ret List.571; + +procedure List.49 (List.392, List.393): + let List.638 : U64 = StructAtIndex 0 List.393; + let List.639 : U64 = 0i64; + let List.636 : Int1 = CallByName Bool.11 List.638 List.639; + if List.636 then + dec List.392; + let List.637 : List U8 = Array []; + ret List.637; else - let List.623 : U64 = StructAtIndex 1 List.391; - let List.624 : U64 = StructAtIndex 0 List.391; - let List.622 : List U8 = CallByName List.72 List.390 List.623 List.624; - ret List.622; - -procedure List.52 (List.405, List.406): - let List.407 : U64 = CallByName List.6 List.405; - joinpoint List.634 List.408: - let List.632 : U64 = 0i64; - let List.631 : {U64, U64} = Struct {List.408, List.632}; - inc List.405; - let List.409 : List U8 = CallByName List.49 List.405 List.631; - let List.630 : U64 = CallByName Num.75 List.407 List.408; - let List.621 : {U64, U64} = Struct {List.630, List.408}; - let List.410 : List U8 = CallByName List.49 List.405 List.621; - let List.620 : {List U8, List U8} = Struct {List.409, List.410}; - ret List.620; + let List.633 : U64 = StructAtIndex 1 List.393; + let List.634 : U64 = StructAtIndex 0 List.393; + let List.632 : List U8 = CallByName List.72 List.392 List.633 List.634; + ret List.632; + +procedure List.52 (List.407, List.408): + let List.409 : U64 = CallByName List.6 List.407; + joinpoint List.644 List.410: + let List.642 : U64 = 0i64; + let List.641 : {U64, U64} = Struct {List.410, List.642}; + inc List.407; + let List.411 : List U8 = CallByName List.49 List.407 List.641; + let List.640 : U64 = CallByName Num.75 List.409 List.410; + let List.631 : {U64, U64} = Struct {List.640, List.410}; + let List.412 : List U8 = CallByName List.49 List.407 List.631; + let List.630 : {List U8, List U8} = Struct {List.411, List.412}; + ret List.630; in - let List.635 : Int1 = CallByName Num.24 List.407 List.406; - if List.635 then - jump List.634 List.406; + let List.645 : Int1 = CallByName Num.24 List.409 List.408; + if List.645 then + jump List.644 List.408; else - jump List.634 List.407; + jump List.644 List.409; procedure List.6 (#Attr.2): - let List.615 : U64 = lowlevel ListLen #Attr.2; - ret List.615; + let List.625 : U64 = lowlevel ListLen #Attr.2; + ret List.625; procedure List.6 (#Attr.2): - let List.616 : U64 = lowlevel ListLen #Attr.2; - ret List.616; + let List.626 : U64 = lowlevel ListLen #Attr.2; + ret List.626; procedure List.6 (#Attr.2): - let List.618 : U64 = lowlevel ListLen #Attr.2; - ret List.618; + let List.628 : U64 = lowlevel ListLen #Attr.2; + ret List.628; procedure List.66 (#Attr.2, #Attr.3): - let List.574 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.574; + let List.584 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.584; procedure List.66 (#Attr.2, #Attr.3): - let List.586 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.586; + let List.596 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.596; procedure List.68 (#Attr.2): - let List.611 : List Str = lowlevel ListWithCapacity #Attr.2; - ret List.611; + let List.621 : List Str = lowlevel ListWithCapacity #Attr.2; + ret List.621; procedure List.68 (#Attr.2): - let List.613 : List U8 = lowlevel ListWithCapacity #Attr.2; - ret List.613; + let List.623 : List U8 = lowlevel ListWithCapacity #Attr.2; + ret List.623; procedure List.70 (#Attr.2, #Attr.3): - let List.540 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.540; + let List.550 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.550; procedure List.70 (#Attr.2, #Attr.3): - let List.557 : List Str = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.557; + let List.567 : List Str = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.567; procedure List.71 (#Attr.2, #Attr.3): - let List.538 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.538; + let List.548 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.548; procedure List.71 (#Attr.2, #Attr.3): - let List.555 : List Str = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.555; + let List.565 : List Str = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.565; procedure List.72 (#Attr.2, #Attr.3, #Attr.4): - let List.625 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.625; + let List.635 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; + ret List.635; procedure List.8 (#Attr.2, #Attr.3): - let List.590 : List Str = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.590; + let List.600 : List Str = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.600; procedure List.8 (#Attr.2, #Attr.3): - let List.598 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.598; + let List.608 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.608; procedure List.80 (#Derived_gen.11, #Derived_gen.12, #Derived_gen.13, #Derived_gen.14, #Derived_gen.15): - joinpoint List.645 List.453 List.454 List.455 List.456 List.457: - let List.647 : Int1 = CallByName Num.22 List.456 List.457; - if List.647 then - let List.656 : U8 = CallByName List.66 List.453 List.456; - let List.648 : [C {U64, Int1}, C {U64, Int1}] = CallByName TotallyNotJson.189 List.454 List.656; - let List.653 : U8 = 1i64; - let List.654 : U8 = GetTagId List.648; - let List.655 : Int1 = lowlevel Eq List.653 List.654; - if List.655 then - let List.458 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.648; - let List.651 : U64 = 1i64; - let List.650 : U64 = CallByName Num.51 List.456 List.651; - jump List.645 List.453 List.458 List.455 List.650 List.457; + joinpoint List.655 List.463 List.464 List.465 List.466 List.467: + let List.657 : Int1 = CallByName Num.22 List.466 List.467; + if List.657 then + let List.666 : U8 = CallByName List.66 List.463 List.466; + let List.658 : [C {U64, Int1}, C {U64, Int1}] = CallByName TotallyNotJson.189 List.464 List.666; + let List.663 : U8 = 1i64; + let List.664 : U8 = GetTagId List.658; + let List.665 : Int1 = lowlevel Eq List.663 List.664; + if List.665 then + let List.468 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.658; + let List.661 : U64 = 1i64; + let List.660 : U64 = CallByName Num.51 List.466 List.661; + jump List.655 List.463 List.468 List.465 List.660 List.467; else - dec List.453; - let List.459 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.648; - let List.652 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) List.459; - ret List.652; + dec List.463; + let List.469 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.658; + let List.662 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) List.469; + ret List.662; else - dec List.453; - let List.646 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.454; - ret List.646; + dec List.463; + let List.656 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.464; + ret List.656; in - jump List.645 #Derived_gen.11 #Derived_gen.12 #Derived_gen.13 #Derived_gen.14 #Derived_gen.15; - -procedure List.86 (#Derived_gen.26, #Derived_gen.27, #Derived_gen.28, #Derived_gen.29, #Derived_gen.30): - joinpoint List.579 List.148 List.149 List.150 List.151 List.152: - let List.581 : Int1 = CallByName Num.22 List.151 List.152; - if List.581 then - let List.585 : U8 = CallByName List.66 List.148 List.151; - let List.153 : List U8 = CallByName TotallyNotJson.215 List.149 List.585; - let List.584 : U64 = 1i64; - let List.583 : U64 = CallByName Num.51 List.151 List.584; - jump List.579 List.148 List.153 List.150 List.583 List.152; + jump List.655 #Derived_gen.11 #Derived_gen.12 #Derived_gen.13 #Derived_gen.14 #Derived_gen.15; + +procedure List.87 (#Derived_gen.25, #Derived_gen.26, #Derived_gen.27, #Derived_gen.28, #Derived_gen.29): + joinpoint List.589 List.150 List.151 List.152 List.153 List.154: + let List.591 : Int1 = CallByName Num.22 List.153 List.154; + if List.591 then + let List.595 : U8 = CallByName List.66 List.150 List.153; + let List.155 : List U8 = CallByName TotallyNotJson.215 List.151 List.595; + let List.594 : U64 = 1i64; + let List.593 : U64 = CallByName Num.51 List.153 List.594; + jump List.589 List.150 List.155 List.152 List.593 List.154; else - dec List.148; - ret List.149; + dec List.150; + ret List.151; in - jump List.579 #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.567 List.148 List.149 List.150 List.151 List.152: - let List.569 : Int1 = CallByName Num.22 List.151 List.152; - if List.569 then - let List.573 : {Str, Str} = CallByName List.66 List.148 List.151; - inc List.573; - let List.153 : {List U8, U64} = CallByName TotallyNotJson.237 List.149 List.573 List.150; - let List.572 : U64 = 1i64; - let List.571 : U64 = CallByName Num.51 List.151 List.572; - jump List.567 List.148 List.153 List.150 List.571 List.152; + jump List.589 #Derived_gen.25 #Derived_gen.26 #Derived_gen.27 #Derived_gen.28 #Derived_gen.29; + +procedure List.87 (#Derived_gen.31, #Derived_gen.32, #Derived_gen.33, #Derived_gen.34, #Derived_gen.35): + joinpoint List.577 List.150 List.151 List.152 List.153 List.154: + let List.579 : Int1 = CallByName Num.22 List.153 List.154; + if List.579 then + let List.583 : {Str, Str} = CallByName List.66 List.150 List.153; + inc List.583; + let List.155 : {List U8, U64} = CallByName TotallyNotJson.237 List.151 List.583 List.152; + let List.582 : U64 = 1i64; + let List.581 : U64 = CallByName Num.51 List.153 List.582; + jump List.577 List.150 List.155 List.152 List.581 List.154; else - dec List.148; - ret List.149; + dec List.150; + ret List.151; in - jump List.567 #Derived_gen.31 #Derived_gen.32 #Derived_gen.33 #Derived_gen.34 #Derived_gen.35; + jump List.577 #Derived_gen.31 #Derived_gen.32 #Derived_gen.33 #Derived_gen.34 #Derived_gen.35; -procedure List.96 (List.450, List.451, List.452): - let List.643 : U64 = 0i64; - let List.644 : U64 = CallByName List.6 List.450; - let List.642 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.80 List.450 List.451 List.452 List.643 List.644; - ret List.642; +procedure List.98 (List.460, List.461, List.462): + let List.653 : U64 = 0i64; + let List.654 : U64 = CallByName List.6 List.460; + let List.652 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.80 List.460 List.461 List.462 List.653 List.654; + ret List.652; procedure Num.127 (#Attr.2): let Num.296 : U8 = lowlevel NumIntCast #Attr.2; @@ -1269,7 +1269,7 @@ procedure TotallyNotJson.95 (TotallyNotJson.829): dec TotallyNotJson.1489; ret TotallyNotJson.1488; -procedure TotallyNotJson.96 (#Derived_gen.25): +procedure TotallyNotJson.96 (#Derived_gen.30): joinpoint TotallyNotJson.1496 TotallyNotJson.1168: let TotallyNotJson.834 : List Str = StructAtIndex 0 TotallyNotJson.1168; let TotallyNotJson.833 : List Str = StructAtIndex 1 TotallyNotJson.1168; @@ -1305,7 +1305,7 @@ procedure TotallyNotJson.96 (#Derived_gen.25): let TotallyNotJson.1497 : {List Str, List Str} = Struct {TotallyNotJson.834, TotallyNotJson.833}; ret TotallyNotJson.1497; in - jump TotallyNotJson.1496 #Derived_gen.25; + jump TotallyNotJson.1496 #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 72a6378f3c3..5875bb440b2 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,205 +58,205 @@ procedure Encode.26 (Encode.105, Encode.106): ret Encode.108; procedure List.13 (#Attr.2, #Attr.3): - let List.619 : List Str = lowlevel ListPrepend #Attr.2 #Attr.3; - ret List.619; - -procedure List.18 (List.145, List.146, List.147): - let List.565 : U64 = 0i64; - let List.566 : U64 = CallByName List.6 List.145; - let List.564 : {List U8, U64} = CallByName List.86 List.145 List.146 List.147 List.565 List.566; - ret List.564; - -procedure List.18 (List.145, List.146, List.147): - let List.577 : U64 = 0i64; - let List.578 : U64 = CallByName List.6 List.145; - let List.576 : List U8 = CallByName List.86 List.145 List.146 List.147 List.577 List.578; - ret List.576; - -procedure List.26 (List.172, List.173, List.174): - let List.636 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.96 List.172 List.173 List.174; - let List.639 : U8 = 1i64; - let List.640 : U8 = GetTagId List.636; - let List.641 : Int1 = lowlevel Eq List.639 List.640; - if List.641 then - let List.175 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.636; - ret List.175; + let List.629 : List Str = lowlevel ListPrepend #Attr.2 #Attr.3; + ret List.629; + +procedure List.18 (List.147, List.148, List.149): + let List.575 : U64 = 0i64; + let List.576 : U64 = CallByName List.6 List.147; + let List.574 : {List U8, U64} = CallByName List.87 List.147 List.148 List.149 List.575 List.576; + ret List.574; + +procedure List.18 (List.147, List.148, List.149): + let List.587 : U64 = 0i64; + let List.588 : U64 = CallByName List.6 List.147; + let List.586 : List U8 = CallByName List.87 List.147 List.148 List.149 List.587 List.588; + ret List.586; + +procedure List.26 (List.174, List.175, List.176): + let List.646 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.98 List.174 List.175 List.176; + let List.649 : U8 = 1i64; + let List.650 : U8 = GetTagId List.646; + let List.651 : Int1 = lowlevel Eq List.649 List.650; + if List.651 then + let List.177 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.646; + ret List.177; else - let List.176 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.636; - ret List.176; + let List.178 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.646; + ret List.178; procedure List.31 (#Attr.2, #Attr.3): - let List.601 : List Str = lowlevel ListDropAt #Attr.2 #Attr.3; - ret List.601; + let List.611 : List Str = lowlevel ListDropAt #Attr.2 #Attr.3; + ret List.611; -procedure List.38 (List.311): - let List.609 : U64 = 0i64; - let List.608 : List Str = CallByName List.31 List.311 List.609; - ret List.608; +procedure List.38 (List.313): + let List.619 : U64 = 0i64; + let List.618 : List Str = CallByName List.31 List.313 List.619; + ret List.618; -procedure List.4 (List.116, List.117): - let List.560 : U64 = 1i64; - let List.559 : List Str = CallByName List.70 List.116 List.560; - let List.558 : List Str = CallByName List.71 List.559 List.117; - ret List.558; - -procedure List.4 (List.116, List.117): - let List.563 : U64 = 1i64; - let List.562 : List U8 = CallByName List.70 List.116 List.563; - let List.561 : List U8 = CallByName List.71 List.562 List.117; - ret List.561; - -procedure List.49 (List.390, List.391): - let List.628 : U64 = StructAtIndex 0 List.391; - let List.629 : U64 = 0i64; - let List.626 : Int1 = CallByName Bool.11 List.628 List.629; - if List.626 then - dec List.390; - let List.627 : List U8 = Array []; - ret List.627; +procedure List.4 (List.118, List.119): + let List.570 : U64 = 1i64; + let List.569 : List Str = CallByName List.70 List.118 List.570; + let List.568 : List Str = CallByName List.71 List.569 List.119; + ret List.568; + +procedure List.4 (List.118, List.119): + let List.573 : U64 = 1i64; + let List.572 : List U8 = CallByName List.70 List.118 List.573; + let List.571 : List U8 = CallByName List.71 List.572 List.119; + ret List.571; + +procedure List.49 (List.392, List.393): + let List.638 : U64 = StructAtIndex 0 List.393; + let List.639 : U64 = 0i64; + let List.636 : Int1 = CallByName Bool.11 List.638 List.639; + if List.636 then + dec List.392; + let List.637 : List U8 = Array []; + ret List.637; else - let List.623 : U64 = StructAtIndex 1 List.391; - let List.624 : U64 = StructAtIndex 0 List.391; - let List.622 : List U8 = CallByName List.72 List.390 List.623 List.624; - ret List.622; - -procedure List.52 (List.405, List.406): - let List.407 : U64 = CallByName List.6 List.405; - joinpoint List.634 List.408: - let List.632 : U64 = 0i64; - let List.631 : {U64, U64} = Struct {List.408, List.632}; - inc List.405; - let List.409 : List U8 = CallByName List.49 List.405 List.631; - let List.630 : U64 = CallByName Num.75 List.407 List.408; - let List.621 : {U64, U64} = Struct {List.630, List.408}; - let List.410 : List U8 = CallByName List.49 List.405 List.621; - let List.620 : {List U8, List U8} = Struct {List.409, List.410}; - ret List.620; + let List.633 : U64 = StructAtIndex 1 List.393; + let List.634 : U64 = StructAtIndex 0 List.393; + let List.632 : List U8 = CallByName List.72 List.392 List.633 List.634; + ret List.632; + +procedure List.52 (List.407, List.408): + let List.409 : U64 = CallByName List.6 List.407; + joinpoint List.644 List.410: + let List.642 : U64 = 0i64; + let List.641 : {U64, U64} = Struct {List.410, List.642}; + inc List.407; + let List.411 : List U8 = CallByName List.49 List.407 List.641; + let List.640 : U64 = CallByName Num.75 List.409 List.410; + let List.631 : {U64, U64} = Struct {List.640, List.410}; + let List.412 : List U8 = CallByName List.49 List.407 List.631; + let List.630 : {List U8, List U8} = Struct {List.411, List.412}; + ret List.630; in - let List.635 : Int1 = CallByName Num.24 List.407 List.406; - if List.635 then - jump List.634 List.406; + let List.645 : Int1 = CallByName Num.24 List.409 List.408; + if List.645 then + jump List.644 List.408; else - jump List.634 List.407; + jump List.644 List.409; procedure List.6 (#Attr.2): - let List.615 : U64 = lowlevel ListLen #Attr.2; - ret List.615; + let List.625 : U64 = lowlevel ListLen #Attr.2; + ret List.625; procedure List.6 (#Attr.2): - let List.616 : U64 = lowlevel ListLen #Attr.2; - ret List.616; + let List.626 : U64 = lowlevel ListLen #Attr.2; + ret List.626; procedure List.6 (#Attr.2): - let List.618 : U64 = lowlevel ListLen #Attr.2; - ret List.618; + let List.628 : U64 = lowlevel ListLen #Attr.2; + ret List.628; procedure List.66 (#Attr.2, #Attr.3): - let List.574 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.574; + let List.584 : {Str, Str} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.584; procedure List.66 (#Attr.2, #Attr.3): - let List.586 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.586; + let List.596 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.596; procedure List.68 (#Attr.2): - let List.611 : List Str = lowlevel ListWithCapacity #Attr.2; - ret List.611; + let List.621 : List Str = lowlevel ListWithCapacity #Attr.2; + ret List.621; procedure List.68 (#Attr.2): - let List.613 : List U8 = lowlevel ListWithCapacity #Attr.2; - ret List.613; + let List.623 : List U8 = lowlevel ListWithCapacity #Attr.2; + ret List.623; procedure List.70 (#Attr.2, #Attr.3): - let List.540 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.540; + let List.550 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.550; procedure List.70 (#Attr.2, #Attr.3): - let List.557 : List Str = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.557; + let List.567 : List Str = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.567; procedure List.71 (#Attr.2, #Attr.3): - let List.538 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.538; + let List.548 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.548; procedure List.71 (#Attr.2, #Attr.3): - let List.555 : List Str = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.555; + let List.565 : List Str = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.565; procedure List.72 (#Attr.2, #Attr.3, #Attr.4): - let List.625 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.625; + let List.635 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; + ret List.635; procedure List.8 (#Attr.2, #Attr.3): - let List.590 : List Str = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.590; + let List.600 : List Str = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.600; procedure List.8 (#Attr.2, #Attr.3): - let List.598 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.598; + let List.608 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.608; procedure List.80 (#Derived_gen.15, #Derived_gen.16, #Derived_gen.17, #Derived_gen.18, #Derived_gen.19): - joinpoint List.645 List.453 List.454 List.455 List.456 List.457: - let List.647 : Int1 = CallByName Num.22 List.456 List.457; - if List.647 then - let List.656 : U8 = CallByName List.66 List.453 List.456; - let List.648 : [C {U64, Int1}, C {U64, Int1}] = CallByName TotallyNotJson.189 List.454 List.656; - let List.653 : U8 = 1i64; - let List.654 : U8 = GetTagId List.648; - let List.655 : Int1 = lowlevel Eq List.653 List.654; - if List.655 then - let List.458 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.648; - let List.651 : U64 = 1i64; - let List.650 : U64 = CallByName Num.51 List.456 List.651; - jump List.645 List.453 List.458 List.455 List.650 List.457; + joinpoint List.655 List.463 List.464 List.465 List.466 List.467: + let List.657 : Int1 = CallByName Num.22 List.466 List.467; + if List.657 then + let List.666 : U8 = CallByName List.66 List.463 List.466; + let List.658 : [C {U64, Int1}, C {U64, Int1}] = CallByName TotallyNotJson.189 List.464 List.666; + let List.663 : U8 = 1i64; + let List.664 : U8 = GetTagId List.658; + let List.665 : Int1 = lowlevel Eq List.663 List.664; + if List.665 then + let List.468 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.658; + let List.661 : U64 = 1i64; + let List.660 : U64 = CallByName Num.51 List.466 List.661; + jump List.655 List.463 List.468 List.465 List.660 List.467; else - dec List.453; - let List.459 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.648; - let List.652 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) List.459; - ret List.652; + dec List.463; + let List.469 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.658; + let List.662 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) List.469; + ret List.662; else - dec List.453; - let List.646 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.454; - ret List.646; + dec List.463; + let List.656 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.464; + ret List.656; in - jump List.645 #Derived_gen.15 #Derived_gen.16 #Derived_gen.17 #Derived_gen.18 #Derived_gen.19; - -procedure List.86 (#Derived_gen.30, #Derived_gen.31, #Derived_gen.32, #Derived_gen.33, #Derived_gen.34): - joinpoint List.579 List.148 List.149 List.150 List.151 List.152: - let List.581 : Int1 = CallByName Num.22 List.151 List.152; - if List.581 then - let List.585 : U8 = CallByName List.66 List.148 List.151; - let List.153 : List U8 = CallByName TotallyNotJson.215 List.149 List.585; - let List.584 : U64 = 1i64; - let List.583 : U64 = CallByName Num.51 List.151 List.584; - jump List.579 List.148 List.153 List.150 List.583 List.152; + jump List.655 #Derived_gen.15 #Derived_gen.16 #Derived_gen.17 #Derived_gen.18 #Derived_gen.19; + +procedure List.87 (#Derived_gen.29, #Derived_gen.30, #Derived_gen.31, #Derived_gen.32, #Derived_gen.33): + joinpoint List.589 List.150 List.151 List.152 List.153 List.154: + let List.591 : Int1 = CallByName Num.22 List.153 List.154; + if List.591 then + let List.595 : U8 = CallByName List.66 List.150 List.153; + let List.155 : List U8 = CallByName TotallyNotJson.215 List.151 List.595; + let List.594 : U64 = 1i64; + let List.593 : U64 = CallByName Num.51 List.153 List.594; + jump List.589 List.150 List.155 List.152 List.593 List.154; else - dec List.148; - ret List.149; + dec List.150; + ret List.151; in - jump List.579 #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.567 List.148 List.149 List.150 List.151 List.152: - let List.569 : Int1 = CallByName Num.22 List.151 List.152; - if List.569 then - let List.573 : {Str, Str} = CallByName List.66 List.148 List.151; - inc List.573; - let List.153 : {List U8, U64} = CallByName TotallyNotJson.237 List.149 List.573 List.150; - let List.572 : U64 = 1i64; - let List.571 : U64 = CallByName Num.51 List.151 List.572; - jump List.567 List.148 List.153 List.150 List.571 List.152; + jump List.589 #Derived_gen.29 #Derived_gen.30 #Derived_gen.31 #Derived_gen.32 #Derived_gen.33; + +procedure List.87 (#Derived_gen.35, #Derived_gen.36, #Derived_gen.37, #Derived_gen.38, #Derived_gen.39): + joinpoint List.577 List.150 List.151 List.152 List.153 List.154: + let List.579 : Int1 = CallByName Num.22 List.153 List.154; + if List.579 then + let List.583 : {Str, Str} = CallByName List.66 List.150 List.153; + inc List.583; + let List.155 : {List U8, U64} = CallByName TotallyNotJson.237 List.151 List.583 List.152; + let List.582 : U64 = 1i64; + let List.581 : U64 = CallByName Num.51 List.153 List.582; + jump List.577 List.150 List.155 List.152 List.581 List.154; else - dec List.148; - ret List.149; + dec List.150; + ret List.151; in - jump List.567 #Derived_gen.35 #Derived_gen.36 #Derived_gen.37 #Derived_gen.38 #Derived_gen.39; + jump List.577 #Derived_gen.35 #Derived_gen.36 #Derived_gen.37 #Derived_gen.38 #Derived_gen.39; -procedure List.96 (List.450, List.451, List.452): - let List.643 : U64 = 0i64; - let List.644 : U64 = CallByName List.6 List.450; - let List.642 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.80 List.450 List.451 List.452 List.643 List.644; - ret List.642; +procedure List.98 (List.460, List.461, List.462): + let List.653 : U64 = 0i64; + let List.654 : U64 = CallByName List.6 List.460; + let List.652 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.80 List.460 List.461 List.462 List.653 List.654; + ret List.652; procedure Num.127 (#Attr.2): let Num.296 : U8 = lowlevel NumIntCast #Attr.2; @@ -1276,7 +1276,7 @@ procedure TotallyNotJson.95 (TotallyNotJson.829): dec TotallyNotJson.1489; ret TotallyNotJson.1488; -procedure TotallyNotJson.96 (#Derived_gen.29): +procedure TotallyNotJson.96 (#Derived_gen.34): joinpoint TotallyNotJson.1496 TotallyNotJson.1168: let TotallyNotJson.834 : List Str = StructAtIndex 0 TotallyNotJson.1168; let TotallyNotJson.833 : List Str = StructAtIndex 1 TotallyNotJson.1168; @@ -1312,7 +1312,7 @@ procedure TotallyNotJson.96 (#Derived_gen.29): let TotallyNotJson.1497 : {List Str, List Str} = Struct {TotallyNotJson.834, TotallyNotJson.833}; ret TotallyNotJson.1497; in - jump TotallyNotJson.1496 #Derived_gen.29; + jump TotallyNotJson.1496 #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 9ec55b27823..5c69390b1d6 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.145, List.146, List.147): - let List.549 : U64 = 0i64; - let List.550 : U64 = CallByName List.6 List.145; - let List.548 : List U8 = CallByName List.86 List.145 List.146 List.147 List.549 List.550; - ret List.548; - -procedure List.26 (List.172, List.173, List.174): - let List.575 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.96 List.172 List.173 List.174; - let List.578 : U8 = 1i64; - let List.579 : U8 = GetTagId List.575; - let List.580 : Int1 = lowlevel Eq List.578 List.579; - if List.580 then - let List.175 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.575; - ret List.175; +procedure List.18 (List.147, List.148, List.149): + let List.559 : U64 = 0i64; + let List.560 : U64 = CallByName List.6 List.147; + let List.558 : List U8 = CallByName List.87 List.147 List.148 List.149 List.559 List.560; + ret List.558; + +procedure List.26 (List.174, List.175, List.176): + let List.585 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.98 List.174 List.175 List.176; + 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.177 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.585; + ret List.177; else - let List.176 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.575; - ret List.176; - -procedure List.49 (List.390, List.391): - let List.567 : U64 = StructAtIndex 0 List.391; - let List.568 : U64 = 0i64; - let List.565 : Int1 = CallByName Bool.11 List.567 List.568; - if List.565 then - dec List.390; - let List.566 : List U8 = Array []; - ret List.566; + let List.178 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.585; + ret List.178; + +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; else - let List.562 : U64 = StructAtIndex 1 List.391; - let List.563 : U64 = StructAtIndex 0 List.391; - let List.561 : List U8 = CallByName List.72 List.390 List.562 List.563; - ret List.561; - -procedure List.52 (List.405, List.406): - let List.407 : U64 = CallByName List.6 List.405; - joinpoint List.573 List.408: - let List.571 : U64 = 0i64; - let List.570 : {U64, U64} = Struct {List.408, List.571}; - inc List.405; - let List.409 : List U8 = CallByName List.49 List.405 List.570; - let List.569 : U64 = CallByName Num.75 List.407 List.408; - let List.560 : {U64, U64} = Struct {List.569, List.408}; - let List.410 : List U8 = CallByName List.49 List.405 List.560; - let List.559 : {List U8, List U8} = Struct {List.409, List.410}; - ret List.559; + 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; in - let List.574 : Int1 = CallByName Num.24 List.407 List.406; - if List.574 then - jump List.573 List.406; + let List.584 : Int1 = CallByName Num.24 List.409 List.408; + if List.584 then + jump List.583 List.408; else - jump List.573 List.407; + jump List.583 List.409; procedure List.6 (#Attr.2): - let List.547 : U64 = lowlevel ListLen #Attr.2; - ret List.547; + let List.557 : U64 = lowlevel ListLen #Attr.2; + ret List.557; procedure List.66 (#Attr.2, #Attr.3): - let List.558 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.558; + let List.568 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.568; procedure List.68 (#Attr.2): - let List.545 : List U8 = lowlevel ListWithCapacity #Attr.2; - ret List.545; + let List.555 : List U8 = lowlevel ListWithCapacity #Attr.2; + ret List.555; procedure List.72 (#Attr.2, #Attr.3, #Attr.4): - let List.564 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.564; + let List.574 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; + ret List.574; procedure List.8 (#Attr.2, #Attr.3): - let List.543 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.543; + let List.553 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.553; procedure List.80 (#Derived_gen.8, #Derived_gen.9, #Derived_gen.10, #Derived_gen.11, #Derived_gen.12): - joinpoint List.584 List.453 List.454 List.455 List.456 List.457: - let List.586 : Int1 = CallByName Num.22 List.456 List.457; - if List.586 then - let List.595 : U8 = CallByName List.66 List.453 List.456; - let List.587 : [C {U64, Int1}, C {U64, Int1}] = CallByName TotallyNotJson.189 List.454 List.595; - let List.592 : U8 = 1i64; - let List.593 : U8 = GetTagId List.587; - let List.594 : Int1 = lowlevel Eq List.592 List.593; - if List.594 then - let List.458 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.587; - let List.590 : U64 = 1i64; - let List.589 : U64 = CallByName Num.51 List.456 List.590; - jump List.584 List.453 List.458 List.455 List.589 List.457; + 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; else - dec List.453; - let List.459 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.587; - let List.591 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) List.459; - ret List.591; + 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; else - dec List.453; - let List.585 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.454; - ret List.585; + dec List.463; + let List.595 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.464; + ret List.595; in - jump List.584 #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.551 List.148 List.149 List.150 List.151 List.152: - let List.553 : Int1 = CallByName Num.22 List.151 List.152; - if List.553 then - let List.557 : U8 = CallByName List.66 List.148 List.151; - let List.153 : List U8 = CallByName TotallyNotJson.215 List.149 List.557; - let List.556 : U64 = 1i64; - let List.555 : U64 = CallByName Num.51 List.151 List.556; - jump List.551 List.148 List.153 List.150 List.555 List.152; + jump List.594 #Derived_gen.8 #Derived_gen.9 #Derived_gen.10 #Derived_gen.11 #Derived_gen.12; + +procedure List.87 (#Derived_gen.3, #Derived_gen.4, #Derived_gen.5, #Derived_gen.6, #Derived_gen.7): + joinpoint List.561 List.150 List.151 List.152 List.153 List.154: + let List.563 : Int1 = CallByName Num.22 List.153 List.154; + if List.563 then + let List.567 : U8 = CallByName List.66 List.150 List.153; + let List.155 : List U8 = CallByName TotallyNotJson.215 List.151 List.567; + let List.566 : U64 = 1i64; + let List.565 : U64 = CallByName Num.51 List.153 List.566; + jump List.561 List.150 List.155 List.152 List.565 List.154; else - dec List.148; - ret List.149; + dec List.150; + ret List.151; in - jump List.551 #Derived_gen.3 #Derived_gen.4 #Derived_gen.5 #Derived_gen.6 #Derived_gen.7; + jump List.561 #Derived_gen.3 #Derived_gen.4 #Derived_gen.5 #Derived_gen.6 #Derived_gen.7; -procedure List.96 (List.450, List.451, List.452): - let List.582 : U64 = 0i64; - let List.583 : U64 = CallByName List.6 List.450; - let List.581 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.80 List.450 List.451 List.452 List.582 List.583; - ret List.581; +procedure List.98 (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 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 9a06a75ea42..b873f9841ad 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.145, List.146, List.147): - let List.563 : U64 = 0i64; - let List.564 : U64 = CallByName List.6 List.145; - let List.562 : {List U8, U64} = CallByName List.86 List.145 List.146 List.147 List.563 List.564; - ret List.562; - -procedure List.18 (List.145, List.146, List.147): - let List.575 : U64 = 0i64; - let List.576 : U64 = CallByName List.6 List.145; - let List.574 : List U8 = CallByName List.86 List.145 List.146 List.147 List.575 List.576; - ret List.574; - -procedure List.26 (List.172, List.173, List.174): - let List.616 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.96 List.172 List.173 List.174; - let List.619 : U8 = 1i64; - let List.620 : U8 = GetTagId List.616; - let List.621 : Int1 = lowlevel Eq List.619 List.620; - if List.621 then - let List.175 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.616; - ret List.175; +procedure List.18 (List.147, List.148, List.149): + let List.573 : U64 = 0i64; + let List.574 : U64 = CallByName List.6 List.147; + let List.572 : {List U8, U64} = CallByName List.87 List.147 List.148 List.149 List.573 List.574; + ret List.572; + +procedure List.18 (List.147, List.148, List.149): + let List.585 : U64 = 0i64; + let List.586 : U64 = CallByName List.6 List.147; + let List.584 : List U8 = CallByName List.87 List.147 List.148 List.149 List.585 List.586; + ret List.584; + +procedure List.26 (List.174, List.175, List.176): + let List.626 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.98 List.174 List.175 List.176; + 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.177 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.626; + ret List.177; else - let List.176 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.616; - ret List.176; - -procedure List.4 (List.116, List.117): - let List.561 : U64 = 1i64; - let List.560 : List U8 = CallByName List.70 List.116 List.561; - let List.559 : List U8 = CallByName List.71 List.560 List.117; - ret List.559; - -procedure List.49 (List.390, List.391): - let List.608 : U64 = StructAtIndex 0 List.391; - let List.609 : U64 = 0i64; - let List.606 : Int1 = CallByName Bool.11 List.608 List.609; - if List.606 then - dec List.390; - let List.607 : List U8 = Array []; - ret List.607; + let List.178 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.626; + ret List.178; + +procedure List.4 (List.118, List.119): + let List.571 : U64 = 1i64; + let List.570 : List U8 = CallByName List.70 List.118 List.571; + let List.569 : List U8 = CallByName List.71 List.570 List.119; + 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; else - let List.603 : U64 = StructAtIndex 1 List.391; - let List.604 : U64 = StructAtIndex 0 List.391; - let List.602 : List U8 = CallByName List.72 List.390 List.603 List.604; - ret List.602; - -procedure List.52 (List.405, List.406): - let List.407 : U64 = CallByName List.6 List.405; - joinpoint List.614 List.408: - let List.612 : U64 = 0i64; - let List.611 : {U64, U64} = Struct {List.408, List.612}; - inc List.405; - let List.409 : List U8 = CallByName List.49 List.405 List.611; - let List.610 : U64 = CallByName Num.75 List.407 List.408; - let List.601 : {U64, U64} = Struct {List.610, List.408}; - let List.410 : List U8 = CallByName List.49 List.405 List.601; - let List.600 : {List U8, List U8} = Struct {List.409, List.410}; - ret List.600; + 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; in - let List.615 : Int1 = CallByName Num.24 List.407 List.406; - if List.615 then - jump List.614 List.406; + let List.625 : Int1 = CallByName Num.24 List.409 List.408; + if List.625 then + jump List.624 List.408; else - jump List.614 List.407; + jump List.624 List.409; procedure List.6 (#Attr.2): - let List.586 : U64 = lowlevel ListLen #Attr.2; - ret List.586; + let List.596 : U64 = lowlevel ListLen #Attr.2; + ret List.596; procedure List.6 (#Attr.2): - let List.588 : U64 = lowlevel ListLen #Attr.2; - ret List.588; + let List.598 : U64 = lowlevel ListLen #Attr.2; + ret List.598; procedure List.66 (#Attr.2, #Attr.3): - let List.572 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.572; + let List.582 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.582; procedure List.66 (#Attr.2, #Attr.3): - let List.584 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.584; + let List.594 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.594; procedure List.68 (#Attr.2): - let List.599 : List U8 = lowlevel ListWithCapacity #Attr.2; - ret List.599; + let List.609 : List U8 = lowlevel ListWithCapacity #Attr.2; + ret List.609; procedure List.70 (#Attr.2, #Attr.3): - let List.540 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.540; + let List.550 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.550; procedure List.71 (#Attr.2, #Attr.3): - let List.538 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.538; + let List.548 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.548; procedure List.72 (#Attr.2, #Attr.3, #Attr.4): - let List.605 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.605; + let List.615 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; + ret List.615; procedure List.8 (#Attr.2, #Attr.3): - let List.597 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.597; - -procedure List.80 (#Derived_gen.16, #Derived_gen.17, #Derived_gen.18, #Derived_gen.19, #Derived_gen.20): - joinpoint List.625 List.453 List.454 List.455 List.456 List.457: - let List.627 : Int1 = CallByName Num.22 List.456 List.457; - if List.627 then - let List.636 : U8 = CallByName List.66 List.453 List.456; - let List.628 : [C {U64, Int1}, C {U64, Int1}] = CallByName TotallyNotJson.189 List.454 List.636; - let List.633 : U8 = 1i64; - let List.634 : U8 = GetTagId List.628; - let List.635 : Int1 = lowlevel Eq List.633 List.634; - if List.635 then - let List.458 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.628; - let List.631 : U64 = 1i64; - let List.630 : U64 = CallByName Num.51 List.456 List.631; - jump List.625 List.453 List.458 List.455 List.630 List.457; + let List.607 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.607; + +procedure List.80 (#Derived_gen.21, #Derived_gen.22, #Derived_gen.23, #Derived_gen.24, #Derived_gen.25): + 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; else - dec List.453; - let List.459 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.628; - let List.632 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) List.459; - ret List.632; + 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; else - dec List.453; - let List.626 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.454; - ret List.626; + dec List.463; + let List.636 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.464; + ret List.636; in - jump List.625 #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.577 List.148 List.149 List.150 List.151 List.152: - let List.579 : Int1 = CallByName Num.22 List.151 List.152; - if List.579 then - let List.583 : U8 = CallByName List.66 List.148 List.151; - let List.153 : List U8 = CallByName TotallyNotJson.215 List.149 List.583; - let List.582 : U64 = 1i64; - let List.581 : U64 = CallByName Num.51 List.151 List.582; - jump List.577 List.148 List.153 List.150 List.581 List.152; + jump List.635 #Derived_gen.21 #Derived_gen.22 #Derived_gen.23 #Derived_gen.24 #Derived_gen.25; + +procedure List.87 (#Derived_gen.10, #Derived_gen.11, #Derived_gen.12, #Derived_gen.13, #Derived_gen.14): + joinpoint List.575 List.150 List.151 List.152 List.153 List.154: + let List.577 : Int1 = CallByName Num.22 List.153 List.154; + if List.577 then + let List.581 : Str = CallByName List.66 List.150 List.153; + inc List.581; + let List.155 : {List U8, U64} = CallByName TotallyNotJson.267 List.151 List.581 List.152; + let List.580 : U64 = 1i64; + let List.579 : U64 = CallByName Num.51 List.153 List.580; + jump List.575 List.150 List.155 List.152 List.579 List.154; else - dec List.148; - ret List.149; + dec List.150; + ret List.151; in - jump List.577 #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.565 List.148 List.149 List.150 List.151 List.152: - let List.567 : Int1 = CallByName Num.22 List.151 List.152; - if List.567 then - let List.571 : Str = CallByName List.66 List.148 List.151; - inc List.571; - let List.153 : {List U8, U64} = CallByName TotallyNotJson.267 List.149 List.571 List.150; - let List.570 : U64 = 1i64; - let List.569 : U64 = CallByName Num.51 List.151 List.570; - jump List.565 List.148 List.153 List.150 List.569 List.152; + jump List.575 #Derived_gen.10 #Derived_gen.11 #Derived_gen.12 #Derived_gen.13 #Derived_gen.14; + +procedure List.87 (#Derived_gen.26, #Derived_gen.27, #Derived_gen.28, #Derived_gen.29, #Derived_gen.30): + joinpoint List.587 List.150 List.151 List.152 List.153 List.154: + let List.589 : Int1 = CallByName Num.22 List.153 List.154; + if List.589 then + let List.593 : U8 = CallByName List.66 List.150 List.153; + let List.155 : List U8 = CallByName TotallyNotJson.215 List.151 List.593; + let List.592 : U64 = 1i64; + let List.591 : U64 = CallByName Num.51 List.153 List.592; + jump List.587 List.150 List.155 List.152 List.591 List.154; else - dec List.148; - ret List.149; + dec List.150; + ret List.151; in - jump List.565 #Derived_gen.26 #Derived_gen.27 #Derived_gen.28 #Derived_gen.29 #Derived_gen.30; + jump List.587 #Derived_gen.26 #Derived_gen.27 #Derived_gen.28 #Derived_gen.29 #Derived_gen.30; -procedure List.96 (List.450, List.451, List.452): - let List.623 : U64 = 0i64; - let List.624 : U64 = CallByName List.6 List.450; - let List.622 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.80 List.450 List.451 List.452 List.623 List.624; - ret List.622; +procedure List.98 (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 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 150db580a7a..1ee8d260769 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.145, List.146, List.147): - let List.563 : U64 = 0i64; - let List.564 : U64 = CallByName List.6 List.145; - let List.562 : {List U8, U64} = CallByName List.86 List.145 List.146 List.147 List.563 List.564; - ret List.562; - -procedure List.18 (List.145, List.146, List.147): - let List.575 : U64 = 0i64; - let List.576 : U64 = CallByName List.6 List.145; - let List.574 : List U8 = CallByName List.86 List.145 List.146 List.147 List.575 List.576; - ret List.574; - -procedure List.26 (List.172, List.173, List.174): - let List.616 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.96 List.172 List.173 List.174; - let List.619 : U8 = 1i64; - let List.620 : U8 = GetTagId List.616; - let List.621 : Int1 = lowlevel Eq List.619 List.620; - if List.621 then - let List.175 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.616; - ret List.175; +procedure List.18 (List.147, List.148, List.149): + let List.573 : U64 = 0i64; + let List.574 : U64 = CallByName List.6 List.147; + let List.572 : {List U8, U64} = CallByName List.87 List.147 List.148 List.149 List.573 List.574; + ret List.572; + +procedure List.18 (List.147, List.148, List.149): + let List.585 : U64 = 0i64; + let List.586 : U64 = CallByName List.6 List.147; + let List.584 : List U8 = CallByName List.87 List.147 List.148 List.149 List.585 List.586; + ret List.584; + +procedure List.26 (List.174, List.175, List.176): + let List.626 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.98 List.174 List.175 List.176; + 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.177 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.626; + ret List.177; else - let List.176 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.616; - ret List.176; - -procedure List.4 (List.116, List.117): - let List.561 : U64 = 1i64; - let List.560 : List U8 = CallByName List.70 List.116 List.561; - let List.559 : List U8 = CallByName List.71 List.560 List.117; - ret List.559; - -procedure List.49 (List.390, List.391): - let List.608 : U64 = StructAtIndex 0 List.391; - let List.609 : U64 = 0i64; - let List.606 : Int1 = CallByName Bool.11 List.608 List.609; - if List.606 then - dec List.390; - let List.607 : List U8 = Array []; - ret List.607; + let List.178 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.626; + ret List.178; + +procedure List.4 (List.118, List.119): + let List.571 : U64 = 1i64; + let List.570 : List U8 = CallByName List.70 List.118 List.571; + let List.569 : List U8 = CallByName List.71 List.570 List.119; + 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; else - let List.603 : U64 = StructAtIndex 1 List.391; - let List.604 : U64 = StructAtIndex 0 List.391; - let List.602 : List U8 = CallByName List.72 List.390 List.603 List.604; - ret List.602; - -procedure List.52 (List.405, List.406): - let List.407 : U64 = CallByName List.6 List.405; - joinpoint List.614 List.408: - let List.612 : U64 = 0i64; - let List.611 : {U64, U64} = Struct {List.408, List.612}; - inc List.405; - let List.409 : List U8 = CallByName List.49 List.405 List.611; - let List.610 : U64 = CallByName Num.75 List.407 List.408; - let List.601 : {U64, U64} = Struct {List.610, List.408}; - let List.410 : List U8 = CallByName List.49 List.405 List.601; - let List.600 : {List U8, List U8} = Struct {List.409, List.410}; - ret List.600; + 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; in - let List.615 : Int1 = CallByName Num.24 List.407 List.406; - if List.615 then - jump List.614 List.406; + let List.625 : Int1 = CallByName Num.24 List.409 List.408; + if List.625 then + jump List.624 List.408; else - jump List.614 List.407; + jump List.624 List.409; procedure List.6 (#Attr.2): - let List.586 : U64 = lowlevel ListLen #Attr.2; - ret List.586; + let List.596 : U64 = lowlevel ListLen #Attr.2; + ret List.596; procedure List.6 (#Attr.2): - let List.588 : U64 = lowlevel ListLen #Attr.2; - ret List.588; + let List.598 : U64 = lowlevel ListLen #Attr.2; + ret List.598; procedure List.66 (#Attr.2, #Attr.3): - let List.572 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.572; + let List.582 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.582; procedure List.66 (#Attr.2, #Attr.3): - let List.584 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.584; + let List.594 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.594; procedure List.68 (#Attr.2): - let List.599 : List U8 = lowlevel ListWithCapacity #Attr.2; - ret List.599; + let List.609 : List U8 = lowlevel ListWithCapacity #Attr.2; + ret List.609; procedure List.70 (#Attr.2, #Attr.3): - let List.540 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.540; + let List.550 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.550; procedure List.71 (#Attr.2, #Attr.3): - let List.538 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.538; + let List.548 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.548; procedure List.72 (#Attr.2, #Attr.3, #Attr.4): - let List.605 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.605; + let List.615 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; + ret List.615; procedure List.8 (#Attr.2, #Attr.3): - let List.597 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.597; + 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.625 List.453 List.454 List.455 List.456 List.457: - let List.627 : Int1 = CallByName Num.22 List.456 List.457; - if List.627 then - let List.636 : U8 = CallByName List.66 List.453 List.456; - let List.628 : [C {U64, Int1}, C {U64, Int1}] = CallByName TotallyNotJson.189 List.454 List.636; - let List.633 : U8 = 1i64; - let List.634 : U8 = GetTagId List.628; - let List.635 : Int1 = lowlevel Eq List.633 List.634; - if List.635 then - let List.458 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.628; - let List.631 : U64 = 1i64; - let List.630 : U64 = CallByName Num.51 List.456 List.631; - jump List.625 List.453 List.458 List.455 List.630 List.457; + 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; else - dec List.453; - let List.459 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.628; - let List.632 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) List.459; - ret List.632; + 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; else - dec List.453; - let List.626 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.454; - ret List.626; + dec List.463; + let List.636 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.464; + ret List.636; in - jump List.625 #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.565 List.148 List.149 List.150 List.151 List.152: - let List.567 : Int1 = CallByName Num.22 List.151 List.152; - if List.567 then - let List.571 : Str = CallByName List.66 List.148 List.151; - inc List.571; - let List.153 : {List U8, U64} = CallByName TotallyNotJson.267 List.149 List.571 List.150; - let List.570 : U64 = 1i64; - let List.569 : U64 = CallByName Num.51 List.151 List.570; - jump List.565 List.148 List.153 List.150 List.569 List.152; + jump List.635 #Derived_gen.14 #Derived_gen.15 #Derived_gen.16 #Derived_gen.17 #Derived_gen.18; + +procedure List.87 (#Derived_gen.19, #Derived_gen.20, #Derived_gen.21, #Derived_gen.22, #Derived_gen.23): + joinpoint List.587 List.150 List.151 List.152 List.153 List.154: + let List.589 : Int1 = CallByName Num.22 List.153 List.154; + if List.589 then + let List.593 : U8 = CallByName List.66 List.150 List.153; + let List.155 : List U8 = CallByName TotallyNotJson.215 List.151 List.593; + let List.592 : U64 = 1i64; + let List.591 : U64 = CallByName Num.51 List.153 List.592; + jump List.587 List.150 List.155 List.152 List.591 List.154; else - dec List.148; - ret List.149; + dec List.150; + ret List.151; in - jump List.565 #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.577 List.148 List.149 List.150 List.151 List.152: - let List.579 : Int1 = CallByName Num.22 List.151 List.152; - if List.579 then - let List.583 : U8 = CallByName List.66 List.148 List.151; - let List.153 : List U8 = CallByName TotallyNotJson.215 List.149 List.583; - let List.582 : U64 = 1i64; - let List.581 : U64 = CallByName Num.51 List.151 List.582; - jump List.577 List.148 List.153 List.150 List.581 List.152; + jump List.587 #Derived_gen.19 #Derived_gen.20 #Derived_gen.21 #Derived_gen.22 #Derived_gen.23; + +procedure List.87 (#Derived_gen.24, #Derived_gen.25, #Derived_gen.26, #Derived_gen.27, #Derived_gen.28): + joinpoint List.575 List.150 List.151 List.152 List.153 List.154: + let List.577 : Int1 = CallByName Num.22 List.153 List.154; + if List.577 then + let List.581 : Str = CallByName List.66 List.150 List.153; + inc List.581; + let List.155 : {List U8, U64} = CallByName TotallyNotJson.267 List.151 List.581 List.152; + let List.580 : U64 = 1i64; + let List.579 : U64 = CallByName Num.51 List.153 List.580; + jump List.575 List.150 List.155 List.152 List.579 List.154; else - dec List.148; - ret List.149; + dec List.150; + ret List.151; in - jump List.577 #Derived_gen.27 #Derived_gen.28 #Derived_gen.29 #Derived_gen.30 #Derived_gen.31; + jump List.575 #Derived_gen.24 #Derived_gen.25 #Derived_gen.26 #Derived_gen.27 #Derived_gen.28; -procedure List.96 (List.450, List.451, List.452): - let List.623 : U64 = 0i64; - let List.624 : U64 = CallByName List.6 List.450; - let List.622 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.80 List.450 List.451 List.452 List.623 List.624; - ret List.622; +procedure List.98 (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 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 4245e526ff1..c975251debf 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.535 : U64 = lowlevel ListLen #Attr.2; - ret List.535; + let List.545 : U64 = lowlevel ListLen #Attr.2; + ret List.545; 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 953ce01ea66..7aa157818dd 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.100, List.101): - let List.549 : U64 = CallByName List.6 List.100; - let List.545 : Int1 = CallByName Num.22 List.101 List.549; - if List.545 then - let List.547 : I64 = CallByName List.66 List.100 List.101; - dec List.100; - let List.546 : [C {}, C I64] = TagId(1) List.547; - ret List.546; +procedure List.2 (List.102, List.103): + let List.559 : U64 = CallByName List.6 List.102; + let List.555 : Int1 = CallByName Num.22 List.103 List.559; + if List.555 then + let List.557 : I64 = CallByName List.66 List.102 List.103; + dec List.102; + let List.556 : [C {}, C I64] = TagId(1) List.557; + ret List.556; else - dec List.100; - let List.544 : {} = Struct {}; - let List.543 : [C {}, C I64] = TagId(0) List.544; - ret List.543; + dec List.102; + let List.554 : {} = Struct {}; + let List.553 : [C {}, C I64] = TagId(0) List.554; + ret List.553; procedure List.6 (#Attr.2): - let List.550 : U64 = lowlevel ListLen #Attr.2; - ret List.550; + let List.560 : U64 = lowlevel ListLen #Attr.2; + ret List.560; procedure List.66 (#Attr.2, #Attr.3): - let List.548 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.548; + let List.558 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.558; -procedure List.9 (List.306): - let List.542 : U64 = 0i64; - let List.535 : [C {}, C I64] = CallByName List.2 List.306 List.542; - let List.539 : U8 = 1i64; - let List.540 : U8 = GetTagId List.535; - let List.541 : Int1 = lowlevel Eq List.539 List.540; - if List.541 then - let List.307 : I64 = UnionAtIndex (Id 1) (Index 0) List.535; - let List.536 : [C Int1, C I64] = TagId(1) List.307; - ret List.536; +procedure List.9 (List.308): + let List.552 : U64 = 0i64; + let List.545 : [C {}, C I64] = CallByName List.2 List.308 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.309 : I64 = UnionAtIndex (Id 1) (Index 0) List.545; + let List.546 : [C Int1, C I64] = TagId(1) List.309; + ret List.546; else - let List.538 : Int1 = true; - let List.537 : [C Int1, C I64] = TagId(0) List.538; - ret List.537; + let List.548 : Int1 = true; + let List.547 : [C Int1, C I64] = TagId(0) List.548; + ret List.547; 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 8748cb0070e..3d772ebfee2 100644 --- a/crates/compiler/test_mono/generated/issue_4749.txt +++ b/crates/compiler/test_mono/generated/issue_4749.txt @@ -64,136 +64,136 @@ 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.99): - let List.602 : U64 = CallByName List.6 List.99; - dec List.99; - let List.603 : U64 = 0i64; - let List.601 : Int1 = CallByName Bool.11 List.602 List.603; - ret List.601; - -procedure List.2 (List.100, List.101): - let List.585 : U64 = CallByName List.6 List.100; - let List.582 : Int1 = CallByName Num.22 List.101 List.585; - if List.582 then - let List.584 : U8 = CallByName List.66 List.100 List.101; - dec List.100; - let List.583 : [C {}, C U8] = TagId(1) List.584; - ret List.583; +procedure List.1 (List.101): + let List.612 : U64 = CallByName List.6 List.101; + dec List.101; + let List.613 : U64 = 0i64; + let List.611 : Int1 = CallByName Bool.11 List.612 List.613; + ret List.611; + +procedure List.2 (List.102, List.103): + let List.595 : U64 = CallByName List.6 List.102; + let List.592 : Int1 = CallByName Num.22 List.103 List.595; + if List.592 then + let List.594 : U8 = CallByName List.66 List.102 List.103; + dec List.102; + let List.593 : [C {}, C U8] = TagId(1) List.594; + ret List.593; else - dec List.100; - let List.581 : {} = Struct {}; - let List.580 : [C {}, C U8] = TagId(0) List.581; - ret List.580; - -procedure List.26 (List.172, List.173, List.174): - let List.604 : [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.96 List.172 List.173 List.174; - let List.607 : U8 = 1i64; - let List.608 : U8 = GetTagId List.604; - let List.609 : Int1 = lowlevel Eq List.607 List.608; - if List.609 then - let List.175 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = UnionAtIndex (Id 1) (Index 0) List.604; - ret List.175; + dec List.102; + let List.591 : {} = Struct {}; + let List.590 : [C {}, C U8] = TagId(0) List.591; + ret List.590; + +procedure List.26 (List.174, List.175, List.176): + let List.614 : [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.98 List.174 List.175 List.176; + let List.617 : U8 = 1i64; + let List.618 : U8 = GetTagId List.614; + let List.619 : Int1 = lowlevel Eq List.617 List.618; + if List.619 then + let List.177 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = UnionAtIndex (Id 1) (Index 0) List.614; + ret List.177; else - let List.176 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = UnionAtIndex (Id 0) (Index 0) List.604; - ret List.176; + let List.178 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = UnionAtIndex (Id 0) (Index 0) List.614; + ret List.178; -procedure List.29 (List.317, List.318): - let List.559 : U64 = CallByName List.6 List.317; - let List.319 : U64 = CallByName Num.77 List.559 List.318; - let List.558 : List U8 = CallByName List.43 List.317 List.319; - ret List.558; +procedure List.29 (List.319, List.320): + let List.569 : U64 = CallByName List.6 List.319; + let List.321 : U64 = CallByName Num.77 List.569 List.320; + let List.568 : List U8 = CallByName List.43 List.319 List.321; + ret List.568; procedure List.31 (#Attr.2, #Attr.3): - let List.572 : List U8 = lowlevel ListDropAt #Attr.2 #Attr.3; - ret List.572; - -procedure List.38 (List.311): - let List.571 : U64 = 0i64; - let List.570 : List U8 = CallByName List.31 List.311 List.571; - ret List.570; - -procedure List.4 (List.116, List.117): - let List.569 : U64 = 1i64; - let List.568 : List U8 = CallByName List.70 List.116 List.569; - let List.567 : List U8 = CallByName List.71 List.568 List.117; - ret List.567; - -procedure List.43 (List.315, List.316): - let List.551 : U64 = CallByName List.6 List.315; - let List.550 : U64 = CallByName Num.77 List.551 List.316; - let List.541 : {U64, U64} = Struct {List.316, List.550}; - let List.540 : List U8 = CallByName List.49 List.315 List.541; - ret List.540; - -procedure List.49 (List.390, List.391): - let List.598 : U64 = StructAtIndex 0 List.391; - let List.599 : U64 = 0i64; - let List.596 : Int1 = CallByName Bool.11 List.598 List.599; - if List.596 then - dec List.390; - let List.597 : List U8 = Array []; - ret List.597; + let List.582 : List U8 = lowlevel ListDropAt #Attr.2 #Attr.3; + ret List.582; + +procedure List.38 (List.313): + let List.581 : U64 = 0i64; + let List.580 : List U8 = CallByName List.31 List.313 List.581; + ret List.580; + +procedure List.4 (List.118, List.119): + let List.579 : U64 = 1i64; + let List.578 : List U8 = CallByName List.70 List.118 List.579; + let List.577 : List U8 = CallByName List.71 List.578 List.119; + ret List.577; + +procedure List.43 (List.317, List.318): + let List.561 : U64 = CallByName List.6 List.317; + let List.560 : U64 = CallByName Num.77 List.561 List.318; + let List.551 : {U64, U64} = Struct {List.318, List.560}; + let List.550 : List U8 = CallByName List.49 List.317 List.551; + ret List.550; + +procedure List.49 (List.392, List.393): + let List.608 : U64 = StructAtIndex 0 List.393; + let List.609 : U64 = 0i64; + let List.606 : Int1 = CallByName Bool.11 List.608 List.609; + if List.606 then + dec List.392; + let List.607 : List U8 = Array []; + ret List.607; else - let List.594 : U64 = StructAtIndex 1 List.391; - let List.595 : U64 = StructAtIndex 0 List.391; - let List.593 : List U8 = CallByName List.72 List.390 List.594 List.595; - ret List.593; + let List.604 : U64 = StructAtIndex 1 List.393; + let List.605 : U64 = StructAtIndex 0 List.393; + let List.603 : List U8 = CallByName List.72 List.392 List.604 List.605; + ret List.603; procedure List.6 (#Attr.2): - let List.625 : U64 = lowlevel ListLen #Attr.2; - ret List.625; + let List.635 : U64 = lowlevel ListLen #Attr.2; + ret List.635; procedure List.66 (#Attr.2, #Attr.3): - let List.578 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.578; + let List.588 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.588; procedure List.70 (#Attr.2, #Attr.3): - let List.566 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.566; + let List.576 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.576; procedure List.71 (#Attr.2, #Attr.3): - let List.564 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.564; + let List.574 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.574; procedure List.72 (#Attr.2, #Attr.3, #Attr.4): - let List.545 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.545; + let List.555 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; + ret List.555; procedure List.8 (#Attr.2, #Attr.3): - let List.561 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.561; + let List.571 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.571; procedure List.80 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2, #Derived_gen.3, #Derived_gen.4): - joinpoint List.613 List.453 List.454 List.455 List.456 List.457: - let List.615 : Int1 = CallByName Num.22 List.456 List.457; - if List.615 then - let List.624 : U8 = CallByName List.66 List.453 List.456; - let List.616 : [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.454 List.624; - let List.621 : U8 = 1i64; - let List.622 : U8 = GetTagId List.616; - let List.623 : Int1 = lowlevel Eq List.621 List.622; - if List.623 then - let List.458 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = UnionAtIndex (Id 1) (Index 0) List.616; - let List.619 : U64 = 1i64; - let List.618 : U64 = CallByName Num.51 List.456 List.619; - jump List.613 List.453 List.458 List.455 List.618 List.457; + joinpoint List.623 List.463 List.464 List.465 List.466 List.467: + let List.625 : Int1 = CallByName Num.22 List.466 List.467; + if List.625 then + let List.634 : U8 = CallByName List.66 List.463 List.466; + let List.626 : [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.634; + let List.631 : U8 = 1i64; + let List.632 : U8 = GetTagId List.626; + let List.633 : Int1 = lowlevel Eq List.631 List.632; + if List.633 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.626; + let List.629 : U64 = 1i64; + let List.628 : U64 = CallByName Num.51 List.466 List.629; + jump List.623 List.463 List.468 List.465 List.628 List.467; else - dec List.453; - let List.459 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = UnionAtIndex (Id 0) (Index 0) List.616; - let List.620 : [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.459; - ret List.620; + 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.626; + let List.630 : [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.630; else - dec List.453; - let List.614 : [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.454; - ret List.614; + dec List.463; + let List.624 : [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.624; in - jump List.613 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; + jump List.623 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; -procedure List.96 (List.450, List.451, List.452): - let List.611 : U64 = 0i64; - let List.612 : U64 = CallByName List.6 List.450; - let List.610 : [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.450 List.451 List.452 List.611 List.612; - ret List.610; +procedure List.98 (List.460, List.461, List.462): + let List.621 : U64 = 0i64; + let List.622 : U64 = CallByName List.6 List.460; + let List.620 : [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.621 List.622; + ret List.620; 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 261d2109305..b8d7b8deae2 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.207 (List.537, List.208, List.206): - let List.567 : Int1 = CallByName Test.1 List.208; - if List.567 then - let List.569 : {} = Struct {}; - let List.568 : [C {}, C {}] = TagId(1) List.569; - ret List.568; +procedure List.209 (List.547, List.210, List.208): + let List.577 : Int1 = CallByName Test.1 List.210; + if List.577 then + let List.579 : {} = Struct {}; + let List.578 : [C {}, C {}] = TagId(1) List.579; + ret List.578; else - let List.566 : {} = Struct {}; - let List.565 : [C {}, C {}] = TagId(0) List.566; - ret List.565; + let List.576 : {} = Struct {}; + let List.575 : [C {}, C {}] = TagId(0) List.576; + ret List.575; procedure List.23 (#Attr.2, #Attr.3, #Attr.4): - let List.570 : 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.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; decref #Attr.3; decref #Attr.2; - ret List.570; + ret List.580; -procedure List.56 (List.205, List.206): - let List.546 : {} = Struct {}; - let List.538 : [C {}, C {}] = CallByName List.96 List.205 List.546 List.206; - let List.543 : U8 = 1i64; - let List.544 : U8 = GetTagId List.538; - let List.545 : Int1 = lowlevel Eq List.543 List.544; - if List.545 then - let List.539 : Int1 = CallByName Bool.2; - ret List.539; +procedure List.56 (List.207, List.208): + let List.556 : {} = Struct {}; + let List.548 : [C {}, C {}] = CallByName List.98 List.207 List.556 List.208; + 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; else - let List.540 : Int1 = CallByName Bool.1; - ret List.540; + let List.550 : Int1 = CallByName Bool.1; + ret List.550; procedure List.6 (#Attr.2): - let List.536 : U64 = lowlevel ListLen #Attr.2; - ret List.536; + let List.546 : U64 = lowlevel ListLen #Attr.2; + ret List.546; procedure List.6 (#Attr.2): - let List.564 : U64 = lowlevel ListLen #Attr.2; - ret List.564; + let List.574 : U64 = lowlevel ListLen #Attr.2; + ret List.574; procedure List.66 (#Attr.2, #Attr.3): - let List.563 : {[C I64, C List *self], [C I64, C List *self]} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.563; + let List.573 : {[C I64, C List *self], [C I64, C List *self]} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.573; procedure List.80 (#Derived_gen.1, #Derived_gen.2, #Derived_gen.3, #Derived_gen.4, #Derived_gen.5): - joinpoint List.551 List.453 List.454 List.455 List.456 List.457: - let List.553 : Int1 = CallByName Num.22 List.456 List.457; - if List.553 then - let List.562 : {[C I64, C List *self], [C I64, C List *self]} = CallByName List.66 List.453 List.456; - inc List.562; - let List.554 : [C {}, C {}] = CallByName List.207 List.454 List.562 List.455; - let List.559 : U8 = 1i64; - let List.560 : U8 = GetTagId List.554; - let List.561 : Int1 = lowlevel Eq List.559 List.560; - if List.561 then - let List.458 : {} = UnionAtIndex (Id 1) (Index 0) List.554; - let List.557 : U64 = 1i64; - let List.556 : U64 = CallByName Num.51 List.456 List.557; - jump List.551 List.453 List.458 List.455 List.556 List.457; + 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.209 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; else - dec List.453; - let List.459 : {} = UnionAtIndex (Id 0) (Index 0) List.554; - let List.558 : [C {}, C {}] = TagId(0) List.459; - ret List.558; + 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; else - dec List.453; - let List.552 : [C {}, C {}] = TagId(1) List.454; - ret List.552; + dec List.463; + let List.562 : [C {}, C {}] = TagId(1) List.464; + ret List.562; in - jump List.551 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4 #Derived_gen.5; + jump List.561 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4 #Derived_gen.5; -procedure List.96 (List.450, List.451, List.452): - let List.549 : U64 = 0i64; - let List.550 : U64 = CallByName List.6 List.450; - let List.548 : [C {}, C {}] = CallByName List.80 List.450 List.451 List.452 List.549 List.550; - ret List.548; +procedure List.98 (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 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 2093b1da1ea..80f817c439b 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,136 +38,136 @@ 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.99): - let List.598 : U64 = CallByName List.6 List.99; - dec List.99; - let List.599 : U64 = 0i64; - let List.597 : Int1 = CallByName Bool.11 List.598 List.599; - ret List.597; - -procedure List.2 (List.100, List.101): - let List.581 : U64 = CallByName List.6 List.100; - let List.578 : Int1 = CallByName Num.22 List.101 List.581; - if List.578 then - let List.580 : U8 = CallByName List.66 List.100 List.101; - dec List.100; - let List.579 : [C {}, C U8] = TagId(1) List.580; - ret List.579; +procedure List.1 (List.101): + let List.608 : U64 = CallByName List.6 List.101; + dec List.101; + let List.609 : U64 = 0i64; + let List.607 : Int1 = CallByName Bool.11 List.608 List.609; + ret List.607; + +procedure List.2 (List.102, List.103): + let List.591 : U64 = CallByName List.6 List.102; + let List.588 : Int1 = CallByName Num.22 List.103 List.591; + if List.588 then + let List.590 : U8 = CallByName List.66 List.102 List.103; + dec List.102; + let List.589 : [C {}, C U8] = TagId(1) List.590; + ret List.589; else - dec List.100; - let List.577 : {} = Struct {}; - let List.576 : [C {}, C U8] = TagId(0) List.577; - ret List.576; - -procedure List.26 (List.172, List.173, List.174): - let List.600 : [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.96 List.172 List.173 List.174; - let List.603 : U8 = 1i64; - let List.604 : U8 = GetTagId List.600; - let List.605 : Int1 = lowlevel Eq List.603 List.604; - if List.605 then - let List.175 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = UnionAtIndex (Id 1) (Index 0) List.600; - ret List.175; + dec List.102; + let List.587 : {} = Struct {}; + let List.586 : [C {}, C U8] = TagId(0) List.587; + ret List.586; + +procedure List.26 (List.174, List.175, List.176): + let List.610 : [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.98 List.174 List.175 List.176; + let List.613 : U8 = 1i64; + let List.614 : U8 = GetTagId List.610; + let List.615 : Int1 = lowlevel Eq List.613 List.614; + if List.615 then + let List.177 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = UnionAtIndex (Id 1) (Index 0) List.610; + ret List.177; else - let List.176 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = UnionAtIndex (Id 0) (Index 0) List.600; - ret List.176; + let List.178 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = UnionAtIndex (Id 0) (Index 0) List.610; + ret List.178; -procedure List.29 (List.317, List.318): - let List.555 : U64 = CallByName List.6 List.317; - let List.319 : U64 = CallByName Num.77 List.555 List.318; - let List.554 : List U8 = CallByName List.43 List.317 List.319; - ret List.554; +procedure List.29 (List.319, List.320): + let List.565 : U64 = CallByName List.6 List.319; + let List.321 : U64 = CallByName Num.77 List.565 List.320; + let List.564 : List U8 = CallByName List.43 List.319 List.321; + ret List.564; procedure List.31 (#Attr.2, #Attr.3): - let List.568 : List U8 = lowlevel ListDropAt #Attr.2 #Attr.3; - ret List.568; - -procedure List.38 (List.311): - let List.567 : U64 = 0i64; - let List.566 : List U8 = CallByName List.31 List.311 List.567; - ret List.566; - -procedure List.4 (List.116, List.117): - let List.565 : U64 = 1i64; - let List.564 : List U8 = CallByName List.70 List.116 List.565; - let List.563 : List U8 = CallByName List.71 List.564 List.117; - ret List.563; - -procedure List.43 (List.315, List.316): - let List.547 : U64 = CallByName List.6 List.315; - let List.546 : U64 = CallByName Num.77 List.547 List.316; - let List.537 : {U64, U64} = Struct {List.316, List.546}; - let List.536 : List U8 = CallByName List.49 List.315 List.537; - ret List.536; - -procedure List.49 (List.390, List.391): - let List.594 : U64 = StructAtIndex 0 List.391; - let List.595 : U64 = 0i64; - let List.592 : Int1 = CallByName Bool.11 List.594 List.595; - if List.592 then - dec List.390; - let List.593 : List U8 = Array []; - ret List.593; + let List.578 : List U8 = lowlevel ListDropAt #Attr.2 #Attr.3; + ret List.578; + +procedure List.38 (List.313): + let List.577 : U64 = 0i64; + let List.576 : List U8 = CallByName List.31 List.313 List.577; + ret List.576; + +procedure List.4 (List.118, List.119): + let List.575 : U64 = 1i64; + let List.574 : List U8 = CallByName List.70 List.118 List.575; + let List.573 : List U8 = CallByName List.71 List.574 List.119; + ret List.573; + +procedure List.43 (List.317, List.318): + let List.557 : U64 = CallByName List.6 List.317; + let List.556 : U64 = CallByName Num.77 List.557 List.318; + let List.547 : {U64, U64} = Struct {List.318, List.556}; + let List.546 : List U8 = CallByName List.49 List.317 List.547; + ret List.546; + +procedure List.49 (List.392, List.393): + let List.604 : U64 = StructAtIndex 0 List.393; + let List.605 : U64 = 0i64; + let List.602 : Int1 = CallByName Bool.11 List.604 List.605; + if List.602 then + dec List.392; + let List.603 : List U8 = Array []; + ret List.603; else - let List.590 : U64 = StructAtIndex 1 List.391; - let List.591 : U64 = StructAtIndex 0 List.391; - let List.589 : List U8 = CallByName List.72 List.390 List.590 List.591; - ret List.589; + let List.600 : U64 = StructAtIndex 1 List.393; + let List.601 : U64 = StructAtIndex 0 List.393; + let List.599 : List U8 = CallByName List.72 List.392 List.600 List.601; + ret List.599; procedure List.6 (#Attr.2): - let List.621 : U64 = lowlevel ListLen #Attr.2; - ret List.621; + let List.631 : U64 = lowlevel ListLen #Attr.2; + ret List.631; procedure List.66 (#Attr.2, #Attr.3): - let List.574 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.574; + let List.584 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.584; procedure List.70 (#Attr.2, #Attr.3): - let List.562 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.562; + let List.572 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.572; procedure List.71 (#Attr.2, #Attr.3): - let List.560 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.560; + let List.570 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.570; procedure List.72 (#Attr.2, #Attr.3, #Attr.4): - let List.541 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.541; + let List.551 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; + ret List.551; procedure List.8 (#Attr.2, #Attr.3): - let List.557 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.557; + let List.567 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.567; procedure List.80 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2, #Derived_gen.3, #Derived_gen.4): - joinpoint List.609 List.453 List.454 List.455 List.456 List.457: - let List.611 : Int1 = CallByName Num.22 List.456 List.457; - if List.611 then - let List.620 : U8 = CallByName List.66 List.453 List.456; - let List.612 : [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.454 List.620; - let List.617 : U8 = 1i64; - let List.618 : U8 = GetTagId List.612; - let List.619 : Int1 = lowlevel Eq List.617 List.618; - if List.619 then - let List.458 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = UnionAtIndex (Id 1) (Index 0) List.612; - let List.615 : U64 = 1i64; - let List.614 : U64 = CallByName Num.51 List.456 List.615; - jump List.609 List.453 List.458 List.455 List.614 List.457; + joinpoint List.619 List.463 List.464 List.465 List.466 List.467: + let List.621 : Int1 = CallByName Num.22 List.466 List.467; + if List.621 then + let List.630 : U8 = CallByName List.66 List.463 List.466; + let List.622 : [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.630; + let List.627 : U8 = 1i64; + let List.628 : U8 = GetTagId List.622; + let List.629 : Int1 = lowlevel Eq List.627 List.628; + if List.629 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.622; + let List.625 : U64 = 1i64; + let List.624 : U64 = CallByName Num.51 List.466 List.625; + jump List.619 List.463 List.468 List.465 List.624 List.467; else - dec List.453; - let List.459 : [C U64, C U64, C U64, C , C , C U64, C U64, C U64, C U64] = UnionAtIndex (Id 0) (Index 0) List.612; - let List.616 : [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.459; - ret List.616; + 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.622; + let List.626 : [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.626; else - dec List.453; - let List.610 : [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.454; - ret List.610; + dec List.463; + let List.620 : [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.620; in - jump List.609 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; + jump List.619 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; -procedure List.96 (List.450, List.451, List.452): - let List.607 : U64 = 0i64; - let List.608 : U64 = CallByName List.6 List.450; - let List.606 : [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.450 List.451 List.452 List.607 List.608; - ret List.606; +procedure List.98 (List.460, List.461, List.462): + let List.617 : U64 = 0i64; + let List.618 : U64 = CallByName List.6 List.460; + let List.616 : [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.617 List.618; + ret List.616; 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 b3b8c117c91..5ea3b2fb303 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.145, List.146, List.147): - let List.536 : U64 = 0i64; - let List.537 : U64 = CallByName List.6 List.145; - let List.535 : [, C {[C *self, ], *self}] = CallByName List.86 List.145 List.146 List.147 List.536 List.537; - ret List.535; +procedure List.18 (List.147, List.148, List.149): + let List.546 : U64 = 0i64; + let List.547 : U64 = CallByName List.6 List.147; + let List.545 : [, C {[C *self, ], *self}] = CallByName List.87 List.147 List.148 List.149 List.546 List.547; + ret List.545; procedure List.6 (#Attr.2): - let List.546 : U64 = lowlevel ListLen #Attr.2; - ret List.546; + let List.556 : U64 = lowlevel ListLen #Attr.2; + ret List.556; procedure List.66 (#Attr.2, #Attr.3): - let List.545 : [C *self, ] = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.545; + let List.555 : [C *self, ] = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.555; -procedure List.86 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2, #Derived_gen.3, #Derived_gen.4): - joinpoint List.538 List.148 List.149 List.150 List.151 List.152: - let List.540 : Int1 = CallByName Num.22 List.151 List.152; - if List.540 then - let List.544 : [C *self, ] = CallByName List.66 List.148 List.151; - inc List.544; - let List.153 : [, C {[C *self, ], *self}] = CallByName Test.7 List.149 List.544; - let List.543 : U64 = 1i64; - let List.542 : U64 = CallByName Num.51 List.151 List.543; - jump List.538 List.148 List.153 List.150 List.542 List.152; +procedure List.87 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2, #Derived_gen.3, #Derived_gen.4): + joinpoint List.548 List.150 List.151 List.152 List.153 List.154: + let List.550 : Int1 = CallByName Num.22 List.153 List.154; + if List.550 then + let List.554 : [C *self, ] = CallByName List.66 List.150 List.153; + inc List.554; + let List.155 : [, C {[C *self, ], *self}] = CallByName Test.7 List.151 List.554; + let List.553 : U64 = 1i64; + let List.552 : U64 = CallByName Num.51 List.153 List.553; + jump List.548 List.150 List.155 List.152 List.552 List.154; else - dec List.148; - ret List.149; + dec List.150; + ret List.151; in - jump List.538 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; + jump List.548 #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 62b590417cd..15b1916396c 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.116, List.117): - let List.538 : U64 = 1i64; - let List.536 : List I64 = CallByName List.70 List.116 List.538; - let List.535 : List I64 = CallByName List.71 List.536 List.117; - ret List.535; +procedure List.4 (List.118, List.119): + let List.548 : U64 = 1i64; + let List.546 : List I64 = CallByName List.70 List.118 List.548; + let List.545 : List I64 = CallByName List.71 List.546 List.119; + ret List.545; procedure List.70 (#Attr.2, #Attr.3): - let List.539 : List I64 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.539; + let List.549 : List I64 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.549; procedure List.71 (#Attr.2, #Attr.3): - let List.537 : List I64 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.537; + let List.547 : List I64 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.547; 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 4b4643fbd7b..576eb97230f 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.116, List.117): - let List.538 : U64 = 1i64; - let List.536 : List I64 = CallByName List.70 List.116 List.538; - let List.535 : List I64 = CallByName List.71 List.536 List.117; - ret List.535; +procedure List.4 (List.118, List.119): + let List.548 : U64 = 1i64; + let List.546 : List I64 = CallByName List.70 List.118 List.548; + let List.545 : List I64 = CallByName List.71 List.546 List.119; + ret List.545; procedure List.70 (#Attr.2, #Attr.3): - let List.539 : List I64 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.539; + let List.549 : List I64 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.549; procedure List.71 (#Attr.2, #Attr.3): - let List.537 : List I64 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.537; + let List.547 : List I64 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.547; 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 f4f820692f2..6c254e12bcb 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.108, List.109, List.110): - let List.538 : {List I64, I64} = CallByName List.64 List.108 List.109 List.110; - let List.537 : List I64 = StructAtIndex 0 List.538; - ret List.537; +procedure List.3 (List.110, List.111, List.112): + let List.548 : {List I64, I64} = CallByName List.64 List.110 List.111 List.112; + let List.547 : List I64 = StructAtIndex 0 List.548; + ret List.547; procedure List.6 (#Attr.2): - let List.536 : U64 = lowlevel ListLen #Attr.2; - ret List.536; - -procedure List.64 (List.105, List.106, List.107): - let List.543 : U64 = CallByName List.6 List.105; - let List.540 : Int1 = CallByName Num.22 List.106 List.543; - if List.540 then - let List.541 : {List I64, I64} = CallByName List.67 List.105 List.106 List.107; - ret List.541; + let List.546 : U64 = lowlevel ListLen #Attr.2; + ret List.546; + +procedure List.64 (List.107, List.108, List.109): + let List.553 : U64 = CallByName List.6 List.107; + let List.550 : Int1 = CallByName Num.22 List.108 List.553; + if List.550 then + let List.551 : {List I64, I64} = CallByName List.67 List.107 List.108 List.109; + ret List.551; else - let List.539 : {List I64, I64} = Struct {List.105, List.107}; - ret List.539; + let List.549 : {List I64, I64} = Struct {List.107, List.109}; + ret List.549; procedure List.67 (#Attr.2, #Attr.3, #Attr.4): - let List.542 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; - ret List.542; + let List.552 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; + ret List.552; 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 8ac58f711c6..82e9c93a7df 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.100, List.101): - let List.541 : U64 = CallByName List.6 List.100; - let List.537 : Int1 = CallByName Num.22 List.101 List.541; - if List.537 then - let List.539 : I64 = CallByName List.66 List.100 List.101; - dec List.100; - let List.538 : [C {}, C I64] = TagId(1) List.539; - ret List.538; +procedure List.2 (List.102, List.103): + let List.551 : U64 = CallByName List.6 List.102; + let List.547 : Int1 = CallByName Num.22 List.103 List.551; + if List.547 then + let List.549 : I64 = CallByName List.66 List.102 List.103; + dec List.102; + let List.548 : [C {}, C I64] = TagId(1) List.549; + ret List.548; else - dec List.100; - let List.536 : {} = Struct {}; - let List.535 : [C {}, C I64] = TagId(0) List.536; - ret List.535; + dec List.102; + let List.546 : {} = Struct {}; + let List.545 : [C {}, C I64] = TagId(0) List.546; + ret List.545; procedure List.6 (#Attr.2): - let List.542 : U64 = lowlevel ListLen #Attr.2; - ret List.542; + let List.552 : U64 = lowlevel ListLen #Attr.2; + ret List.552; procedure List.66 (#Attr.2, #Attr.3): - let List.540 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.540; + let List.550 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.550; 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 4b0b4e035f3..326debe024b 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.535 : U64 = lowlevel ListLen #Attr.2; - ret List.535; + let List.545 : U64 = lowlevel ListLen #Attr.2; + ret List.545; procedure List.6 (#Attr.2): - let List.536 : U64 = lowlevel ListLen #Attr.2; - ret List.536; + let List.546 : U64 = lowlevel ListLen #Attr.2; + ret List.546; 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 78d6b1828c0..5d30a281440 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.100, List.101): - let List.541 : U64 = CallByName List.6 List.100; - let List.537 : Int1 = CallByName Num.22 List.101 List.541; - if List.537 then - let List.539 : Str = CallByName List.66 List.100 List.101; - inc List.539; - dec List.100; - let List.538 : [C {}, C Str] = TagId(1) List.539; - ret List.538; +procedure List.2 (List.102, List.103): + let List.551 : U64 = CallByName List.6 List.102; + let List.547 : Int1 = CallByName Num.22 List.103 List.551; + if List.547 then + let List.549 : Str = CallByName List.66 List.102 List.103; + inc List.549; + dec List.102; + let List.548 : [C {}, C Str] = TagId(1) List.549; + ret List.548; else - dec List.100; - let List.536 : {} = Struct {}; - let List.535 : [C {}, C Str] = TagId(0) List.536; - ret List.535; + dec List.102; + let List.546 : {} = Struct {}; + let List.545 : [C {}, C Str] = TagId(0) List.546; + ret List.545; procedure List.5 (#Attr.2, #Attr.3): - let List.543 : List Str = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.3 #Attr.3; + let List.553 : List Str = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.3 #Attr.3; decref #Attr.2; - ret List.543; + ret List.553; procedure List.6 (#Attr.2): - let List.542 : U64 = lowlevel ListLen #Attr.2; - ret List.542; + let List.552 : U64 = lowlevel ListLen #Attr.2; + ret List.552; procedure List.66 (#Attr.2, #Attr.3): - let List.540 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.540; + let List.550 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.550; 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 011330dad64..138be6f3c3a 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.100, List.101): - let List.541 : U64 = CallByName List.6 List.100; - let List.537 : Int1 = CallByName Num.22 List.101 List.541; - if List.537 then - let List.539 : Str = CallByName List.66 List.100 List.101; - inc List.539; - dec List.100; - let List.538 : [C {}, C Str] = TagId(1) List.539; - ret List.538; +procedure List.2 (List.102, List.103): + let List.551 : U64 = CallByName List.6 List.102; + let List.547 : Int1 = CallByName Num.22 List.103 List.551; + if List.547 then + let List.549 : Str = CallByName List.66 List.102 List.103; + inc List.549; + dec List.102; + let List.548 : [C {}, C Str] = TagId(1) List.549; + ret List.548; else - dec List.100; - let List.536 : {} = Struct {}; - let List.535 : [C {}, C Str] = TagId(0) List.536; - ret List.535; + dec List.102; + let List.546 : {} = Struct {}; + let List.545 : [C {}, C Str] = TagId(0) List.546; + ret List.545; procedure List.5 (#Attr.2, #Attr.3): - let List.543 : List Str = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.3 #Attr.3; + let List.553 : List Str = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.3 #Attr.3; decref #Attr.2; - ret List.543; + ret List.553; procedure List.6 (#Attr.2): - let List.542 : U64 = lowlevel ListLen #Attr.2; - ret List.542; + let List.552 : U64 = lowlevel ListLen #Attr.2; + ret List.552; procedure List.66 (#Attr.2, #Attr.3): - let List.540 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.540; + let List.550 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.550; 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 720624553ca..b03497022ba 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.536 : U8 = GetTagId #Attr.3; - joinpoint List.537 List.535: - ret List.535; + let List.546 : U8 = GetTagId #Attr.3; + joinpoint List.547 List.545: + ret List.545; in - switch List.536: + switch List.546: case 0: - let List.538 : List U8 = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.4 #Attr.3; + let List.548 : List U8 = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.4 #Attr.3; decref #Attr.2; - jump List.537 List.538; + jump List.547 List.548; case 1: - let List.539 : List U8 = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.6 #Attr.3; + let List.549 : List U8 = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.6 #Attr.3; decref #Attr.2; - jump List.537 List.539; + jump List.547 List.549; default: - let List.540 : List U8 = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.8 #Attr.3; + let List.550 : List U8 = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.8 #Attr.3; decref #Attr.2; - jump List.537 List.540; + jump List.547 List.550; 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 91e2b61a33e..87c775d27bf 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.108, List.109, List.110): - let List.536 : {List I64, I64} = CallByName List.64 List.108 List.109 List.110; - let List.535 : List I64 = StructAtIndex 0 List.536; - ret List.535; +procedure List.3 (List.110, List.111, List.112): + let List.546 : {List I64, I64} = CallByName List.64 List.110 List.111 List.112; + let List.545 : List I64 = StructAtIndex 0 List.546; + ret List.545; procedure List.6 (#Attr.2): - let List.542 : U64 = lowlevel ListLen #Attr.2; - ret List.542; + let List.552 : U64 = lowlevel ListLen #Attr.2; + ret List.552; -procedure List.64 (List.105, List.106, List.107): - let List.541 : U64 = CallByName List.6 List.105; - let List.538 : Int1 = CallByName Num.22 List.106 List.541; - if List.538 then - let List.539 : {List I64, I64} = CallByName List.67 List.105 List.106 List.107; - ret List.539; +procedure List.64 (List.107, List.108, List.109): + let List.551 : U64 = CallByName List.6 List.107; + let List.548 : Int1 = CallByName Num.22 List.108 List.551; + if List.548 then + let List.549 : {List I64, I64} = CallByName List.67 List.107 List.108 List.109; + ret List.549; else - let List.537 : {List I64, I64} = Struct {List.105, List.107}; - ret List.537; + let List.547 : {List I64, I64} = Struct {List.107, List.109}; + ret List.547; procedure List.67 (#Attr.2, #Attr.3, #Attr.4): - let List.540 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; - ret List.540; + let List.550 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; + ret List.550; 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 3ba8c8a9802..daba7a02e29 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.537 : List I64 = lowlevel ListSortWith { xs: `#Attr.#arg1` } #Attr.2 Num.46 #Attr.3; - ret List.537; + let List.547 : List I64 = lowlevel ListSortWith { xs: `#Attr.#arg1` } #Attr.2 Num.46 #Attr.3; + ret List.547; -procedure List.59 (List.301): - let List.536 : {} = Struct {}; - let List.535 : List I64 = CallByName List.28 List.301 List.536; - ret List.535; +procedure List.59 (List.303): + let List.546 : {} = Struct {}; + let List.545 : List I64 = CallByName List.28 List.303 List.546; + ret List.545; 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 1e8ec2af629..6fb7de11ee3 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.100, List.101): - let List.557 : U64 = CallByName List.6 List.100; - let List.554 : Int1 = CallByName Num.22 List.101 List.557; - if List.554 then - let List.556 : I64 = CallByName List.66 List.100 List.101; - dec List.100; - let List.555 : [C {}, C I64] = TagId(1) List.556; - ret List.555; +procedure List.2 (List.102, List.103): + let List.567 : U64 = CallByName List.6 List.102; + let List.564 : Int1 = CallByName Num.22 List.103 List.567; + if List.564 then + let List.566 : I64 = CallByName List.66 List.102 List.103; + dec List.102; + let List.565 : [C {}, C I64] = TagId(1) List.566; + ret List.565; else - dec List.100; - let List.553 : {} = Struct {}; - let List.552 : [C {}, C I64] = TagId(0) List.553; - ret List.552; + dec List.102; + let List.563 : {} = Struct {}; + let List.562 : [C {}, C I64] = TagId(0) List.563; + ret List.562; -procedure List.3 (List.108, List.109, List.110): - let List.544 : {List I64, I64} = CallByName List.64 List.108 List.109 List.110; - let List.543 : List I64 = StructAtIndex 0 List.544; - ret List.543; +procedure List.3 (List.110, List.111, List.112): + let List.554 : {List I64, I64} = CallByName List.64 List.110 List.111 List.112; + let List.553 : List I64 = StructAtIndex 0 List.554; + ret List.553; procedure List.6 (#Attr.2): - let List.542 : U64 = lowlevel ListLen #Attr.2; - ret List.542; + let List.552 : U64 = lowlevel ListLen #Attr.2; + ret List.552; -procedure List.64 (List.105, List.106, List.107): - let List.541 : U64 = CallByName List.6 List.105; - let List.538 : Int1 = CallByName Num.22 List.106 List.541; - if List.538 then - let List.539 : {List I64, I64} = CallByName List.67 List.105 List.106 List.107; - ret List.539; +procedure List.64 (List.107, List.108, List.109): + let List.551 : U64 = CallByName List.6 List.107; + let List.548 : Int1 = CallByName Num.22 List.108 List.551; + if List.548 then + let List.549 : {List I64, I64} = CallByName List.67 List.107 List.108 List.109; + ret List.549; else - let List.537 : {List I64, I64} = Struct {List.105, List.107}; - ret List.537; + let List.547 : {List I64, I64} = Struct {List.107, List.109}; + ret List.547; procedure List.66 (#Attr.2, #Attr.3): - let List.550 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.550; + let List.560 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.560; procedure List.67 (#Attr.2, #Attr.3, #Attr.4): - let List.540 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; - ret List.540; + let List.550 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; + ret List.550; 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 6953ad48c00..fe47b411312 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.108, List.109, List.110): - let List.544 : {List U64, U64} = CallByName List.64 List.108 List.109 List.110; - let List.543 : List U64 = StructAtIndex 0 List.544; - ret List.543; +procedure List.3 (List.110, List.111, List.112): + let List.554 : {List U64, U64} = CallByName List.64 List.110 List.111 List.112; + let List.553 : List U64 = StructAtIndex 0 List.554; + ret List.553; procedure List.6 (#Attr.2): - let List.542 : U64 = lowlevel ListLen #Attr.2; - ret List.542; + let List.552 : U64 = lowlevel ListLen #Attr.2; + ret List.552; -procedure List.64 (List.105, List.106, List.107): - let List.541 : U64 = CallByName List.6 List.105; - let List.538 : Int1 = CallByName Num.22 List.106 List.541; - if List.538 then - let List.539 : {List U64, U64} = CallByName List.67 List.105 List.106 List.107; - ret List.539; +procedure List.64 (List.107, List.108, List.109): + let List.551 : U64 = CallByName List.6 List.107; + let List.548 : Int1 = CallByName Num.22 List.108 List.551; + if List.548 then + let List.549 : {List U64, U64} = CallByName List.67 List.107 List.108 List.109; + ret List.549; else - let List.537 : {List U64, U64} = Struct {List.105, List.107}; - ret List.537; + let List.547 : {List U64, U64} = Struct {List.107, List.109}; + ret List.547; procedure List.67 (#Attr.2, #Attr.3, #Attr.4): - let List.540 : {List U64, U64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; - ret List.540; + let List.550 : {List U64, U64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; + ret List.550; 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 33c93ab540d..fc058d6c487 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.535 : List [C List *self] = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.2 #Attr.3; + let List.545 : List [C List *self] = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.2 #Attr.3; decref #Attr.2; - ret List.535; + ret List.545; 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 063c5702479..815fd8722d3 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.100, List.101): - let List.557 : U64 = CallByName List.6 List.100; - let List.554 : Int1 = CallByName Num.22 List.101 List.557; - if List.554 then - let List.556 : I64 = CallByName List.66 List.100 List.101; - dec List.100; - let List.555 : [C {}, C I64] = TagId(1) List.556; - ret List.555; +procedure List.2 (List.102, List.103): + let List.567 : U64 = CallByName List.6 List.102; + let List.564 : Int1 = CallByName Num.22 List.103 List.567; + if List.564 then + let List.566 : I64 = CallByName List.66 List.102 List.103; + dec List.102; + let List.565 : [C {}, C I64] = TagId(1) List.566; + ret List.565; else - dec List.100; - let List.553 : {} = Struct {}; - let List.552 : [C {}, C I64] = TagId(0) List.553; - ret List.552; + dec List.102; + let List.563 : {} = Struct {}; + let List.562 : [C {}, C I64] = TagId(0) List.563; + ret List.562; -procedure List.3 (List.108, List.109, List.110): - let List.544 : {List I64, I64} = CallByName List.64 List.108 List.109 List.110; - let List.543 : List I64 = StructAtIndex 0 List.544; - ret List.543; +procedure List.3 (List.110, List.111, List.112): + let List.554 : {List I64, I64} = CallByName List.64 List.110 List.111 List.112; + let List.553 : List I64 = StructAtIndex 0 List.554; + ret List.553; procedure List.6 (#Attr.2): - let List.542 : U64 = lowlevel ListLen #Attr.2; - ret List.542; + let List.552 : U64 = lowlevel ListLen #Attr.2; + ret List.552; -procedure List.64 (List.105, List.106, List.107): - let List.541 : U64 = CallByName List.6 List.105; - let List.538 : Int1 = CallByName Num.22 List.106 List.541; - if List.538 then - let List.539 : {List I64, I64} = CallByName List.67 List.105 List.106 List.107; - ret List.539; +procedure List.64 (List.107, List.108, List.109): + let List.551 : U64 = CallByName List.6 List.107; + let List.548 : Int1 = CallByName Num.22 List.108 List.551; + if List.548 then + let List.549 : {List I64, I64} = CallByName List.67 List.107 List.108 List.109; + ret List.549; else - let List.537 : {List I64, I64} = Struct {List.105, List.107}; - ret List.537; + let List.547 : {List I64, I64} = Struct {List.107, List.109}; + ret List.547; procedure List.66 (#Attr.2, #Attr.3): - let List.550 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.550; + let List.560 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.560; procedure List.67 (#Attr.2, #Attr.3, #Attr.4): - let List.540 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; - ret List.540; + let List.550 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; + ret List.550; 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 f4f767262a6..801215008b6 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.145, List.146, List.147): - let List.562 : U64 = 0i64; - let List.563 : U64 = CallByName List.6 List.145; - let List.561 : {List U8, U64} = CallByName List.86 List.145 List.146 List.147 List.562 List.563; - ret List.561; - -procedure List.18 (List.145, List.146, List.147): - let List.574 : U64 = 0i64; - let List.575 : U64 = CallByName List.6 List.145; - let List.573 : List U8 = CallByName List.86 List.145 List.146 List.147 List.574 List.575; - ret List.573; - -procedure List.26 (List.172, List.173, List.174): - let List.615 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.96 List.172 List.173 List.174; - let List.618 : U8 = 1i64; - let List.619 : U8 = GetTagId List.615; - let List.620 : Int1 = lowlevel Eq List.618 List.619; - if List.620 then - let List.175 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.615; - ret List.175; +procedure List.18 (List.147, List.148, List.149): + let List.572 : U64 = 0i64; + let List.573 : U64 = CallByName List.6 List.147; + let List.571 : {List U8, U64} = CallByName List.87 List.147 List.148 List.149 List.572 List.573; + ret List.571; + +procedure List.18 (List.147, List.148, List.149): + let List.584 : U64 = 0i64; + let List.585 : U64 = CallByName List.6 List.147; + let List.583 : List U8 = CallByName List.87 List.147 List.148 List.149 List.584 List.585; + ret List.583; + +procedure List.26 (List.174, List.175, List.176): + let List.625 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.98 List.174 List.175 List.176; + 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.177 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.625; + ret List.177; else - let List.176 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.615; - ret List.176; - -procedure List.4 (List.116, List.117): - let List.560 : U64 = 1i64; - let List.559 : List U8 = CallByName List.70 List.116 List.560; - let List.558 : List U8 = CallByName List.71 List.559 List.117; - ret List.558; - -procedure List.49 (List.390, List.391): - let List.607 : U64 = StructAtIndex 0 List.391; - let List.608 : U64 = 0i64; - let List.605 : Int1 = CallByName Bool.11 List.607 List.608; - if List.605 then - dec List.390; - let List.606 : List U8 = Array []; - ret List.606; + let List.178 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.625; + ret List.178; + +procedure List.4 (List.118, List.119): + let List.570 : U64 = 1i64; + let List.569 : List U8 = CallByName List.70 List.118 List.570; + let List.568 : List U8 = CallByName List.71 List.569 List.119; + 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; else - let List.602 : U64 = StructAtIndex 1 List.391; - let List.603 : U64 = StructAtIndex 0 List.391; - let List.601 : List U8 = CallByName List.72 List.390 List.602 List.603; - ret List.601; - -procedure List.52 (List.405, List.406): - let List.407 : U64 = CallByName List.6 List.405; - joinpoint List.613 List.408: - let List.611 : U64 = 0i64; - let List.610 : {U64, U64} = Struct {List.408, List.611}; - inc List.405; - let List.409 : List U8 = CallByName List.49 List.405 List.610; - let List.609 : U64 = CallByName Num.75 List.407 List.408; - let List.600 : {U64, U64} = Struct {List.609, List.408}; - let List.410 : List U8 = CallByName List.49 List.405 List.600; - let List.599 : {List U8, List U8} = Struct {List.409, List.410}; - ret List.599; + 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; in - let List.614 : Int1 = CallByName Num.24 List.407 List.406; - if List.614 then - jump List.613 List.406; + let List.624 : Int1 = CallByName Num.24 List.409 List.408; + if List.624 then + jump List.623 List.408; else - jump List.613 List.407; + jump List.623 List.409; procedure List.6 (#Attr.2): - let List.585 : U64 = lowlevel ListLen #Attr.2; - ret List.585; + let List.595 : U64 = lowlevel ListLen #Attr.2; + ret List.595; procedure List.6 (#Attr.2): - let List.587 : U64 = lowlevel ListLen #Attr.2; - ret List.587; + let List.597 : U64 = lowlevel ListLen #Attr.2; + ret List.597; procedure List.66 (#Attr.2, #Attr.3): - let List.571 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.571; + let List.581 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.581; procedure List.66 (#Attr.2, #Attr.3): - let List.583 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.583; + let List.593 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.593; procedure List.68 (#Attr.2): - let List.598 : List U8 = lowlevel ListWithCapacity #Attr.2; - ret List.598; + let List.608 : List U8 = lowlevel ListWithCapacity #Attr.2; + ret List.608; procedure List.70 (#Attr.2, #Attr.3): - let List.539 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.539; + let List.549 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.549; procedure List.71 (#Attr.2, #Attr.3): - let List.537 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.537; + let List.547 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.547; procedure List.72 (#Attr.2, #Attr.3, #Attr.4): - let List.604 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.604; + let List.614 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; + ret List.614; procedure List.8 (#Attr.2, #Attr.3): - let List.596 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.596; + 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.624 List.453 List.454 List.455 List.456 List.457: - let List.626 : Int1 = CallByName Num.22 List.456 List.457; - if List.626 then - let List.635 : U8 = CallByName List.66 List.453 List.456; - let List.627 : [C {U64, Int1}, C {U64, Int1}] = CallByName TotallyNotJson.189 List.454 List.635; - let List.632 : U8 = 1i64; - let List.633 : U8 = GetTagId List.627; - let List.634 : Int1 = lowlevel Eq List.632 List.633; - if List.634 then - let List.458 : {U64, Int1} = UnionAtIndex (Id 1) (Index 0) List.627; - let List.630 : U64 = 1i64; - let List.629 : U64 = CallByName Num.51 List.456 List.630; - jump List.624 List.453 List.458 List.455 List.629 List.457; + 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; else - dec List.453; - let List.459 : {U64, Int1} = UnionAtIndex (Id 0) (Index 0) List.627; - let List.631 : [C {U64, Int1}, C {U64, Int1}] = TagId(0) List.459; - ret List.631; + 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; else - dec List.453; - let List.625 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.454; - ret List.625; + dec List.463; + let List.635 : [C {U64, Int1}, C {U64, Int1}] = TagId(1) List.464; + ret List.635; in - jump List.624 #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.576 List.148 List.149 List.150 List.151 List.152: - let List.578 : Int1 = CallByName Num.22 List.151 List.152; - if List.578 then - let List.582 : U8 = CallByName List.66 List.148 List.151; - let List.153 : List U8 = CallByName TotallyNotJson.215 List.149 List.582; - let List.581 : U64 = 1i64; - let List.580 : U64 = CallByName Num.51 List.151 List.581; - jump List.576 List.148 List.153 List.150 List.580 List.152; + jump List.634 #Derived_gen.8 #Derived_gen.9 #Derived_gen.10 #Derived_gen.11 #Derived_gen.12; + +procedure List.87 (#Derived_gen.13, #Derived_gen.14, #Derived_gen.15, #Derived_gen.16, #Derived_gen.17): + joinpoint List.586 List.150 List.151 List.152 List.153 List.154: + let List.588 : Int1 = CallByName Num.22 List.153 List.154; + if List.588 then + let List.592 : U8 = CallByName List.66 List.150 List.153; + let List.155 : List U8 = CallByName TotallyNotJson.215 List.151 List.592; + let List.591 : U64 = 1i64; + let List.590 : U64 = CallByName Num.51 List.153 List.591; + jump List.586 List.150 List.155 List.152 List.590 List.154; else - dec List.148; - ret List.149; + dec List.150; + ret List.151; in - jump List.576 #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.564 List.148 List.149 List.150 List.151 List.152: - let List.566 : Int1 = CallByName Num.22 List.151 List.152; - if List.566 then - let List.570 : Str = CallByName List.66 List.148 List.151; - inc List.570; - let List.153 : {List U8, U64} = CallByName TotallyNotJson.267 List.149 List.570 List.150; - let List.569 : U64 = 1i64; - let List.568 : U64 = CallByName Num.51 List.151 List.569; - jump List.564 List.148 List.153 List.150 List.568 List.152; + jump List.586 #Derived_gen.13 #Derived_gen.14 #Derived_gen.15 #Derived_gen.16 #Derived_gen.17; + +procedure List.87 (#Derived_gen.3, #Derived_gen.4, #Derived_gen.5, #Derived_gen.6, #Derived_gen.7): + joinpoint List.574 List.150 List.151 List.152 List.153 List.154: + let List.576 : Int1 = CallByName Num.22 List.153 List.154; + if List.576 then + let List.580 : Str = CallByName List.66 List.150 List.153; + inc List.580; + let List.155 : {List U8, U64} = CallByName TotallyNotJson.267 List.151 List.580 List.152; + let List.579 : U64 = 1i64; + let List.578 : U64 = CallByName Num.51 List.153 List.579; + jump List.574 List.150 List.155 List.152 List.578 List.154; else - dec List.148; - ret List.149; + dec List.150; + ret List.151; in - jump List.564 #Derived_gen.3 #Derived_gen.4 #Derived_gen.5 #Derived_gen.6 #Derived_gen.7; + jump List.574 #Derived_gen.3 #Derived_gen.4 #Derived_gen.5 #Derived_gen.6 #Derived_gen.7; -procedure List.96 (List.450, List.451, List.452): - let List.622 : U64 = 0i64; - let List.623 : U64 = CallByName List.6 List.450; - let List.621 : [C {U64, Int1}, C {U64, Int1}] = CallByName List.80 List.450 List.451 List.452 List.622 List.623; - ret List.621; +procedure List.98 (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 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 f53dfa733f6..514bfb0d039 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.145, List.146, List.147): - let List.562 : U64 = 0i64; - let List.563 : U64 = CallByName List.6 List.145; - let List.561 : {List U8, U64} = CallByName List.86 List.145 List.146 List.147 List.562 List.563; - ret List.561; - -procedure List.18 (List.145, List.146, List.147): - let List.602 : U64 = 0i64; - let List.603 : U64 = CallByName List.6 List.145; - let List.601 : {List U8, U64} = CallByName List.86 List.145 List.146 List.147 List.602 List.603; - ret List.601; - -procedure List.4 (List.116, List.117): - let List.600 : U64 = 1i64; - let List.599 : List U8 = CallByName List.70 List.116 List.600; - let List.598 : List U8 = CallByName List.71 List.599 List.117; - ret List.598; +procedure List.18 (List.147, List.148, List.149): + let List.572 : U64 = 0i64; + let List.573 : U64 = CallByName List.6 List.147; + let List.571 : {List U8, U64} = CallByName List.87 List.147 List.148 List.149 List.572 List.573; + ret List.571; + +procedure List.18 (List.147, List.148, List.149): + let List.612 : U64 = 0i64; + let List.613 : U64 = CallByName List.6 List.147; + let List.611 : {List U8, U64} = CallByName List.87 List.147 List.148 List.149 List.612 List.613; + ret List.611; + +procedure List.4 (List.118, List.119): + let List.610 : U64 = 1i64; + let List.609 : List U8 = CallByName List.70 List.118 List.610; + let List.608 : List U8 = CallByName List.71 List.609 List.119; + ret List.608; procedure List.6 (#Attr.2): - let List.573 : U64 = lowlevel ListLen #Attr.2; - ret List.573; + let List.583 : U64 = lowlevel ListLen #Attr.2; + ret List.583; procedure List.6 (#Attr.2): - let List.613 : U64 = lowlevel ListLen #Attr.2; - ret List.613; + let List.623 : U64 = lowlevel ListLen #Attr.2; + ret List.623; procedure List.66 (#Attr.2, #Attr.3): - let List.571 : [C {}, C {}] = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.571; + let List.581 : [C {}, C {}] = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.581; procedure List.66 (#Attr.2, #Attr.3): - let List.611 : [] = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.611; + let List.621 : [] = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.621; procedure List.70 (#Attr.2, #Attr.3): - let List.579 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; - ret List.579; + let List.589 : List U8 = lowlevel ListReserve #Attr.2 #Attr.3; + ret List.589; procedure List.71 (#Attr.2, #Attr.3): - let List.577 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; - ret List.577; + let List.587 : List U8 = lowlevel ListAppendUnsafe #Attr.2 #Attr.3; + ret List.587; procedure List.8 (#Attr.2, #Attr.3): - let List.614 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; - ret List.614; - -procedure List.86 (#Derived_gen.20, #Derived_gen.21, #Derived_gen.22, #Derived_gen.23, #Derived_gen.24): - joinpoint List.564 List.148 List.149 List.150 List.151 List.152: - let List.566 : Int1 = CallByName Num.22 List.151 List.152; - if List.566 then - let List.570 : [C {}, C {}] = CallByName List.66 List.148 List.151; - let List.153 : {List U8, U64} = CallByName TotallyNotJson.267 List.149 List.570 List.150; - let List.569 : U64 = 1i64; - let List.568 : U64 = CallByName Num.51 List.151 List.569; - jump List.564 List.148 List.153 List.150 List.568 List.152; + let List.624 : List U8 = lowlevel ListConcat #Attr.2 #Attr.3; + ret List.624; + +procedure List.87 (#Derived_gen.20, #Derived_gen.21, #Derived_gen.22, #Derived_gen.23, #Derived_gen.24): + joinpoint List.574 List.150 List.151 List.152 List.153 List.154: + let List.576 : Int1 = CallByName Num.22 List.153 List.154; + if List.576 then + let List.580 : [C {}, C {}] = CallByName List.66 List.150 List.153; + let List.155 : {List U8, U64} = CallByName TotallyNotJson.267 List.151 List.580 List.152; + let List.579 : U64 = 1i64; + let List.578 : U64 = CallByName Num.51 List.153 List.579; + jump List.574 List.150 List.155 List.152 List.578 List.154; else - dec List.148; - ret List.149; + dec List.150; + ret List.151; in - jump List.564 #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.604 List.148 List.149 List.150 List.151 List.152: - let List.606 : Int1 = CallByName Num.22 List.151 List.152; - if List.606 then - let List.610 : [] = CallByName List.66 List.148 List.151; - let List.153 : {List U8, U64} = CallByName TotallyNotJson.267 List.149 List.610 List.150; - let List.609 : U64 = 1i64; - let List.608 : U64 = CallByName Num.51 List.151 List.609; - jump List.604 List.148 List.153 List.150 List.608 List.152; + jump List.574 #Derived_gen.20 #Derived_gen.21 #Derived_gen.22 #Derived_gen.23 #Derived_gen.24; + +procedure List.87 (#Derived_gen.25, #Derived_gen.26, #Derived_gen.27, #Derived_gen.28, #Derived_gen.29): + joinpoint List.614 List.150 List.151 List.152 List.153 List.154: + let List.616 : Int1 = CallByName Num.22 List.153 List.154; + if List.616 then + let List.620 : [] = CallByName List.66 List.150 List.153; + let List.155 : {List U8, U64} = CallByName TotallyNotJson.267 List.151 List.620 List.152; + let List.619 : U64 = 1i64; + let List.618 : U64 = CallByName Num.51 List.153 List.619; + jump List.614 List.150 List.155 List.152 List.618 List.154; else - dec List.148; - ret List.149; + dec List.150; + ret List.151; in - jump List.604 #Derived_gen.34 #Derived_gen.35 #Derived_gen.36 #Derived_gen.37 #Derived_gen.38; + jump List.614 #Derived_gen.25 #Derived_gen.26 #Derived_gen.27 #Derived_gen.28 #Derived_gen.29; 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 6091c1831a1..bc6b95a38fd 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.172, List.173, List.174): - let List.550 : [C U64, C U64] = CallByName List.96 List.172 List.173 List.174; - let List.553 : U8 = 1i64; - let List.554 : U8 = GetTagId List.550; - let List.555 : Int1 = lowlevel Eq List.553 List.554; - if List.555 then - let List.175 : U64 = UnionAtIndex (Id 1) (Index 0) List.550; - ret List.175; +procedure List.26 (List.174, List.175, List.176): + let List.560 : [C U64, C U64] = CallByName List.98 List.174 List.175 List.176; + 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.177 : U64 = UnionAtIndex (Id 1) (Index 0) List.560; + ret List.177; else - let List.176 : U64 = UnionAtIndex (Id 0) (Index 0) List.550; - ret List.176; + let List.178 : U64 = UnionAtIndex (Id 0) (Index 0) List.560; + ret List.178; -procedure List.29 (List.317, List.318): - let List.549 : U64 = CallByName List.6 List.317; - let List.319 : U64 = CallByName Num.77 List.549 List.318; - let List.535 : List U8 = CallByName List.43 List.317 List.319; - ret List.535; +procedure List.29 (List.319, List.320): + let List.559 : U64 = CallByName List.6 List.319; + let List.321 : U64 = CallByName Num.77 List.559 List.320; + let List.545 : List U8 = CallByName List.43 List.319 List.321; + ret List.545; -procedure List.43 (List.315, List.316): - let List.547 : U64 = CallByName List.6 List.315; - let List.546 : U64 = CallByName Num.77 List.547 List.316; - let List.537 : {U64, U64} = Struct {List.316, List.546}; - let List.536 : List U8 = CallByName List.49 List.315 List.537; - ret List.536; +procedure List.43 (List.317, List.318): + let List.557 : U64 = CallByName List.6 List.317; + let List.556 : U64 = CallByName Num.77 List.557 List.318; + let List.547 : {U64, U64} = Struct {List.318, List.556}; + let List.546 : List U8 = CallByName List.49 List.317 List.547; + ret List.546; -procedure List.49 (List.390, List.391): - let List.544 : U64 = StructAtIndex 0 List.391; - let List.545 : U64 = 0i64; - let List.542 : Int1 = CallByName Bool.11 List.544 List.545; - if List.542 then - dec List.390; - let List.543 : List U8 = Array []; - ret List.543; +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; else - let List.539 : U64 = StructAtIndex 1 List.391; - let List.540 : U64 = StructAtIndex 0 List.391; - let List.538 : List U8 = CallByName List.72 List.390 List.539 List.540; - ret List.538; + 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; procedure List.6 (#Attr.2): - let List.548 : U64 = lowlevel ListLen #Attr.2; - ret List.548; + let List.558 : U64 = lowlevel ListLen #Attr.2; + ret List.558; procedure List.66 (#Attr.2, #Attr.3): - let List.571 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.571; + let List.581 : U8 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.581; procedure List.72 (#Attr.2, #Attr.3, #Attr.4): - let List.541 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; - ret List.541; + let List.551 : List U8 = lowlevel ListSublist #Attr.2 #Attr.3 #Attr.4; + ret List.551; procedure List.80 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2, #Derived_gen.3, #Derived_gen.4): - joinpoint List.559 List.453 List.454 List.455 List.456 List.457: - let List.561 : Int1 = CallByName Num.22 List.456 List.457; - if List.561 then - let List.570 : U8 = CallByName List.66 List.453 List.456; - let List.562 : [C U64, C U64] = CallByName Test.3 List.454 List.570; - let List.567 : U8 = 1i64; - let List.568 : U8 = GetTagId List.562; - let List.569 : Int1 = lowlevel Eq List.567 List.568; - if List.569 then - let List.458 : U64 = UnionAtIndex (Id 1) (Index 0) List.562; - let List.565 : U64 = 1i64; - let List.564 : U64 = CallByName Num.51 List.456 List.565; - jump List.559 List.453 List.458 List.455 List.564 List.457; + 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; else - dec List.453; - let List.459 : U64 = UnionAtIndex (Id 0) (Index 0) List.562; - let List.566 : [C U64, C U64] = TagId(0) List.459; - ret List.566; + 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; else - dec List.453; - let List.560 : [C U64, C U64] = TagId(1) List.454; - ret List.560; + dec List.463; + let List.570 : [C U64, C U64] = TagId(1) List.464; + ret List.570; in - jump List.559 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; + jump List.569 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3 #Derived_gen.4; -procedure List.96 (List.450, List.451, List.452): - let List.557 : U64 = 0i64; - let List.558 : U64 = CallByName List.6 List.450; - let List.556 : [C U64, C U64] = CallByName List.80 List.450 List.451 List.452 List.557 List.558; - ret List.556; +procedure List.98 (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 Num.22 (#Attr.2, #Attr.3): let Num.294 : Int1 = lowlevel NumLt #Attr.2 #Attr.3;