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 12255ab5fc..f7ad8dbcf9 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 @@ -41,8 +41,8 @@ procedure Num.51 (#Attr.2, #Attr.3): ret Num.283; procedure Str.3 (#Attr.2, #Attr.3): - let Str.250 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.250; + let Str.382 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.382; procedure Test.1 (Test.5): ret Test.5; diff --git a/crates/compiler/test_mono/generated/dbg_expr.txt b/crates/compiler/test_mono/generated/dbg_expr.txt index 8ea30e4d74..eff3de04f6 100644 --- a/crates/compiler/test_mono/generated/dbg_expr.txt +++ b/crates/compiler/test_mono/generated/dbg_expr.txt @@ -43,8 +43,8 @@ procedure Num.96 (#Attr.2): ret Num.284; procedure Str.3 (#Attr.2, #Attr.3): - let Str.248 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.248; + let Str.380 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.380; procedure Test.0 (): let Test.4 : I64 = 1i64; diff --git a/crates/compiler/test_mono/generated/dbg_in_expect.txt b/crates/compiler/test_mono/generated/dbg_in_expect.txt index ccfba09ea0..2f11d82ff7 100644 --- a/crates/compiler/test_mono/generated/dbg_in_expect.txt +++ b/crates/compiler/test_mono/generated/dbg_in_expect.txt @@ -104,184 +104,184 @@ procedure Num.77 (#Attr.2, #Attr.3): ret Num.293; procedure Str.20 (#Attr.2): - let Str.316 : Str = lowlevel StrWithCapacity #Attr.2; - ret Str.316; + let Str.448 : Str = lowlevel StrWithCapacity #Attr.2; + ret Str.448; procedure Str.3 (#Attr.2, #Attr.3): - let Str.248 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.248; + let Str.380 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.380; procedure Str.35 (#Attr.2, #Attr.3): - let Str.306 : U8 = lowlevel StrGetUnsafe #Attr.2 #Attr.3; - ret Str.306; + let Str.438 : U8 = lowlevel StrGetUnsafe #Attr.2 #Attr.3; + ret Str.438; procedure Str.36 (#Attr.2): - let Str.268 : U64 = lowlevel StrCountUtf8Bytes #Attr.2; - ret Str.268; + let Str.400 : U64 = lowlevel StrCountUtf8Bytes #Attr.2; + ret Str.400; procedure Str.37 (#Attr.2, #Attr.3, #Attr.4): - let Str.266 : Str = lowlevel StrSubstringUnsafe #Attr.2 #Attr.3 #Attr.4; - ret Str.266; - -procedure Str.38 (Str.113, Str.114): - let Str.262 : [C , C U64] = CallByName Str.58 Str.113 Str.114; - let Str.275 : U8 = 1i64; - let Str.276 : U8 = GetTagId Str.262; - let Str.277 : Int1 = lowlevel Eq Str.275 Str.276; - if Str.277 then - let Str.115 : U64 = UnionAtIndex (Id 1) (Index 0) Str.262; - let Str.271 : U64 = CallByName Str.36 Str.113; - let Str.272 : U64 = CallByName Str.36 Str.114; - let Str.270 : U64 = CallByName Num.20 Str.271 Str.272; - let Str.116 : U64 = CallByName Num.20 Str.270 Str.115; - let Str.269 : U64 = 0i64; - inc Str.113; - let Str.117 : Str = CallByName Str.37 Str.113 Str.269 Str.115; - let Str.267 : U64 = CallByName Str.36 Str.114; - let Str.265 : U64 = CallByName Num.51 Str.115 Str.267; - let Str.118 : Str = CallByName Str.37 Str.113 Str.265 Str.116; - let Str.264 : {Str, Str} = Struct {Str.118, Str.117}; - let Str.263 : [C {}, C {Str, Str}] = TagId(1) Str.264; - ret Str.263; + let Str.398 : Str = lowlevel StrSubstringUnsafe #Attr.2 #Attr.3 #Attr.4; + ret Str.398; + +procedure Str.38 (Str.211, Str.212): + let Str.394 : [C , C U64] = CallByName Str.63 Str.211 Str.212; + let Str.407 : U8 = 1i64; + let Str.408 : U8 = GetTagId Str.394; + let Str.409 : Int1 = lowlevel Eq Str.407 Str.408; + if Str.409 then + let Str.213 : U64 = UnionAtIndex (Id 1) (Index 0) Str.394; + let Str.403 : U64 = CallByName Str.36 Str.211; + let Str.404 : U64 = CallByName Str.36 Str.212; + let Str.402 : U64 = CallByName Num.20 Str.403 Str.404; + let Str.214 : U64 = CallByName Num.20 Str.402 Str.213; + let Str.401 : U64 = 0i64; + inc Str.211; + let Str.215 : Str = CallByName Str.37 Str.211 Str.401 Str.213; + let Str.399 : U64 = CallByName Str.36 Str.212; + let Str.397 : U64 = CallByName Num.51 Str.213 Str.399; + let Str.216 : Str = CallByName Str.37 Str.211 Str.397 Str.214; + let Str.396 : {Str, Str} = Struct {Str.216, Str.215}; + let Str.395 : [C {}, C {Str, Str}] = TagId(1) Str.396; + ret Str.395; else - dec Str.113; - let Str.274 : {} = Struct {}; - let Str.273 : [C {}, C {Str, Str}] = TagId(0) Str.274; - ret Str.273; - -procedure Str.45 (Str.92, Str.93, Str.94): - inc Str.92; - let Str.344 : [C {}, C {Str, Str}] = CallByName Str.38 Str.92 Str.93; - let Str.352 : U8 = 1i64; - let Str.353 : U8 = GetTagId Str.344; - let Str.354 : Int1 = lowlevel Eq Str.352 Str.353; - if Str.354 then - let Str.351 : {Str, Str} = UnionAtIndex (Id 1) (Index 0) Str.344; - let Str.96 : Str = StructAtIndex 0 Str.351; - let Str.95 : Str = StructAtIndex 1 Str.351; - let Str.349 : U64 = CallByName Str.36 Str.92; - dec Str.92; - let Str.348 : Str = CallByName Str.20 Str.349; - let Str.347 : Str = CallByName Str.3 Str.348 Str.95; - dec Str.95; - let Str.346 : Str = CallByName Str.3 Str.347 Str.94; - let Str.345 : Str = CallByName Str.57 Str.346 Str.96 Str.93 Str.94; - ret Str.345; + dec Str.211; + let Str.406 : {} = Struct {}; + let Str.405 : [C {}, C {Str, Str}] = TagId(0) Str.406; + ret Str.405; + +procedure Str.45 (Str.190, Str.191, Str.192): + inc Str.190; + let Str.476 : [C {}, C {Str, Str}] = CallByName Str.38 Str.190 Str.191; + let Str.484 : U8 = 1i64; + let Str.485 : U8 = GetTagId Str.476; + let Str.486 : Int1 = lowlevel Eq Str.484 Str.485; + if Str.486 then + let Str.483 : {Str, Str} = UnionAtIndex (Id 1) (Index 0) Str.476; + let Str.194 : Str = StructAtIndex 0 Str.483; + let Str.193 : Str = StructAtIndex 1 Str.483; + let Str.481 : U64 = CallByName Str.36 Str.190; + dec Str.190; + let Str.480 : Str = CallByName Str.20 Str.481; + let Str.479 : Str = CallByName Str.3 Str.480 Str.193; + dec Str.193; + let Str.478 : Str = CallByName Str.3 Str.479 Str.192; + let Str.477 : Str = CallByName Str.62 Str.478 Str.194 Str.191 Str.192; + ret Str.477; else - dec Str.344; - ret Str.92; - -procedure Str.57 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2, #Derived_gen.3): - joinpoint Str.252 Str.97 Str.98 Str.99 Str.100: - inc Str.98; - let Str.253 : [C {}, C {Str, Str}] = CallByName Str.38 Str.98 Str.99; - let Str.259 : U8 = 1i64; - let Str.260 : U8 = GetTagId Str.253; - let Str.261 : Int1 = lowlevel Eq Str.259 Str.260; - if Str.261 then - dec Str.98; - let Str.258 : {Str, Str} = UnionAtIndex (Id 1) (Index 0) Str.253; - let Str.102 : Str = StructAtIndex 0 Str.258; - let Str.101 : Str = StructAtIndex 1 Str.258; - let Str.256 : Str = CallByName Str.3 Str.97 Str.101; - dec Str.101; - let Str.255 : Str = CallByName Str.3 Str.256 Str.100; - jump Str.252 Str.255 Str.102 Str.99 Str.100; + dec Str.476; + ret Str.190; + +procedure Str.62 (#Derived_gen.0, #Derived_gen.1, #Derived_gen.2, #Derived_gen.3): + joinpoint Str.384 Str.195 Str.196 Str.197 Str.198: + inc Str.196; + let Str.385 : [C {}, C {Str, Str}] = CallByName Str.38 Str.196 Str.197; + let Str.391 : U8 = 1i64; + let Str.392 : U8 = GetTagId Str.385; + let Str.393 : Int1 = lowlevel Eq Str.391 Str.392; + if Str.393 then + dec Str.196; + let Str.390 : {Str, Str} = UnionAtIndex (Id 1) (Index 0) Str.385; + let Str.200 : Str = StructAtIndex 0 Str.390; + let Str.199 : Str = StructAtIndex 1 Str.390; + let Str.388 : Str = CallByName Str.3 Str.195 Str.199; + dec Str.199; + let Str.387 : Str = CallByName Str.3 Str.388 Str.198; + jump Str.384 Str.387 Str.200 Str.197 Str.198; else - dec Str.100; - dec Str.99; - dec Str.253; - let Str.257 : Str = CallByName Str.3 Str.97 Str.98; - dec Str.98; - ret Str.257; + dec Str.385; + dec Str.198; + dec Str.197; + let Str.389 : Str = CallByName Str.3 Str.195 Str.196; + dec Str.196; + ret Str.389; in inc #Derived_gen.3; inc #Derived_gen.2; - jump Str.252 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3; - -procedure Str.58 (Str.122, Str.123): - let Str.124 : U64 = CallByName Str.36 Str.122; - let Str.125 : U64 = CallByName Str.36 Str.123; - let Str.126 : U64 = CallByName Num.77 Str.124 Str.125; - let Str.279 : U64 = 0i64; - let Str.278 : [C , C U64] = CallByName Str.59 Str.122 Str.123 Str.279 Str.126; - ret Str.278; - -procedure Str.59 (#Derived_gen.4, #Derived_gen.5, #Derived_gen.6, #Derived_gen.7): - joinpoint Str.280 Str.127 Str.128 Str.129 Str.130: - let Str.282 : Int1 = CallByName Num.23 Str.129 Str.130; - if Str.282 then - let Str.286 : Int1 = CallByName Str.63 Str.127 Str.129 Str.128; - if Str.286 then - dec Str.127; - dec Str.128; - let Str.287 : [C , C U64] = TagId(1) Str.129; - ret Str.287; + jump Str.384 #Derived_gen.0 #Derived_gen.1 #Derived_gen.2 #Derived_gen.3; + +procedure Str.63 (Str.220, Str.221): + let Str.222 : U64 = CallByName Str.36 Str.220; + let Str.223 : U64 = CallByName Str.36 Str.221; + let Str.224 : U64 = CallByName Num.77 Str.222 Str.223; + let Str.411 : U64 = 0i64; + let Str.410 : [C , C U64] = CallByName Str.64 Str.220 Str.221 Str.411 Str.224; + ret Str.410; + +procedure Str.64 (#Derived_gen.4, #Derived_gen.5, #Derived_gen.6, #Derived_gen.7): + joinpoint Str.412 Str.225 Str.226 Str.227 Str.228: + let Str.414 : Int1 = CallByName Num.23 Str.227 Str.228; + if Str.414 then + let Str.418 : Int1 = CallByName Str.68 Str.225 Str.227 Str.226; + if Str.418 then + dec Str.226; + dec Str.225; + let Str.419 : [C , C U64] = TagId(1) Str.227; + ret Str.419; else - let Str.285 : U64 = 1i64; - let Str.284 : U64 = CallByName Num.51 Str.129 Str.285; - jump Str.280 Str.127 Str.128 Str.284 Str.130; + let Str.417 : U64 = 1i64; + let Str.416 : U64 = CallByName Num.51 Str.227 Str.417; + jump Str.412 Str.225 Str.226 Str.416 Str.228; else - dec Str.127; - dec Str.128; - let Str.281 : [C , C U64] = TagId(0) ; - ret Str.281; + dec Str.226; + dec Str.225; + let Str.413 : [C , C U64] = TagId(0) ; + ret Str.413; in inc #Derived_gen.5; inc #Derived_gen.4; - jump Str.280 #Derived_gen.4 #Derived_gen.5 #Derived_gen.6 #Derived_gen.7; + jump Str.412 #Derived_gen.4 #Derived_gen.5 #Derived_gen.6 #Derived_gen.7; -procedure Str.62 (Str.153, Str.154): - let Str.311 : Int1 = CallByName Num.22 Str.153 Str.154; - if Str.311 then - ret Str.153; +procedure Str.67 (Str.251, Str.252): + let Str.443 : Int1 = CallByName Num.22 Str.251 Str.252; + if Str.443 then + ret Str.251; else - ret Str.154; - -procedure Str.63 (Str.155, Str.156, Str.157): - let Str.158 : U64 = CallByName Str.36 Str.155; - let Str.159 : U64 = CallByName Str.36 Str.157; - let Str.309 : U64 = CallByName Num.53 Str.156 Str.159; - let Str.160 : U64 = CallByName Str.62 Str.309 Str.158; - let Str.308 : U64 = 0i64; - inc Str.157; - inc Str.155; - let Str.289 : {U64, Str, U64, Str, U64, U64} = Struct {Str.160, Str.155, Str.156, Str.157, Str.308, Str.159}; - let Str.288 : Int1 = CallByName Str.64 Str.289; - ret Str.288; - -procedure Str.64 (Str.161): - let Str.167 : U64 = StructAtIndex 0 Str.161; - let Str.162 : Str = StructAtIndex 1 Str.161; - let Str.163 : U64 = StructAtIndex 2 Str.161; - let Str.164 : Str = StructAtIndex 3 Str.161; - let Str.165 : U64 = StructAtIndex 4 Str.161; - let Str.166 : U64 = StructAtIndex 5 Str.161; - let Str.168 : Int1 = CallByName Num.25 Str.163 Str.167; - if Str.168 then - dec Str.162; - dec Str.164; - let Str.169 : Int1 = CallByName Bool.9 Str.165 Str.166; - ret Str.169; + ret Str.252; + +procedure Str.68 (Str.253, Str.254, Str.255): + let Str.256 : U64 = CallByName Str.36 Str.253; + let Str.257 : U64 = CallByName Str.36 Str.255; + let Str.441 : U64 = CallByName Num.53 Str.254 Str.257; + let Str.258 : U64 = CallByName Str.67 Str.441 Str.256; + let Str.440 : U64 = 0i64; + inc Str.255; + inc Str.253; + let Str.421 : {U64, Str, U64, Str, U64, U64} = Struct {Str.258, Str.253, Str.254, Str.255, Str.440, Str.257}; + let Str.420 : Int1 = CallByName Str.69 Str.421; + ret Str.420; + +procedure Str.69 (Str.259): + let Str.265 : U64 = StructAtIndex 0 Str.259; + let Str.260 : Str = StructAtIndex 1 Str.259; + let Str.261 : U64 = StructAtIndex 2 Str.259; + let Str.262 : Str = StructAtIndex 3 Str.259; + let Str.263 : U64 = StructAtIndex 4 Str.259; + let Str.264 : U64 = StructAtIndex 5 Str.259; + let Str.266 : Int1 = CallByName Num.25 Str.261 Str.265; + if Str.266 then + dec Str.262; + dec Str.260; + let Str.267 : Int1 = CallByName Bool.9 Str.263 Str.264; + ret Str.267; else - let Str.304 : U8 = CallByName Str.35 Str.162 Str.163; - let Str.305 : U8 = CallByName Str.35 Str.164 Str.165; - let Str.170 : Int1 = CallByName Bool.9 Str.304 Str.305; - let Str.294 : U64 = StructAtIndex 0 Str.161; - let Str.295 : Str = StructAtIndex 1 Str.161; - let Str.297 : Str = StructAtIndex 3 Str.161; - let Str.299 : U64 = StructAtIndex 5 Str.161; - let Str.303 : U64 = 1i64; - let Str.301 : U64 = CallByName Num.51 Str.165 Str.303; - let Str.302 : U64 = 1i64; - let Str.300 : U64 = CallByName Num.51 Str.163 Str.302; - let Str.293 : {U64, Str, U64, Str, U64, U64} = Struct {Str.294, Str.295, Str.300, Str.297, Str.301, Str.299}; - let Str.171 : Int1 = CallByName Str.64 Str.293; - if Str.170 then - ret Str.171; + let Str.436 : U8 = CallByName Str.35 Str.260 Str.261; + let Str.437 : U8 = CallByName Str.35 Str.262 Str.263; + let Str.268 : Int1 = CallByName Bool.9 Str.436 Str.437; + let Str.426 : U64 = StructAtIndex 0 Str.259; + let Str.427 : Str = StructAtIndex 1 Str.259; + let Str.429 : Str = StructAtIndex 3 Str.259; + let Str.431 : U64 = StructAtIndex 5 Str.259; + let Str.435 : U64 = 1i64; + let Str.433 : U64 = CallByName Num.51 Str.263 Str.435; + let Str.434 : U64 = 1i64; + let Str.432 : U64 = CallByName Num.51 Str.261 Str.434; + let Str.425 : {U64, Str, U64, Str, U64, U64} = Struct {Str.426, Str.427, Str.432, Str.429, Str.433, Str.431}; + let Str.269 : Int1 = CallByName Str.69 Str.425; + if Str.268 then + ret Str.269; else - let Str.291 : Int1 = CallByName Bool.1; - ret Str.291; + let Str.423 : Int1 = CallByName Bool.1; + ret Str.423; procedure Test.1 (): let Test.4 : Str = ""; diff --git a/crates/compiler/test_mono/generated/dbg_inside_string.txt b/crates/compiler/test_mono/generated/dbg_inside_string.txt index addffa7756..5f633e0d15 100644 --- a/crates/compiler/test_mono/generated/dbg_inside_string.txt +++ b/crates/compiler/test_mono/generated/dbg_inside_string.txt @@ -100,184 +100,184 @@ procedure Num.77 (#Attr.2, #Attr.3): ret Num.293; procedure Str.20 (#Attr.2): - let Str.318 : Str = lowlevel StrWithCapacity #Attr.2; - ret Str.318; + let Str.450 : Str = lowlevel StrWithCapacity #Attr.2; + ret Str.450; procedure Str.3 (#Attr.2, #Attr.3): - let Str.250 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.250; + let Str.382 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.382; procedure Str.35 (#Attr.2, #Attr.3): - let Str.308 : U8 = lowlevel StrGetUnsafe #Attr.2 #Attr.3; - ret Str.308; + let Str.440 : U8 = lowlevel StrGetUnsafe #Attr.2 #Attr.3; + ret Str.440; procedure Str.36 (#Attr.2): - let Str.270 : U64 = lowlevel StrCountUtf8Bytes #Attr.2; - ret Str.270; + let Str.402 : U64 = lowlevel StrCountUtf8Bytes #Attr.2; + ret Str.402; procedure Str.37 (#Attr.2, #Attr.3, #Attr.4): - let Str.268 : Str = lowlevel StrSubstringUnsafe #Attr.2 #Attr.3 #Attr.4; - ret Str.268; + let Str.400 : Str = lowlevel StrSubstringUnsafe #Attr.2 #Attr.3 #Attr.4; + ret Str.400; -procedure Str.38 (Str.113, Str.114): - let Str.264 : [C , C U64] = CallByName Str.58 Str.113 Str.114; - let Str.277 : U8 = 1i64; - let Str.278 : U8 = GetTagId Str.264; - let Str.279 : Int1 = lowlevel Eq Str.277 Str.278; - if Str.279 then - let Str.115 : U64 = UnionAtIndex (Id 1) (Index 0) Str.264; - let Str.273 : U64 = CallByName Str.36 Str.113; - let Str.274 : U64 = CallByName Str.36 Str.114; - let Str.272 : U64 = CallByName Num.20 Str.273 Str.274; - let Str.116 : U64 = CallByName Num.20 Str.272 Str.115; - let Str.271 : U64 = 0i64; - inc Str.113; - let Str.117 : Str = CallByName Str.37 Str.113 Str.271 Str.115; - let Str.269 : U64 = CallByName Str.36 Str.114; - let Str.267 : U64 = CallByName Num.51 Str.115 Str.269; - let Str.118 : Str = CallByName Str.37 Str.113 Str.267 Str.116; - let Str.266 : {Str, Str} = Struct {Str.118, Str.117}; - let Str.265 : [C {}, C {Str, Str}] = TagId(1) Str.266; - ret Str.265; +procedure Str.38 (Str.211, Str.212): + let Str.396 : [C , C U64] = CallByName Str.63 Str.211 Str.212; + let Str.409 : U8 = 1i64; + let Str.410 : U8 = GetTagId Str.396; + let Str.411 : Int1 = lowlevel Eq Str.409 Str.410; + if Str.411 then + let Str.213 : U64 = UnionAtIndex (Id 1) (Index 0) Str.396; + let Str.405 : U64 = CallByName Str.36 Str.211; + let Str.406 : U64 = CallByName Str.36 Str.212; + let Str.404 : U64 = CallByName Num.20 Str.405 Str.406; + let Str.214 : U64 = CallByName Num.20 Str.404 Str.213; + let Str.403 : U64 = 0i64; + inc Str.211; + let Str.215 : Str = CallByName Str.37 Str.211 Str.403 Str.213; + let Str.401 : U64 = CallByName Str.36 Str.212; + let Str.399 : U64 = CallByName Num.51 Str.213 Str.401; + let Str.216 : Str = CallByName Str.37 Str.211 Str.399 Str.214; + let Str.398 : {Str, Str} = Struct {Str.216, Str.215}; + let Str.397 : [C {}, C {Str, Str}] = TagId(1) Str.398; + ret Str.397; else - dec Str.113; - let Str.276 : {} = Struct {}; - let Str.275 : [C {}, C {Str, Str}] = TagId(0) Str.276; - ret Str.275; + dec Str.211; + let Str.408 : {} = Struct {}; + let Str.407 : [C {}, C {Str, Str}] = TagId(0) Str.408; + ret Str.407; -procedure Str.45 (Str.92, Str.93, Str.94): - inc Str.92; - let Str.346 : [C {}, C {Str, Str}] = CallByName Str.38 Str.92 Str.93; - let Str.354 : U8 = 1i64; - let Str.355 : U8 = GetTagId Str.346; - let Str.356 : Int1 = lowlevel Eq Str.354 Str.355; - if Str.356 then - let Str.353 : {Str, Str} = UnionAtIndex (Id 1) (Index 0) Str.346; - let Str.96 : Str = StructAtIndex 0 Str.353; - let Str.95 : Str = StructAtIndex 1 Str.353; - let Str.351 : U64 = CallByName Str.36 Str.92; - dec Str.92; - let Str.350 : Str = CallByName Str.20 Str.351; - let Str.349 : Str = CallByName Str.3 Str.350 Str.95; - dec Str.95; - let Str.348 : Str = CallByName Str.3 Str.349 Str.94; - let Str.347 : Str = CallByName Str.57 Str.348 Str.96 Str.93 Str.94; - ret Str.347; +procedure Str.45 (Str.190, Str.191, Str.192): + inc Str.190; + let Str.478 : [C {}, C {Str, Str}] = CallByName Str.38 Str.190 Str.191; + let Str.486 : U8 = 1i64; + let Str.487 : U8 = GetTagId Str.478; + let Str.488 : Int1 = lowlevel Eq Str.486 Str.487; + if Str.488 then + let Str.485 : {Str, Str} = UnionAtIndex (Id 1) (Index 0) Str.478; + let Str.194 : Str = StructAtIndex 0 Str.485; + let Str.193 : Str = StructAtIndex 1 Str.485; + let Str.483 : U64 = CallByName Str.36 Str.190; + dec Str.190; + let Str.482 : Str = CallByName Str.20 Str.483; + let Str.481 : Str = CallByName Str.3 Str.482 Str.193; + dec Str.193; + let Str.480 : Str = CallByName Str.3 Str.481 Str.192; + let Str.479 : Str = CallByName Str.62 Str.480 Str.194 Str.191 Str.192; + ret Str.479; else - dec Str.346; - ret Str.92; + dec Str.478; + ret Str.190; -procedure Str.57 (Bool.24, Bool.25, Bool.26, Bool.27): - joinpoint Str.254 Str.97 Str.98 Str.99 Str.100: - inc Str.98; - let Str.255 : [C {}, C {Str, Str}] = CallByName Str.38 Str.98 Str.99; - let Str.261 : U8 = 1i64; - let Str.262 : U8 = GetTagId Str.255; - let Str.263 : Int1 = lowlevel Eq Str.261 Str.262; - if Str.263 then - dec Str.98; - let Str.260 : {Str, Str} = UnionAtIndex (Id 1) (Index 0) Str.255; - let Str.102 : Str = StructAtIndex 0 Str.260; - let Str.101 : Str = StructAtIndex 1 Str.260; - let Str.258 : Str = CallByName Str.3 Str.97 Str.101; - dec Str.101; - let Str.257 : Str = CallByName Str.3 Str.258 Str.100; - jump Str.254 Str.257 Str.102 Str.99 Str.100; +procedure Str.62 (Bool.24, Bool.25, Bool.26, Bool.27): + joinpoint Str.386 Str.195 Str.196 Str.197 Str.198: + inc Str.196; + let Str.387 : [C {}, C {Str, Str}] = CallByName Str.38 Str.196 Str.197; + let Str.393 : U8 = 1i64; + let Str.394 : U8 = GetTagId Str.387; + let Str.395 : Int1 = lowlevel Eq Str.393 Str.394; + if Str.395 then + dec Str.196; + let Str.392 : {Str, Str} = UnionAtIndex (Id 1) (Index 0) Str.387; + let Str.200 : Str = StructAtIndex 0 Str.392; + let Str.199 : Str = StructAtIndex 1 Str.392; + let Str.390 : Str = CallByName Str.3 Str.195 Str.199; + dec Str.199; + let Str.389 : Str = CallByName Str.3 Str.390 Str.198; + jump Str.386 Str.389 Str.200 Str.197 Str.198; else - dec Str.100; - dec Str.99; - dec Str.255; - let Str.259 : Str = CallByName Str.3 Str.97 Str.98; - dec Str.98; - ret Str.259; + dec Str.198; + dec Str.197; + dec Str.387; + let Str.391 : Str = CallByName Str.3 Str.195 Str.196; + dec Str.196; + ret Str.391; in inc Bool.26; inc Bool.27; - jump Str.254 Bool.24 Bool.25 Bool.26 Bool.27; + jump Str.386 Bool.24 Bool.25 Bool.26 Bool.27; -procedure Str.58 (Str.122, Str.123): - let Str.124 : U64 = CallByName Str.36 Str.122; - let Str.125 : U64 = CallByName Str.36 Str.123; - let Str.126 : U64 = CallByName Num.77 Str.124 Str.125; - let Str.281 : U64 = 0i64; - let Str.280 : [C , C U64] = CallByName Str.59 Str.122 Str.123 Str.281 Str.126; - ret Str.280; +procedure Str.63 (Str.220, Str.221): + let Str.222 : U64 = CallByName Str.36 Str.220; + let Str.223 : U64 = CallByName Str.36 Str.221; + let Str.224 : U64 = CallByName Num.77 Str.222 Str.223; + let Str.413 : U64 = 0i64; + let Str.412 : [C , C U64] = CallByName Str.64 Str.220 Str.221 Str.413 Str.224; + ret Str.412; -procedure Str.59 (Bool.28, Bool.29, Bool.30, Bool.31): - joinpoint Str.282 Str.127 Str.128 Str.129 Str.130: - let Str.284 : Int1 = CallByName Num.23 Str.129 Str.130; - if Str.284 then - let Str.288 : Int1 = CallByName Str.63 Str.127 Str.129 Str.128; - if Str.288 then - dec Str.127; - dec Str.128; - let Str.289 : [C , C U64] = TagId(1) Str.129; - ret Str.289; +procedure Str.64 (Bool.28, Bool.29, Bool.30, Bool.31): + joinpoint Str.414 Str.225 Str.226 Str.227 Str.228: + let Str.416 : Int1 = CallByName Num.23 Str.227 Str.228; + if Str.416 then + let Str.420 : Int1 = CallByName Str.68 Str.225 Str.227 Str.226; + if Str.420 then + dec Str.226; + dec Str.225; + let Str.421 : [C , C U64] = TagId(1) Str.227; + ret Str.421; else - let Str.287 : U64 = 1i64; - let Str.286 : U64 = CallByName Num.51 Str.129 Str.287; - jump Str.282 Str.127 Str.128 Str.286 Str.130; + let Str.419 : U64 = 1i64; + let Str.418 : U64 = CallByName Num.51 Str.227 Str.419; + jump Str.414 Str.225 Str.226 Str.418 Str.228; else - dec Str.127; - dec Str.128; - let Str.283 : [C , C U64] = TagId(0) ; - ret Str.283; + dec Str.226; + dec Str.225; + let Str.415 : [C , C U64] = TagId(0) ; + ret Str.415; in inc Bool.29; inc Bool.28; - jump Str.282 Bool.28 Bool.29 Bool.30 Bool.31; + jump Str.414 Bool.28 Bool.29 Bool.30 Bool.31; -procedure Str.62 (Str.153, Str.154): - let Str.313 : Int1 = CallByName Num.22 Str.153 Str.154; - if Str.313 then - ret Str.153; +procedure Str.67 (Str.251, Str.252): + let Str.445 : Int1 = CallByName Num.22 Str.251 Str.252; + if Str.445 then + ret Str.251; else - ret Str.154; + ret Str.252; -procedure Str.63 (Str.155, Str.156, Str.157): - let Str.158 : U64 = CallByName Str.36 Str.155; - let Str.159 : U64 = CallByName Str.36 Str.157; - let Str.311 : U64 = CallByName Num.53 Str.156 Str.159; - let Str.160 : U64 = CallByName Str.62 Str.311 Str.158; - let Str.310 : U64 = 0i64; - inc Str.157; - inc Str.155; - let Str.291 : {U64, Str, U64, Str, U64, U64} = Struct {Str.160, Str.155, Str.156, Str.157, Str.310, Str.159}; - let Str.290 : Int1 = CallByName Str.64 Str.291; - ret Str.290; +procedure Str.68 (Str.253, Str.254, Str.255): + let Str.256 : U64 = CallByName Str.36 Str.253; + let Str.257 : U64 = CallByName Str.36 Str.255; + let Str.443 : U64 = CallByName Num.53 Str.254 Str.257; + let Str.258 : U64 = CallByName Str.67 Str.443 Str.256; + let Str.442 : U64 = 0i64; + inc Str.255; + inc Str.253; + let Str.423 : {U64, Str, U64, Str, U64, U64} = Struct {Str.258, Str.253, Str.254, Str.255, Str.442, Str.257}; + let Str.422 : Int1 = CallByName Str.69 Str.423; + ret Str.422; -procedure Str.64 (Str.161): - let Str.167 : U64 = StructAtIndex 0 Str.161; - let Str.162 : Str = StructAtIndex 1 Str.161; - let Str.163 : U64 = StructAtIndex 2 Str.161; - let Str.164 : Str = StructAtIndex 3 Str.161; - let Str.165 : U64 = StructAtIndex 4 Str.161; - let Str.166 : U64 = StructAtIndex 5 Str.161; - let Str.168 : Int1 = CallByName Num.25 Str.163 Str.167; - if Str.168 then - dec Str.162; - dec Str.164; - let Str.169 : Int1 = CallByName Bool.9 Str.165 Str.166; - ret Str.169; +procedure Str.69 (Str.259): + let Str.265 : U64 = StructAtIndex 0 Str.259; + let Str.260 : Str = StructAtIndex 1 Str.259; + let Str.261 : U64 = StructAtIndex 2 Str.259; + let Str.262 : Str = StructAtIndex 3 Str.259; + let Str.263 : U64 = StructAtIndex 4 Str.259; + let Str.264 : U64 = StructAtIndex 5 Str.259; + let Str.266 : Int1 = CallByName Num.25 Str.261 Str.265; + if Str.266 then + dec Str.262; + dec Str.260; + let Str.267 : Int1 = CallByName Bool.9 Str.263 Str.264; + ret Str.267; else - let Str.306 : U8 = CallByName Str.35 Str.162 Str.163; - let Str.307 : U8 = CallByName Str.35 Str.164 Str.165; - let Str.170 : Int1 = CallByName Bool.9 Str.306 Str.307; - let Str.296 : U64 = StructAtIndex 0 Str.161; - let Str.297 : Str = StructAtIndex 1 Str.161; - let Str.299 : Str = StructAtIndex 3 Str.161; - let Str.301 : U64 = StructAtIndex 5 Str.161; - let Str.305 : U64 = 1i64; - let Str.303 : U64 = CallByName Num.51 Str.165 Str.305; - let Str.304 : U64 = 1i64; - let Str.302 : U64 = CallByName Num.51 Str.163 Str.304; - let Str.295 : {U64, Str, U64, Str, U64, U64} = Struct {Str.296, Str.297, Str.302, Str.299, Str.303, Str.301}; - let Str.171 : Int1 = CallByName Str.64 Str.295; - if Str.170 then - ret Str.171; + let Str.438 : U8 = CallByName Str.35 Str.260 Str.261; + let Str.439 : U8 = CallByName Str.35 Str.262 Str.263; + let Str.268 : Int1 = CallByName Bool.9 Str.438 Str.439; + let Str.428 : U64 = StructAtIndex 0 Str.259; + let Str.429 : Str = StructAtIndex 1 Str.259; + let Str.431 : Str = StructAtIndex 3 Str.259; + let Str.433 : U64 = StructAtIndex 5 Str.259; + let Str.437 : U64 = 1i64; + let Str.435 : U64 = CallByName Num.51 Str.263 Str.437; + let Str.436 : U64 = 1i64; + let Str.434 : U64 = CallByName Num.51 Str.261 Str.436; + let Str.427 : {U64, Str, U64, Str, U64, U64} = Struct {Str.428, Str.429, Str.434, Str.431, Str.435, Str.433}; + let Str.269 : Int1 = CallByName Str.69 Str.427; + if Str.268 then + ret Str.269; else - let Str.293 : Int1 = CallByName Bool.1; - ret Str.293; + let Str.425 : Int1 = CallByName Bool.1; + ret Str.425; procedure Test.0 (): let Test.4 : Str = "Hello "; diff --git a/crates/compiler/test_mono/generated/dbg_nested_expr.txt b/crates/compiler/test_mono/generated/dbg_nested_expr.txt index c247a2011c..4d8a861cab 100644 --- a/crates/compiler/test_mono/generated/dbg_nested_expr.txt +++ b/crates/compiler/test_mono/generated/dbg_nested_expr.txt @@ -39,8 +39,8 @@ procedure Num.96 (#Attr.2): ret Num.283; procedure Str.3 (#Attr.2, #Attr.3): - let Str.248 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.248; + let Str.380 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.380; procedure Test.0 (): let Test.3 : I64 = 1i64; diff --git a/crates/compiler/test_mono/generated/dbg_str_followed_by_number.txt b/crates/compiler/test_mono/generated/dbg_str_followed_by_number.txt index 415c1ed272..124011850d 100644 --- a/crates/compiler/test_mono/generated/dbg_str_followed_by_number.txt +++ b/crates/compiler/test_mono/generated/dbg_str_followed_by_number.txt @@ -100,184 +100,184 @@ procedure Num.77 (#Attr.2, #Attr.3): ret Num.293; procedure Str.20 (#Attr.2): - let Str.316 : Str = lowlevel StrWithCapacity #Attr.2; - ret Str.316; + let Str.448 : Str = lowlevel StrWithCapacity #Attr.2; + ret Str.448; procedure Str.3 (#Attr.2, #Attr.3): - let Str.248 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.248; + let Str.380 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.380; procedure Str.35 (#Attr.2, #Attr.3): - let Str.306 : U8 = lowlevel StrGetUnsafe #Attr.2 #Attr.3; - ret Str.306; + let Str.438 : U8 = lowlevel StrGetUnsafe #Attr.2 #Attr.3; + ret Str.438; procedure Str.36 (#Attr.2): - let Str.268 : U64 = lowlevel StrCountUtf8Bytes #Attr.2; - ret Str.268; + let Str.400 : U64 = lowlevel StrCountUtf8Bytes #Attr.2; + ret Str.400; procedure Str.37 (#Attr.2, #Attr.3, #Attr.4): - let Str.266 : Str = lowlevel StrSubstringUnsafe #Attr.2 #Attr.3 #Attr.4; - ret Str.266; + let Str.398 : Str = lowlevel StrSubstringUnsafe #Attr.2 #Attr.3 #Attr.4; + ret Str.398; -procedure Str.38 (Str.113, Str.114): - let Str.262 : [C , C U64] = CallByName Str.58 Str.113 Str.114; - let Str.275 : U8 = 1i64; - let Str.276 : U8 = GetTagId Str.262; - let Str.277 : Int1 = lowlevel Eq Str.275 Str.276; - if Str.277 then - let Str.115 : U64 = UnionAtIndex (Id 1) (Index 0) Str.262; - let Str.271 : U64 = CallByName Str.36 Str.113; - let Str.272 : U64 = CallByName Str.36 Str.114; - let Str.270 : U64 = CallByName Num.20 Str.271 Str.272; - let Str.116 : U64 = CallByName Num.20 Str.270 Str.115; - let Str.269 : U64 = 0i64; - inc Str.113; - let Str.117 : Str = CallByName Str.37 Str.113 Str.269 Str.115; - let Str.267 : U64 = CallByName Str.36 Str.114; - let Str.265 : U64 = CallByName Num.51 Str.115 Str.267; - let Str.118 : Str = CallByName Str.37 Str.113 Str.265 Str.116; - let Str.264 : {Str, Str} = Struct {Str.118, Str.117}; - let Str.263 : [C {}, C {Str, Str}] = TagId(1) Str.264; - ret Str.263; +procedure Str.38 (Str.211, Str.212): + let Str.394 : [C , C U64] = CallByName Str.63 Str.211 Str.212; + let Str.407 : U8 = 1i64; + let Str.408 : U8 = GetTagId Str.394; + let Str.409 : Int1 = lowlevel Eq Str.407 Str.408; + if Str.409 then + let Str.213 : U64 = UnionAtIndex (Id 1) (Index 0) Str.394; + let Str.403 : U64 = CallByName Str.36 Str.211; + let Str.404 : U64 = CallByName Str.36 Str.212; + let Str.402 : U64 = CallByName Num.20 Str.403 Str.404; + let Str.214 : U64 = CallByName Num.20 Str.402 Str.213; + let Str.401 : U64 = 0i64; + inc Str.211; + let Str.215 : Str = CallByName Str.37 Str.211 Str.401 Str.213; + let Str.399 : U64 = CallByName Str.36 Str.212; + let Str.397 : U64 = CallByName Num.51 Str.213 Str.399; + let Str.216 : Str = CallByName Str.37 Str.211 Str.397 Str.214; + let Str.396 : {Str, Str} = Struct {Str.216, Str.215}; + let Str.395 : [C {}, C {Str, Str}] = TagId(1) Str.396; + ret Str.395; else - dec Str.113; - let Str.274 : {} = Struct {}; - let Str.273 : [C {}, C {Str, Str}] = TagId(0) Str.274; - ret Str.273; + dec Str.211; + let Str.406 : {} = Struct {}; + let Str.405 : [C {}, C {Str, Str}] = TagId(0) Str.406; + ret Str.405; -procedure Str.45 (Str.92, Str.93, Str.94): - inc Str.92; - let Str.344 : [C {}, C {Str, Str}] = CallByName Str.38 Str.92 Str.93; - let Str.352 : U8 = 1i64; - let Str.353 : U8 = GetTagId Str.344; - let Str.354 : Int1 = lowlevel Eq Str.352 Str.353; - if Str.354 then - let Str.351 : {Str, Str} = UnionAtIndex (Id 1) (Index 0) Str.344; - let Str.96 : Str = StructAtIndex 0 Str.351; - let Str.95 : Str = StructAtIndex 1 Str.351; - let Str.349 : U64 = CallByName Str.36 Str.92; - dec Str.92; - let Str.348 : Str = CallByName Str.20 Str.349; - let Str.347 : Str = CallByName Str.3 Str.348 Str.95; - dec Str.95; - let Str.346 : Str = CallByName Str.3 Str.347 Str.94; - let Str.345 : Str = CallByName Str.57 Str.346 Str.96 Str.93 Str.94; - ret Str.345; +procedure Str.45 (Str.190, Str.191, Str.192): + inc Str.190; + let Str.476 : [C {}, C {Str, Str}] = CallByName Str.38 Str.190 Str.191; + let Str.484 : U8 = 1i64; + let Str.485 : U8 = GetTagId Str.476; + let Str.486 : Int1 = lowlevel Eq Str.484 Str.485; + if Str.486 then + let Str.483 : {Str, Str} = UnionAtIndex (Id 1) (Index 0) Str.476; + let Str.194 : Str = StructAtIndex 0 Str.483; + let Str.193 : Str = StructAtIndex 1 Str.483; + let Str.481 : U64 = CallByName Str.36 Str.190; + dec Str.190; + let Str.480 : Str = CallByName Str.20 Str.481; + let Str.479 : Str = CallByName Str.3 Str.480 Str.193; + dec Str.193; + let Str.478 : Str = CallByName Str.3 Str.479 Str.192; + let Str.477 : Str = CallByName Str.62 Str.478 Str.194 Str.191 Str.192; + ret Str.477; else - dec Str.344; - ret Str.92; + dec Str.476; + ret Str.190; -procedure Str.57 (Bool.24, Bool.25, Bool.26, Bool.27): - joinpoint Str.252 Str.97 Str.98 Str.99 Str.100: - inc Str.98; - let Str.253 : [C {}, C {Str, Str}] = CallByName Str.38 Str.98 Str.99; - let Str.259 : U8 = 1i64; - let Str.260 : U8 = GetTagId Str.253; - let Str.261 : Int1 = lowlevel Eq Str.259 Str.260; - if Str.261 then - dec Str.98; - let Str.258 : {Str, Str} = UnionAtIndex (Id 1) (Index 0) Str.253; - let Str.102 : Str = StructAtIndex 0 Str.258; - let Str.101 : Str = StructAtIndex 1 Str.258; - let Str.256 : Str = CallByName Str.3 Str.97 Str.101; - dec Str.101; - let Str.255 : Str = CallByName Str.3 Str.256 Str.100; - jump Str.252 Str.255 Str.102 Str.99 Str.100; +procedure Str.62 (Bool.24, Bool.25, Bool.26, Bool.27): + joinpoint Str.384 Str.195 Str.196 Str.197 Str.198: + inc Str.196; + let Str.385 : [C {}, C {Str, Str}] = CallByName Str.38 Str.196 Str.197; + let Str.391 : U8 = 1i64; + let Str.392 : U8 = GetTagId Str.385; + let Str.393 : Int1 = lowlevel Eq Str.391 Str.392; + if Str.393 then + dec Str.196; + let Str.390 : {Str, Str} = UnionAtIndex (Id 1) (Index 0) Str.385; + let Str.200 : Str = StructAtIndex 0 Str.390; + let Str.199 : Str = StructAtIndex 1 Str.390; + let Str.388 : Str = CallByName Str.3 Str.195 Str.199; + dec Str.199; + let Str.387 : Str = CallByName Str.3 Str.388 Str.198; + jump Str.384 Str.387 Str.200 Str.197 Str.198; else - dec Str.100; - dec Str.99; - dec Str.253; - let Str.257 : Str = CallByName Str.3 Str.97 Str.98; - dec Str.98; - ret Str.257; + dec Str.385; + dec Str.198; + dec Str.197; + let Str.389 : Str = CallByName Str.3 Str.195 Str.196; + dec Str.196; + ret Str.389; in inc Bool.26; inc Bool.27; - jump Str.252 Bool.24 Bool.25 Bool.26 Bool.27; + jump Str.384 Bool.24 Bool.25 Bool.26 Bool.27; -procedure Str.58 (Str.122, Str.123): - let Str.124 : U64 = CallByName Str.36 Str.122; - let Str.125 : U64 = CallByName Str.36 Str.123; - let Str.126 : U64 = CallByName Num.77 Str.124 Str.125; - let Str.279 : U64 = 0i64; - let Str.278 : [C , C U64] = CallByName Str.59 Str.122 Str.123 Str.279 Str.126; - ret Str.278; +procedure Str.63 (Str.220, Str.221): + let Str.222 : U64 = CallByName Str.36 Str.220; + let Str.223 : U64 = CallByName Str.36 Str.221; + let Str.224 : U64 = CallByName Num.77 Str.222 Str.223; + let Str.411 : U64 = 0i64; + let Str.410 : [C , C U64] = CallByName Str.64 Str.220 Str.221 Str.411 Str.224; + ret Str.410; -procedure Str.59 (Bool.28, Bool.29, Bool.30, Bool.31): - joinpoint Str.280 Str.127 Str.128 Str.129 Str.130: - let Str.282 : Int1 = CallByName Num.23 Str.129 Str.130; - if Str.282 then - let Str.286 : Int1 = CallByName Str.63 Str.127 Str.129 Str.128; - if Str.286 then - dec Str.127; - dec Str.128; - let Str.287 : [C , C U64] = TagId(1) Str.129; - ret Str.287; +procedure Str.64 (Bool.28, Bool.29, Bool.30, Bool.31): + joinpoint Str.412 Str.225 Str.226 Str.227 Str.228: + let Str.414 : Int1 = CallByName Num.23 Str.227 Str.228; + if Str.414 then + let Str.418 : Int1 = CallByName Str.68 Str.225 Str.227 Str.226; + if Str.418 then + dec Str.226; + dec Str.225; + let Str.419 : [C , C U64] = TagId(1) Str.227; + ret Str.419; else - let Str.285 : U64 = 1i64; - let Str.284 : U64 = CallByName Num.51 Str.129 Str.285; - jump Str.280 Str.127 Str.128 Str.284 Str.130; + let Str.417 : U64 = 1i64; + let Str.416 : U64 = CallByName Num.51 Str.227 Str.417; + jump Str.412 Str.225 Str.226 Str.416 Str.228; else - dec Str.127; - dec Str.128; - let Str.281 : [C , C U64] = TagId(0) ; - ret Str.281; + dec Str.226; + dec Str.225; + let Str.413 : [C , C U64] = TagId(0) ; + ret Str.413; in inc Bool.29; inc Bool.28; - jump Str.280 Bool.28 Bool.29 Bool.30 Bool.31; + jump Str.412 Bool.28 Bool.29 Bool.30 Bool.31; -procedure Str.62 (Str.153, Str.154): - let Str.311 : Int1 = CallByName Num.22 Str.153 Str.154; - if Str.311 then - ret Str.153; +procedure Str.67 (Str.251, Str.252): + let Str.443 : Int1 = CallByName Num.22 Str.251 Str.252; + if Str.443 then + ret Str.251; else - ret Str.154; + ret Str.252; -procedure Str.63 (Str.155, Str.156, Str.157): - let Str.158 : U64 = CallByName Str.36 Str.155; - let Str.159 : U64 = CallByName Str.36 Str.157; - let Str.309 : U64 = CallByName Num.53 Str.156 Str.159; - let Str.160 : U64 = CallByName Str.62 Str.309 Str.158; - let Str.308 : U64 = 0i64; - inc Str.157; - inc Str.155; - let Str.289 : {U64, Str, U64, Str, U64, U64} = Struct {Str.160, Str.155, Str.156, Str.157, Str.308, Str.159}; - let Str.288 : Int1 = CallByName Str.64 Str.289; - ret Str.288; +procedure Str.68 (Str.253, Str.254, Str.255): + let Str.256 : U64 = CallByName Str.36 Str.253; + let Str.257 : U64 = CallByName Str.36 Str.255; + let Str.441 : U64 = CallByName Num.53 Str.254 Str.257; + let Str.258 : U64 = CallByName Str.67 Str.441 Str.256; + let Str.440 : U64 = 0i64; + inc Str.255; + inc Str.253; + let Str.421 : {U64, Str, U64, Str, U64, U64} = Struct {Str.258, Str.253, Str.254, Str.255, Str.440, Str.257}; + let Str.420 : Int1 = CallByName Str.69 Str.421; + ret Str.420; -procedure Str.64 (Str.161): - let Str.167 : U64 = StructAtIndex 0 Str.161; - let Str.162 : Str = StructAtIndex 1 Str.161; - let Str.163 : U64 = StructAtIndex 2 Str.161; - let Str.164 : Str = StructAtIndex 3 Str.161; - let Str.165 : U64 = StructAtIndex 4 Str.161; - let Str.166 : U64 = StructAtIndex 5 Str.161; - let Str.168 : Int1 = CallByName Num.25 Str.163 Str.167; - if Str.168 then - dec Str.162; - dec Str.164; - let Str.169 : Int1 = CallByName Bool.9 Str.165 Str.166; - ret Str.169; +procedure Str.69 (Str.259): + let Str.265 : U64 = StructAtIndex 0 Str.259; + let Str.260 : Str = StructAtIndex 1 Str.259; + let Str.261 : U64 = StructAtIndex 2 Str.259; + let Str.262 : Str = StructAtIndex 3 Str.259; + let Str.263 : U64 = StructAtIndex 4 Str.259; + let Str.264 : U64 = StructAtIndex 5 Str.259; + let Str.266 : Int1 = CallByName Num.25 Str.261 Str.265; + if Str.266 then + dec Str.262; + dec Str.260; + let Str.267 : Int1 = CallByName Bool.9 Str.263 Str.264; + ret Str.267; else - let Str.304 : U8 = CallByName Str.35 Str.162 Str.163; - let Str.305 : U8 = CallByName Str.35 Str.164 Str.165; - let Str.170 : Int1 = CallByName Bool.9 Str.304 Str.305; - let Str.294 : U64 = StructAtIndex 0 Str.161; - let Str.295 : Str = StructAtIndex 1 Str.161; - let Str.297 : Str = StructAtIndex 3 Str.161; - let Str.299 : U64 = StructAtIndex 5 Str.161; - let Str.303 : U64 = 1i64; - let Str.301 : U64 = CallByName Num.51 Str.165 Str.303; - let Str.302 : U64 = 1i64; - let Str.300 : U64 = CallByName Num.51 Str.163 Str.302; - let Str.293 : {U64, Str, U64, Str, U64, U64} = Struct {Str.294, Str.295, Str.300, Str.297, Str.301, Str.299}; - let Str.171 : Int1 = CallByName Str.64 Str.293; - if Str.170 then - ret Str.171; + let Str.436 : U8 = CallByName Str.35 Str.260 Str.261; + let Str.437 : U8 = CallByName Str.35 Str.262 Str.263; + let Str.268 : Int1 = CallByName Bool.9 Str.436 Str.437; + let Str.426 : U64 = StructAtIndex 0 Str.259; + let Str.427 : Str = StructAtIndex 1 Str.259; + let Str.429 : Str = StructAtIndex 3 Str.259; + let Str.431 : U64 = StructAtIndex 5 Str.259; + let Str.435 : U64 = 1i64; + let Str.433 : U64 = CallByName Num.51 Str.263 Str.435; + let Str.434 : U64 = 1i64; + let Str.432 : U64 = CallByName Num.51 Str.261 Str.434; + let Str.425 : {U64, Str, U64, Str, U64, U64} = Struct {Str.426, Str.427, Str.432, Str.429, Str.433, Str.431}; + let Str.269 : Int1 = CallByName Str.69 Str.425; + if Str.268 then + ret Str.269; else - let Str.291 : Int1 = CallByName Bool.1; - ret Str.291; + let Str.423 : Int1 = CallByName Bool.1; + ret Str.423; procedure Test.0 (): let Test.3 : Str = ""; diff --git a/crates/compiler/test_mono/generated/dec_refcount_for_usage_after_early_return_in_if.txt b/crates/compiler/test_mono/generated/dec_refcount_for_usage_after_early_return_in_if.txt index 944f62af33..3260a716af 100644 --- a/crates/compiler/test_mono/generated/dec_refcount_for_usage_after_early_return_in_if.txt +++ b/crates/compiler/test_mono/generated/dec_refcount_for_usage_after_early_return_in_if.txt @@ -11,8 +11,8 @@ procedure Num.96 (#Attr.2): ret Num.284; procedure Str.3 (#Attr.2, #Attr.3): - let Str.249 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.249; + let Str.381 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.381; procedure Test.1 (Test.2): let Test.3 : Str = CallByName Num.96 Test.2; 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 5a9f4ad26d..108cc62f22 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 @@ -164,32 +164,32 @@ procedure Num.96 (#Attr.2): ret Num.287; procedure Str.12 (#Attr.2): - let Str.261 : List U8 = lowlevel StrToUtf8 #Attr.2; - ret Str.261; + let Str.393 : List U8 = lowlevel StrToUtf8 #Attr.2; + ret Str.393; procedure Str.36 (#Attr.2): - let Str.262 : U64 = lowlevel StrCountUtf8Bytes #Attr.2; - ret Str.262; + let Str.394 : U64 = lowlevel StrCountUtf8Bytes #Attr.2; + ret Str.394; procedure Str.43 (#Attr.2): - let Str.256 : {U64, Str, Int1, U8} = lowlevel StrFromUtf8 #Attr.2; - ret Str.256; - -procedure Str.9 (Str.74): - let Str.75 : {U64, Str, Int1, U8} = CallByName Str.43 Str.74; - let Str.253 : Int1 = StructAtIndex 2 Str.75; - if Str.253 then - let Str.255 : Str = StructAtIndex 1 Str.75; - let Str.254 : [C {U64, U8}, C Str] = TagId(1) Str.255; - ret Str.254; + let Str.388 : {U64, Str, Int1, U8} = lowlevel StrFromUtf8 #Attr.2; + ret Str.388; + +procedure Str.9 (Str.77): + let Str.78 : {U64, Str, Int1, U8} = CallByName Str.43 Str.77; + let Str.385 : Int1 = StructAtIndex 2 Str.78; + if Str.385 then + let Str.387 : Str = StructAtIndex 1 Str.78; + let Str.386 : [C {U64, U8}, C Str] = TagId(1) Str.387; + ret Str.386; else - let Str.251 : U64 = StructAtIndex 0 Str.75; - let Str.252 : U8 = StructAtIndex 3 Str.75; - let #Derived_gen.45 : Str = StructAtIndex 1 Str.75; + let Str.383 : U64 = StructAtIndex 0 Str.78; + let Str.384 : U8 = StructAtIndex 3 Str.78; + let #Derived_gen.45 : Str = StructAtIndex 1 Str.78; dec #Derived_gen.45; - let Str.250 : {U64, U8} = Struct {Str.251, Str.252}; - let Str.248 : [C {U64, U8}, C Str] = TagId(0) Str.250; - ret Str.248; + let Str.382 : {U64, U8} = Struct {Str.383, Str.384}; + let Str.380 : [C {U64, U8}, C Str] = TagId(0) Str.382; + ret Str.380; procedure Test.20 (Test.56): let Test.325 : Str = CallByName Encode.23 Test.56; 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 f1c5d4a712..2bac379a6d 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 @@ -105,32 +105,32 @@ procedure Num.96 (#Attr.2): ret Num.283; procedure Str.12 (#Attr.2): - let Str.258 : List U8 = lowlevel StrToUtf8 #Attr.2; - ret Str.258; + let Str.390 : List U8 = lowlevel StrToUtf8 #Attr.2; + ret Str.390; procedure Str.36 (#Attr.2): - let Str.259 : U64 = lowlevel StrCountUtf8Bytes #Attr.2; - ret Str.259; + let Str.391 : U64 = lowlevel StrCountUtf8Bytes #Attr.2; + ret Str.391; procedure Str.43 (#Attr.2): - let Str.256 : {U64, Str, Int1, U8} = lowlevel StrFromUtf8 #Attr.2; - ret Str.256; - -procedure Str.9 (Str.74): - let Str.75 : {U64, Str, Int1, U8} = CallByName Str.43 Str.74; - let Str.253 : Int1 = StructAtIndex 2 Str.75; - if Str.253 then - let Str.255 : Str = StructAtIndex 1 Str.75; - let Str.254 : [C {U64, U8}, C Str] = TagId(1) Str.255; - ret Str.254; + let Str.388 : {U64, Str, Int1, U8} = lowlevel StrFromUtf8 #Attr.2; + ret Str.388; + +procedure Str.9 (Str.77): + let Str.78 : {U64, Str, Int1, U8} = CallByName Str.43 Str.77; + let Str.385 : Int1 = StructAtIndex 2 Str.78; + if Str.385 then + let Str.387 : Str = StructAtIndex 1 Str.78; + let Str.386 : [C {U64, U8}, C Str] = TagId(1) Str.387; + ret Str.386; else - let Str.251 : U64 = StructAtIndex 0 Str.75; - let Str.252 : U8 = StructAtIndex 3 Str.75; - let #Derived_gen.24 : Str = StructAtIndex 1 Str.75; + let Str.383 : U64 = StructAtIndex 0 Str.78; + let Str.384 : U8 = StructAtIndex 3 Str.78; + let #Derived_gen.24 : Str = StructAtIndex 1 Str.78; dec #Derived_gen.24; - let Str.250 : {U64, U8} = Struct {Str.251, Str.252}; - let Str.248 : [C {U64, U8}, C Str] = TagId(0) Str.250; - ret Str.248; + let Str.382 : {U64, U8} = Struct {Str.383, Str.384}; + let Str.380 : [C {U64, U8}, C Str] = TagId(0) Str.382; + ret Str.380; procedure Test.20 (Test.56): let Test.292 : Str = CallByName Encode.23 Test.56; 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 3318b15260..1c1b720eb6 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 @@ -112,32 +112,32 @@ procedure Num.96 (#Attr.2): ret Num.283; procedure Str.12 (#Attr.2): - let Str.258 : List U8 = lowlevel StrToUtf8 #Attr.2; - ret Str.258; + let Str.390 : List U8 = lowlevel StrToUtf8 #Attr.2; + ret Str.390; procedure Str.36 (#Attr.2): - let Str.259 : U64 = lowlevel StrCountUtf8Bytes #Attr.2; - ret Str.259; + let Str.391 : U64 = lowlevel StrCountUtf8Bytes #Attr.2; + ret Str.391; procedure Str.43 (#Attr.2): - let Str.256 : {U64, Str, Int1, U8} = lowlevel StrFromUtf8 #Attr.2; - ret Str.256; - -procedure Str.9 (Str.74): - let Str.75 : {U64, Str, Int1, U8} = CallByName Str.43 Str.74; - let Str.253 : Int1 = StructAtIndex 2 Str.75; - if Str.253 then - let Str.255 : Str = StructAtIndex 1 Str.75; - let Str.254 : [C {U64, U8}, C Str] = TagId(1) Str.255; - ret Str.254; + let Str.388 : {U64, Str, Int1, U8} = lowlevel StrFromUtf8 #Attr.2; + ret Str.388; + +procedure Str.9 (Str.77): + let Str.78 : {U64, Str, Int1, U8} = CallByName Str.43 Str.77; + let Str.385 : Int1 = StructAtIndex 2 Str.78; + if Str.385 then + let Str.387 : Str = StructAtIndex 1 Str.78; + let Str.386 : [C {U64, U8}, C Str] = TagId(1) Str.387; + ret Str.386; else - let Str.251 : U64 = StructAtIndex 0 Str.75; - let Str.252 : U8 = StructAtIndex 3 Str.75; - let #Derived_gen.28 : Str = StructAtIndex 1 Str.75; + let Str.383 : U64 = StructAtIndex 0 Str.78; + let Str.384 : U8 = StructAtIndex 3 Str.78; + let #Derived_gen.28 : Str = StructAtIndex 1 Str.78; dec #Derived_gen.28; - let Str.250 : {U64, U8} = Struct {Str.251, Str.252}; - let Str.248 : [C {U64, U8}, C Str] = TagId(0) Str.250; - ret Str.248; + let Str.382 : {U64, U8} = Struct {Str.383, Str.384}; + let Str.380 : [C {U64, U8}, C Str] = TagId(0) Str.382; + ret Str.380; procedure Test.20 (Test.56): let Test.296 : Str = CallByName Encode.23 Test.56; diff --git a/crates/compiler/test_mono/generated/encode_derived_string.txt b/crates/compiler/test_mono/generated/encode_derived_string.txt index 8f72c77054..158782f712 100644 --- a/crates/compiler/test_mono/generated/encode_derived_string.txt +++ b/crates/compiler/test_mono/generated/encode_derived_string.txt @@ -38,32 +38,32 @@ procedure Num.96 (#Attr.2): ret Num.283; procedure Str.12 (#Attr.2): - let Str.258 : List U8 = lowlevel StrToUtf8 #Attr.2; - ret Str.258; + let Str.390 : List U8 = lowlevel StrToUtf8 #Attr.2; + ret Str.390; procedure Str.36 (#Attr.2): - let Str.259 : U64 = lowlevel StrCountUtf8Bytes #Attr.2; - ret Str.259; + let Str.391 : U64 = lowlevel StrCountUtf8Bytes #Attr.2; + ret Str.391; procedure Str.43 (#Attr.2): - let Str.256 : {U64, Str, Int1, U8} = lowlevel StrFromUtf8 #Attr.2; - ret Str.256; - -procedure Str.9 (Str.74): - let Str.75 : {U64, Str, Int1, U8} = CallByName Str.43 Str.74; - let Str.253 : Int1 = StructAtIndex 2 Str.75; - if Str.253 then - let Str.255 : Str = StructAtIndex 1 Str.75; - let Str.254 : [C {U64, U8}, C Str] = TagId(1) Str.255; - ret Str.254; + let Str.388 : {U64, Str, Int1, U8} = lowlevel StrFromUtf8 #Attr.2; + ret Str.388; + +procedure Str.9 (Str.77): + let Str.78 : {U64, Str, Int1, U8} = CallByName Str.43 Str.77; + let Str.385 : Int1 = StructAtIndex 2 Str.78; + if Str.385 then + let Str.387 : Str = StructAtIndex 1 Str.78; + let Str.386 : [C {U64, U8}, C Str] = TagId(1) Str.387; + ret Str.386; else - let Str.251 : U64 = StructAtIndex 0 Str.75; - let Str.252 : U8 = StructAtIndex 3 Str.75; - let #Derived_gen.3 : Str = StructAtIndex 1 Str.75; + let Str.383 : U64 = StructAtIndex 0 Str.78; + let Str.384 : U8 = StructAtIndex 3 Str.78; + let #Derived_gen.3 : Str = StructAtIndex 1 Str.78; dec #Derived_gen.3; - let Str.250 : {U64, U8} = Struct {Str.251, Str.252}; - let Str.248 : [C {U64, U8}, C Str] = TagId(0) Str.250; - ret Str.248; + let Str.382 : {U64, U8} = Struct {Str.383, Str.384}; + let Str.380 : [C {U64, U8}, C Str] = TagId(0) Str.382; + ret Str.380; procedure Test.20 (Test.56): let Test.259 : Str = CallByName Encode.23 Test.56; 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 b19f1935ce..4d0dff4622 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 @@ -110,32 +110,32 @@ procedure Num.96 (#Attr.2): ret Num.283; procedure Str.12 (#Attr.2): - let Str.258 : List U8 = lowlevel StrToUtf8 #Attr.2; - ret Str.258; + let Str.390 : List U8 = lowlevel StrToUtf8 #Attr.2; + ret Str.390; procedure Str.36 (#Attr.2): - let Str.259 : U64 = lowlevel StrCountUtf8Bytes #Attr.2; - ret Str.259; + let Str.391 : U64 = lowlevel StrCountUtf8Bytes #Attr.2; + ret Str.391; procedure Str.43 (#Attr.2): - let Str.256 : {U64, Str, Int1, U8} = lowlevel StrFromUtf8 #Attr.2; - ret Str.256; - -procedure Str.9 (Str.74): - let Str.75 : {U64, Str, Int1, U8} = CallByName Str.43 Str.74; - let Str.253 : Int1 = StructAtIndex 2 Str.75; - if Str.253 then - let Str.255 : Str = StructAtIndex 1 Str.75; - let Str.254 : [C {U64, U8}, C Str] = TagId(1) Str.255; - ret Str.254; + let Str.388 : {U64, Str, Int1, U8} = lowlevel StrFromUtf8 #Attr.2; + ret Str.388; + +procedure Str.9 (Str.77): + let Str.78 : {U64, Str, Int1, U8} = CallByName Str.43 Str.77; + let Str.385 : Int1 = StructAtIndex 2 Str.78; + if Str.385 then + let Str.387 : Str = StructAtIndex 1 Str.78; + let Str.386 : [C {U64, U8}, C Str] = TagId(1) Str.387; + ret Str.386; else - let Str.251 : U64 = StructAtIndex 0 Str.75; - let Str.252 : U8 = StructAtIndex 3 Str.75; - let #Derived_gen.27 : Str = StructAtIndex 1 Str.75; + let Str.383 : U64 = StructAtIndex 0 Str.78; + let Str.384 : U8 = StructAtIndex 3 Str.78; + let #Derived_gen.27 : Str = StructAtIndex 1 Str.78; dec #Derived_gen.27; - let Str.250 : {U64, U8} = Struct {Str.251, Str.252}; - let Str.248 : [C {U64, U8}, C Str] = TagId(0) Str.250; - ret Str.248; + let Str.382 : {U64, U8} = Struct {Str.383, Str.384}; + let Str.380 : [C {U64, U8}, C Str] = TagId(0) Str.382; + ret Str.380; procedure Test.20 (Test.56): let Test.297 : Str = CallByName Encode.23 Test.56; 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 0a50c84e73..90f36ce91b 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 @@ -113,32 +113,32 @@ procedure Num.96 (#Attr.2): ret Num.283; procedure Str.12 (#Attr.2): - let Str.258 : List U8 = lowlevel StrToUtf8 #Attr.2; - ret Str.258; + let Str.390 : List U8 = lowlevel StrToUtf8 #Attr.2; + ret Str.390; procedure Str.36 (#Attr.2): - let Str.259 : U64 = lowlevel StrCountUtf8Bytes #Attr.2; - ret Str.259; + let Str.391 : U64 = lowlevel StrCountUtf8Bytes #Attr.2; + ret Str.391; procedure Str.43 (#Attr.2): - let Str.256 : {U64, Str, Int1, U8} = lowlevel StrFromUtf8 #Attr.2; - ret Str.256; - -procedure Str.9 (Str.74): - let Str.75 : {U64, Str, Int1, U8} = CallByName Str.43 Str.74; - let Str.253 : Int1 = StructAtIndex 2 Str.75; - if Str.253 then - let Str.255 : Str = StructAtIndex 1 Str.75; - let Str.254 : [C {U64, U8}, C Str] = TagId(1) Str.255; - ret Str.254; + let Str.388 : {U64, Str, Int1, U8} = lowlevel StrFromUtf8 #Attr.2; + ret Str.388; + +procedure Str.9 (Str.77): + let Str.78 : {U64, Str, Int1, U8} = CallByName Str.43 Str.77; + let Str.385 : Int1 = StructAtIndex 2 Str.78; + if Str.385 then + let Str.387 : Str = StructAtIndex 1 Str.78; + let Str.386 : [C {U64, U8}, C Str] = TagId(1) Str.387; + ret Str.386; else - let Str.251 : U64 = StructAtIndex 0 Str.75; - let Str.252 : U8 = StructAtIndex 3 Str.75; - let #Derived_gen.28 : Str = StructAtIndex 1 Str.75; + let Str.383 : U64 = StructAtIndex 0 Str.78; + let Str.384 : U8 = StructAtIndex 3 Str.78; + let #Derived_gen.28 : Str = StructAtIndex 1 Str.78; dec #Derived_gen.28; - let Str.250 : {U64, U8} = Struct {Str.251, Str.252}; - let Str.248 : [C {U64, U8}, C Str] = TagId(0) Str.250; - ret Str.248; + let Str.382 : {U64, U8} = Struct {Str.383, Str.384}; + let Str.380 : [C {U64, U8}, C Str] = TagId(0) Str.382; + ret Str.380; procedure Test.20 (Test.56): let Test.301 : Str = CallByName Encode.23 Test.56; diff --git a/crates/compiler/test_mono/generated/inspect_derived_dict.txt b/crates/compiler/test_mono/generated/inspect_derived_dict.txt index fd66e5cc88..3065fa676b 100644 --- a/crates/compiler/test_mono/generated/inspect_derived_dict.txt +++ b/crates/compiler/test_mono/generated/inspect_derived_dict.txt @@ -1204,188 +1204,188 @@ procedure Num.96 (#Attr.2): ret Num.440; procedure Str.12 (#Attr.2): - let Str.250 : List U8 = lowlevel StrToUtf8 #Attr.2; - ret Str.250; + let Str.382 : List U8 = lowlevel StrToUtf8 #Attr.2; + ret Str.382; procedure Str.20 (#Attr.2): - let Str.319 : Str = lowlevel StrWithCapacity #Attr.2; - ret Str.319; + let Str.451 : Str = lowlevel StrWithCapacity #Attr.2; + ret Str.451; procedure Str.3 (#Attr.2, #Attr.3): - let Str.251 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.251; + let Str.383 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.383; procedure Str.35 (#Attr.2, #Attr.3): - let Str.309 : U8 = lowlevel StrGetUnsafe #Attr.2 #Attr.3; - ret Str.309; + let Str.441 : U8 = lowlevel StrGetUnsafe #Attr.2 #Attr.3; + ret Str.441; procedure Str.36 (#Attr.2): - let Str.271 : U64 = lowlevel StrCountUtf8Bytes #Attr.2; - ret Str.271; + let Str.403 : U64 = lowlevel StrCountUtf8Bytes #Attr.2; + ret Str.403; procedure Str.37 (#Attr.2, #Attr.3, #Attr.4): - let Str.269 : Str = lowlevel StrSubstringUnsafe #Attr.2 #Attr.3 #Attr.4; - ret Str.269; - -procedure Str.38 (Str.113, Str.114): - let Str.265 : [C , C U64] = CallByName Str.58 Str.113 Str.114; - let Str.278 : U8 = 1i64; - let Str.279 : U8 = GetTagId Str.265; - let Str.280 : Int1 = lowlevel Eq Str.278 Str.279; - if Str.280 then - let Str.115 : U64 = UnionAtIndex (Id 1) (Index 0) Str.265; - let Str.274 : U64 = CallByName Str.36 Str.113; - let Str.275 : U64 = CallByName Str.36 Str.114; - let Str.273 : U64 = CallByName Num.20 Str.274 Str.275; - let Str.116 : U64 = CallByName Num.20 Str.273 Str.115; - let Str.272 : U64 = 0i64; - inc Str.113; - let Str.117 : Str = CallByName Str.37 Str.113 Str.272 Str.115; - let Str.270 : U64 = CallByName Str.36 Str.114; - let Str.268 : U64 = CallByName Num.51 Str.115 Str.270; - let Str.118 : Str = CallByName Str.37 Str.113 Str.268 Str.116; - let Str.267 : {Str, Str} = Struct {Str.118, Str.117}; - let Str.266 : [C {}, C {Str, Str}] = TagId(1) Str.267; - ret Str.266; + let Str.401 : Str = lowlevel StrSubstringUnsafe #Attr.2 #Attr.3 #Attr.4; + ret Str.401; + +procedure Str.38 (Str.211, Str.212): + let Str.397 : [C , C U64] = CallByName Str.63 Str.211 Str.212; + let Str.410 : U8 = 1i64; + let Str.411 : U8 = GetTagId Str.397; + let Str.412 : Int1 = lowlevel Eq Str.410 Str.411; + if Str.412 then + let Str.213 : U64 = UnionAtIndex (Id 1) (Index 0) Str.397; + let Str.406 : U64 = CallByName Str.36 Str.211; + let Str.407 : U64 = CallByName Str.36 Str.212; + let Str.405 : U64 = CallByName Num.20 Str.406 Str.407; + let Str.214 : U64 = CallByName Num.20 Str.405 Str.213; + let Str.404 : U64 = 0i64; + inc Str.211; + let Str.215 : Str = CallByName Str.37 Str.211 Str.404 Str.213; + let Str.402 : U64 = CallByName Str.36 Str.212; + let Str.400 : U64 = CallByName Num.51 Str.213 Str.402; + let Str.216 : Str = CallByName Str.37 Str.211 Str.400 Str.214; + let Str.399 : {Str, Str} = Struct {Str.216, Str.215}; + let Str.398 : [C {}, C {Str, Str}] = TagId(1) Str.399; + ret Str.398; else - dec Str.113; - let Str.277 : {} = Struct {}; - let Str.276 : [C {}, C {Str, Str}] = TagId(0) Str.277; - ret Str.276; - -procedure Str.45 (Str.92, Str.93, Str.94): - inc Str.92; - let Str.347 : [C {}, C {Str, Str}] = CallByName Str.38 Str.92 Str.93; - let Str.355 : U8 = 1i64; - let Str.356 : U8 = GetTagId Str.347; - let Str.357 : Int1 = lowlevel Eq Str.355 Str.356; - if Str.357 then - let Str.354 : {Str, Str} = UnionAtIndex (Id 1) (Index 0) Str.347; - let Str.96 : Str = StructAtIndex 0 Str.354; - let Str.95 : Str = StructAtIndex 1 Str.354; - let Str.352 : U64 = CallByName Str.36 Str.92; - dec Str.92; - let Str.351 : Str = CallByName Str.20 Str.352; - let Str.350 : Str = CallByName Str.3 Str.351 Str.95; - dec Str.95; - let Str.349 : Str = CallByName Str.3 Str.350 Str.94; - let Str.348 : Str = CallByName Str.57 Str.349 Str.96 Str.93 Str.94; - ret Str.348; + dec Str.211; + let Str.409 : {} = Struct {}; + let Str.408 : [C {}, C {Str, Str}] = TagId(0) Str.409; + ret Str.408; + +procedure Str.45 (Str.190, Str.191, Str.192): + inc Str.190; + let Str.479 : [C {}, C {Str, Str}] = CallByName Str.38 Str.190 Str.191; + let Str.487 : U8 = 1i64; + let Str.488 : U8 = GetTagId Str.479; + let Str.489 : Int1 = lowlevel Eq Str.487 Str.488; + if Str.489 then + let Str.486 : {Str, Str} = UnionAtIndex (Id 1) (Index 0) Str.479; + let Str.194 : Str = StructAtIndex 0 Str.486; + let Str.193 : Str = StructAtIndex 1 Str.486; + let Str.484 : U64 = CallByName Str.36 Str.190; + dec Str.190; + let Str.483 : Str = CallByName Str.20 Str.484; + let Str.482 : Str = CallByName Str.3 Str.483 Str.193; + dec Str.193; + let Str.481 : Str = CallByName Str.3 Str.482 Str.192; + let Str.480 : Str = CallByName Str.62 Str.481 Str.194 Str.191 Str.192; + ret Str.480; else - dec Str.347; - ret Str.92; - -procedure Str.57 (#Derived_gen.9, #Derived_gen.10, #Derived_gen.11, #Derived_gen.12): - joinpoint Str.255 Str.97 Str.98 Str.99 Str.100: - inc Str.98; - let Str.256 : [C {}, C {Str, Str}] = CallByName Str.38 Str.98 Str.99; - let Str.262 : U8 = 1i64; - let Str.263 : U8 = GetTagId Str.256; - let Str.264 : Int1 = lowlevel Eq Str.262 Str.263; - if Str.264 then - dec Str.98; - let Str.261 : {Str, Str} = UnionAtIndex (Id 1) (Index 0) Str.256; - let Str.102 : Str = StructAtIndex 0 Str.261; - let Str.101 : Str = StructAtIndex 1 Str.261; - let Str.259 : Str = CallByName Str.3 Str.97 Str.101; - dec Str.101; - let Str.258 : Str = CallByName Str.3 Str.259 Str.100; - jump Str.255 Str.258 Str.102 Str.99 Str.100; + dec Str.479; + ret Str.190; + +procedure Str.62 (#Derived_gen.9, #Derived_gen.10, #Derived_gen.11, #Derived_gen.12): + joinpoint Str.387 Str.195 Str.196 Str.197 Str.198: + inc Str.196; + let Str.388 : [C {}, C {Str, Str}] = CallByName Str.38 Str.196 Str.197; + let Str.394 : U8 = 1i64; + let Str.395 : U8 = GetTagId Str.388; + let Str.396 : Int1 = lowlevel Eq Str.394 Str.395; + if Str.396 then + dec Str.196; + let Str.393 : {Str, Str} = UnionAtIndex (Id 1) (Index 0) Str.388; + let Str.200 : Str = StructAtIndex 0 Str.393; + let Str.199 : Str = StructAtIndex 1 Str.393; + let Str.391 : Str = CallByName Str.3 Str.195 Str.199; + dec Str.199; + let Str.390 : Str = CallByName Str.3 Str.391 Str.198; + jump Str.387 Str.390 Str.200 Str.197 Str.198; else - dec Str.100; - dec Str.99; - dec Str.256; - let Str.260 : Str = CallByName Str.3 Str.97 Str.98; - dec Str.98; - ret Str.260; + dec Str.198; + dec Str.388; + dec Str.197; + let Str.392 : Str = CallByName Str.3 Str.195 Str.196; + dec Str.196; + ret Str.392; in inc #Derived_gen.12; inc #Derived_gen.11; - jump Str.255 #Derived_gen.9 #Derived_gen.10 #Derived_gen.11 #Derived_gen.12; - -procedure Str.58 (Str.122, Str.123): - let Str.124 : U64 = CallByName Str.36 Str.122; - let Str.125 : U64 = CallByName Str.36 Str.123; - let Str.126 : U64 = CallByName Num.77 Str.124 Str.125; - let Str.282 : U64 = 0i64; - let Str.281 : [C , C U64] = CallByName Str.59 Str.122 Str.123 Str.282 Str.126; - ret Str.281; - -procedure Str.59 (#Derived_gen.13, #Derived_gen.14, #Derived_gen.15, #Derived_gen.16): - joinpoint Str.283 Str.127 Str.128 Str.129 Str.130: - let Str.285 : Int1 = CallByName Num.23 Str.129 Str.130; - if Str.285 then - let Str.289 : Int1 = CallByName Str.63 Str.127 Str.129 Str.128; - if Str.289 then - dec Str.127; - dec Str.128; - let Str.290 : [C , C U64] = TagId(1) Str.129; - ret Str.290; + jump Str.387 #Derived_gen.9 #Derived_gen.10 #Derived_gen.11 #Derived_gen.12; + +procedure Str.63 (Str.220, Str.221): + let Str.222 : U64 = CallByName Str.36 Str.220; + let Str.223 : U64 = CallByName Str.36 Str.221; + let Str.224 : U64 = CallByName Num.77 Str.222 Str.223; + let Str.414 : U64 = 0i64; + let Str.413 : [C , C U64] = CallByName Str.64 Str.220 Str.221 Str.414 Str.224; + ret Str.413; + +procedure Str.64 (#Derived_gen.13, #Derived_gen.14, #Derived_gen.15, #Derived_gen.16): + joinpoint Str.415 Str.225 Str.226 Str.227 Str.228: + let Str.417 : Int1 = CallByName Num.23 Str.227 Str.228; + if Str.417 then + let Str.421 : Int1 = CallByName Str.68 Str.225 Str.227 Str.226; + if Str.421 then + dec Str.226; + dec Str.225; + let Str.422 : [C , C U64] = TagId(1) Str.227; + ret Str.422; else - let Str.288 : U64 = 1i64; - let Str.287 : U64 = CallByName Num.51 Str.129 Str.288; - jump Str.283 Str.127 Str.128 Str.287 Str.130; + let Str.420 : U64 = 1i64; + let Str.419 : U64 = CallByName Num.51 Str.227 Str.420; + jump Str.415 Str.225 Str.226 Str.419 Str.228; else - dec Str.127; - dec Str.128; - let Str.284 : [C , C U64] = TagId(0) ; - ret Str.284; + dec Str.226; + dec Str.225; + let Str.416 : [C , C U64] = TagId(0) ; + ret Str.416; in inc #Derived_gen.14; inc #Derived_gen.13; - jump Str.283 #Derived_gen.13 #Derived_gen.14 #Derived_gen.15 #Derived_gen.16; + jump Str.415 #Derived_gen.13 #Derived_gen.14 #Derived_gen.15 #Derived_gen.16; -procedure Str.62 (Str.153, Str.154): - let Str.314 : Int1 = CallByName Num.22 Str.153 Str.154; - if Str.314 then - ret Str.153; +procedure Str.67 (Str.251, Str.252): + let Str.446 : Int1 = CallByName Num.22 Str.251 Str.252; + if Str.446 then + ret Str.251; else - ret Str.154; - -procedure Str.63 (Str.155, Str.156, Str.157): - let Str.158 : U64 = CallByName Str.36 Str.155; - let Str.159 : U64 = CallByName Str.36 Str.157; - let Str.312 : U64 = CallByName Num.53 Str.156 Str.159; - let Str.160 : U64 = CallByName Str.62 Str.312 Str.158; - let Str.311 : U64 = 0i64; - inc Str.157; - inc Str.155; - let Str.292 : {U64, Str, U64, Str, U64, U64} = Struct {Str.160, Str.155, Str.156, Str.157, Str.311, Str.159}; - let Str.291 : Int1 = CallByName Str.64 Str.292; - ret Str.291; - -procedure Str.64 (Str.161): - let Str.167 : U64 = StructAtIndex 0 Str.161; - let Str.162 : Str = StructAtIndex 1 Str.161; - let Str.163 : U64 = StructAtIndex 2 Str.161; - let Str.164 : Str = StructAtIndex 3 Str.161; - let Str.165 : U64 = StructAtIndex 4 Str.161; - let Str.166 : U64 = StructAtIndex 5 Str.161; - let Str.168 : Int1 = CallByName Num.25 Str.163 Str.167; - if Str.168 then - dec Str.162; - dec Str.164; - let Str.169 : Int1 = CallByName Bool.9 Str.165 Str.166; - ret Str.169; + ret Str.252; + +procedure Str.68 (Str.253, Str.254, Str.255): + let Str.256 : U64 = CallByName Str.36 Str.253; + let Str.257 : U64 = CallByName Str.36 Str.255; + let Str.444 : U64 = CallByName Num.53 Str.254 Str.257; + let Str.258 : U64 = CallByName Str.67 Str.444 Str.256; + let Str.443 : U64 = 0i64; + inc Str.255; + inc Str.253; + let Str.424 : {U64, Str, U64, Str, U64, U64} = Struct {Str.258, Str.253, Str.254, Str.255, Str.443, Str.257}; + let Str.423 : Int1 = CallByName Str.69 Str.424; + ret Str.423; + +procedure Str.69 (Str.259): + let Str.265 : U64 = StructAtIndex 0 Str.259; + let Str.260 : Str = StructAtIndex 1 Str.259; + let Str.261 : U64 = StructAtIndex 2 Str.259; + let Str.262 : Str = StructAtIndex 3 Str.259; + let Str.263 : U64 = StructAtIndex 4 Str.259; + let Str.264 : U64 = StructAtIndex 5 Str.259; + let Str.266 : Int1 = CallByName Num.25 Str.261 Str.265; + if Str.266 then + dec Str.262; + dec Str.260; + let Str.267 : Int1 = CallByName Bool.9 Str.263 Str.264; + ret Str.267; else - let Str.307 : U8 = CallByName Str.35 Str.162 Str.163; - let Str.308 : U8 = CallByName Str.35 Str.164 Str.165; - let Str.170 : Int1 = CallByName Bool.9 Str.307 Str.308; - let Str.297 : U64 = StructAtIndex 0 Str.161; - let Str.298 : Str = StructAtIndex 1 Str.161; - let Str.300 : Str = StructAtIndex 3 Str.161; - let Str.302 : U64 = StructAtIndex 5 Str.161; - let Str.306 : U64 = 1i64; - let Str.304 : U64 = CallByName Num.51 Str.165 Str.306; - let Str.305 : U64 = 1i64; - let Str.303 : U64 = CallByName Num.51 Str.163 Str.305; - let Str.296 : {U64, Str, U64, Str, U64, U64} = Struct {Str.297, Str.298, Str.303, Str.300, Str.304, Str.302}; - let Str.171 : Int1 = CallByName Str.64 Str.296; - if Str.170 then - ret Str.171; + let Str.439 : U8 = CallByName Str.35 Str.260 Str.261; + let Str.440 : U8 = CallByName Str.35 Str.262 Str.263; + let Str.268 : Int1 = CallByName Bool.9 Str.439 Str.440; + let Str.429 : U64 = StructAtIndex 0 Str.259; + let Str.430 : Str = StructAtIndex 1 Str.259; + let Str.432 : Str = StructAtIndex 3 Str.259; + let Str.434 : U64 = StructAtIndex 5 Str.259; + let Str.438 : U64 = 1i64; + let Str.436 : U64 = CallByName Num.51 Str.263 Str.438; + let Str.437 : U64 = 1i64; + let Str.435 : U64 = CallByName Num.51 Str.261 Str.437; + let Str.428 : {U64, Str, U64, Str, U64, U64} = Struct {Str.429, Str.430, Str.435, Str.432, Str.436, Str.434}; + let Str.269 : Int1 = CallByName Str.69 Str.428; + if Str.268 then + ret Str.269; else - let Str.294 : Int1 = CallByName Bool.1; - ret Str.294; + let Str.426 : Int1 = CallByName Bool.1; + ret Str.426; procedure Test.0 (): let Test.8 : Str = "a"; diff --git a/crates/compiler/test_mono/generated/inspect_derived_list.txt b/crates/compiler/test_mono/generated/inspect_derived_list.txt index 9e3ee2a89d..8e8fb6bf58 100644 --- a/crates/compiler/test_mono/generated/inspect_derived_list.txt +++ b/crates/compiler/test_mono/generated/inspect_derived_list.txt @@ -163,8 +163,8 @@ procedure Num.96 (#Attr.2): ret Num.283; procedure Str.3 (#Attr.2, #Attr.3): - let Str.248 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.248; + let Str.380 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.380; procedure Test.0 (): let Test.2 : List I64 = Array [1i64, 2i64, 3i64]; diff --git a/crates/compiler/test_mono/generated/inspect_derived_nested_record_string.txt b/crates/compiler/test_mono/generated/inspect_derived_nested_record_string.txt index f3b43627d4..6950187ead 100644 --- a/crates/compiler/test_mono/generated/inspect_derived_nested_record_string.txt +++ b/crates/compiler/test_mono/generated/inspect_derived_nested_record_string.txt @@ -322,184 +322,184 @@ procedure Num.77 (#Attr.2, #Attr.3): ret Num.295; procedure Str.20 (#Attr.2): - let Str.317 : Str = lowlevel StrWithCapacity #Attr.2; - ret Str.317; + let Str.449 : Str = lowlevel StrWithCapacity #Attr.2; + ret Str.449; procedure Str.3 (#Attr.2, #Attr.3): - let Str.249 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.249; + let Str.381 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.381; procedure Str.35 (#Attr.2, #Attr.3): - let Str.307 : U8 = lowlevel StrGetUnsafe #Attr.2 #Attr.3; - ret Str.307; + let Str.439 : U8 = lowlevel StrGetUnsafe #Attr.2 #Attr.3; + ret Str.439; procedure Str.36 (#Attr.2): - let Str.269 : U64 = lowlevel StrCountUtf8Bytes #Attr.2; - ret Str.269; + let Str.401 : U64 = lowlevel StrCountUtf8Bytes #Attr.2; + ret Str.401; procedure Str.37 (#Attr.2, #Attr.3, #Attr.4): - let Str.267 : Str = lowlevel StrSubstringUnsafe #Attr.2 #Attr.3 #Attr.4; - ret Str.267; - -procedure Str.38 (Str.113, Str.114): - let Str.263 : [C , C U64] = CallByName Str.58 Str.113 Str.114; - let Str.276 : U8 = 1i64; - let Str.277 : U8 = GetTagId Str.263; - let Str.278 : Int1 = lowlevel Eq Str.276 Str.277; - if Str.278 then - let Str.115 : U64 = UnionAtIndex (Id 1) (Index 0) Str.263; - let Str.272 : U64 = CallByName Str.36 Str.113; - let Str.273 : U64 = CallByName Str.36 Str.114; - let Str.271 : U64 = CallByName Num.20 Str.272 Str.273; - let Str.116 : U64 = CallByName Num.20 Str.271 Str.115; - let Str.270 : U64 = 0i64; - inc Str.113; - let Str.117 : Str = CallByName Str.37 Str.113 Str.270 Str.115; - let Str.268 : U64 = CallByName Str.36 Str.114; - let Str.266 : U64 = CallByName Num.51 Str.115 Str.268; - let Str.118 : Str = CallByName Str.37 Str.113 Str.266 Str.116; - let Str.265 : {Str, Str} = Struct {Str.118, Str.117}; - let Str.264 : [C {}, C {Str, Str}] = TagId(1) Str.265; - ret Str.264; + let Str.399 : Str = lowlevel StrSubstringUnsafe #Attr.2 #Attr.3 #Attr.4; + ret Str.399; + +procedure Str.38 (Str.211, Str.212): + let Str.395 : [C , C U64] = CallByName Str.63 Str.211 Str.212; + let Str.408 : U8 = 1i64; + let Str.409 : U8 = GetTagId Str.395; + let Str.410 : Int1 = lowlevel Eq Str.408 Str.409; + if Str.410 then + let Str.213 : U64 = UnionAtIndex (Id 1) (Index 0) Str.395; + let Str.404 : U64 = CallByName Str.36 Str.211; + let Str.405 : U64 = CallByName Str.36 Str.212; + let Str.403 : U64 = CallByName Num.20 Str.404 Str.405; + let Str.214 : U64 = CallByName Num.20 Str.403 Str.213; + let Str.402 : U64 = 0i64; + inc Str.211; + let Str.215 : Str = CallByName Str.37 Str.211 Str.402 Str.213; + let Str.400 : U64 = CallByName Str.36 Str.212; + let Str.398 : U64 = CallByName Num.51 Str.213 Str.400; + let Str.216 : Str = CallByName Str.37 Str.211 Str.398 Str.214; + let Str.397 : {Str, Str} = Struct {Str.216, Str.215}; + let Str.396 : [C {}, C {Str, Str}] = TagId(1) Str.397; + ret Str.396; else - dec Str.113; - let Str.275 : {} = Struct {}; - let Str.274 : [C {}, C {Str, Str}] = TagId(0) Str.275; - ret Str.274; - -procedure Str.45 (Str.92, Str.93, Str.94): - inc Str.92; - let Str.345 : [C {}, C {Str, Str}] = CallByName Str.38 Str.92 Str.93; - let Str.353 : U8 = 1i64; - let Str.354 : U8 = GetTagId Str.345; - let Str.355 : Int1 = lowlevel Eq Str.353 Str.354; - if Str.355 then - let Str.352 : {Str, Str} = UnionAtIndex (Id 1) (Index 0) Str.345; - let Str.96 : Str = StructAtIndex 0 Str.352; - let Str.95 : Str = StructAtIndex 1 Str.352; - let Str.350 : U64 = CallByName Str.36 Str.92; - dec Str.92; - let Str.349 : Str = CallByName Str.20 Str.350; - let Str.348 : Str = CallByName Str.3 Str.349 Str.95; - dec Str.95; - let Str.347 : Str = CallByName Str.3 Str.348 Str.94; - let Str.346 : Str = CallByName Str.57 Str.347 Str.96 Str.93 Str.94; - ret Str.346; + dec Str.211; + let Str.407 : {} = Struct {}; + let Str.406 : [C {}, C {Str, Str}] = TagId(0) Str.407; + ret Str.406; + +procedure Str.45 (Str.190, Str.191, Str.192): + inc Str.190; + let Str.477 : [C {}, C {Str, Str}] = CallByName Str.38 Str.190 Str.191; + let Str.485 : U8 = 1i64; + let Str.486 : U8 = GetTagId Str.477; + let Str.487 : Int1 = lowlevel Eq Str.485 Str.486; + if Str.487 then + let Str.484 : {Str, Str} = UnionAtIndex (Id 1) (Index 0) Str.477; + let Str.194 : Str = StructAtIndex 0 Str.484; + let Str.193 : Str = StructAtIndex 1 Str.484; + let Str.482 : U64 = CallByName Str.36 Str.190; + dec Str.190; + let Str.481 : Str = CallByName Str.20 Str.482; + let Str.480 : Str = CallByName Str.3 Str.481 Str.193; + dec Str.193; + let Str.479 : Str = CallByName Str.3 Str.480 Str.192; + let Str.478 : Str = CallByName Str.62 Str.479 Str.194 Str.191 Str.192; + ret Str.478; else - dec Str.345; - ret Str.92; - -procedure Str.57 (#Derived_gen.24, #Derived_gen.25, #Derived_gen.26, #Derived_gen.27): - joinpoint Str.253 Str.97 Str.98 Str.99 Str.100: - inc Str.98; - let Str.254 : [C {}, C {Str, Str}] = CallByName Str.38 Str.98 Str.99; - let Str.260 : U8 = 1i64; - let Str.261 : U8 = GetTagId Str.254; - let Str.262 : Int1 = lowlevel Eq Str.260 Str.261; - if Str.262 then - dec Str.98; - let Str.259 : {Str, Str} = UnionAtIndex (Id 1) (Index 0) Str.254; - let Str.102 : Str = StructAtIndex 0 Str.259; - let Str.101 : Str = StructAtIndex 1 Str.259; - let Str.257 : Str = CallByName Str.3 Str.97 Str.101; - dec Str.101; - let Str.256 : Str = CallByName Str.3 Str.257 Str.100; - jump Str.253 Str.256 Str.102 Str.99 Str.100; + dec Str.477; + ret Str.190; + +procedure Str.62 (#Derived_gen.24, #Derived_gen.25, #Derived_gen.26, #Derived_gen.27): + joinpoint Str.385 Str.195 Str.196 Str.197 Str.198: + inc Str.196; + let Str.386 : [C {}, C {Str, Str}] = CallByName Str.38 Str.196 Str.197; + let Str.392 : U8 = 1i64; + let Str.393 : U8 = GetTagId Str.386; + let Str.394 : Int1 = lowlevel Eq Str.392 Str.393; + if Str.394 then + dec Str.196; + let Str.391 : {Str, Str} = UnionAtIndex (Id 1) (Index 0) Str.386; + let Str.200 : Str = StructAtIndex 0 Str.391; + let Str.199 : Str = StructAtIndex 1 Str.391; + let Str.389 : Str = CallByName Str.3 Str.195 Str.199; + dec Str.199; + let Str.388 : Str = CallByName Str.3 Str.389 Str.198; + jump Str.385 Str.388 Str.200 Str.197 Str.198; else - dec Str.100; - dec Str.99; - dec Str.254; - let Str.258 : Str = CallByName Str.3 Str.97 Str.98; - dec Str.98; - ret Str.258; + dec Str.198; + dec Str.386; + dec Str.197; + let Str.390 : Str = CallByName Str.3 Str.195 Str.196; + dec Str.196; + ret Str.390; in inc #Derived_gen.27; inc #Derived_gen.26; - jump Str.253 #Derived_gen.24 #Derived_gen.25 #Derived_gen.26 #Derived_gen.27; - -procedure Str.58 (Str.122, Str.123): - let Str.124 : U64 = CallByName Str.36 Str.122; - let Str.125 : U64 = CallByName Str.36 Str.123; - let Str.126 : U64 = CallByName Num.77 Str.124 Str.125; - let Str.280 : U64 = 0i64; - let Str.279 : [C , C U64] = CallByName Str.59 Str.122 Str.123 Str.280 Str.126; - ret Str.279; - -procedure Str.59 (#Derived_gen.28, #Derived_gen.29, #Derived_gen.30, #Derived_gen.31): - joinpoint Str.281 Str.127 Str.128 Str.129 Str.130: - let Str.283 : Int1 = CallByName Num.23 Str.129 Str.130; - if Str.283 then - let Str.287 : Int1 = CallByName Str.63 Str.127 Str.129 Str.128; - if Str.287 then - dec Str.127; - dec Str.128; - let Str.288 : [C , C U64] = TagId(1) Str.129; - ret Str.288; + jump Str.385 #Derived_gen.24 #Derived_gen.25 #Derived_gen.26 #Derived_gen.27; + +procedure Str.63 (Str.220, Str.221): + let Str.222 : U64 = CallByName Str.36 Str.220; + let Str.223 : U64 = CallByName Str.36 Str.221; + let Str.224 : U64 = CallByName Num.77 Str.222 Str.223; + let Str.412 : U64 = 0i64; + let Str.411 : [C , C U64] = CallByName Str.64 Str.220 Str.221 Str.412 Str.224; + ret Str.411; + +procedure Str.64 (#Derived_gen.28, #Derived_gen.29, #Derived_gen.30, #Derived_gen.31): + joinpoint Str.413 Str.225 Str.226 Str.227 Str.228: + let Str.415 : Int1 = CallByName Num.23 Str.227 Str.228; + if Str.415 then + let Str.419 : Int1 = CallByName Str.68 Str.225 Str.227 Str.226; + if Str.419 then + dec Str.226; + dec Str.225; + let Str.420 : [C , C U64] = TagId(1) Str.227; + ret Str.420; else - let Str.286 : U64 = 1i64; - let Str.285 : U64 = CallByName Num.51 Str.129 Str.286; - jump Str.281 Str.127 Str.128 Str.285 Str.130; + let Str.418 : U64 = 1i64; + let Str.417 : U64 = CallByName Num.51 Str.227 Str.418; + jump Str.413 Str.225 Str.226 Str.417 Str.228; else - dec Str.127; - dec Str.128; - let Str.282 : [C , C U64] = TagId(0) ; - ret Str.282; + dec Str.226; + dec Str.225; + let Str.414 : [C , C U64] = TagId(0) ; + ret Str.414; in inc #Derived_gen.29; inc #Derived_gen.28; - jump Str.281 #Derived_gen.28 #Derived_gen.29 #Derived_gen.30 #Derived_gen.31; + jump Str.413 #Derived_gen.28 #Derived_gen.29 #Derived_gen.30 #Derived_gen.31; -procedure Str.62 (Str.153, Str.154): - let Str.312 : Int1 = CallByName Num.22 Str.153 Str.154; - if Str.312 then - ret Str.153; +procedure Str.67 (Str.251, Str.252): + let Str.444 : Int1 = CallByName Num.22 Str.251 Str.252; + if Str.444 then + ret Str.251; else - ret Str.154; - -procedure Str.63 (Str.155, Str.156, Str.157): - let Str.158 : U64 = CallByName Str.36 Str.155; - let Str.159 : U64 = CallByName Str.36 Str.157; - let Str.310 : U64 = CallByName Num.53 Str.156 Str.159; - let Str.160 : U64 = CallByName Str.62 Str.310 Str.158; - let Str.309 : U64 = 0i64; - inc Str.157; - inc Str.155; - let Str.290 : {U64, Str, U64, Str, U64, U64} = Struct {Str.160, Str.155, Str.156, Str.157, Str.309, Str.159}; - let Str.289 : Int1 = CallByName Str.64 Str.290; - ret Str.289; - -procedure Str.64 (Str.161): - let Str.167 : U64 = StructAtIndex 0 Str.161; - let Str.162 : Str = StructAtIndex 1 Str.161; - let Str.163 : U64 = StructAtIndex 2 Str.161; - let Str.164 : Str = StructAtIndex 3 Str.161; - let Str.165 : U64 = StructAtIndex 4 Str.161; - let Str.166 : U64 = StructAtIndex 5 Str.161; - let Str.168 : Int1 = CallByName Num.25 Str.163 Str.167; - if Str.168 then - dec Str.162; - dec Str.164; - let Str.169 : Int1 = CallByName Bool.9 Str.165 Str.166; - ret Str.169; + ret Str.252; + +procedure Str.68 (Str.253, Str.254, Str.255): + let Str.256 : U64 = CallByName Str.36 Str.253; + let Str.257 : U64 = CallByName Str.36 Str.255; + let Str.442 : U64 = CallByName Num.53 Str.254 Str.257; + let Str.258 : U64 = CallByName Str.67 Str.442 Str.256; + let Str.441 : U64 = 0i64; + inc Str.255; + inc Str.253; + let Str.422 : {U64, Str, U64, Str, U64, U64} = Struct {Str.258, Str.253, Str.254, Str.255, Str.441, Str.257}; + let Str.421 : Int1 = CallByName Str.69 Str.422; + ret Str.421; + +procedure Str.69 (Str.259): + let Str.265 : U64 = StructAtIndex 0 Str.259; + let Str.260 : Str = StructAtIndex 1 Str.259; + let Str.261 : U64 = StructAtIndex 2 Str.259; + let Str.262 : Str = StructAtIndex 3 Str.259; + let Str.263 : U64 = StructAtIndex 4 Str.259; + let Str.264 : U64 = StructAtIndex 5 Str.259; + let Str.266 : Int1 = CallByName Num.25 Str.261 Str.265; + if Str.266 then + dec Str.262; + dec Str.260; + let Str.267 : Int1 = CallByName Bool.9 Str.263 Str.264; + ret Str.267; else - let Str.305 : U8 = CallByName Str.35 Str.162 Str.163; - let Str.306 : U8 = CallByName Str.35 Str.164 Str.165; - let Str.170 : Int1 = CallByName Bool.9 Str.305 Str.306; - let Str.295 : U64 = StructAtIndex 0 Str.161; - let Str.296 : Str = StructAtIndex 1 Str.161; - let Str.298 : Str = StructAtIndex 3 Str.161; - let Str.300 : U64 = StructAtIndex 5 Str.161; - let Str.304 : U64 = 1i64; - let Str.302 : U64 = CallByName Num.51 Str.165 Str.304; - let Str.303 : U64 = 1i64; - let Str.301 : U64 = CallByName Num.51 Str.163 Str.303; - let Str.294 : {U64, Str, U64, Str, U64, U64} = Struct {Str.295, Str.296, Str.301, Str.298, Str.302, Str.300}; - let Str.171 : Int1 = CallByName Str.64 Str.294; - if Str.170 then - ret Str.171; + let Str.437 : U8 = CallByName Str.35 Str.260 Str.261; + let Str.438 : U8 = CallByName Str.35 Str.262 Str.263; + let Str.268 : Int1 = CallByName Bool.9 Str.437 Str.438; + let Str.427 : U64 = StructAtIndex 0 Str.259; + let Str.428 : Str = StructAtIndex 1 Str.259; + let Str.430 : Str = StructAtIndex 3 Str.259; + let Str.432 : U64 = StructAtIndex 5 Str.259; + let Str.436 : U64 = 1i64; + let Str.434 : U64 = CallByName Num.51 Str.263 Str.436; + let Str.435 : U64 = 1i64; + let Str.433 : U64 = CallByName Num.51 Str.261 Str.435; + let Str.426 : {U64, Str, U64, Str, U64, U64} = Struct {Str.427, Str.428, Str.433, Str.430, Str.434, Str.432}; + let Str.269 : Int1 = CallByName Str.69 Str.426; + if Str.268 then + ret Str.269; else - let Str.292 : Int1 = CallByName Bool.1; - ret Str.292; + let Str.424 : Int1 = CallByName Bool.1; + ret Str.424; procedure Test.0 (): let Test.4 : Str = "bar"; diff --git a/crates/compiler/test_mono/generated/inspect_derived_record.txt b/crates/compiler/test_mono/generated/inspect_derived_record.txt index 155c6be33d..c4fbde56a4 100644 --- a/crates/compiler/test_mono/generated/inspect_derived_record.txt +++ b/crates/compiler/test_mono/generated/inspect_derived_record.txt @@ -198,8 +198,8 @@ procedure Num.96 (#Attr.2): ret Num.284; procedure Str.3 (#Attr.2, #Attr.3): - let Str.248 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.248; + let Str.380 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.380; procedure Test.0 (): let Test.3 : Decimal = 3dec; diff --git a/crates/compiler/test_mono/generated/inspect_derived_record_one_field_string.txt b/crates/compiler/test_mono/generated/inspect_derived_record_one_field_string.txt index 128095a818..62a10bc7a9 100644 --- a/crates/compiler/test_mono/generated/inspect_derived_record_one_field_string.txt +++ b/crates/compiler/test_mono/generated/inspect_derived_record_one_field_string.txt @@ -216,184 +216,184 @@ procedure Num.77 (#Attr.2, #Attr.3): ret Num.293; procedure Str.20 (#Attr.2): - let Str.316 : Str = lowlevel StrWithCapacity #Attr.2; - ret Str.316; + let Str.448 : Str = lowlevel StrWithCapacity #Attr.2; + ret Str.448; procedure Str.3 (#Attr.2, #Attr.3): - let Str.248 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.248; + let Str.380 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.380; procedure Str.35 (#Attr.2, #Attr.3): - let Str.306 : U8 = lowlevel StrGetUnsafe #Attr.2 #Attr.3; - ret Str.306; + let Str.438 : U8 = lowlevel StrGetUnsafe #Attr.2 #Attr.3; + ret Str.438; procedure Str.36 (#Attr.2): - let Str.268 : U64 = lowlevel StrCountUtf8Bytes #Attr.2; - ret Str.268; + let Str.400 : U64 = lowlevel StrCountUtf8Bytes #Attr.2; + ret Str.400; procedure Str.37 (#Attr.2, #Attr.3, #Attr.4): - let Str.266 : Str = lowlevel StrSubstringUnsafe #Attr.2 #Attr.3 #Attr.4; - ret Str.266; - -procedure Str.38 (Str.113, Str.114): - let Str.262 : [C , C U64] = CallByName Str.58 Str.113 Str.114; - let Str.275 : U8 = 1i64; - let Str.276 : U8 = GetTagId Str.262; - let Str.277 : Int1 = lowlevel Eq Str.275 Str.276; - if Str.277 then - let Str.115 : U64 = UnionAtIndex (Id 1) (Index 0) Str.262; - let Str.271 : U64 = CallByName Str.36 Str.113; - let Str.272 : U64 = CallByName Str.36 Str.114; - let Str.270 : U64 = CallByName Num.20 Str.271 Str.272; - let Str.116 : U64 = CallByName Num.20 Str.270 Str.115; - let Str.269 : U64 = 0i64; - inc Str.113; - let Str.117 : Str = CallByName Str.37 Str.113 Str.269 Str.115; - let Str.267 : U64 = CallByName Str.36 Str.114; - let Str.265 : U64 = CallByName Num.51 Str.115 Str.267; - let Str.118 : Str = CallByName Str.37 Str.113 Str.265 Str.116; - let Str.264 : {Str, Str} = Struct {Str.118, Str.117}; - let Str.263 : [C {}, C {Str, Str}] = TagId(1) Str.264; - ret Str.263; + let Str.398 : Str = lowlevel StrSubstringUnsafe #Attr.2 #Attr.3 #Attr.4; + ret Str.398; + +procedure Str.38 (Str.211, Str.212): + let Str.394 : [C , C U64] = CallByName Str.63 Str.211 Str.212; + let Str.407 : U8 = 1i64; + let Str.408 : U8 = GetTagId Str.394; + let Str.409 : Int1 = lowlevel Eq Str.407 Str.408; + if Str.409 then + let Str.213 : U64 = UnionAtIndex (Id 1) (Index 0) Str.394; + let Str.403 : U64 = CallByName Str.36 Str.211; + let Str.404 : U64 = CallByName Str.36 Str.212; + let Str.402 : U64 = CallByName Num.20 Str.403 Str.404; + let Str.214 : U64 = CallByName Num.20 Str.402 Str.213; + let Str.401 : U64 = 0i64; + inc Str.211; + let Str.215 : Str = CallByName Str.37 Str.211 Str.401 Str.213; + let Str.399 : U64 = CallByName Str.36 Str.212; + let Str.397 : U64 = CallByName Num.51 Str.213 Str.399; + let Str.216 : Str = CallByName Str.37 Str.211 Str.397 Str.214; + let Str.396 : {Str, Str} = Struct {Str.216, Str.215}; + let Str.395 : [C {}, C {Str, Str}] = TagId(1) Str.396; + ret Str.395; else - dec Str.113; - let Str.274 : {} = Struct {}; - let Str.273 : [C {}, C {Str, Str}] = TagId(0) Str.274; - ret Str.273; - -procedure Str.45 (Str.92, Str.93, Str.94): - inc Str.92; - let Str.344 : [C {}, C {Str, Str}] = CallByName Str.38 Str.92 Str.93; - let Str.352 : U8 = 1i64; - let Str.353 : U8 = GetTagId Str.344; - let Str.354 : Int1 = lowlevel Eq Str.352 Str.353; - if Str.354 then - let Str.351 : {Str, Str} = UnionAtIndex (Id 1) (Index 0) Str.344; - let Str.96 : Str = StructAtIndex 0 Str.351; - let Str.95 : Str = StructAtIndex 1 Str.351; - let Str.349 : U64 = CallByName Str.36 Str.92; - dec Str.92; - let Str.348 : Str = CallByName Str.20 Str.349; - let Str.347 : Str = CallByName Str.3 Str.348 Str.95; - dec Str.95; - let Str.346 : Str = CallByName Str.3 Str.347 Str.94; - let Str.345 : Str = CallByName Str.57 Str.346 Str.96 Str.93 Str.94; - ret Str.345; + dec Str.211; + let Str.406 : {} = Struct {}; + let Str.405 : [C {}, C {Str, Str}] = TagId(0) Str.406; + ret Str.405; + +procedure Str.45 (Str.190, Str.191, Str.192): + inc Str.190; + let Str.476 : [C {}, C {Str, Str}] = CallByName Str.38 Str.190 Str.191; + let Str.484 : U8 = 1i64; + let Str.485 : U8 = GetTagId Str.476; + let Str.486 : Int1 = lowlevel Eq Str.484 Str.485; + if Str.486 then + let Str.483 : {Str, Str} = UnionAtIndex (Id 1) (Index 0) Str.476; + let Str.194 : Str = StructAtIndex 0 Str.483; + let Str.193 : Str = StructAtIndex 1 Str.483; + let Str.481 : U64 = CallByName Str.36 Str.190; + dec Str.190; + let Str.480 : Str = CallByName Str.20 Str.481; + let Str.479 : Str = CallByName Str.3 Str.480 Str.193; + dec Str.193; + let Str.478 : Str = CallByName Str.3 Str.479 Str.192; + let Str.477 : Str = CallByName Str.62 Str.478 Str.194 Str.191 Str.192; + ret Str.477; else - dec Str.344; - ret Str.92; - -procedure Str.57 (#Derived_gen.12, #Derived_gen.13, #Derived_gen.14, #Derived_gen.15): - joinpoint Str.252 Str.97 Str.98 Str.99 Str.100: - inc Str.98; - let Str.253 : [C {}, C {Str, Str}] = CallByName Str.38 Str.98 Str.99; - let Str.259 : U8 = 1i64; - let Str.260 : U8 = GetTagId Str.253; - let Str.261 : Int1 = lowlevel Eq Str.259 Str.260; - if Str.261 then - dec Str.98; - let Str.258 : {Str, Str} = UnionAtIndex (Id 1) (Index 0) Str.253; - let Str.102 : Str = StructAtIndex 0 Str.258; - let Str.101 : Str = StructAtIndex 1 Str.258; - let Str.256 : Str = CallByName Str.3 Str.97 Str.101; - dec Str.101; - let Str.255 : Str = CallByName Str.3 Str.256 Str.100; - jump Str.252 Str.255 Str.102 Str.99 Str.100; + dec Str.476; + ret Str.190; + +procedure Str.62 (#Derived_gen.12, #Derived_gen.13, #Derived_gen.14, #Derived_gen.15): + joinpoint Str.384 Str.195 Str.196 Str.197 Str.198: + inc Str.196; + let Str.385 : [C {}, C {Str, Str}] = CallByName Str.38 Str.196 Str.197; + let Str.391 : U8 = 1i64; + let Str.392 : U8 = GetTagId Str.385; + let Str.393 : Int1 = lowlevel Eq Str.391 Str.392; + if Str.393 then + dec Str.196; + let Str.390 : {Str, Str} = UnionAtIndex (Id 1) (Index 0) Str.385; + let Str.200 : Str = StructAtIndex 0 Str.390; + let Str.199 : Str = StructAtIndex 1 Str.390; + let Str.388 : Str = CallByName Str.3 Str.195 Str.199; + dec Str.199; + let Str.387 : Str = CallByName Str.3 Str.388 Str.198; + jump Str.384 Str.387 Str.200 Str.197 Str.198; else - dec Str.100; - dec Str.99; - dec Str.253; - let Str.257 : Str = CallByName Str.3 Str.97 Str.98; - dec Str.98; - ret Str.257; + dec Str.385; + dec Str.198; + dec Str.197; + let Str.389 : Str = CallByName Str.3 Str.195 Str.196; + dec Str.196; + ret Str.389; in inc #Derived_gen.14; inc #Derived_gen.15; - jump Str.252 #Derived_gen.12 #Derived_gen.13 #Derived_gen.14 #Derived_gen.15; - -procedure Str.58 (Str.122, Str.123): - let Str.124 : U64 = CallByName Str.36 Str.122; - let Str.125 : U64 = CallByName Str.36 Str.123; - let Str.126 : U64 = CallByName Num.77 Str.124 Str.125; - let Str.279 : U64 = 0i64; - let Str.278 : [C , C U64] = CallByName Str.59 Str.122 Str.123 Str.279 Str.126; - ret Str.278; - -procedure Str.59 (#Derived_gen.16, #Derived_gen.17, #Derived_gen.18, #Derived_gen.19): - joinpoint Str.280 Str.127 Str.128 Str.129 Str.130: - let Str.282 : Int1 = CallByName Num.23 Str.129 Str.130; - if Str.282 then - let Str.286 : Int1 = CallByName Str.63 Str.127 Str.129 Str.128; - if Str.286 then - dec Str.127; - dec Str.128; - let Str.287 : [C , C U64] = TagId(1) Str.129; - ret Str.287; + jump Str.384 #Derived_gen.12 #Derived_gen.13 #Derived_gen.14 #Derived_gen.15; + +procedure Str.63 (Str.220, Str.221): + let Str.222 : U64 = CallByName Str.36 Str.220; + let Str.223 : U64 = CallByName Str.36 Str.221; + let Str.224 : U64 = CallByName Num.77 Str.222 Str.223; + let Str.411 : U64 = 0i64; + let Str.410 : [C , C U64] = CallByName Str.64 Str.220 Str.221 Str.411 Str.224; + ret Str.410; + +procedure Str.64 (#Derived_gen.16, #Derived_gen.17, #Derived_gen.18, #Derived_gen.19): + joinpoint Str.412 Str.225 Str.226 Str.227 Str.228: + let Str.414 : Int1 = CallByName Num.23 Str.227 Str.228; + if Str.414 then + let Str.418 : Int1 = CallByName Str.68 Str.225 Str.227 Str.226; + if Str.418 then + dec Str.226; + dec Str.225; + let Str.419 : [C , C U64] = TagId(1) Str.227; + ret Str.419; else - let Str.285 : U64 = 1i64; - let Str.284 : U64 = CallByName Num.51 Str.129 Str.285; - jump Str.280 Str.127 Str.128 Str.284 Str.130; + let Str.417 : U64 = 1i64; + let Str.416 : U64 = CallByName Num.51 Str.227 Str.417; + jump Str.412 Str.225 Str.226 Str.416 Str.228; else - dec Str.127; - dec Str.128; - let Str.281 : [C , C U64] = TagId(0) ; - ret Str.281; + dec Str.226; + dec Str.225; + let Str.413 : [C , C U64] = TagId(0) ; + ret Str.413; in inc #Derived_gen.17; inc #Derived_gen.16; - jump Str.280 #Derived_gen.16 #Derived_gen.17 #Derived_gen.18 #Derived_gen.19; + jump Str.412 #Derived_gen.16 #Derived_gen.17 #Derived_gen.18 #Derived_gen.19; -procedure Str.62 (Str.153, Str.154): - let Str.311 : Int1 = CallByName Num.22 Str.153 Str.154; - if Str.311 then - ret Str.153; +procedure Str.67 (Str.251, Str.252): + let Str.443 : Int1 = CallByName Num.22 Str.251 Str.252; + if Str.443 then + ret Str.251; else - ret Str.154; - -procedure Str.63 (Str.155, Str.156, Str.157): - let Str.158 : U64 = CallByName Str.36 Str.155; - let Str.159 : U64 = CallByName Str.36 Str.157; - let Str.309 : U64 = CallByName Num.53 Str.156 Str.159; - let Str.160 : U64 = CallByName Str.62 Str.309 Str.158; - let Str.308 : U64 = 0i64; - inc Str.157; - inc Str.155; - let Str.289 : {U64, Str, U64, Str, U64, U64} = Struct {Str.160, Str.155, Str.156, Str.157, Str.308, Str.159}; - let Str.288 : Int1 = CallByName Str.64 Str.289; - ret Str.288; - -procedure Str.64 (Str.161): - let Str.167 : U64 = StructAtIndex 0 Str.161; - let Str.162 : Str = StructAtIndex 1 Str.161; - let Str.163 : U64 = StructAtIndex 2 Str.161; - let Str.164 : Str = StructAtIndex 3 Str.161; - let Str.165 : U64 = StructAtIndex 4 Str.161; - let Str.166 : U64 = StructAtIndex 5 Str.161; - let Str.168 : Int1 = CallByName Num.25 Str.163 Str.167; - if Str.168 then - dec Str.162; - dec Str.164; - let Str.169 : Int1 = CallByName Bool.9 Str.165 Str.166; - ret Str.169; + ret Str.252; + +procedure Str.68 (Str.253, Str.254, Str.255): + let Str.256 : U64 = CallByName Str.36 Str.253; + let Str.257 : U64 = CallByName Str.36 Str.255; + let Str.441 : U64 = CallByName Num.53 Str.254 Str.257; + let Str.258 : U64 = CallByName Str.67 Str.441 Str.256; + let Str.440 : U64 = 0i64; + inc Str.255; + inc Str.253; + let Str.421 : {U64, Str, U64, Str, U64, U64} = Struct {Str.258, Str.253, Str.254, Str.255, Str.440, Str.257}; + let Str.420 : Int1 = CallByName Str.69 Str.421; + ret Str.420; + +procedure Str.69 (Str.259): + let Str.265 : U64 = StructAtIndex 0 Str.259; + let Str.260 : Str = StructAtIndex 1 Str.259; + let Str.261 : U64 = StructAtIndex 2 Str.259; + let Str.262 : Str = StructAtIndex 3 Str.259; + let Str.263 : U64 = StructAtIndex 4 Str.259; + let Str.264 : U64 = StructAtIndex 5 Str.259; + let Str.266 : Int1 = CallByName Num.25 Str.261 Str.265; + if Str.266 then + dec Str.262; + dec Str.260; + let Str.267 : Int1 = CallByName Bool.9 Str.263 Str.264; + ret Str.267; else - let Str.304 : U8 = CallByName Str.35 Str.162 Str.163; - let Str.305 : U8 = CallByName Str.35 Str.164 Str.165; - let Str.170 : Int1 = CallByName Bool.9 Str.304 Str.305; - let Str.294 : U64 = StructAtIndex 0 Str.161; - let Str.295 : Str = StructAtIndex 1 Str.161; - let Str.297 : Str = StructAtIndex 3 Str.161; - let Str.299 : U64 = StructAtIndex 5 Str.161; - let Str.303 : U64 = 1i64; - let Str.301 : U64 = CallByName Num.51 Str.165 Str.303; - let Str.302 : U64 = 1i64; - let Str.300 : U64 = CallByName Num.51 Str.163 Str.302; - let Str.293 : {U64, Str, U64, Str, U64, U64} = Struct {Str.294, Str.295, Str.300, Str.297, Str.301, Str.299}; - let Str.171 : Int1 = CallByName Str.64 Str.293; - if Str.170 then - ret Str.171; + let Str.436 : U8 = CallByName Str.35 Str.260 Str.261; + let Str.437 : U8 = CallByName Str.35 Str.262 Str.263; + let Str.268 : Int1 = CallByName Bool.9 Str.436 Str.437; + let Str.426 : U64 = StructAtIndex 0 Str.259; + let Str.427 : Str = StructAtIndex 1 Str.259; + let Str.429 : Str = StructAtIndex 3 Str.259; + let Str.431 : U64 = StructAtIndex 5 Str.259; + let Str.435 : U64 = 1i64; + let Str.433 : U64 = CallByName Num.51 Str.263 Str.435; + let Str.434 : U64 = 1i64; + let Str.432 : U64 = CallByName Num.51 Str.261 Str.434; + let Str.425 : {U64, Str, U64, Str, U64, U64} = Struct {Str.426, Str.427, Str.432, Str.429, Str.433, Str.431}; + let Str.269 : Int1 = CallByName Str.69 Str.425; + if Str.268 then + ret Str.269; else - let Str.291 : Int1 = CallByName Bool.1; - ret Str.291; + let Str.423 : Int1 = CallByName Bool.1; + ret Str.423; procedure Test.0 (): let Test.3 : Str = "foo"; diff --git a/crates/compiler/test_mono/generated/inspect_derived_record_two_field_strings.txt b/crates/compiler/test_mono/generated/inspect_derived_record_two_field_strings.txt index 7b67fec057..1644ebdbc5 100644 --- a/crates/compiler/test_mono/generated/inspect_derived_record_two_field_strings.txt +++ b/crates/compiler/test_mono/generated/inspect_derived_record_two_field_strings.txt @@ -223,184 +223,184 @@ procedure Num.77 (#Attr.2, #Attr.3): ret Num.293; procedure Str.20 (#Attr.2): - let Str.316 : Str = lowlevel StrWithCapacity #Attr.2; - ret Str.316; + let Str.448 : Str = lowlevel StrWithCapacity #Attr.2; + ret Str.448; procedure Str.3 (#Attr.2, #Attr.3): - let Str.248 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.248; + let Str.380 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.380; procedure Str.35 (#Attr.2, #Attr.3): - let Str.306 : U8 = lowlevel StrGetUnsafe #Attr.2 #Attr.3; - ret Str.306; + let Str.438 : U8 = lowlevel StrGetUnsafe #Attr.2 #Attr.3; + ret Str.438; procedure Str.36 (#Attr.2): - let Str.268 : U64 = lowlevel StrCountUtf8Bytes #Attr.2; - ret Str.268; + let Str.400 : U64 = lowlevel StrCountUtf8Bytes #Attr.2; + ret Str.400; procedure Str.37 (#Attr.2, #Attr.3, #Attr.4): - let Str.266 : Str = lowlevel StrSubstringUnsafe #Attr.2 #Attr.3 #Attr.4; - ret Str.266; - -procedure Str.38 (Str.113, Str.114): - let Str.262 : [C , C U64] = CallByName Str.58 Str.113 Str.114; - let Str.275 : U8 = 1i64; - let Str.276 : U8 = GetTagId Str.262; - let Str.277 : Int1 = lowlevel Eq Str.275 Str.276; - if Str.277 then - let Str.115 : U64 = UnionAtIndex (Id 1) (Index 0) Str.262; - let Str.271 : U64 = CallByName Str.36 Str.113; - let Str.272 : U64 = CallByName Str.36 Str.114; - let Str.270 : U64 = CallByName Num.20 Str.271 Str.272; - let Str.116 : U64 = CallByName Num.20 Str.270 Str.115; - let Str.269 : U64 = 0i64; - inc Str.113; - let Str.117 : Str = CallByName Str.37 Str.113 Str.269 Str.115; - let Str.267 : U64 = CallByName Str.36 Str.114; - let Str.265 : U64 = CallByName Num.51 Str.115 Str.267; - let Str.118 : Str = CallByName Str.37 Str.113 Str.265 Str.116; - let Str.264 : {Str, Str} = Struct {Str.118, Str.117}; - let Str.263 : [C {}, C {Str, Str}] = TagId(1) Str.264; - ret Str.263; + let Str.398 : Str = lowlevel StrSubstringUnsafe #Attr.2 #Attr.3 #Attr.4; + ret Str.398; + +procedure Str.38 (Str.211, Str.212): + let Str.394 : [C , C U64] = CallByName Str.63 Str.211 Str.212; + let Str.407 : U8 = 1i64; + let Str.408 : U8 = GetTagId Str.394; + let Str.409 : Int1 = lowlevel Eq Str.407 Str.408; + if Str.409 then + let Str.213 : U64 = UnionAtIndex (Id 1) (Index 0) Str.394; + let Str.403 : U64 = CallByName Str.36 Str.211; + let Str.404 : U64 = CallByName Str.36 Str.212; + let Str.402 : U64 = CallByName Num.20 Str.403 Str.404; + let Str.214 : U64 = CallByName Num.20 Str.402 Str.213; + let Str.401 : U64 = 0i64; + inc Str.211; + let Str.215 : Str = CallByName Str.37 Str.211 Str.401 Str.213; + let Str.399 : U64 = CallByName Str.36 Str.212; + let Str.397 : U64 = CallByName Num.51 Str.213 Str.399; + let Str.216 : Str = CallByName Str.37 Str.211 Str.397 Str.214; + let Str.396 : {Str, Str} = Struct {Str.216, Str.215}; + let Str.395 : [C {}, C {Str, Str}] = TagId(1) Str.396; + ret Str.395; else - dec Str.113; - let Str.274 : {} = Struct {}; - let Str.273 : [C {}, C {Str, Str}] = TagId(0) Str.274; - ret Str.273; - -procedure Str.45 (Str.92, Str.93, Str.94): - inc Str.92; - let Str.388 : [C {}, C {Str, Str}] = CallByName Str.38 Str.92 Str.93; - let Str.396 : U8 = 1i64; - let Str.397 : U8 = GetTagId Str.388; - let Str.398 : Int1 = lowlevel Eq Str.396 Str.397; - if Str.398 then - let Str.395 : {Str, Str} = UnionAtIndex (Id 1) (Index 0) Str.388; - let Str.96 : Str = StructAtIndex 0 Str.395; - let Str.95 : Str = StructAtIndex 1 Str.395; - let Str.393 : U64 = CallByName Str.36 Str.92; - dec Str.92; - let Str.392 : Str = CallByName Str.20 Str.393; - let Str.391 : Str = CallByName Str.3 Str.392 Str.95; - dec Str.95; - let Str.390 : Str = CallByName Str.3 Str.391 Str.94; - let Str.389 : Str = CallByName Str.57 Str.390 Str.96 Str.93 Str.94; - ret Str.389; + dec Str.211; + let Str.406 : {} = Struct {}; + let Str.405 : [C {}, C {Str, Str}] = TagId(0) Str.406; + ret Str.405; + +procedure Str.45 (Str.190, Str.191, Str.192): + inc Str.190; + let Str.520 : [C {}, C {Str, Str}] = CallByName Str.38 Str.190 Str.191; + let Str.528 : U8 = 1i64; + let Str.529 : U8 = GetTagId Str.520; + let Str.530 : Int1 = lowlevel Eq Str.528 Str.529; + if Str.530 then + let Str.527 : {Str, Str} = UnionAtIndex (Id 1) (Index 0) Str.520; + let Str.194 : Str = StructAtIndex 0 Str.527; + let Str.193 : Str = StructAtIndex 1 Str.527; + let Str.525 : U64 = CallByName Str.36 Str.190; + dec Str.190; + let Str.524 : Str = CallByName Str.20 Str.525; + let Str.523 : Str = CallByName Str.3 Str.524 Str.193; + dec Str.193; + let Str.522 : Str = CallByName Str.3 Str.523 Str.192; + let Str.521 : Str = CallByName Str.62 Str.522 Str.194 Str.191 Str.192; + ret Str.521; else - dec Str.388; - ret Str.92; - -procedure Str.57 (#Derived_gen.16, #Derived_gen.17, #Derived_gen.18, #Derived_gen.19): - joinpoint Str.252 Str.97 Str.98 Str.99 Str.100: - inc Str.98; - let Str.253 : [C {}, C {Str, Str}] = CallByName Str.38 Str.98 Str.99; - let Str.259 : U8 = 1i64; - let Str.260 : U8 = GetTagId Str.253; - let Str.261 : Int1 = lowlevel Eq Str.259 Str.260; - if Str.261 then - dec Str.98; - let Str.258 : {Str, Str} = UnionAtIndex (Id 1) (Index 0) Str.253; - let Str.102 : Str = StructAtIndex 0 Str.258; - let Str.101 : Str = StructAtIndex 1 Str.258; - let Str.256 : Str = CallByName Str.3 Str.97 Str.101; - dec Str.101; - let Str.255 : Str = CallByName Str.3 Str.256 Str.100; - jump Str.252 Str.255 Str.102 Str.99 Str.100; + dec Str.520; + ret Str.190; + +procedure Str.62 (#Derived_gen.16, #Derived_gen.17, #Derived_gen.18, #Derived_gen.19): + joinpoint Str.384 Str.195 Str.196 Str.197 Str.198: + inc Str.196; + let Str.385 : [C {}, C {Str, Str}] = CallByName Str.38 Str.196 Str.197; + let Str.391 : U8 = 1i64; + let Str.392 : U8 = GetTagId Str.385; + let Str.393 : Int1 = lowlevel Eq Str.391 Str.392; + if Str.393 then + dec Str.196; + let Str.390 : {Str, Str} = UnionAtIndex (Id 1) (Index 0) Str.385; + let Str.200 : Str = StructAtIndex 0 Str.390; + let Str.199 : Str = StructAtIndex 1 Str.390; + let Str.388 : Str = CallByName Str.3 Str.195 Str.199; + dec Str.199; + let Str.387 : Str = CallByName Str.3 Str.388 Str.198; + jump Str.384 Str.387 Str.200 Str.197 Str.198; else - dec Str.100; - dec Str.99; - dec Str.253; - let Str.257 : Str = CallByName Str.3 Str.97 Str.98; - dec Str.98; - ret Str.257; + dec Str.385; + dec Str.198; + dec Str.197; + let Str.389 : Str = CallByName Str.3 Str.195 Str.196; + dec Str.196; + ret Str.389; in inc #Derived_gen.18; inc #Derived_gen.19; - jump Str.252 #Derived_gen.16 #Derived_gen.17 #Derived_gen.18 #Derived_gen.19; - -procedure Str.58 (Str.122, Str.123): - let Str.124 : U64 = CallByName Str.36 Str.122; - let Str.125 : U64 = CallByName Str.36 Str.123; - let Str.126 : U64 = CallByName Num.77 Str.124 Str.125; - let Str.279 : U64 = 0i64; - let Str.278 : [C , C U64] = CallByName Str.59 Str.122 Str.123 Str.279 Str.126; - ret Str.278; - -procedure Str.59 (#Derived_gen.20, #Derived_gen.21, #Derived_gen.22, #Derived_gen.23): - joinpoint Str.280 Str.127 Str.128 Str.129 Str.130: - let Str.282 : Int1 = CallByName Num.23 Str.129 Str.130; - if Str.282 then - let Str.286 : Int1 = CallByName Str.63 Str.127 Str.129 Str.128; - if Str.286 then - dec Str.127; - dec Str.128; - let Str.287 : [C , C U64] = TagId(1) Str.129; - ret Str.287; + jump Str.384 #Derived_gen.16 #Derived_gen.17 #Derived_gen.18 #Derived_gen.19; + +procedure Str.63 (Str.220, Str.221): + let Str.222 : U64 = CallByName Str.36 Str.220; + let Str.223 : U64 = CallByName Str.36 Str.221; + let Str.224 : U64 = CallByName Num.77 Str.222 Str.223; + let Str.411 : U64 = 0i64; + let Str.410 : [C , C U64] = CallByName Str.64 Str.220 Str.221 Str.411 Str.224; + ret Str.410; + +procedure Str.64 (#Derived_gen.20, #Derived_gen.21, #Derived_gen.22, #Derived_gen.23): + joinpoint Str.412 Str.225 Str.226 Str.227 Str.228: + let Str.414 : Int1 = CallByName Num.23 Str.227 Str.228; + if Str.414 then + let Str.418 : Int1 = CallByName Str.68 Str.225 Str.227 Str.226; + if Str.418 then + dec Str.226; + dec Str.225; + let Str.419 : [C , C U64] = TagId(1) Str.227; + ret Str.419; else - let Str.285 : U64 = 1i64; - let Str.284 : U64 = CallByName Num.51 Str.129 Str.285; - jump Str.280 Str.127 Str.128 Str.284 Str.130; + let Str.417 : U64 = 1i64; + let Str.416 : U64 = CallByName Num.51 Str.227 Str.417; + jump Str.412 Str.225 Str.226 Str.416 Str.228; else - dec Str.127; - dec Str.128; - let Str.281 : [C , C U64] = TagId(0) ; - ret Str.281; + dec Str.226; + dec Str.225; + let Str.413 : [C , C U64] = TagId(0) ; + ret Str.413; in inc #Derived_gen.20; inc #Derived_gen.21; - jump Str.280 #Derived_gen.20 #Derived_gen.21 #Derived_gen.22 #Derived_gen.23; + jump Str.412 #Derived_gen.20 #Derived_gen.21 #Derived_gen.22 #Derived_gen.23; -procedure Str.62 (Str.153, Str.154): - let Str.311 : Int1 = CallByName Num.22 Str.153 Str.154; - if Str.311 then - ret Str.153; +procedure Str.67 (Str.251, Str.252): + let Str.443 : Int1 = CallByName Num.22 Str.251 Str.252; + if Str.443 then + ret Str.251; else - ret Str.154; - -procedure Str.63 (Str.155, Str.156, Str.157): - let Str.158 : U64 = CallByName Str.36 Str.155; - let Str.159 : U64 = CallByName Str.36 Str.157; - let Str.309 : U64 = CallByName Num.53 Str.156 Str.159; - let Str.160 : U64 = CallByName Str.62 Str.309 Str.158; - let Str.308 : U64 = 0i64; - inc Str.157; - inc Str.155; - let Str.289 : {U64, Str, U64, Str, U64, U64} = Struct {Str.160, Str.155, Str.156, Str.157, Str.308, Str.159}; - let Str.288 : Int1 = CallByName Str.64 Str.289; - ret Str.288; - -procedure Str.64 (Str.161): - let Str.167 : U64 = StructAtIndex 0 Str.161; - let Str.162 : Str = StructAtIndex 1 Str.161; - let Str.163 : U64 = StructAtIndex 2 Str.161; - let Str.164 : Str = StructAtIndex 3 Str.161; - let Str.165 : U64 = StructAtIndex 4 Str.161; - let Str.166 : U64 = StructAtIndex 5 Str.161; - let Str.168 : Int1 = CallByName Num.25 Str.163 Str.167; - if Str.168 then - dec Str.162; - dec Str.164; - let Str.169 : Int1 = CallByName Bool.9 Str.165 Str.166; - ret Str.169; + ret Str.252; + +procedure Str.68 (Str.253, Str.254, Str.255): + let Str.256 : U64 = CallByName Str.36 Str.253; + let Str.257 : U64 = CallByName Str.36 Str.255; + let Str.441 : U64 = CallByName Num.53 Str.254 Str.257; + let Str.258 : U64 = CallByName Str.67 Str.441 Str.256; + let Str.440 : U64 = 0i64; + inc Str.255; + inc Str.253; + let Str.421 : {U64, Str, U64, Str, U64, U64} = Struct {Str.258, Str.253, Str.254, Str.255, Str.440, Str.257}; + let Str.420 : Int1 = CallByName Str.69 Str.421; + ret Str.420; + +procedure Str.69 (Str.259): + let Str.265 : U64 = StructAtIndex 0 Str.259; + let Str.260 : Str = StructAtIndex 1 Str.259; + let Str.261 : U64 = StructAtIndex 2 Str.259; + let Str.262 : Str = StructAtIndex 3 Str.259; + let Str.263 : U64 = StructAtIndex 4 Str.259; + let Str.264 : U64 = StructAtIndex 5 Str.259; + let Str.266 : Int1 = CallByName Num.25 Str.261 Str.265; + if Str.266 then + dec Str.262; + dec Str.260; + let Str.267 : Int1 = CallByName Bool.9 Str.263 Str.264; + ret Str.267; else - let Str.304 : U8 = CallByName Str.35 Str.162 Str.163; - let Str.305 : U8 = CallByName Str.35 Str.164 Str.165; - let Str.170 : Int1 = CallByName Bool.9 Str.304 Str.305; - let Str.294 : U64 = StructAtIndex 0 Str.161; - let Str.295 : Str = StructAtIndex 1 Str.161; - let Str.297 : Str = StructAtIndex 3 Str.161; - let Str.299 : U64 = StructAtIndex 5 Str.161; - let Str.303 : U64 = 1i64; - let Str.301 : U64 = CallByName Num.51 Str.165 Str.303; - let Str.302 : U64 = 1i64; - let Str.300 : U64 = CallByName Num.51 Str.163 Str.302; - let Str.293 : {U64, Str, U64, Str, U64, U64} = Struct {Str.294, Str.295, Str.300, Str.297, Str.301, Str.299}; - let Str.171 : Int1 = CallByName Str.64 Str.293; - if Str.170 then - ret Str.171; + let Str.436 : U8 = CallByName Str.35 Str.260 Str.261; + let Str.437 : U8 = CallByName Str.35 Str.262 Str.263; + let Str.268 : Int1 = CallByName Bool.9 Str.436 Str.437; + let Str.426 : U64 = StructAtIndex 0 Str.259; + let Str.427 : Str = StructAtIndex 1 Str.259; + let Str.429 : Str = StructAtIndex 3 Str.259; + let Str.431 : U64 = StructAtIndex 5 Str.259; + let Str.435 : U64 = 1i64; + let Str.433 : U64 = CallByName Num.51 Str.263 Str.435; + let Str.434 : U64 = 1i64; + let Str.432 : U64 = CallByName Num.51 Str.261 Str.434; + let Str.425 : {U64, Str, U64, Str, U64, U64} = Struct {Str.426, Str.427, Str.432, Str.429, Str.433, Str.431}; + let Str.269 : Int1 = CallByName Str.69 Str.425; + if Str.268 then + ret Str.269; else - let Str.291 : Int1 = CallByName Bool.1; - ret Str.291; + let Str.423 : Int1 = CallByName Bool.1; + ret Str.423; procedure Test.0 (): let Test.3 : Str = "foo"; diff --git a/crates/compiler/test_mono/generated/inspect_derived_string.txt b/crates/compiler/test_mono/generated/inspect_derived_string.txt index 18f3af890d..80b2e53b96 100644 --- a/crates/compiler/test_mono/generated/inspect_derived_string.txt +++ b/crates/compiler/test_mono/generated/inspect_derived_string.txt @@ -100,184 +100,184 @@ procedure Num.77 (#Attr.2, #Attr.3): ret Num.293; procedure Str.20 (#Attr.2): - let Str.316 : Str = lowlevel StrWithCapacity #Attr.2; - ret Str.316; + let Str.448 : Str = lowlevel StrWithCapacity #Attr.2; + ret Str.448; procedure Str.3 (#Attr.2, #Attr.3): - let Str.248 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.248; + let Str.380 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.380; procedure Str.35 (#Attr.2, #Attr.3): - let Str.306 : U8 = lowlevel StrGetUnsafe #Attr.2 #Attr.3; - ret Str.306; + let Str.438 : U8 = lowlevel StrGetUnsafe #Attr.2 #Attr.3; + ret Str.438; procedure Str.36 (#Attr.2): - let Str.268 : U64 = lowlevel StrCountUtf8Bytes #Attr.2; - ret Str.268; + let Str.400 : U64 = lowlevel StrCountUtf8Bytes #Attr.2; + ret Str.400; procedure Str.37 (#Attr.2, #Attr.3, #Attr.4): - let Str.266 : Str = lowlevel StrSubstringUnsafe #Attr.2 #Attr.3 #Attr.4; - ret Str.266; + let Str.398 : Str = lowlevel StrSubstringUnsafe #Attr.2 #Attr.3 #Attr.4; + ret Str.398; -procedure Str.38 (Str.113, Str.114): - let Str.262 : [C , C U64] = CallByName Str.58 Str.113 Str.114; - let Str.275 : U8 = 1i64; - let Str.276 : U8 = GetTagId Str.262; - let Str.277 : Int1 = lowlevel Eq Str.275 Str.276; - if Str.277 then - let Str.115 : U64 = UnionAtIndex (Id 1) (Index 0) Str.262; - let Str.271 : U64 = CallByName Str.36 Str.113; - let Str.272 : U64 = CallByName Str.36 Str.114; - let Str.270 : U64 = CallByName Num.20 Str.271 Str.272; - let Str.116 : U64 = CallByName Num.20 Str.270 Str.115; - let Str.269 : U64 = 0i64; - inc Str.113; - let Str.117 : Str = CallByName Str.37 Str.113 Str.269 Str.115; - let Str.267 : U64 = CallByName Str.36 Str.114; - let Str.265 : U64 = CallByName Num.51 Str.115 Str.267; - let Str.118 : Str = CallByName Str.37 Str.113 Str.265 Str.116; - let Str.264 : {Str, Str} = Struct {Str.118, Str.117}; - let Str.263 : [C {}, C {Str, Str}] = TagId(1) Str.264; - ret Str.263; +procedure Str.38 (Str.211, Str.212): + let Str.394 : [C , C U64] = CallByName Str.63 Str.211 Str.212; + let Str.407 : U8 = 1i64; + let Str.408 : U8 = GetTagId Str.394; + let Str.409 : Int1 = lowlevel Eq Str.407 Str.408; + if Str.409 then + let Str.213 : U64 = UnionAtIndex (Id 1) (Index 0) Str.394; + let Str.403 : U64 = CallByName Str.36 Str.211; + let Str.404 : U64 = CallByName Str.36 Str.212; + let Str.402 : U64 = CallByName Num.20 Str.403 Str.404; + let Str.214 : U64 = CallByName Num.20 Str.402 Str.213; + let Str.401 : U64 = 0i64; + inc Str.211; + let Str.215 : Str = CallByName Str.37 Str.211 Str.401 Str.213; + let Str.399 : U64 = CallByName Str.36 Str.212; + let Str.397 : U64 = CallByName Num.51 Str.213 Str.399; + let Str.216 : Str = CallByName Str.37 Str.211 Str.397 Str.214; + let Str.396 : {Str, Str} = Struct {Str.216, Str.215}; + let Str.395 : [C {}, C {Str, Str}] = TagId(1) Str.396; + ret Str.395; else - dec Str.113; - let Str.274 : {} = Struct {}; - let Str.273 : [C {}, C {Str, Str}] = TagId(0) Str.274; - ret Str.273; + dec Str.211; + let Str.406 : {} = Struct {}; + let Str.405 : [C {}, C {Str, Str}] = TagId(0) Str.406; + ret Str.405; -procedure Str.45 (Str.92, Str.93, Str.94): - inc Str.92; - let Str.344 : [C {}, C {Str, Str}] = CallByName Str.38 Str.92 Str.93; - let Str.352 : U8 = 1i64; - let Str.353 : U8 = GetTagId Str.344; - let Str.354 : Int1 = lowlevel Eq Str.352 Str.353; - if Str.354 then - let Str.351 : {Str, Str} = UnionAtIndex (Id 1) (Index 0) Str.344; - let Str.96 : Str = StructAtIndex 0 Str.351; - let Str.95 : Str = StructAtIndex 1 Str.351; - let Str.349 : U64 = CallByName Str.36 Str.92; - dec Str.92; - let Str.348 : Str = CallByName Str.20 Str.349; - let Str.347 : Str = CallByName Str.3 Str.348 Str.95; - dec Str.95; - let Str.346 : Str = CallByName Str.3 Str.347 Str.94; - let Str.345 : Str = CallByName Str.57 Str.346 Str.96 Str.93 Str.94; - ret Str.345; +procedure Str.45 (Str.190, Str.191, Str.192): + inc Str.190; + let Str.476 : [C {}, C {Str, Str}] = CallByName Str.38 Str.190 Str.191; + let Str.484 : U8 = 1i64; + let Str.485 : U8 = GetTagId Str.476; + let Str.486 : Int1 = lowlevel Eq Str.484 Str.485; + if Str.486 then + let Str.483 : {Str, Str} = UnionAtIndex (Id 1) (Index 0) Str.476; + let Str.194 : Str = StructAtIndex 0 Str.483; + let Str.193 : Str = StructAtIndex 1 Str.483; + let Str.481 : U64 = CallByName Str.36 Str.190; + dec Str.190; + let Str.480 : Str = CallByName Str.20 Str.481; + let Str.479 : Str = CallByName Str.3 Str.480 Str.193; + dec Str.193; + let Str.478 : Str = CallByName Str.3 Str.479 Str.192; + let Str.477 : Str = CallByName Str.62 Str.478 Str.194 Str.191 Str.192; + ret Str.477; else - dec Str.344; - ret Str.92; + dec Str.476; + ret Str.190; -procedure Str.57 (Bool.24, Bool.25, Bool.26, Bool.27): - joinpoint Str.252 Str.97 Str.98 Str.99 Str.100: - inc Str.98; - let Str.253 : [C {}, C {Str, Str}] = CallByName Str.38 Str.98 Str.99; - let Str.259 : U8 = 1i64; - let Str.260 : U8 = GetTagId Str.253; - let Str.261 : Int1 = lowlevel Eq Str.259 Str.260; - if Str.261 then - dec Str.98; - let Str.258 : {Str, Str} = UnionAtIndex (Id 1) (Index 0) Str.253; - let Str.102 : Str = StructAtIndex 0 Str.258; - let Str.101 : Str = StructAtIndex 1 Str.258; - let Str.256 : Str = CallByName Str.3 Str.97 Str.101; - dec Str.101; - let Str.255 : Str = CallByName Str.3 Str.256 Str.100; - jump Str.252 Str.255 Str.102 Str.99 Str.100; +procedure Str.62 (Bool.24, Bool.25, Bool.26, Bool.27): + joinpoint Str.384 Str.195 Str.196 Str.197 Str.198: + inc Str.196; + let Str.385 : [C {}, C {Str, Str}] = CallByName Str.38 Str.196 Str.197; + let Str.391 : U8 = 1i64; + let Str.392 : U8 = GetTagId Str.385; + let Str.393 : Int1 = lowlevel Eq Str.391 Str.392; + if Str.393 then + dec Str.196; + let Str.390 : {Str, Str} = UnionAtIndex (Id 1) (Index 0) Str.385; + let Str.200 : Str = StructAtIndex 0 Str.390; + let Str.199 : Str = StructAtIndex 1 Str.390; + let Str.388 : Str = CallByName Str.3 Str.195 Str.199; + dec Str.199; + let Str.387 : Str = CallByName Str.3 Str.388 Str.198; + jump Str.384 Str.387 Str.200 Str.197 Str.198; else - dec Str.100; - dec Str.99; - dec Str.253; - let Str.257 : Str = CallByName Str.3 Str.97 Str.98; - dec Str.98; - ret Str.257; + dec Str.385; + dec Str.198; + dec Str.197; + let Str.389 : Str = CallByName Str.3 Str.195 Str.196; + dec Str.196; + ret Str.389; in inc Bool.26; inc Bool.27; - jump Str.252 Bool.24 Bool.25 Bool.26 Bool.27; + jump Str.384 Bool.24 Bool.25 Bool.26 Bool.27; -procedure Str.58 (Str.122, Str.123): - let Str.124 : U64 = CallByName Str.36 Str.122; - let Str.125 : U64 = CallByName Str.36 Str.123; - let Str.126 : U64 = CallByName Num.77 Str.124 Str.125; - let Str.279 : U64 = 0i64; - let Str.278 : [C , C U64] = CallByName Str.59 Str.122 Str.123 Str.279 Str.126; - ret Str.278; +procedure Str.63 (Str.220, Str.221): + let Str.222 : U64 = CallByName Str.36 Str.220; + let Str.223 : U64 = CallByName Str.36 Str.221; + let Str.224 : U64 = CallByName Num.77 Str.222 Str.223; + let Str.411 : U64 = 0i64; + let Str.410 : [C , C U64] = CallByName Str.64 Str.220 Str.221 Str.411 Str.224; + ret Str.410; -procedure Str.59 (Bool.28, Bool.29, Bool.30, Bool.31): - joinpoint Str.280 Str.127 Str.128 Str.129 Str.130: - let Str.282 : Int1 = CallByName Num.23 Str.129 Str.130; - if Str.282 then - let Str.286 : Int1 = CallByName Str.63 Str.127 Str.129 Str.128; - if Str.286 then - dec Str.127; - dec Str.128; - let Str.287 : [C , C U64] = TagId(1) Str.129; - ret Str.287; +procedure Str.64 (Bool.28, Bool.29, Bool.30, Bool.31): + joinpoint Str.412 Str.225 Str.226 Str.227 Str.228: + let Str.414 : Int1 = CallByName Num.23 Str.227 Str.228; + if Str.414 then + let Str.418 : Int1 = CallByName Str.68 Str.225 Str.227 Str.226; + if Str.418 then + dec Str.226; + dec Str.225; + let Str.419 : [C , C U64] = TagId(1) Str.227; + ret Str.419; else - let Str.285 : U64 = 1i64; - let Str.284 : U64 = CallByName Num.51 Str.129 Str.285; - jump Str.280 Str.127 Str.128 Str.284 Str.130; + let Str.417 : U64 = 1i64; + let Str.416 : U64 = CallByName Num.51 Str.227 Str.417; + jump Str.412 Str.225 Str.226 Str.416 Str.228; else - dec Str.127; - dec Str.128; - let Str.281 : [C , C U64] = TagId(0) ; - ret Str.281; + dec Str.226; + dec Str.225; + let Str.413 : [C , C U64] = TagId(0) ; + ret Str.413; in inc Bool.29; inc Bool.28; - jump Str.280 Bool.28 Bool.29 Bool.30 Bool.31; + jump Str.412 Bool.28 Bool.29 Bool.30 Bool.31; -procedure Str.62 (Str.153, Str.154): - let Str.311 : Int1 = CallByName Num.22 Str.153 Str.154; - if Str.311 then - ret Str.153; +procedure Str.67 (Str.251, Str.252): + let Str.443 : Int1 = CallByName Num.22 Str.251 Str.252; + if Str.443 then + ret Str.251; else - ret Str.154; + ret Str.252; -procedure Str.63 (Str.155, Str.156, Str.157): - let Str.158 : U64 = CallByName Str.36 Str.155; - let Str.159 : U64 = CallByName Str.36 Str.157; - let Str.309 : U64 = CallByName Num.53 Str.156 Str.159; - let Str.160 : U64 = CallByName Str.62 Str.309 Str.158; - let Str.308 : U64 = 0i64; - inc Str.157; - inc Str.155; - let Str.289 : {U64, Str, U64, Str, U64, U64} = Struct {Str.160, Str.155, Str.156, Str.157, Str.308, Str.159}; - let Str.288 : Int1 = CallByName Str.64 Str.289; - ret Str.288; +procedure Str.68 (Str.253, Str.254, Str.255): + let Str.256 : U64 = CallByName Str.36 Str.253; + let Str.257 : U64 = CallByName Str.36 Str.255; + let Str.441 : U64 = CallByName Num.53 Str.254 Str.257; + let Str.258 : U64 = CallByName Str.67 Str.441 Str.256; + let Str.440 : U64 = 0i64; + inc Str.255; + inc Str.253; + let Str.421 : {U64, Str, U64, Str, U64, U64} = Struct {Str.258, Str.253, Str.254, Str.255, Str.440, Str.257}; + let Str.420 : Int1 = CallByName Str.69 Str.421; + ret Str.420; -procedure Str.64 (Str.161): - let Str.167 : U64 = StructAtIndex 0 Str.161; - let Str.162 : Str = StructAtIndex 1 Str.161; - let Str.163 : U64 = StructAtIndex 2 Str.161; - let Str.164 : Str = StructAtIndex 3 Str.161; - let Str.165 : U64 = StructAtIndex 4 Str.161; - let Str.166 : U64 = StructAtIndex 5 Str.161; - let Str.168 : Int1 = CallByName Num.25 Str.163 Str.167; - if Str.168 then - dec Str.162; - dec Str.164; - let Str.169 : Int1 = CallByName Bool.9 Str.165 Str.166; - ret Str.169; +procedure Str.69 (Str.259): + let Str.265 : U64 = StructAtIndex 0 Str.259; + let Str.260 : Str = StructAtIndex 1 Str.259; + let Str.261 : U64 = StructAtIndex 2 Str.259; + let Str.262 : Str = StructAtIndex 3 Str.259; + let Str.263 : U64 = StructAtIndex 4 Str.259; + let Str.264 : U64 = StructAtIndex 5 Str.259; + let Str.266 : Int1 = CallByName Num.25 Str.261 Str.265; + if Str.266 then + dec Str.262; + dec Str.260; + let Str.267 : Int1 = CallByName Bool.9 Str.263 Str.264; + ret Str.267; else - let Str.304 : U8 = CallByName Str.35 Str.162 Str.163; - let Str.305 : U8 = CallByName Str.35 Str.164 Str.165; - let Str.170 : Int1 = CallByName Bool.9 Str.304 Str.305; - let Str.294 : U64 = StructAtIndex 0 Str.161; - let Str.295 : Str = StructAtIndex 1 Str.161; - let Str.297 : Str = StructAtIndex 3 Str.161; - let Str.299 : U64 = StructAtIndex 5 Str.161; - let Str.303 : U64 = 1i64; - let Str.301 : U64 = CallByName Num.51 Str.165 Str.303; - let Str.302 : U64 = 1i64; - let Str.300 : U64 = CallByName Num.51 Str.163 Str.302; - let Str.293 : {U64, Str, U64, Str, U64, U64} = Struct {Str.294, Str.295, Str.300, Str.297, Str.301, Str.299}; - let Str.171 : Int1 = CallByName Str.64 Str.293; - if Str.170 then - ret Str.171; + let Str.436 : U8 = CallByName Str.35 Str.260 Str.261; + let Str.437 : U8 = CallByName Str.35 Str.262 Str.263; + let Str.268 : Int1 = CallByName Bool.9 Str.436 Str.437; + let Str.426 : U64 = StructAtIndex 0 Str.259; + let Str.427 : Str = StructAtIndex 1 Str.259; + let Str.429 : Str = StructAtIndex 3 Str.259; + let Str.431 : U64 = StructAtIndex 5 Str.259; + let Str.435 : U64 = 1i64; + let Str.433 : U64 = CallByName Num.51 Str.263 Str.435; + let Str.434 : U64 = 1i64; + let Str.432 : U64 = CallByName Num.51 Str.261 Str.434; + let Str.425 : {U64, Str, U64, Str, U64, U64} = Struct {Str.426, Str.427, Str.432, Str.429, Str.433, Str.431}; + let Str.269 : Int1 = CallByName Str.69 Str.425; + if Str.268 then + ret Str.269; else - let Str.291 : Int1 = CallByName Bool.1; - ret Str.291; + let Str.423 : Int1 = CallByName Bool.1; + ret Str.423; procedure Test.0 (): let Test.2 : Str = "abc"; diff --git a/crates/compiler/test_mono/generated/inspect_derived_tag_one_field_string.txt b/crates/compiler/test_mono/generated/inspect_derived_tag_one_field_string.txt index bfc0a52fa6..fe96fb04cd 100644 --- a/crates/compiler/test_mono/generated/inspect_derived_tag_one_field_string.txt +++ b/crates/compiler/test_mono/generated/inspect_derived_tag_one_field_string.txt @@ -223,184 +223,184 @@ procedure Num.77 (#Attr.2, #Attr.3): ret Num.293; procedure Str.20 (#Attr.2): - let Str.316 : Str = lowlevel StrWithCapacity #Attr.2; - ret Str.316; + let Str.448 : Str = lowlevel StrWithCapacity #Attr.2; + ret Str.448; procedure Str.3 (#Attr.2, #Attr.3): - let Str.248 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.248; + let Str.380 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.380; procedure Str.35 (#Attr.2, #Attr.3): - let Str.306 : U8 = lowlevel StrGetUnsafe #Attr.2 #Attr.3; - ret Str.306; + let Str.438 : U8 = lowlevel StrGetUnsafe #Attr.2 #Attr.3; + ret Str.438; procedure Str.36 (#Attr.2): - let Str.268 : U64 = lowlevel StrCountUtf8Bytes #Attr.2; - ret Str.268; + let Str.400 : U64 = lowlevel StrCountUtf8Bytes #Attr.2; + ret Str.400; procedure Str.37 (#Attr.2, #Attr.3, #Attr.4): - let Str.266 : Str = lowlevel StrSubstringUnsafe #Attr.2 #Attr.3 #Attr.4; - ret Str.266; - -procedure Str.38 (Str.113, Str.114): - let Str.262 : [C , C U64] = CallByName Str.58 Str.113 Str.114; - let Str.275 : U8 = 1i64; - let Str.276 : U8 = GetTagId Str.262; - let Str.277 : Int1 = lowlevel Eq Str.275 Str.276; - if Str.277 then - let Str.115 : U64 = UnionAtIndex (Id 1) (Index 0) Str.262; - let Str.271 : U64 = CallByName Str.36 Str.113; - let Str.272 : U64 = CallByName Str.36 Str.114; - let Str.270 : U64 = CallByName Num.20 Str.271 Str.272; - let Str.116 : U64 = CallByName Num.20 Str.270 Str.115; - let Str.269 : U64 = 0i64; - inc Str.113; - let Str.117 : Str = CallByName Str.37 Str.113 Str.269 Str.115; - let Str.267 : U64 = CallByName Str.36 Str.114; - let Str.265 : U64 = CallByName Num.51 Str.115 Str.267; - let Str.118 : Str = CallByName Str.37 Str.113 Str.265 Str.116; - let Str.264 : {Str, Str} = Struct {Str.118, Str.117}; - let Str.263 : [C {}, C {Str, Str}] = TagId(1) Str.264; - ret Str.263; + let Str.398 : Str = lowlevel StrSubstringUnsafe #Attr.2 #Attr.3 #Attr.4; + ret Str.398; + +procedure Str.38 (Str.211, Str.212): + let Str.394 : [C , C U64] = CallByName Str.63 Str.211 Str.212; + let Str.407 : U8 = 1i64; + let Str.408 : U8 = GetTagId Str.394; + let Str.409 : Int1 = lowlevel Eq Str.407 Str.408; + if Str.409 then + let Str.213 : U64 = UnionAtIndex (Id 1) (Index 0) Str.394; + let Str.403 : U64 = CallByName Str.36 Str.211; + let Str.404 : U64 = CallByName Str.36 Str.212; + let Str.402 : U64 = CallByName Num.20 Str.403 Str.404; + let Str.214 : U64 = CallByName Num.20 Str.402 Str.213; + let Str.401 : U64 = 0i64; + inc Str.211; + let Str.215 : Str = CallByName Str.37 Str.211 Str.401 Str.213; + let Str.399 : U64 = CallByName Str.36 Str.212; + let Str.397 : U64 = CallByName Num.51 Str.213 Str.399; + let Str.216 : Str = CallByName Str.37 Str.211 Str.397 Str.214; + let Str.396 : {Str, Str} = Struct {Str.216, Str.215}; + let Str.395 : [C {}, C {Str, Str}] = TagId(1) Str.396; + ret Str.395; else - dec Str.113; - let Str.274 : {} = Struct {}; - let Str.273 : [C {}, C {Str, Str}] = TagId(0) Str.274; - ret Str.273; - -procedure Str.45 (Str.92, Str.93, Str.94): - inc Str.92; - let Str.344 : [C {}, C {Str, Str}] = CallByName Str.38 Str.92 Str.93; - let Str.352 : U8 = 1i64; - let Str.353 : U8 = GetTagId Str.344; - let Str.354 : Int1 = lowlevel Eq Str.352 Str.353; - if Str.354 then - let Str.351 : {Str, Str} = UnionAtIndex (Id 1) (Index 0) Str.344; - let Str.96 : Str = StructAtIndex 0 Str.351; - let Str.95 : Str = StructAtIndex 1 Str.351; - let Str.349 : U64 = CallByName Str.36 Str.92; - dec Str.92; - let Str.348 : Str = CallByName Str.20 Str.349; - let Str.347 : Str = CallByName Str.3 Str.348 Str.95; - dec Str.95; - let Str.346 : Str = CallByName Str.3 Str.347 Str.94; - let Str.345 : Str = CallByName Str.57 Str.346 Str.96 Str.93 Str.94; - ret Str.345; + dec Str.211; + let Str.406 : {} = Struct {}; + let Str.405 : [C {}, C {Str, Str}] = TagId(0) Str.406; + ret Str.405; + +procedure Str.45 (Str.190, Str.191, Str.192): + inc Str.190; + let Str.476 : [C {}, C {Str, Str}] = CallByName Str.38 Str.190 Str.191; + let Str.484 : U8 = 1i64; + let Str.485 : U8 = GetTagId Str.476; + let Str.486 : Int1 = lowlevel Eq Str.484 Str.485; + if Str.486 then + let Str.483 : {Str, Str} = UnionAtIndex (Id 1) (Index 0) Str.476; + let Str.194 : Str = StructAtIndex 0 Str.483; + let Str.193 : Str = StructAtIndex 1 Str.483; + let Str.481 : U64 = CallByName Str.36 Str.190; + dec Str.190; + let Str.480 : Str = CallByName Str.20 Str.481; + let Str.479 : Str = CallByName Str.3 Str.480 Str.193; + dec Str.193; + let Str.478 : Str = CallByName Str.3 Str.479 Str.192; + let Str.477 : Str = CallByName Str.62 Str.478 Str.194 Str.191 Str.192; + ret Str.477; else - dec Str.344; - ret Str.92; - -procedure Str.57 (#Derived_gen.12, #Derived_gen.13, #Derived_gen.14, #Derived_gen.15): - joinpoint Str.252 Str.97 Str.98 Str.99 Str.100: - inc Str.98; - let Str.253 : [C {}, C {Str, Str}] = CallByName Str.38 Str.98 Str.99; - let Str.259 : U8 = 1i64; - let Str.260 : U8 = GetTagId Str.253; - let Str.261 : Int1 = lowlevel Eq Str.259 Str.260; - if Str.261 then - dec Str.98; - let Str.258 : {Str, Str} = UnionAtIndex (Id 1) (Index 0) Str.253; - let Str.102 : Str = StructAtIndex 0 Str.258; - let Str.101 : Str = StructAtIndex 1 Str.258; - let Str.256 : Str = CallByName Str.3 Str.97 Str.101; - dec Str.101; - let Str.255 : Str = CallByName Str.3 Str.256 Str.100; - jump Str.252 Str.255 Str.102 Str.99 Str.100; + dec Str.476; + ret Str.190; + +procedure Str.62 (#Derived_gen.12, #Derived_gen.13, #Derived_gen.14, #Derived_gen.15): + joinpoint Str.384 Str.195 Str.196 Str.197 Str.198: + inc Str.196; + let Str.385 : [C {}, C {Str, Str}] = CallByName Str.38 Str.196 Str.197; + let Str.391 : U8 = 1i64; + let Str.392 : U8 = GetTagId Str.385; + let Str.393 : Int1 = lowlevel Eq Str.391 Str.392; + if Str.393 then + dec Str.196; + let Str.390 : {Str, Str} = UnionAtIndex (Id 1) (Index 0) Str.385; + let Str.200 : Str = StructAtIndex 0 Str.390; + let Str.199 : Str = StructAtIndex 1 Str.390; + let Str.388 : Str = CallByName Str.3 Str.195 Str.199; + dec Str.199; + let Str.387 : Str = CallByName Str.3 Str.388 Str.198; + jump Str.384 Str.387 Str.200 Str.197 Str.198; else - dec Str.100; - dec Str.99; - dec Str.253; - let Str.257 : Str = CallByName Str.3 Str.97 Str.98; - dec Str.98; - ret Str.257; + dec Str.385; + dec Str.198; + dec Str.197; + let Str.389 : Str = CallByName Str.3 Str.195 Str.196; + dec Str.196; + ret Str.389; in inc #Derived_gen.14; inc #Derived_gen.15; - jump Str.252 #Derived_gen.12 #Derived_gen.13 #Derived_gen.14 #Derived_gen.15; - -procedure Str.58 (Str.122, Str.123): - let Str.124 : U64 = CallByName Str.36 Str.122; - let Str.125 : U64 = CallByName Str.36 Str.123; - let Str.126 : U64 = CallByName Num.77 Str.124 Str.125; - let Str.279 : U64 = 0i64; - let Str.278 : [C , C U64] = CallByName Str.59 Str.122 Str.123 Str.279 Str.126; - ret Str.278; - -procedure Str.59 (#Derived_gen.16, #Derived_gen.17, #Derived_gen.18, #Derived_gen.19): - joinpoint Str.280 Str.127 Str.128 Str.129 Str.130: - let Str.282 : Int1 = CallByName Num.23 Str.129 Str.130; - if Str.282 then - let Str.286 : Int1 = CallByName Str.63 Str.127 Str.129 Str.128; - if Str.286 then - dec Str.127; - dec Str.128; - let Str.287 : [C , C U64] = TagId(1) Str.129; - ret Str.287; + jump Str.384 #Derived_gen.12 #Derived_gen.13 #Derived_gen.14 #Derived_gen.15; + +procedure Str.63 (Str.220, Str.221): + let Str.222 : U64 = CallByName Str.36 Str.220; + let Str.223 : U64 = CallByName Str.36 Str.221; + let Str.224 : U64 = CallByName Num.77 Str.222 Str.223; + let Str.411 : U64 = 0i64; + let Str.410 : [C , C U64] = CallByName Str.64 Str.220 Str.221 Str.411 Str.224; + ret Str.410; + +procedure Str.64 (#Derived_gen.16, #Derived_gen.17, #Derived_gen.18, #Derived_gen.19): + joinpoint Str.412 Str.225 Str.226 Str.227 Str.228: + let Str.414 : Int1 = CallByName Num.23 Str.227 Str.228; + if Str.414 then + let Str.418 : Int1 = CallByName Str.68 Str.225 Str.227 Str.226; + if Str.418 then + dec Str.226; + dec Str.225; + let Str.419 : [C , C U64] = TagId(1) Str.227; + ret Str.419; else - let Str.285 : U64 = 1i64; - let Str.284 : U64 = CallByName Num.51 Str.129 Str.285; - jump Str.280 Str.127 Str.128 Str.284 Str.130; + let Str.417 : U64 = 1i64; + let Str.416 : U64 = CallByName Num.51 Str.227 Str.417; + jump Str.412 Str.225 Str.226 Str.416 Str.228; else - dec Str.127; - dec Str.128; - let Str.281 : [C , C U64] = TagId(0) ; - ret Str.281; + dec Str.226; + dec Str.225; + let Str.413 : [C , C U64] = TagId(0) ; + ret Str.413; in inc #Derived_gen.17; inc #Derived_gen.16; - jump Str.280 #Derived_gen.16 #Derived_gen.17 #Derived_gen.18 #Derived_gen.19; + jump Str.412 #Derived_gen.16 #Derived_gen.17 #Derived_gen.18 #Derived_gen.19; -procedure Str.62 (Str.153, Str.154): - let Str.311 : Int1 = CallByName Num.22 Str.153 Str.154; - if Str.311 then - ret Str.153; +procedure Str.67 (Str.251, Str.252): + let Str.443 : Int1 = CallByName Num.22 Str.251 Str.252; + if Str.443 then + ret Str.251; else - ret Str.154; - -procedure Str.63 (Str.155, Str.156, Str.157): - let Str.158 : U64 = CallByName Str.36 Str.155; - let Str.159 : U64 = CallByName Str.36 Str.157; - let Str.309 : U64 = CallByName Num.53 Str.156 Str.159; - let Str.160 : U64 = CallByName Str.62 Str.309 Str.158; - let Str.308 : U64 = 0i64; - inc Str.157; - inc Str.155; - let Str.289 : {U64, Str, U64, Str, U64, U64} = Struct {Str.160, Str.155, Str.156, Str.157, Str.308, Str.159}; - let Str.288 : Int1 = CallByName Str.64 Str.289; - ret Str.288; - -procedure Str.64 (Str.161): - let Str.167 : U64 = StructAtIndex 0 Str.161; - let Str.162 : Str = StructAtIndex 1 Str.161; - let Str.163 : U64 = StructAtIndex 2 Str.161; - let Str.164 : Str = StructAtIndex 3 Str.161; - let Str.165 : U64 = StructAtIndex 4 Str.161; - let Str.166 : U64 = StructAtIndex 5 Str.161; - let Str.168 : Int1 = CallByName Num.25 Str.163 Str.167; - if Str.168 then - dec Str.162; - dec Str.164; - let Str.169 : Int1 = CallByName Bool.9 Str.165 Str.166; - ret Str.169; + ret Str.252; + +procedure Str.68 (Str.253, Str.254, Str.255): + let Str.256 : U64 = CallByName Str.36 Str.253; + let Str.257 : U64 = CallByName Str.36 Str.255; + let Str.441 : U64 = CallByName Num.53 Str.254 Str.257; + let Str.258 : U64 = CallByName Str.67 Str.441 Str.256; + let Str.440 : U64 = 0i64; + inc Str.255; + inc Str.253; + let Str.421 : {U64, Str, U64, Str, U64, U64} = Struct {Str.258, Str.253, Str.254, Str.255, Str.440, Str.257}; + let Str.420 : Int1 = CallByName Str.69 Str.421; + ret Str.420; + +procedure Str.69 (Str.259): + let Str.265 : U64 = StructAtIndex 0 Str.259; + let Str.260 : Str = StructAtIndex 1 Str.259; + let Str.261 : U64 = StructAtIndex 2 Str.259; + let Str.262 : Str = StructAtIndex 3 Str.259; + let Str.263 : U64 = StructAtIndex 4 Str.259; + let Str.264 : U64 = StructAtIndex 5 Str.259; + let Str.266 : Int1 = CallByName Num.25 Str.261 Str.265; + if Str.266 then + dec Str.262; + dec Str.260; + let Str.267 : Int1 = CallByName Bool.9 Str.263 Str.264; + ret Str.267; else - let Str.304 : U8 = CallByName Str.35 Str.162 Str.163; - let Str.305 : U8 = CallByName Str.35 Str.164 Str.165; - let Str.170 : Int1 = CallByName Bool.9 Str.304 Str.305; - let Str.294 : U64 = StructAtIndex 0 Str.161; - let Str.295 : Str = StructAtIndex 1 Str.161; - let Str.297 : Str = StructAtIndex 3 Str.161; - let Str.299 : U64 = StructAtIndex 5 Str.161; - let Str.303 : U64 = 1i64; - let Str.301 : U64 = CallByName Num.51 Str.165 Str.303; - let Str.302 : U64 = 1i64; - let Str.300 : U64 = CallByName Num.51 Str.163 Str.302; - let Str.293 : {U64, Str, U64, Str, U64, U64} = Struct {Str.294, Str.295, Str.300, Str.297, Str.301, Str.299}; - let Str.171 : Int1 = CallByName Str.64 Str.293; - if Str.170 then - ret Str.171; + let Str.436 : U8 = CallByName Str.35 Str.260 Str.261; + let Str.437 : U8 = CallByName Str.35 Str.262 Str.263; + let Str.268 : Int1 = CallByName Bool.9 Str.436 Str.437; + let Str.426 : U64 = StructAtIndex 0 Str.259; + let Str.427 : Str = StructAtIndex 1 Str.259; + let Str.429 : Str = StructAtIndex 3 Str.259; + let Str.431 : U64 = StructAtIndex 5 Str.259; + let Str.435 : U64 = 1i64; + let Str.433 : U64 = CallByName Num.51 Str.263 Str.435; + let Str.434 : U64 = 1i64; + let Str.432 : U64 = CallByName Num.51 Str.261 Str.434; + let Str.425 : {U64, Str, U64, Str, U64, U64} = Struct {Str.426, Str.427, Str.432, Str.429, Str.433, Str.431}; + let Str.269 : Int1 = CallByName Str.69 Str.425; + if Str.268 then + ret Str.269; else - let Str.291 : Int1 = CallByName Bool.1; - ret Str.291; + let Str.423 : Int1 = CallByName Bool.1; + ret Str.423; procedure Test.0 (): let Test.4 : Str = "foo"; diff --git a/crates/compiler/test_mono/generated/inspect_derived_tag_two_payloads_string.txt b/crates/compiler/test_mono/generated/inspect_derived_tag_two_payloads_string.txt index ae01098f7c..fbd3848588 100644 --- a/crates/compiler/test_mono/generated/inspect_derived_tag_two_payloads_string.txt +++ b/crates/compiler/test_mono/generated/inspect_derived_tag_two_payloads_string.txt @@ -226,184 +226,184 @@ procedure Num.77 (#Attr.2, #Attr.3): ret Num.293; procedure Str.20 (#Attr.2): - let Str.316 : Str = lowlevel StrWithCapacity #Attr.2; - ret Str.316; + let Str.448 : Str = lowlevel StrWithCapacity #Attr.2; + ret Str.448; procedure Str.3 (#Attr.2, #Attr.3): - let Str.248 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.248; + let Str.380 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.380; procedure Str.35 (#Attr.2, #Attr.3): - let Str.306 : U8 = lowlevel StrGetUnsafe #Attr.2 #Attr.3; - ret Str.306; + let Str.438 : U8 = lowlevel StrGetUnsafe #Attr.2 #Attr.3; + ret Str.438; procedure Str.36 (#Attr.2): - let Str.268 : U64 = lowlevel StrCountUtf8Bytes #Attr.2; - ret Str.268; + let Str.400 : U64 = lowlevel StrCountUtf8Bytes #Attr.2; + ret Str.400; procedure Str.37 (#Attr.2, #Attr.3, #Attr.4): - let Str.266 : Str = lowlevel StrSubstringUnsafe #Attr.2 #Attr.3 #Attr.4; - ret Str.266; - -procedure Str.38 (Str.113, Str.114): - let Str.262 : [C , C U64] = CallByName Str.58 Str.113 Str.114; - let Str.275 : U8 = 1i64; - let Str.276 : U8 = GetTagId Str.262; - let Str.277 : Int1 = lowlevel Eq Str.275 Str.276; - if Str.277 then - let Str.115 : U64 = UnionAtIndex (Id 1) (Index 0) Str.262; - let Str.271 : U64 = CallByName Str.36 Str.113; - let Str.272 : U64 = CallByName Str.36 Str.114; - let Str.270 : U64 = CallByName Num.20 Str.271 Str.272; - let Str.116 : U64 = CallByName Num.20 Str.270 Str.115; - let Str.269 : U64 = 0i64; - inc Str.113; - let Str.117 : Str = CallByName Str.37 Str.113 Str.269 Str.115; - let Str.267 : U64 = CallByName Str.36 Str.114; - let Str.265 : U64 = CallByName Num.51 Str.115 Str.267; - let Str.118 : Str = CallByName Str.37 Str.113 Str.265 Str.116; - let Str.264 : {Str, Str} = Struct {Str.118, Str.117}; - let Str.263 : [C {}, C {Str, Str}] = TagId(1) Str.264; - ret Str.263; + let Str.398 : Str = lowlevel StrSubstringUnsafe #Attr.2 #Attr.3 #Attr.4; + ret Str.398; + +procedure Str.38 (Str.211, Str.212): + let Str.394 : [C , C U64] = CallByName Str.63 Str.211 Str.212; + let Str.407 : U8 = 1i64; + let Str.408 : U8 = GetTagId Str.394; + let Str.409 : Int1 = lowlevel Eq Str.407 Str.408; + if Str.409 then + let Str.213 : U64 = UnionAtIndex (Id 1) (Index 0) Str.394; + let Str.403 : U64 = CallByName Str.36 Str.211; + let Str.404 : U64 = CallByName Str.36 Str.212; + let Str.402 : U64 = CallByName Num.20 Str.403 Str.404; + let Str.214 : U64 = CallByName Num.20 Str.402 Str.213; + let Str.401 : U64 = 0i64; + inc Str.211; + let Str.215 : Str = CallByName Str.37 Str.211 Str.401 Str.213; + let Str.399 : U64 = CallByName Str.36 Str.212; + let Str.397 : U64 = CallByName Num.51 Str.213 Str.399; + let Str.216 : Str = CallByName Str.37 Str.211 Str.397 Str.214; + let Str.396 : {Str, Str} = Struct {Str.216, Str.215}; + let Str.395 : [C {}, C {Str, Str}] = TagId(1) Str.396; + ret Str.395; else - dec Str.113; - let Str.274 : {} = Struct {}; - let Str.273 : [C {}, C {Str, Str}] = TagId(0) Str.274; - ret Str.273; - -procedure Str.45 (Str.92, Str.93, Str.94): - inc Str.92; - let Str.388 : [C {}, C {Str, Str}] = CallByName Str.38 Str.92 Str.93; - let Str.396 : U8 = 1i64; - let Str.397 : U8 = GetTagId Str.388; - let Str.398 : Int1 = lowlevel Eq Str.396 Str.397; - if Str.398 then - let Str.395 : {Str, Str} = UnionAtIndex (Id 1) (Index 0) Str.388; - let Str.96 : Str = StructAtIndex 0 Str.395; - let Str.95 : Str = StructAtIndex 1 Str.395; - let Str.393 : U64 = CallByName Str.36 Str.92; - dec Str.92; - let Str.392 : Str = CallByName Str.20 Str.393; - let Str.391 : Str = CallByName Str.3 Str.392 Str.95; - dec Str.95; - let Str.390 : Str = CallByName Str.3 Str.391 Str.94; - let Str.389 : Str = CallByName Str.57 Str.390 Str.96 Str.93 Str.94; - ret Str.389; + dec Str.211; + let Str.406 : {} = Struct {}; + let Str.405 : [C {}, C {Str, Str}] = TagId(0) Str.406; + ret Str.405; + +procedure Str.45 (Str.190, Str.191, Str.192): + inc Str.190; + let Str.520 : [C {}, C {Str, Str}] = CallByName Str.38 Str.190 Str.191; + let Str.528 : U8 = 1i64; + let Str.529 : U8 = GetTagId Str.520; + let Str.530 : Int1 = lowlevel Eq Str.528 Str.529; + if Str.530 then + let Str.527 : {Str, Str} = UnionAtIndex (Id 1) (Index 0) Str.520; + let Str.194 : Str = StructAtIndex 0 Str.527; + let Str.193 : Str = StructAtIndex 1 Str.527; + let Str.525 : U64 = CallByName Str.36 Str.190; + dec Str.190; + let Str.524 : Str = CallByName Str.20 Str.525; + let Str.523 : Str = CallByName Str.3 Str.524 Str.193; + dec Str.193; + let Str.522 : Str = CallByName Str.3 Str.523 Str.192; + let Str.521 : Str = CallByName Str.62 Str.522 Str.194 Str.191 Str.192; + ret Str.521; else - dec Str.388; - ret Str.92; - -procedure Str.57 (#Derived_gen.13, #Derived_gen.14, #Derived_gen.15, #Derived_gen.16): - joinpoint Str.252 Str.97 Str.98 Str.99 Str.100: - inc Str.98; - let Str.253 : [C {}, C {Str, Str}] = CallByName Str.38 Str.98 Str.99; - let Str.259 : U8 = 1i64; - let Str.260 : U8 = GetTagId Str.253; - let Str.261 : Int1 = lowlevel Eq Str.259 Str.260; - if Str.261 then - dec Str.98; - let Str.258 : {Str, Str} = UnionAtIndex (Id 1) (Index 0) Str.253; - let Str.102 : Str = StructAtIndex 0 Str.258; - let Str.101 : Str = StructAtIndex 1 Str.258; - let Str.256 : Str = CallByName Str.3 Str.97 Str.101; - dec Str.101; - let Str.255 : Str = CallByName Str.3 Str.256 Str.100; - jump Str.252 Str.255 Str.102 Str.99 Str.100; + dec Str.520; + ret Str.190; + +procedure Str.62 (#Derived_gen.13, #Derived_gen.14, #Derived_gen.15, #Derived_gen.16): + joinpoint Str.384 Str.195 Str.196 Str.197 Str.198: + inc Str.196; + let Str.385 : [C {}, C {Str, Str}] = CallByName Str.38 Str.196 Str.197; + let Str.391 : U8 = 1i64; + let Str.392 : U8 = GetTagId Str.385; + let Str.393 : Int1 = lowlevel Eq Str.391 Str.392; + if Str.393 then + dec Str.196; + let Str.390 : {Str, Str} = UnionAtIndex (Id 1) (Index 0) Str.385; + let Str.200 : Str = StructAtIndex 0 Str.390; + let Str.199 : Str = StructAtIndex 1 Str.390; + let Str.388 : Str = CallByName Str.3 Str.195 Str.199; + dec Str.199; + let Str.387 : Str = CallByName Str.3 Str.388 Str.198; + jump Str.384 Str.387 Str.200 Str.197 Str.198; else - dec Str.100; - dec Str.99; - dec Str.253; - let Str.257 : Str = CallByName Str.3 Str.97 Str.98; - dec Str.98; - ret Str.257; + dec Str.385; + dec Str.198; + dec Str.197; + let Str.389 : Str = CallByName Str.3 Str.195 Str.196; + dec Str.196; + ret Str.389; in inc #Derived_gen.15; inc #Derived_gen.16; - jump Str.252 #Derived_gen.13 #Derived_gen.14 #Derived_gen.15 #Derived_gen.16; - -procedure Str.58 (Str.122, Str.123): - let Str.124 : U64 = CallByName Str.36 Str.122; - let Str.125 : U64 = CallByName Str.36 Str.123; - let Str.126 : U64 = CallByName Num.77 Str.124 Str.125; - let Str.279 : U64 = 0i64; - let Str.278 : [C , C U64] = CallByName Str.59 Str.122 Str.123 Str.279 Str.126; - ret Str.278; - -procedure Str.59 (#Derived_gen.17, #Derived_gen.18, #Derived_gen.19, #Derived_gen.20): - joinpoint Str.280 Str.127 Str.128 Str.129 Str.130: - let Str.282 : Int1 = CallByName Num.23 Str.129 Str.130; - if Str.282 then - let Str.286 : Int1 = CallByName Str.63 Str.127 Str.129 Str.128; - if Str.286 then - dec Str.127; - dec Str.128; - let Str.287 : [C , C U64] = TagId(1) Str.129; - ret Str.287; + jump Str.384 #Derived_gen.13 #Derived_gen.14 #Derived_gen.15 #Derived_gen.16; + +procedure Str.63 (Str.220, Str.221): + let Str.222 : U64 = CallByName Str.36 Str.220; + let Str.223 : U64 = CallByName Str.36 Str.221; + let Str.224 : U64 = CallByName Num.77 Str.222 Str.223; + let Str.411 : U64 = 0i64; + let Str.410 : [C , C U64] = CallByName Str.64 Str.220 Str.221 Str.411 Str.224; + ret Str.410; + +procedure Str.64 (#Derived_gen.17, #Derived_gen.18, #Derived_gen.19, #Derived_gen.20): + joinpoint Str.412 Str.225 Str.226 Str.227 Str.228: + let Str.414 : Int1 = CallByName Num.23 Str.227 Str.228; + if Str.414 then + let Str.418 : Int1 = CallByName Str.68 Str.225 Str.227 Str.226; + if Str.418 then + dec Str.226; + dec Str.225; + let Str.419 : [C , C U64] = TagId(1) Str.227; + ret Str.419; else - let Str.285 : U64 = 1i64; - let Str.284 : U64 = CallByName Num.51 Str.129 Str.285; - jump Str.280 Str.127 Str.128 Str.284 Str.130; + let Str.417 : U64 = 1i64; + let Str.416 : U64 = CallByName Num.51 Str.227 Str.417; + jump Str.412 Str.225 Str.226 Str.416 Str.228; else - dec Str.127; - dec Str.128; - let Str.281 : [C , C U64] = TagId(0) ; - ret Str.281; + dec Str.226; + dec Str.225; + let Str.413 : [C , C U64] = TagId(0) ; + ret Str.413; in inc #Derived_gen.17; inc #Derived_gen.18; - jump Str.280 #Derived_gen.17 #Derived_gen.18 #Derived_gen.19 #Derived_gen.20; + jump Str.412 #Derived_gen.17 #Derived_gen.18 #Derived_gen.19 #Derived_gen.20; -procedure Str.62 (Str.153, Str.154): - let Str.311 : Int1 = CallByName Num.22 Str.153 Str.154; - if Str.311 then - ret Str.153; +procedure Str.67 (Str.251, Str.252): + let Str.443 : Int1 = CallByName Num.22 Str.251 Str.252; + if Str.443 then + ret Str.251; else - ret Str.154; - -procedure Str.63 (Str.155, Str.156, Str.157): - let Str.158 : U64 = CallByName Str.36 Str.155; - let Str.159 : U64 = CallByName Str.36 Str.157; - let Str.309 : U64 = CallByName Num.53 Str.156 Str.159; - let Str.160 : U64 = CallByName Str.62 Str.309 Str.158; - let Str.308 : U64 = 0i64; - inc Str.157; - inc Str.155; - let Str.289 : {U64, Str, U64, Str, U64, U64} = Struct {Str.160, Str.155, Str.156, Str.157, Str.308, Str.159}; - let Str.288 : Int1 = CallByName Str.64 Str.289; - ret Str.288; - -procedure Str.64 (Str.161): - let Str.167 : U64 = StructAtIndex 0 Str.161; - let Str.162 : Str = StructAtIndex 1 Str.161; - let Str.163 : U64 = StructAtIndex 2 Str.161; - let Str.164 : Str = StructAtIndex 3 Str.161; - let Str.165 : U64 = StructAtIndex 4 Str.161; - let Str.166 : U64 = StructAtIndex 5 Str.161; - let Str.168 : Int1 = CallByName Num.25 Str.163 Str.167; - if Str.168 then - dec Str.162; - dec Str.164; - let Str.169 : Int1 = CallByName Bool.9 Str.165 Str.166; - ret Str.169; + ret Str.252; + +procedure Str.68 (Str.253, Str.254, Str.255): + let Str.256 : U64 = CallByName Str.36 Str.253; + let Str.257 : U64 = CallByName Str.36 Str.255; + let Str.441 : U64 = CallByName Num.53 Str.254 Str.257; + let Str.258 : U64 = CallByName Str.67 Str.441 Str.256; + let Str.440 : U64 = 0i64; + inc Str.255; + inc Str.253; + let Str.421 : {U64, Str, U64, Str, U64, U64} = Struct {Str.258, Str.253, Str.254, Str.255, Str.440, Str.257}; + let Str.420 : Int1 = CallByName Str.69 Str.421; + ret Str.420; + +procedure Str.69 (Str.259): + let Str.265 : U64 = StructAtIndex 0 Str.259; + let Str.260 : Str = StructAtIndex 1 Str.259; + let Str.261 : U64 = StructAtIndex 2 Str.259; + let Str.262 : Str = StructAtIndex 3 Str.259; + let Str.263 : U64 = StructAtIndex 4 Str.259; + let Str.264 : U64 = StructAtIndex 5 Str.259; + let Str.266 : Int1 = CallByName Num.25 Str.261 Str.265; + if Str.266 then + dec Str.262; + dec Str.260; + let Str.267 : Int1 = CallByName Bool.9 Str.263 Str.264; + ret Str.267; else - let Str.304 : U8 = CallByName Str.35 Str.162 Str.163; - let Str.305 : U8 = CallByName Str.35 Str.164 Str.165; - let Str.170 : Int1 = CallByName Bool.9 Str.304 Str.305; - let Str.294 : U64 = StructAtIndex 0 Str.161; - let Str.295 : Str = StructAtIndex 1 Str.161; - let Str.297 : Str = StructAtIndex 3 Str.161; - let Str.299 : U64 = StructAtIndex 5 Str.161; - let Str.303 : U64 = 1i64; - let Str.301 : U64 = CallByName Num.51 Str.165 Str.303; - let Str.302 : U64 = 1i64; - let Str.300 : U64 = CallByName Num.51 Str.163 Str.302; - let Str.293 : {U64, Str, U64, Str, U64, U64} = Struct {Str.294, Str.295, Str.300, Str.297, Str.301, Str.299}; - let Str.171 : Int1 = CallByName Str.64 Str.293; - if Str.170 then - ret Str.171; + let Str.436 : U8 = CallByName Str.35 Str.260 Str.261; + let Str.437 : U8 = CallByName Str.35 Str.262 Str.263; + let Str.268 : Int1 = CallByName Bool.9 Str.436 Str.437; + let Str.426 : U64 = StructAtIndex 0 Str.259; + let Str.427 : Str = StructAtIndex 1 Str.259; + let Str.429 : Str = StructAtIndex 3 Str.259; + let Str.431 : U64 = StructAtIndex 5 Str.259; + let Str.435 : U64 = 1i64; + let Str.433 : U64 = CallByName Num.51 Str.263 Str.435; + let Str.434 : U64 = 1i64; + let Str.432 : U64 = CallByName Num.51 Str.261 Str.434; + let Str.425 : {U64, Str, U64, Str, U64, U64} = Struct {Str.426, Str.427, Str.432, Str.429, Str.433, Str.431}; + let Str.269 : Int1 = CallByName Str.69 Str.425; + if Str.268 then + ret Str.269; else - let Str.291 : Int1 = CallByName Bool.1; - ret Str.291; + let Str.423 : Int1 = CallByName Bool.1; + ret Str.423; procedure Test.0 (): let Test.5 : Str = "foo"; 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 5f6e6053d8..c57e66e09a 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 @@ -45,27 +45,27 @@ procedure Num.22 (#Attr.2, #Attr.3): let Num.283 : Int1 = lowlevel NumLt #Attr.2 #Attr.3; ret Num.283; -procedure Str.27 (Str.85): - let Str.248 : [C Int1, C I64] = CallByName Str.67 Str.85; - ret Str.248; +procedure Str.27 (Str.183): + let Str.380 : [C Int1, C I64] = CallByName Str.72 Str.183; + ret Str.380; procedure Str.42 (#Attr.2): - let Str.256 : {I64, U8} = lowlevel StrToNum #Attr.2; - ret Str.256; + let Str.388 : {I64, U8} = lowlevel StrToNum #Attr.2; + ret Str.388; -procedure Str.67 (Str.192): - let Str.193 : {I64, U8} = CallByName Str.42 Str.192; - let Str.254 : U8 = StructAtIndex 1 Str.193; - let Str.255 : U8 = 0i64; - let Str.251 : Int1 = CallByName Bool.9 Str.254 Str.255; - if Str.251 then - let Str.253 : I64 = StructAtIndex 0 Str.193; - let Str.252 : [C Int1, C I64] = TagId(1) Str.253; - ret Str.252; +procedure Str.72 (Str.290): + let Str.291 : {I64, U8} = CallByName Str.42 Str.290; + let Str.386 : U8 = StructAtIndex 1 Str.291; + let Str.387 : U8 = 0i64; + let Str.383 : Int1 = CallByName Bool.9 Str.386 Str.387; + if Str.383 then + let Str.385 : I64 = StructAtIndex 0 Str.291; + let Str.384 : [C Int1, C I64] = TagId(1) Str.385; + ret Str.384; else - let Str.250 : Int1 = false; - let Str.249 : [C Int1, C I64] = TagId(0) Str.250; - ret Str.249; + let Str.382 : Int1 = false; + let Str.381 : [C Int1, C I64] = TagId(0) Str.382; + ret Str.381; procedure Test.0 (): let Test.3 : Int1 = CallByName Bool.2; 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 16771db676..2b6e1ad525 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 @@ -19,30 +19,30 @@ procedure Decode.26 (Decode.109, Decode.110): ret Decode.126; procedure Str.12 (#Attr.2): - let Str.257 : List U8 = lowlevel StrToUtf8 #Attr.2; - ret Str.257; + let Str.389 : List U8 = lowlevel StrToUtf8 #Attr.2; + ret Str.389; -procedure Str.27 (Str.85): - let Str.248 : [C {}, C I64] = CallByName Str.67 Str.85; - ret Str.248; +procedure Str.27 (Str.183): + let Str.380 : [C {}, C I64] = CallByName Str.72 Str.183; + ret Str.380; procedure Str.42 (#Attr.2): - let Str.256 : {I64, U8} = lowlevel StrToNum #Attr.2; - ret Str.256; + let Str.388 : {I64, U8} = lowlevel StrToNum #Attr.2; + ret Str.388; -procedure Str.67 (Str.192): - let Str.193 : {I64, U8} = CallByName Str.42 Str.192; - let Str.254 : U8 = StructAtIndex 1 Str.193; - let Str.255 : U8 = 0i64; - let Str.251 : Int1 = CallByName Bool.9 Str.254 Str.255; - if Str.251 then - let Str.253 : I64 = StructAtIndex 0 Str.193; - let Str.252 : [C {}, C I64] = TagId(1) Str.253; - ret Str.252; +procedure Str.72 (Str.290): + let Str.291 : {I64, U8} = CallByName Str.42 Str.290; + let Str.386 : U8 = StructAtIndex 1 Str.291; + let Str.387 : U8 = 0i64; + let Str.383 : Int1 = CallByName Bool.9 Str.386 Str.387; + if Str.383 then + let Str.385 : I64 = StructAtIndex 0 Str.291; + let Str.384 : [C {}, C I64] = TagId(1) Str.385; + ret Str.384; else - let Str.250 : {} = Struct {}; - let Str.249 : [C {}, C I64] = TagId(0) Str.250; - ret Str.249; + let Str.382 : {} = Struct {}; + let Str.381 : [C {}, C I64] = TagId(0) Str.382; + ret Str.381; procedure Test.103 (): let Test.101 : [C Str, C {List U8, I64}] = CallByName Test.19; diff --git a/crates/compiler/test_mono/generated/lambda_capture_niches_with_other_lambda_capture.txt b/crates/compiler/test_mono/generated/lambda_capture_niches_with_other_lambda_capture.txt index 924f08e2d5..dcfb879652 100644 --- a/crates/compiler/test_mono/generated/lambda_capture_niches_with_other_lambda_capture.txt +++ b/crates/compiler/test_mono/generated/lambda_capture_niches_with_other_lambda_capture.txt @@ -1,6 +1,6 @@ procedure Str.3 (#Attr.2, #Attr.3): - let Str.248 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.248; + let Str.380 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.380; procedure Test.1 (Test.5): let Test.16 : [C {}, C U64, C Str] = TagId(0) Test.5; 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 94608cdc6e..2fb956ba13 100644 --- a/crates/compiler/test_mono/generated/list_map_closure_borrows.txt +++ b/crates/compiler/test_mono/generated/list_map_closure_borrows.txt @@ -71,12 +71,12 @@ procedure Num.51 (#Attr.2, #Attr.3): ret Num.285; procedure Str.16 (#Attr.2, #Attr.3): - let Str.248 : Str = lowlevel StrRepeat #Attr.2 #Attr.3; - ret Str.248; + let Str.380 : Str = lowlevel StrRepeat #Attr.2 #Attr.3; + ret Str.380; procedure Str.3 (#Attr.2, #Attr.3): - let Str.249 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.249; + let Str.381 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.381; 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 b764c74194..9f099628b0 100644 --- a/crates/compiler/test_mono/generated/list_map_closure_owns.txt +++ b/crates/compiler/test_mono/generated/list_map_closure_owns.txt @@ -70,8 +70,8 @@ procedure Num.51 (#Attr.2, #Attr.3): ret Num.285; procedure Str.3 (#Attr.2, #Attr.3): - let Str.249 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.249; + let Str.381 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.381; procedure Test.1 (): let Test.21 : Str = "lllllllllllllllllllllooooooooooong"; diff --git a/crates/compiler/test_mono/generated/pizza_dbg.txt b/crates/compiler/test_mono/generated/pizza_dbg.txt index c9e2711c0f..04b319e2c7 100644 --- a/crates/compiler/test_mono/generated/pizza_dbg.txt +++ b/crates/compiler/test_mono/generated/pizza_dbg.txt @@ -43,8 +43,8 @@ procedure Num.96 (#Attr.2): ret Num.284; procedure Str.3 (#Attr.2, #Attr.3): - let Str.248 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.248; + let Str.380 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.380; procedure Test.0 (): let Test.2 : I64 = 1i64; diff --git a/crates/compiler/test_mono/generated/polymorphic_expression_unification.txt b/crates/compiler/test_mono/generated/polymorphic_expression_unification.txt index fab36e61bf..5667d52c3d 100644 --- a/crates/compiler/test_mono/generated/polymorphic_expression_unification.txt +++ b/crates/compiler/test_mono/generated/polymorphic_expression_unification.txt @@ -3,8 +3,8 @@ procedure Bool.9 (#Attr.2, #Attr.3): ret Bool.21; procedure Str.3 (#Attr.2, #Attr.3): - let Str.249 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.249; + let Str.381 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.381; procedure Test.2 (Test.7): let Test.24 : Str = ".trace(\""; diff --git a/crates/compiler/test_mono/generated/recursively_build_effect.txt b/crates/compiler/test_mono/generated/recursively_build_effect.txt index 7b9e98c4f8..bfa91f0648 100644 --- a/crates/compiler/test_mono/generated/recursively_build_effect.txt +++ b/crates/compiler/test_mono/generated/recursively_build_effect.txt @@ -3,8 +3,8 @@ procedure Num.20 (#Attr.2, #Attr.3): ret Num.283; procedure Str.3 (#Attr.2, #Attr.3): - let Str.250 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.250; + let Str.382 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.382; procedure Test.11 (Test.29, #Attr.12): let Test.32 : {} = UnionAtIndex (Id 0) (Index 0) #Attr.12; diff --git a/crates/compiler/test_mono/generated/return_annotated.txt b/crates/compiler/test_mono/generated/return_annotated.txt index 880404547b..6054a6fc0e 100644 --- a/crates/compiler/test_mono/generated/return_annotated.txt +++ b/crates/compiler/test_mono/generated/return_annotated.txt @@ -2,27 +2,27 @@ procedure Bool.9 (#Attr.2, #Attr.3): let Bool.21 : Int1 = lowlevel Eq #Attr.2 #Attr.3; ret Bool.21; -procedure Str.26 (Str.84): - let Str.248 : [C {}, C U64] = CallByName Str.67 Str.84; - ret Str.248; +procedure Str.26 (Str.182): + let Str.380 : [C {}, C U64] = CallByName Str.72 Str.182; + ret Str.380; procedure Str.42 (#Attr.2): - let Str.256 : {U64, U8} = lowlevel StrToNum #Attr.2; - ret Str.256; + let Str.388 : {U64, U8} = lowlevel StrToNum #Attr.2; + ret Str.388; -procedure Str.67 (Str.192): - let Str.193 : {U64, U8} = CallByName Str.42 Str.192; - let Str.254 : U8 = StructAtIndex 1 Str.193; - let Str.255 : U8 = 0i64; - let Str.251 : Int1 = CallByName Bool.9 Str.254 Str.255; - if Str.251 then - let Str.253 : U64 = StructAtIndex 0 Str.193; - let Str.252 : [C {}, C U64] = TagId(1) Str.253; - ret Str.252; +procedure Str.72 (Str.290): + let Str.291 : {U64, U8} = CallByName Str.42 Str.290; + let Str.386 : U8 = StructAtIndex 1 Str.291; + let Str.387 : U8 = 0i64; + let Str.383 : Int1 = CallByName Bool.9 Str.386 Str.387; + if Str.383 then + let Str.385 : U64 = StructAtIndex 0 Str.291; + let Str.384 : [C {}, C U64] = TagId(1) Str.385; + ret Str.384; else - let Str.250 : {} = Struct {}; - let Str.249 : [C {}, C U64] = TagId(0) Str.250; - ret Str.249; + let Str.382 : {} = Struct {}; + let Str.381 : [C {}, C U64] = TagId(0) Str.382; + ret Str.381; procedure Test.1 (Test.2): joinpoint Test.11 Test.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 131f022a32..7b8472617b 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 @@ -99,12 +99,12 @@ procedure Num.96 (#Attr.2): ret Num.283; procedure Str.12 (#Attr.2): - let Str.249 : List U8 = lowlevel StrToUtf8 #Attr.2; - ret Str.249; + let Str.381 : List U8 = lowlevel StrToUtf8 #Attr.2; + ret Str.381; procedure Str.36 (#Attr.2): - let Str.250 : U64 = lowlevel StrCountUtf8Bytes #Attr.2; - ret Str.250; + let Str.382 : U64 = lowlevel StrCountUtf8Bytes #Attr.2; + ret Str.382; procedure Test.20 (Test.58): let Test.295 : Str = CallByName Encode.23 Test.58; 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 9c0e8514b8..b6e1bb0b17 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 @@ -192,12 +192,12 @@ procedure Num.96 (#Attr.2): ret Num.287; procedure Str.12 (#Attr.2): - let Str.252 : List U8 = lowlevel StrToUtf8 #Attr.2; - ret Str.252; + let Str.384 : List U8 = lowlevel StrToUtf8 #Attr.2; + ret Str.384; procedure Str.36 (#Attr.2): - let Str.253 : U64 = lowlevel StrCountUtf8Bytes #Attr.2; - ret Str.253; + let Str.385 : U64 = lowlevel StrCountUtf8Bytes #Attr.2; + ret Str.385; procedure Test.20 (Test.58): inc Test.58; diff --git a/crates/compiler/uitest/tests/ability/specialize/inspect/opaque_automatic.txt b/crates/compiler/uitest/tests/ability/specialize/inspect/opaque_automatic.txt index 563c6b2103..3b96915938 100644 --- a/crates/compiler/uitest/tests/ability/specialize/inspect/opaque_automatic.txt +++ b/crates/compiler/uitest/tests/ability/specialize/inspect/opaque_automatic.txt @@ -46,8 +46,8 @@ procedure Inspect.64 (Inspect.297): ret Inspect.297; procedure Str.3 (#Attr.2, #Attr.3): - let Str.248 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.248; + let Str.380 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.380; procedure Test.0 (): let Test.4 : {} = Struct {}; diff --git a/crates/compiler/uitest/tests/ability/specialize/inspect/opaque_automatic_late.txt b/crates/compiler/uitest/tests/ability/specialize/inspect/opaque_automatic_late.txt index 06806d5cad..03ced7e5fd 100644 --- a/crates/compiler/uitest/tests/ability/specialize/inspect/opaque_automatic_late.txt +++ b/crates/compiler/uitest/tests/ability/specialize/inspect/opaque_automatic_late.txt @@ -49,8 +49,8 @@ procedure Inspect.64 (Inspect.297): ret Inspect.297; procedure Str.3 (#Attr.2, #Attr.3): - let Str.248 : Str = lowlevel StrConcat #Attr.2 #Attr.3; - ret Str.248; + let Str.380 : Str = lowlevel StrConcat #Attr.2 #Attr.3; + ret Str.380; procedure Test.2 (Test.3): let Test.4 : Str = CallByName Inspect.33 Test.3;