From ae410fbf5d3bd693e7f6665105a33def8944b2b6 Mon Sep 17 00:00:00 2001 From: ayazhafiz Date: Sat, 2 Jul 2022 18:20:29 -0400 Subject: [PATCH] Fix mono tests --- .../test_mono/generated/closure_in_list.txt | 5 ++ .../generated/empty_list_of_function_type.txt | 22 +++++++ .../compiler/test_mono/generated/encode.txt | 5 ++ .../test_mono/generated/ir_int_add.txt | 5 ++ ...cialize_errors_behind_unified_branches.txt | 61 +++++++++++++++---- .../test_mono/generated/list_append.txt | 5 ++ .../generated/list_append_closure.txt | 5 ++ .../generated/list_cannot_update_inplace.txt | 29 +++++++-- .../compiler/test_mono/generated/list_get.txt | 26 +++++++- .../compiler/test_mono/generated/list_len.txt | 9 +++ .../generated/list_map_closure_borrows.txt | 45 +++++++++----- .../generated/list_map_closure_owns.txt | 37 ++++++++--- .../generated/list_pass_to_function.txt | 31 +++++++++- .../test_mono/generated/list_sort_asc.txt | 15 ++++- .../test_mono/generated/quicksort_swap.txt | 52 ++++++++++++---- .../compiler/test_mono/generated/rigids.txt | 52 ++++++++++++---- 16 files changed, 335 insertions(+), 69 deletions(-) diff --git a/crates/compiler/test_mono/generated/closure_in_list.txt b/crates/compiler/test_mono/generated/closure_in_list.txt index 643a75fdad..115677d475 100644 --- a/crates/compiler/test_mono/generated/closure_in_list.txt +++ b/crates/compiler/test_mono/generated/closure_in_list.txt @@ -1,4 +1,5 @@ procedure List.6 (#Attr.2): +<<<<<<< HEAD <<<<<<< HEAD let List.284 : U64 = lowlevel ListLen #Attr.2; ret List.284; @@ -11,6 +12,10 @@ procedure List.6 (#Attr.2): ret List.213; >>>>>>> a5fc399f4 (Rename multimorphic tests to capture niche):compiler/test_mono/generated/closure_in_list.txt >>>>>>> 25bb3751b (Rename multimorphic tests to capture niche) +======= + let List.238 : U64 = lowlevel ListLen #Attr.2; + ret List.238; +>>>>>>> 61fcac491 (Fix mono tests) procedure Test.1 (Test.5): let Test.2 : I64 = 41i64; 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 d1ffaafe5b..b023cf0456 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 @@ -1,4 +1,5 @@ <<<<<<< HEAD +<<<<<<< HEAD procedure List.2 (List.75, List.76): let List.290 : U64 = CallByName List.6 List.75; let List.286 : Int1 = CallByName Num.22 List.76 List.290; @@ -54,6 +55,27 @@ procedure List.60 (#Attr.2, #Attr.3): ret List.221; >>>>>>> a5fc399f4 (Rename multimorphic tests to capture niche):compiler/test_mono/generated/empty_list_of_function_type.txt >>>>>>> 25bb3751b (Rename multimorphic tests to capture niche) +======= +procedure List.2 (List.72, List.73): + let List.244 : U64 = CallByName List.6 List.72; + let List.240 : Int1 = CallByName Num.22 List.73 List.244; + if List.240 then + let List.242 : {} = CallByName List.60 List.72 List.73; + let List.241 : [C {}, C {}] = Ok List.242; + ret List.241; + else + let List.239 : {} = Struct {}; + let List.238 : [C {}, C {}] = Err List.239; + ret List.238; + +procedure List.6 (#Attr.2): + let List.247 : U64 = lowlevel ListLen #Attr.2; + ret List.247; + +procedure List.60 (#Attr.2, #Attr.3): + let List.246 : {} = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.246; +>>>>>>> 61fcac491 (Fix mono tests) procedure Num.22 (#Attr.2, #Attr.3): let Num.188 : 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 7115be0912..037f3703d0 100644 --- a/crates/compiler/test_mono/generated/encode.txt +++ b/crates/compiler/test_mono/generated/encode.txt @@ -1,4 +1,5 @@ procedure List.4 (#Attr.2, #Attr.3): +<<<<<<< HEAD <<<<<<< HEAD let List.284 : List U8 = lowlevel ListAppend #Attr.2 #Attr.3; ret List.284; @@ -11,6 +12,10 @@ procedure List.4 (#Attr.2, #Attr.3): ret List.213; >>>>>>> a5fc399f4 (Rename multimorphic tests to capture niche):compiler/test_mono/generated/encode.txt >>>>>>> 25bb3751b (Rename multimorphic tests to capture niche) +======= + let List.238 : List U8 = lowlevel ListAppend #Attr.2 #Attr.3; + ret List.238; +>>>>>>> 61fcac491 (Fix mono tests) procedure Test.20 (Test.22): let Test.34 : {U8} = Struct {Test.22}; diff --git a/crates/compiler/test_mono/generated/ir_int_add.txt b/crates/compiler/test_mono/generated/ir_int_add.txt index 11f2565ef7..1db9bb3158 100644 --- a/crates/compiler/test_mono/generated/ir_int_add.txt +++ b/crates/compiler/test_mono/generated/ir_int_add.txt @@ -1,4 +1,5 @@ procedure List.6 (#Attr.2): +<<<<<<< HEAD <<<<<<< HEAD let List.284 : U64 = lowlevel ListLen #Attr.2; ret List.284; @@ -11,6 +12,10 @@ procedure List.6 (#Attr.2): ret List.213; >>>>>>> a5fc399f4 (Rename multimorphic tests to capture niche):compiler/test_mono/generated/ir_int_add.txt >>>>>>> 25bb3751b (Rename multimorphic tests to capture niche) +======= + let List.238 : U64 = lowlevel ListLen #Attr.2; + ret List.238; +>>>>>>> 61fcac491 (Fix mono tests) procedure Num.19 (#Attr.2, #Attr.3): let Num.190 : 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 1b417f48fe..e7a1852e6f 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 @@ -1,3 +1,4 @@ +<<<<<<< HEAD procedure List.2 (List.75, List.76): let List.299 : U64 = CallByName List.6 List.75; let List.295 : Int1 = CallByName Num.22 List.76 List.299; @@ -32,24 +33,60 @@ procedure List.9 (List.202): let List.287 : Int1 = true; let List.286 : [C Int1, C I64] = Err List.287; ret List.286; +======= +procedure List.2 (List.72, List.73): + let List.253 : U64 = CallByName List.6 List.72; + let List.249 : Int1 = CallByName Num.22 List.73 List.253; + if List.249 then + let List.251 : I64 = CallByName List.60 List.72 List.73; + let List.250 : [C {}, C I64] = Ok List.251; + ret List.250; + else + let List.248 : {} = Struct {}; + let List.247 : [C {}, C I64] = Err List.248; + ret List.247; + +procedure List.6 (#Attr.2): + let List.254 : U64 = lowlevel ListLen #Attr.2; + ret List.254; + +procedure List.60 (#Attr.2, #Attr.3): + let List.252 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.252; + +procedure List.9 (List.168): + let List.245 : U64 = 0i64; + let List.238 : [C {}, C I64] = CallByName List.2 List.168 List.245; + let List.242 : U8 = 1i64; + let List.243 : U8 = GetTagId List.238; + let List.244 : Int1 = lowlevel Eq List.242 List.243; + if List.244 then + let List.169 : I64 = UnionAtIndex (Id 1) (Index 0) List.238; + let List.239 : [C Int1, C I64] = Ok List.169; + ret List.239; + else + let List.241 : Int1 = true; + let List.240 : [C Int1, C I64] = Err List.241; + ret List.240; +>>>>>>> 61fcac491 (Fix mono tests) procedure Num.22 (#Attr.2, #Attr.3): - let Num.273 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; - ret Num.273; + let Num.188 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; + ret Num.188; procedure Str.27 (#Attr.2): let #Attr.3 : {I64, U8} = lowlevel StrToNum #Attr.2; - let Str.72 : U8 = StructAtIndex 1 #Attr.3; - let Str.73 : U8 = 0i64; - let Str.69 : Int1 = lowlevel NumGt Str.72 Str.73; - if Str.69 then - let Str.71 : Int1 = false; - let Str.70 : [C Int1, C I64] = Err Str.71; - ret Str.70; + let Str.42 : U8 = StructAtIndex 1 #Attr.3; + let Str.43 : U8 = 0i64; + let Str.39 : Int1 = lowlevel NumGt Str.42 Str.43; + if Str.39 then + let Str.41 : Int1 = false; + let Str.40 : [C Int1, C I64] = Err Str.41; + ret Str.40; else - let Str.68 : I64 = StructAtIndex 0 #Attr.3; - let Str.67 : [C Int1, C I64] = Ok Str.68; - ret Str.67; + let Str.38 : I64 = StructAtIndex 0 #Attr.3; + let Str.37 : [C Int1, C I64] = Ok Str.38; + ret Str.37; procedure Test.0 (): let Test.4 : Int1 = true; diff --git a/crates/compiler/test_mono/generated/list_append.txt b/crates/compiler/test_mono/generated/list_append.txt index 9d9624a7a0..a89e4d6eab 100644 --- a/crates/compiler/test_mono/generated/list_append.txt +++ b/crates/compiler/test_mono/generated/list_append.txt @@ -1,4 +1,5 @@ procedure List.4 (#Attr.2, #Attr.3): +<<<<<<< HEAD <<<<<<< HEAD let List.284 : List I64 = lowlevel ListAppend #Attr.2 #Attr.3; ret List.284; @@ -11,6 +12,10 @@ procedure List.4 (#Attr.2, #Attr.3): ret List.213; >>>>>>> a5fc399f4 (Rename multimorphic tests to capture niche):compiler/test_mono/generated/list_append.txt >>>>>>> 25bb3751b (Rename multimorphic tests to capture niche) +======= + let List.238 : List I64 = lowlevel ListAppend #Attr.2 #Attr.3; + ret List.238; +>>>>>>> 61fcac491 (Fix mono tests) 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 9566c7d113..bc217613db 100644 --- a/crates/compiler/test_mono/generated/list_append_closure.txt +++ b/crates/compiler/test_mono/generated/list_append_closure.txt @@ -1,4 +1,5 @@ procedure List.4 (#Attr.2, #Attr.3): +<<<<<<< HEAD <<<<<<< HEAD let List.284 : List I64 = lowlevel ListAppend #Attr.2 #Attr.3; ret List.284; @@ -11,6 +12,10 @@ procedure List.4 (#Attr.2, #Attr.3): ret List.213; >>>>>>> a5fc399f4 (Rename multimorphic tests to capture niche):compiler/test_mono/generated/list_append_closure.txt >>>>>>> 25bb3751b (Rename multimorphic tests to capture niche) +======= + let List.238 : List I64 = lowlevel ListAppend #Attr.2 #Attr.3; + ret List.238; +>>>>>>> 61fcac491 (Fix mono tests) 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 8d0977f122..18465beb56 100644 --- a/crates/compiler/test_mono/generated/list_cannot_update_inplace.txt +++ b/crates/compiler/test_mono/generated/list_cannot_update_inplace.txt @@ -1,4 +1,5 @@ <<<<<<< HEAD +<<<<<<< HEAD procedure List.3 (List.84, List.85, List.86): let List.287 : {List I64, I64} = CallByName List.57 List.84 List.85 List.86; let List.286 : List I64 = StructAtIndex 0 List.287; @@ -57,19 +58,39 @@ procedure List.57 (List.76, List.77, List.78): if List.219 then let List.220 : {List I64, I64} = CallByName List.61 List.76 List.77 List.78; ret List.220; +======= +procedure List.3 (List.80, List.81, List.82): + let List.241 : {List I64, I64} = CallByName List.57 List.80 List.81 List.82; + let List.240 : List I64 = StructAtIndex 0 List.241; + inc List.240; + dec List.241; + ret List.240; + +procedure List.57 (List.77, List.78, List.79): + let List.247 : U64 = CallByName List.6 List.77; + let List.244 : Int1 = CallByName Num.22 List.78 List.247; + if List.244 then + let List.245 : {List I64, I64} = CallByName List.61 List.77 List.78 List.79; + ret List.245; +>>>>>>> 61fcac491 (Fix mono tests) else - let List.218 : {List I64, I64} = Struct {List.76, List.78}; - ret List.218; + let List.243 : {List I64, I64} = Struct {List.77, List.79}; + ret List.243; procedure List.6 (#Attr.2): - let List.214 : U64 = lowlevel ListLen #Attr.2; - ret List.214; + let List.239 : U64 = lowlevel ListLen #Attr.2; + ret List.239; procedure List.61 (#Attr.2, #Attr.3, #Attr.4): +<<<<<<< HEAD let List.221 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; ret List.221; >>>>>>> a5fc399f4 (Rename multimorphic tests to capture niche):compiler/test_mono/generated/list_cannot_update_inplace.txt >>>>>>> 25bb3751b (Rename multimorphic tests to capture niche) +======= + let List.246 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; + ret List.246; +>>>>>>> 61fcac491 (Fix mono tests) procedure Num.19 (#Attr.2, #Attr.3): let Num.188 : 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 17c1f4fc6d..16382b100a 100644 --- a/crates/compiler/test_mono/generated/list_get.txt +++ b/crates/compiler/test_mono/generated/list_get.txt @@ -1,3 +1,4 @@ +<<<<<<< HEAD procedure List.2 (List.75, List.76): let List.290 : U64 = CallByName List.6 List.75; let List.286 : Int1 = CallByName Num.22 List.76 List.290; @@ -17,10 +18,31 @@ procedure List.6 (#Attr.2): procedure List.60 (#Attr.2, #Attr.3): let List.292 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; ret List.292; +======= +procedure List.2 (List.72, List.73): + let List.244 : U64 = CallByName List.6 List.72; + let List.240 : Int1 = CallByName Num.22 List.73 List.244; + if List.240 then + let List.242 : I64 = CallByName List.60 List.72 List.73; + let List.241 : [C {}, C I64] = Ok List.242; + ret List.241; + else + let List.239 : {} = Struct {}; + let List.238 : [C {}, C I64] = Err List.239; + ret List.238; + +procedure List.6 (#Attr.2): + let List.247 : U64 = lowlevel ListLen #Attr.2; + ret List.247; + +procedure List.60 (#Attr.2, #Attr.3): + let List.246 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.246; +>>>>>>> 61fcac491 (Fix mono tests) procedure Num.22 (#Attr.2, #Attr.3): - let Num.273 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; - ret Num.273; + let Num.188 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; + ret Num.188; procedure Test.1 (Test.2): let Test.6 : List I64 = Array [1i64, 2i64, 3i64]; diff --git a/crates/compiler/test_mono/generated/list_len.txt b/crates/compiler/test_mono/generated/list_len.txt index 01f1647f98..08700aee17 100644 --- a/crates/compiler/test_mono/generated/list_len.txt +++ b/crates/compiler/test_mono/generated/list_len.txt @@ -1,4 +1,5 @@ procedure List.6 (#Attr.2): +<<<<<<< HEAD <<<<<<< HEAD let List.284 : U64 = lowlevel ListLen #Attr.2; ret List.284; @@ -23,6 +24,14 @@ procedure List.6 (#Attr.2): ret List.214; >>>>>>> a5fc399f4 (Rename multimorphic tests to capture niche):compiler/test_mono/generated/list_len.txt >>>>>>> 25bb3751b (Rename multimorphic tests to capture niche) +======= + let List.238 : U64 = lowlevel ListLen #Attr.2; + ret List.238; + +procedure List.6 (#Attr.2): + let List.239 : U64 = lowlevel ListLen #Attr.2; + ret List.239; +>>>>>>> 61fcac491 (Fix mono tests) procedure Num.19 (#Attr.2, #Attr.3): let Num.188 : 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 3e4c8afc1a..1e30f9109e 100644 --- a/crates/compiler/test_mono/generated/list_map_closure_borrows.txt +++ b/crates/compiler/test_mono/generated/list_map_closure_borrows.txt @@ -1,4 +1,5 @@ <<<<<<< HEAD +<<<<<<< HEAD procedure List.2 (List.75, List.76): let List.290 : U64 = CallByName List.6 List.75; let List.286 : Int1 = CallByName Num.22 List.76 List.290; @@ -62,27 +63,43 @@ procedure List.60 (#Attr.2, #Attr.3): ret List.222; >>>>>>> a5fc399f4 (Rename multimorphic tests to capture niche):compiler/test_mono/generated/list_map_closure_borrows.txt >>>>>>> 25bb3751b (Rename multimorphic tests to capture niche) +======= +procedure List.2 (List.72, List.73): + let List.244 : U64 = CallByName List.6 List.72; + let List.240 : Int1 = CallByName Num.22 List.73 List.244; + if List.240 then + let List.242 : Str = CallByName List.60 List.72 List.73; + let List.241 : [C {}, C Str] = Ok List.242; + ret List.241; + else + let List.239 : {} = Struct {}; + let List.238 : [C {}, C Str] = Err List.239; + ret List.238; + +procedure List.5 (#Attr.2, #Attr.3): + let List.246 : List Str = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.3 #Attr.3; + ret List.246; + +procedure List.6 (#Attr.2): + let List.248 : U64 = lowlevel ListLen #Attr.2; + ret List.248; + +procedure List.60 (#Attr.2, #Attr.3): + let List.247 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.247; +>>>>>>> 61fcac491 (Fix mono tests) procedure Num.22 (#Attr.2, #Attr.3): let Num.188 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; ret Num.188; procedure Str.16 (#Attr.2, #Attr.3): -<<<<<<< HEAD:crates/compiler/test_mono/generated/list_map_closure_borrows.txt - let Str.67 : Str = lowlevel StrRepeat #Attr.2 #Attr.3; - ret Str.67; - -procedure Str.3 (#Attr.2, #Attr.3): - let Str.68 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.68; -======= - let Str.36 : Str = lowlevel StrRepeat #Attr.2 #Attr.3; - ret Str.36; - -procedure Str.3 (#Attr.2, #Attr.3): - let Str.37 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + let Str.37 : Str = lowlevel StrRepeat #Attr.2 #Attr.3; ret Str.37; ->>>>>>> a5fc399f4 (Rename multimorphic tests to capture niche):compiler/test_mono/generated/list_map_closure_borrows.txt + +procedure Str.3 (#Attr.2, #Attr.3): + let Str.38 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.38; procedure Test.1 (): let Test.21 : Str = "lllllllllllllllllllllooooooooooong"; 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 db2a916558..47f476ec71 100644 --- a/crates/compiler/test_mono/generated/list_map_closure_owns.txt +++ b/crates/compiler/test_mono/generated/list_map_closure_owns.txt @@ -1,4 +1,5 @@ <<<<<<< HEAD +<<<<<<< HEAD procedure List.2 (List.75, List.76): let List.290 : U64 = CallByName List.6 List.75; let List.286 : Int1 = CallByName Num.22 List.76 List.290; @@ -66,19 +67,41 @@ procedure List.60 (#Attr.2, #Attr.3): ret List.222; >>>>>>> a5fc399f4 (Rename multimorphic tests to capture niche):compiler/test_mono/generated/list_map_closure_owns.txt >>>>>>> 25bb3751b (Rename multimorphic tests to capture niche) +======= +procedure List.2 (List.72, List.73): + let List.244 : U64 = CallByName List.6 List.72; + let List.240 : Int1 = CallByName Num.22 List.73 List.244; + if List.240 then + let List.242 : Str = CallByName List.60 List.72 List.73; + let List.241 : [C {}, C Str] = Ok List.242; + ret List.241; + else + let List.239 : {} = Struct {}; + let List.238 : [C {}, C Str] = Err List.239; + ret List.238; + +procedure List.5 (#Attr.2, #Attr.3): + inc #Attr.2; + let List.246 : List Str = lowlevel ListMap { xs: `#Attr.#arg1` } #Attr.2 Test.3 #Attr.3; + decref #Attr.2; + ret List.246; + +procedure List.6 (#Attr.2): + let List.248 : U64 = lowlevel ListLen #Attr.2; + ret List.248; + +procedure List.60 (#Attr.2, #Attr.3): + let List.247 : Str = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.247; +>>>>>>> 61fcac491 (Fix mono tests) procedure Num.22 (#Attr.2, #Attr.3): let Num.188 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; ret Num.188; procedure Str.3 (#Attr.2, #Attr.3): -<<<<<<< HEAD:crates/compiler/test_mono/generated/list_map_closure_owns.txt - let Str.68 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.68; -======= - let Str.37 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.37; ->>>>>>> a5fc399f4 (Rename multimorphic tests to capture niche):compiler/test_mono/generated/list_map_closure_owns.txt + let Str.38 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.38; procedure Test.1 (): let Test.21 : Str = "lllllllllllllllllllllooooooooooong"; 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 28b6e420a1..3c33945478 100644 --- a/crates/compiler/test_mono/generated/list_pass_to_function.txt +++ b/crates/compiler/test_mono/generated/list_pass_to_function.txt @@ -1,3 +1,4 @@ +<<<<<<< HEAD procedure List.3 (List.84, List.85, List.86): let List.285 : {List I64, I64} = CallByName List.57 List.84 List.85 List.86; let List.284 : List I64 = StructAtIndex 0 List.285; @@ -22,10 +23,36 @@ procedure List.6 (#Attr.2): procedure List.61 (#Attr.2, #Attr.3, #Attr.4): let List.290 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; ret List.290; +======= +procedure List.3 (List.80, List.81, List.82): + let List.239 : {List I64, I64} = CallByName List.57 List.80 List.81 List.82; + let List.238 : List I64 = StructAtIndex 0 List.239; + inc List.238; + dec List.239; + ret List.238; + +procedure List.57 (List.77, List.78, List.79): + let List.245 : U64 = CallByName List.6 List.77; + let List.242 : Int1 = CallByName Num.22 List.78 List.245; + if List.242 then + let List.243 : {List I64, I64} = CallByName List.61 List.77 List.78 List.79; + ret List.243; + else + let List.241 : {List I64, I64} = Struct {List.77, List.79}; + ret List.241; + +procedure List.6 (#Attr.2): + let List.246 : U64 = lowlevel ListLen #Attr.2; + ret List.246; + +procedure List.61 (#Attr.2, #Attr.3, #Attr.4): + let List.244 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; + ret List.244; +>>>>>>> 61fcac491 (Fix mono tests) procedure Num.22 (#Attr.2, #Attr.3): - let Num.273 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; - ret Num.273; + let Num.188 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; + ret Num.188; procedure Test.2 (Test.3): let Test.6 : U64 = 0i64; diff --git a/crates/compiler/test_mono/generated/list_sort_asc.txt b/crates/compiler/test_mono/generated/list_sort_asc.txt index a385b049f6..f207733107 100644 --- a/crates/compiler/test_mono/generated/list_sort_asc.txt +++ b/crates/compiler/test_mono/generated/list_sort_asc.txt @@ -1,4 +1,5 @@ procedure List.28 (#Attr.2, #Attr.3): +<<<<<<< HEAD <<<<<<< HEAD let List.287 : List I64 = lowlevel ListSortWith { xs: `#Attr.#arg1` } #Attr.2 Num.46 #Attr.3; ======= @@ -24,19 +25,29 @@ procedure List.54 (List.178): ret List.259; ======= let List.216 : List I64 = lowlevel ListSortWith { xs: `#Attr.#arg1` } #Attr.2 Num.46 #Attr.3; +======= + let List.241 : List I64 = lowlevel ListSortWith { xs: `#Attr.#arg1` } #Attr.2 Num.46 #Attr.3; +>>>>>>> 61fcac491 (Fix mono tests) let Bool.9 : Int1 = lowlevel ListIsUnique #Attr.2; if Bool.9 then - ret List.216; + ret List.241; else decref #Attr.2; - ret List.216; + ret List.241; +<<<<<<< HEAD procedure List.54 (List.142): let List.214 : {} = Struct {}; let List.213 : List I64 = CallByName List.28 List.142 List.214; ret List.213; >>>>>>> a5fc399f4 (Rename multimorphic tests to capture niche):compiler/test_mono/generated/list_sort_asc.txt >>>>>>> 25bb3751b (Rename multimorphic tests to capture niche) +======= +procedure List.54 (List.163): + let List.239 : {} = Struct {}; + let List.238 : List I64 = CallByName List.28 List.163 List.239; + ret List.238; +>>>>>>> 61fcac491 (Fix mono tests) procedure Num.46 (#Attr.2, #Attr.3): let Num.188 : 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 43dac09ce8..4dbe05edb7 100644 --- a/crates/compiler/test_mono/generated/quicksort_swap.txt +++ b/crates/compiler/test_mono/generated/quicksort_swap.txt @@ -1,4 +1,5 @@ <<<<<<< HEAD +<<<<<<< HEAD procedure List.2 (List.75, List.76): let List.304 : U64 = CallByName List.6 List.75; let List.300 : Int1 = CallByName Num.22 List.76 List.304; @@ -72,30 +73,55 @@ procedure List.3 (List.79, List.80, List.81): inc List.216; dec List.217; ret List.216; - -procedure List.57 (List.76, List.77, List.78): - let List.239 : U64 = CallByName List.6 List.76; - let List.236 : Int1 = CallByName Num.22 List.77 List.239; - if List.236 then - let List.237 : {List I64, I64} = CallByName List.61 List.76 List.77 List.78; - ret List.237; +======= +procedure List.2 (List.72, List.73): + let List.258 : U64 = CallByName List.6 List.72; + let List.254 : Int1 = CallByName Num.22 List.73 List.258; + if List.254 then + let List.256 : I64 = CallByName List.60 List.72 List.73; + let List.255 : [C {}, C I64] = Ok List.256; + ret List.255; else - let List.235 : {List I64, I64} = Struct {List.76, List.78}; - ret List.235; + let List.253 : {} = Struct {}; + let List.252 : [C {}, C I64] = Err List.253; + ret List.252; + +procedure List.3 (List.80, List.81, List.82): + let List.242 : {List I64, I64} = CallByName List.57 List.80 List.81 List.82; + let List.241 : List I64 = StructAtIndex 0 List.242; + inc List.241; + dec List.242; + ret List.241; +>>>>>>> 61fcac491 (Fix mono tests) + +procedure List.57 (List.77, List.78, List.79): + let List.264 : U64 = CallByName List.6 List.77; + let List.261 : Int1 = CallByName Num.22 List.78 List.264; + if List.261 then + let List.262 : {List I64, I64} = CallByName List.61 List.77 List.78 List.79; + ret List.262; + else + let List.260 : {List I64, I64} = Struct {List.77, List.79}; + ret List.260; procedure List.6 (#Attr.2): - let List.240 : U64 = lowlevel ListLen #Attr.2; - ret List.240; + let List.265 : U64 = lowlevel ListLen #Attr.2; + ret List.265; procedure List.60 (#Attr.2, #Attr.3): - let List.241 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.241; + let List.266 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.266; procedure List.61 (#Attr.2, #Attr.3, #Attr.4): +<<<<<<< HEAD let List.238 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; ret List.238; >>>>>>> a5fc399f4 (Rename multimorphic tests to capture niche):compiler/test_mono/generated/quicksort_swap.txt >>>>>>> 25bb3751b (Rename multimorphic tests to capture niche) +======= + let List.263 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; + ret List.263; +>>>>>>> 61fcac491 (Fix mono tests) procedure Num.22 (#Attr.2, #Attr.3): let Num.190 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; diff --git a/crates/compiler/test_mono/generated/rigids.txt b/crates/compiler/test_mono/generated/rigids.txt index c3ca7f7ca5..83854197b8 100644 --- a/crates/compiler/test_mono/generated/rigids.txt +++ b/crates/compiler/test_mono/generated/rigids.txt @@ -1,4 +1,5 @@ <<<<<<< HEAD +<<<<<<< HEAD procedure List.2 (List.75, List.76): let List.304 : U64 = CallByName List.6 List.75; let List.300 : Int1 = CallByName Num.22 List.76 List.304; @@ -72,30 +73,55 @@ procedure List.3 (List.79, List.80, List.81): inc List.216; dec List.217; ret List.216; - -procedure List.57 (List.76, List.77, List.78): - let List.239 : U64 = CallByName List.6 List.76; - let List.236 : Int1 = CallByName Num.22 List.77 List.239; - if List.236 then - let List.237 : {List I64, I64} = CallByName List.61 List.76 List.77 List.78; - ret List.237; +======= +procedure List.2 (List.72, List.73): + let List.258 : U64 = CallByName List.6 List.72; + let List.254 : Int1 = CallByName Num.22 List.73 List.258; + if List.254 then + let List.256 : I64 = CallByName List.60 List.72 List.73; + let List.255 : [C {}, C I64] = Ok List.256; + ret List.255; else - let List.235 : {List I64, I64} = Struct {List.76, List.78}; - ret List.235; + let List.253 : {} = Struct {}; + let List.252 : [C {}, C I64] = Err List.253; + ret List.252; + +procedure List.3 (List.80, List.81, List.82): + let List.242 : {List I64, I64} = CallByName List.57 List.80 List.81 List.82; + let List.241 : List I64 = StructAtIndex 0 List.242; + inc List.241; + dec List.242; + ret List.241; +>>>>>>> 61fcac491 (Fix mono tests) + +procedure List.57 (List.77, List.78, List.79): + let List.264 : U64 = CallByName List.6 List.77; + let List.261 : Int1 = CallByName Num.22 List.78 List.264; + if List.261 then + let List.262 : {List I64, I64} = CallByName List.61 List.77 List.78 List.79; + ret List.262; + else + let List.260 : {List I64, I64} = Struct {List.77, List.79}; + ret List.260; procedure List.6 (#Attr.2): - let List.240 : U64 = lowlevel ListLen #Attr.2; - ret List.240; + let List.265 : U64 = lowlevel ListLen #Attr.2; + ret List.265; procedure List.60 (#Attr.2, #Attr.3): - let List.241 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; - ret List.241; + let List.266 : I64 = lowlevel ListGetUnsafe #Attr.2 #Attr.3; + ret List.266; procedure List.61 (#Attr.2, #Attr.3, #Attr.4): +<<<<<<< HEAD let List.238 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; ret List.238; >>>>>>> a5fc399f4 (Rename multimorphic tests to capture niche):compiler/test_mono/generated/rigids.txt >>>>>>> 25bb3751b (Rename multimorphic tests to capture niche) +======= + let List.263 : {List I64, I64} = lowlevel ListReplaceUnsafe #Attr.2 #Attr.3 #Attr.4; + ret List.263; +>>>>>>> 61fcac491 (Fix mono tests) procedure Num.22 (#Attr.2, #Attr.3): let Num.190 : Int1 = lowlevel NumLt #Attr.2 #Attr.3;