roc/compiler/test_mono/generated/monomorphized_ints_aliased.txt
ayazhafiz 17029cff7e Link aliased lambdas to the partial procs of the original symbol
This ensures that we use the correct specialized variable at the call
site of a function. In #2725 what happened was that a generalized
function was aliased, causing it to undergo generalization again. Then,
we lost the variable used to specialize at the call site. Instead, just
link to the partial proc being aliased directly.

There is an added benefit here, which is that we can avoid the
possibly-quadratic replacement of symbols in the generated statement.

Closes #2725
2022-03-14 16:42:53 -05:00

21 lines
617 B
Text

procedure Num.22 (#Attr.2, #Attr.3):
let Test.12 : U64 = lowlevel NumAdd #Attr.2 #Attr.3;
ret Test.12;
procedure Test.5 (Test.7, Test.8):
let Test.18 : U64 = 1i64;
ret Test.18;
procedure Test.6 (Test.7, Test.8):
let Test.15 : U64 = 1i64;
ret Test.15;
procedure Test.0 ():
let Test.16 : U8 = 100i64;
let Test.17 : U32 = 100i64;
let Test.10 : U64 = CallByName Test.5 Test.16 Test.17;
let Test.13 : U32 = 100i64;
let Test.14 : U8 = 100i64;
let Test.11 : U64 = CallByName Test.6 Test.13 Test.14;
let Test.9 : U64 = CallByName Num.22 Test.10 Test.11;
ret Test.9;