FIR CFG: remove ordering from control flow through in-place lambdas

Old graph:

  arg -> lambda enter -> ... -> lambda exit -> lambda enter -> ... ->
   -> lambda exit -> call

New graph:

  arg -+-> lambda enter -> ... -> lambda exit -+-> call
       \-> lambda enter -> ... -> lambda exit -/
This commit is contained in:
pyos
2022-11-23 10:10:16 +01:00
committed by teamcity
parent 5dce772f0b
commit c4c05f5248
41 changed files with 515 additions and 555 deletions
@@ -502,7 +502,7 @@ digraph returns_kt {
172 -> {173};
173 -> {174};
174 -> {175};
175 -> {176 180};
175 -> {176 180 177};
175 -> {180} [style=dashed];
176 -> {177};
177 -> {178};
@@ -127,10 +127,11 @@ digraph incorrectSmartcastToNothing_kt {
32 -> {33};
33 -> {34 38};
34 -> {35};
35 -> {46};
35 -> {36} [color=red];
35 -> {46 37};
35 -> {36} [style=dotted];
35 -> {46} [style=dashed];
36 -> {37};
36 -> {41} [color=red];
36 -> {37} [color=green];
37 -> {38};
38 -> {41 39};
39 -> {40};
@@ -145,7 +146,6 @@ digraph incorrectSmartcastToNothing_kt {
49 -> {50};
50 -> {51};
51 -> {52};
52 -> {41} [color=red];
52 -> {36} [color=green];
52 -> {36};
}
@@ -87,8 +87,8 @@ digraph inPlaceLambdas_kt {
15 -> {23};
16 -> {17};
17 -> {18};
18 -> {26};
18 -> {19} [color=red];
18 -> {26 20};
18 -> {19} [style=dotted];
18 -> {26} [style=dashed];
19 -> {20};
20 -> {21};
@@ -102,8 +102,7 @@ digraph inPlaceLambdas_kt {
29 -> {30};
30 -> {31};
31 -> {32};
32 -> {20} [color=red];
32 -> {19} [color=green];
32 -> {19};
subgraph cluster_11 {
color=red
@@ -135,8 +134,8 @@ digraph inPlaceLambdas_kt {
}
33 -> {34};
34 -> {35};
35 -> {43};
35 -> {36} [color=red];
35 -> {43 37};
35 -> {36} [style=dotted];
35 -> {43} [style=dashed];
36 -> {37};
37 -> {38};
@@ -149,8 +148,7 @@ digraph inPlaceLambdas_kt {
45 -> {46};
46 -> {47};
47 -> {48};
48 -> {37} [color=red];
48 -> {36} [color=green];
48 -> {36};
subgraph cluster_15 {
color=red
@@ -214,8 +212,8 @@ digraph inPlaceLambdas_kt {
56 -> {67};
57 -> {58};
58 -> {59};
59 -> {70};
59 -> {60} [color=red];
59 -> {70 61};
59 -> {60} [style=dotted];
59 -> {70} [style=dashed];
60 -> {61};
61 -> {62};
@@ -235,7 +233,6 @@ digraph inPlaceLambdas_kt {
76 -> {77};
77 -> {78};
78 -> {79};
79 -> {61} [color=red];
79 -> {60} [color=green];
79 -> {60};
}
@@ -216,10 +216,11 @@ digraph lambdaInWhenBranch_kt {
45 -> {46};
46 -> {47};
47 -> {48};
48 -> {82};
48 -> {49} [color=red];
48 -> {82 50};
48 -> {49} [style=dotted];
48 -> {82} [style=dashed];
49 -> {50};
49 -> {53} [color=red];
49 -> {50} [color=green];
50 -> {51};
51 -> {52};
52 -> {53};
@@ -255,7 +256,6 @@ digraph lambdaInWhenBranch_kt {
83 -> {84};
84 -> {85};
85 -> {86};
86 -> {53} [color=red];
86 -> {49} [color=green];
86 -> {49};
}
@@ -304,8 +304,8 @@ digraph implicitReceivers_kt {
82 -> {83};
83 -> {84};
84 -> {85};
85 -> {90};
85 -> {86} [color=red];
85 -> {90 87};
85 -> {86} [style=dotted];
85 -> {90} [style=dashed];
86 -> {87};
87 -> {88};
@@ -313,19 +313,19 @@ digraph implicitReceivers_kt {
90 -> {91};
91 -> {92};
92 -> {93};
93 -> {98};
93 -> {94} [color=red];
93 -> {98 95};
93 -> {94} [style=dotted];
93 -> {98} [style=dashed];
94 -> {95};
94 -> {87} [color=red];
94 -> {95} [color=green];
95 -> {96};
96 -> {97};
97 -> {87} [color=red];
97 -> {86} [color=green];
97 -> {86};
98 -> {99};
99 -> {100};
100 -> {101};
101 -> {110};
101 -> {102} [color=red];
101 -> {110 103};
101 -> {102} [style=dotted];
101 -> {110} [style=dashed];
102 -> {103};
103 -> {104};
@@ -334,7 +334,7 @@ digraph implicitReceivers_kt {
106 -> {107};
107 -> {108};
108 -> {109};
109 -> {94} [color=green];
109 -> {94};
110 -> {111};
111 -> {112};
112 -> {113};
@@ -344,8 +344,7 @@ digraph implicitReceivers_kt {
116 -> {117};
117 -> {118};
118 -> {119};
119 -> {103} [color=red];
119 -> {102} [color=green];
119 -> {102};
subgraph cluster_32 {
color=red
@@ -187,7 +187,7 @@ digraph safeCalls_kt {
56 -> {57};
57 -> {63 58};
58 -> {59};
59 -> {60 69};
59 -> {60 69 61};
59 -> {69} [style=dashed];
60 -> {61};
61 -> {64};
@@ -292,7 +292,7 @@ digraph safeCalls_kt {
95 -> {96 106};
96 -> {97};
97 -> {112};
97 -> {98} [color=red];
97 -> {98 99} [style=dotted];
97 -> {112} [style=dashed];
98 -> {99} [style=dotted];
99 -> {100} [style=dotted];
@@ -314,6 +314,6 @@ digraph safeCalls_kt {
114 -> {115} [style=dotted];
115 -> {116} [style=dotted];
116 -> {117} [style=dotted];
117 -> {98 99} [style=dotted];
117 -> {98} [style=dotted];
}
@@ -295,8 +295,8 @@ digraph smartcastToNothing_kt {
91 -> {92};
92 -> {93 97};
93 -> {94};
94 -> {100};
94 -> {95} [color=red];
94 -> {100 96};
94 -> {95} [style=dotted];
94 -> {100} [style=dashed];
95 -> {96};
96 -> {97};
@@ -307,8 +307,7 @@ digraph smartcastToNothing_kt {
102 -> {103};
103 -> {104};
104 -> {105};
105 -> {96} [color=red];
105 -> {95} [color=green];
105 -> {95};
subgraph cluster_26 {
color=red