Files
kotlin-fork/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromTwoInplaceLambdas.dot
T
Simon Ogorodnik 513af2dfbc FIR. Refactor smart-cast representation in FIR tree
Make smart-casts non-transparent expression without delegation
to underlying FirQualifiedAccessExpression, as children delegation in
fir tree has unclear semantics
Remove two different kinds of tree nodes for smart-casts
2022-08-15 21:46:11 +00:00

586 lines
21 KiB
Plaintext
Vendored

digraph flowFromTwoInplaceLambdas_kt {
graph [nodesep=3]
node [shape=box penwidth=2]
edge [penwidth=2]
subgraph cluster_0 {
color=red
0 [label="Enter function n" style="filled" fillcolor=red];
subgraph cluster_1 {
color=blue
1 [label="Enter block"];
2 [label="Const: Null(null)"];
3 [label="Jump: ^n Null(null)"];
4 [label="Stub" style="filled" fillcolor=gray];
5 [label="Exit block" style="filled" fillcolor=gray];
}
6 [label="Exit function n" style="filled" fillcolor=red];
}
0 -> {1};
1 -> {2};
2 -> {3};
3 -> {6};
3 -> {4} [style=dotted];
4 -> {5} [style=dotted];
5 -> {6} [style=dotted];
subgraph cluster_2 {
color=red
7 [label="Enter function run2" style="filled" fillcolor=red];
subgraph cluster_3 {
color=blue
8 [label="Enter block"];
9 [label="Function call: R|<local>/x|.R|SubstitutionOverride<kotlin/Function0.invoke: R|T|>|()"];
10 [label="Function call: R|<local>/y|.R|SubstitutionOverride<kotlin/Function0.invoke: R|T|>|()"];
11 [label="Exit block"];
}
12 [label="Exit function run2" style="filled" fillcolor=red];
}
7 -> {8};
8 -> {9};
9 -> {10};
10 -> {11};
11 -> {12};
subgraph cluster_4 {
color=red
13 [label="Enter function test1" style="filled" fillcolor=red];
subgraph cluster_5 {
color=blue
14 [label="Enter block"];
15 [label="Access variable R|<local>/x|"];
16 [label="Variable declaration: lvar p: R|kotlin/String?|"];
subgraph cluster_6 {
color=blue
17 [label="Enter when"];
subgraph cluster_7 {
color=blue
18 [label="Enter when branch condition "];
19 [label="Access variable R|<local>/p|"];
20 [label="Const: Null(null)"];
21 [label="Equality operator !="];
22 [label="Exit when branch condition"];
}
23 [label="Synthetic else branch"];
24 [label="Enter when branch result"];
subgraph cluster_8 {
color=blue
25 [label="Enter block"];
26 [label="Postponed enter to lambda"];
subgraph cluster_9 {
color=blue
39 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_10 {
color=blue
40 [label="Enter block"];
41 [label="Const: Null(null)"];
42 [label="Assignment: R|<local>/p|"];
43 [label="Function call: R|/n|<R|kotlin/Int?|>()"];
44 [label="Exit block"];
}
45 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
28 [label="Postponed exit from lambda"];
29 [label="Postponed enter to lambda"];
subgraph cluster_11 {
color=blue
46 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_12 {
color=blue
47 [label="Enter block"];
48 [label="Access variable R|<local>/p|"];
49 [label="Smart cast: R|<local>/p|"];
50 [label="Access variable <Inapplicable(UNSTABLE_SMARTCAST): kotlin/String.length>#"];
51 [label="Const: Int(123)"];
52 [label="Exit block"];
}
53 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
27 [label="Call arguments union" style="filled" fillcolor=yellow];
30 [label="Postponed exit from lambda"];
31 [label="Function call: R|/run2|<R|kotlin/Int?|>(...)"];
32 [label="Access variable R|<local>/p|"];
33 [label="Access variable <Inapplicable(UNSAFE_CALL): kotlin/String.length>#"];
34 [label="Exit block"];
}
35 [label="Exit when branch result"];
36 [label="Exit when"];
}
37 [label="Exit block"];
}
38 [label="Exit function test1" style="filled" fillcolor=red];
}
13 -> {14};
14 -> {15};
15 -> {16};
16 -> {17};
17 -> {18};
18 -> {19};
19 -> {20};
20 -> {21};
21 -> {22};
22 -> {24 23};
23 -> {36};
24 -> {25};
25 -> {26};
26 -> {39};
26 -> {28} [color=red];
26 -> {39} [style=dashed];
27 -> {31} [color=red];
28 -> {29};
29 -> {46};
29 -> {30} [color=red];
29 -> {46} [style=dashed];
30 -> {31} [color=green];
31 -> {32};
32 -> {33};
33 -> {34};
34 -> {35};
35 -> {36};
36 -> {37};
37 -> {38};
39 -> {40};
40 -> {41};
41 -> {42};
42 -> {43};
43 -> {44};
44 -> {45};
45 -> {27} [color=red];
45 -> {28} [color=green];
46 -> {47};
47 -> {48};
48 -> {49};
49 -> {50};
50 -> {51};
51 -> {52};
52 -> {53};
53 -> {27} [color=red];
53 -> {30} [color=green];
subgraph cluster_13 {
color=red
54 [label="Enter function test1_tail" style="filled" fillcolor=red];
subgraph cluster_14 {
color=blue
55 [label="Enter block"];
56 [label="Access variable R|<local>/x|"];
57 [label="Variable declaration: lvar p: R|kotlin/String?|"];
subgraph cluster_15 {
color=blue
58 [label="Enter when"];
subgraph cluster_16 {
color=blue
59 [label="Enter when branch condition "];
60 [label="Access variable R|<local>/p|"];
61 [label="Const: Null(null)"];
62 [label="Equality operator !="];
63 [label="Exit when branch condition"];
}
64 [label="Synthetic else branch"];
65 [label="Enter when branch result"];
subgraph cluster_17 {
color=blue
66 [label="Enter block"];
67 [label="Postponed enter to lambda"];
subgraph cluster_18 {
color=blue
87 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_19 {
color=blue
88 [label="Enter block"];
89 [label="Access variable R|<local>/p|"];
90 [label="Smart cast: R|<local>/p|"];
91 [label="Access variable <Inapplicable(UNSTABLE_SMARTCAST): kotlin/String.length>#"];
92 [label="Const: Int(123)"];
93 [label="Exit block"];
}
94 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
69 [label="Postponed exit from lambda"];
70 [label="Postponed enter to lambda"];
subgraph cluster_20 {
color=blue
80 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_21 {
color=blue
81 [label="Enter block"];
82 [label="Const: Null(null)"];
83 [label="Assignment: R|<local>/p|"];
84 [label="Function call: R|/n|<R|kotlin/Int?|>()"];
85 [label="Exit block"];
}
86 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
68 [label="Call arguments union" style="filled" fillcolor=yellow];
71 [label="Postponed exit from lambda"];
72 [label="Function call: R|/run2|<R|kotlin/Int?|>(...)"];
73 [label="Access variable R|<local>/p|"];
74 [label="Access variable <Inapplicable(UNSAFE_CALL): kotlin/String.length>#"];
75 [label="Exit block"];
}
76 [label="Exit when branch result"];
77 [label="Exit when"];
}
78 [label="Exit block"];
}
79 [label="Exit function test1_tail" style="filled" fillcolor=red];
}
54 -> {55};
55 -> {56};
56 -> {57};
57 -> {58};
58 -> {59};
59 -> {60};
60 -> {61};
61 -> {62};
62 -> {63};
63 -> {65 64};
64 -> {77};
65 -> {66};
66 -> {67};
67 -> {87};
67 -> {69} [color=red];
67 -> {87} [style=dashed];
68 -> {72} [color=red];
69 -> {70};
70 -> {80};
70 -> {71} [color=red];
70 -> {80} [style=dashed];
71 -> {72} [color=green];
72 -> {73};
73 -> {74};
74 -> {75};
75 -> {76};
76 -> {77};
77 -> {78};
78 -> {79};
80 -> {81};
81 -> {82};
82 -> {83};
83 -> {84};
84 -> {85};
85 -> {86};
86 -> {68} [color=red];
86 -> {71} [color=green];
87 -> {88};
88 -> {89};
89 -> {90};
90 -> {91};
91 -> {92};
92 -> {93};
93 -> {94};
94 -> {68} [color=red];
94 -> {69} [color=green];
subgraph cluster_22 {
color=red
95 [label="Enter function test2" style="filled" fillcolor=red];
subgraph cluster_23 {
color=blue
96 [label="Enter block"];
97 [label="Access variable R|<local>/x|"];
98 [label="Variable declaration: lvar p: R|kotlin/Any?|"];
99 [label="Access variable R|<local>/p|"];
100 [label="Access variable <Unresolved name: length>#"];
101 [label="Postponed enter to lambda"];
subgraph cluster_24 {
color=blue
117 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_25 {
color=blue
118 [label="Enter block"];
119 [label="Const: Null(null)"];
120 [label="Assignment: R|<local>/p|"];
121 [label="Function call: R|/n|<R|kotlin/Int?|>()"];
122 [label="Exit block"];
}
123 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
103 [label="Postponed exit from lambda"];
104 [label="Postponed enter to lambda"];
subgraph cluster_26 {
color=blue
124 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_27 {
color=blue
125 [label="Enter block"];
126 [label="Access variable R|<local>/p|"];
127 [label="Type operator: (R|<local>/p| as R|kotlin/String|)"];
128 [label="Const: Int(123)"];
129 [label="Exit block"];
}
130 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
102 [label="Call arguments union" style="filled" fillcolor=yellow];
105 [label="Postponed exit from lambda"];
106 [label="Function call: R|/run2|<R|kotlin/Int?|>(...)"];
107 [label="Access variable R|<local>/p|"];
108 [label="Smart cast: R|<local>/p|"];
109 [label="Access variable <Inapplicable(UNSAFE_CALL): kotlin/String.length>#"];
110 [label="Access variable R|<local>/p|"];
111 [label="Smart cast: R|<local>/p|"];
112 [label="Enter safe call"];
113 [label="Access variable R|kotlin/String.length|"];
114 [label="Exit safe call"];
115 [label="Exit block"];
}
116 [label="Exit function test2" style="filled" fillcolor=red];
}
95 -> {96};
96 -> {97};
97 -> {98};
98 -> {99};
99 -> {100};
100 -> {101};
101 -> {117};
101 -> {103} [color=red];
101 -> {117} [style=dashed];
102 -> {106} [color=red];
103 -> {104};
104 -> {124};
104 -> {105} [color=red];
104 -> {124} [style=dashed];
105 -> {106} [color=green];
106 -> {107};
107 -> {108};
108 -> {109};
109 -> {110};
110 -> {111};
111 -> {112 114};
112 -> {113};
113 -> {114};
114 -> {115};
115 -> {116};
117 -> {118};
118 -> {119};
119 -> {120};
120 -> {121};
121 -> {122};
122 -> {123};
123 -> {102} [color=red];
123 -> {103} [color=green];
124 -> {125};
125 -> {126};
126 -> {127};
127 -> {128};
128 -> {129};
129 -> {130};
130 -> {102} [color=red];
130 -> {105} [color=green];
subgraph cluster_28 {
color=red
131 [label="Enter function test3" style="filled" fillcolor=red];
subgraph cluster_29 {
color=blue
132 [label="Enter block"];
133 [label="Access variable R|<local>/x|"];
134 [label="Variable declaration: lvar p: R|kotlin/Any?|"];
135 [label="Access variable R|<local>/p|"];
136 [label="Access variable <Unresolved name: length>#"];
137 [label="Postponed enter to lambda"];
subgraph cluster_30 {
color=blue
153 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_31 {
color=blue
154 [label="Enter block"];
155 [label="Const: Null(null)"];
156 [label="Assignment: R|<local>/p|"];
157 [label="Function call: R|/n|<R|kotlin/Int?|>()"];
158 [label="Exit block"];
}
159 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
139 [label="Postponed exit from lambda"];
140 [label="Postponed enter to lambda"];
subgraph cluster_32 {
color=blue
160 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_33 {
color=blue
161 [label="Enter block"];
162 [label="Const: String()"];
163 [label="Assignment: R|<local>/p|"];
164 [label="Const: Int(123)"];
165 [label="Exit block"];
}
166 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
138 [label="Call arguments union" style="filled" fillcolor=yellow];
141 [label="Postponed exit from lambda"];
142 [label="Function call: R|/run2|<R|kotlin/Int?|>(...)"];
143 [label="Access variable R|<local>/p|"];
144 [label="Smart cast: R|<local>/p|"];
145 [label="Access variable <Inapplicable(UNSAFE_CALL): kotlin/String.length>#"];
146 [label="Access variable R|<local>/p|"];
147 [label="Smart cast: R|<local>/p|"];
148 [label="Enter safe call"];
149 [label="Access variable R|kotlin/String.length|"];
150 [label="Exit safe call"];
151 [label="Exit block"];
}
152 [label="Exit function test3" style="filled" fillcolor=red];
}
131 -> {132};
132 -> {133};
133 -> {134};
134 -> {135};
135 -> {136};
136 -> {137};
137 -> {153};
137 -> {139} [color=red];
137 -> {153} [style=dashed];
138 -> {142} [color=red];
139 -> {140};
140 -> {160};
140 -> {141} [color=red];
140 -> {160} [style=dashed];
141 -> {142} [color=green];
142 -> {143};
143 -> {144};
144 -> {145};
145 -> {146};
146 -> {147};
147 -> {148 150};
148 -> {149};
149 -> {150};
150 -> {151};
151 -> {152};
153 -> {154};
154 -> {155};
155 -> {156};
156 -> {157};
157 -> {158};
158 -> {159};
159 -> {138} [color=red];
159 -> {139} [color=green];
160 -> {161};
161 -> {162};
162 -> {163};
163 -> {164};
164 -> {165};
165 -> {166};
166 -> {138} [color=red];
166 -> {141} [color=green];
subgraph cluster_34 {
color=red
167 [label="Enter class I1" style="filled" fillcolor=red];
168 [label="Exit class I1" style="filled" fillcolor=red];
}
167 -> {168} [color=green];
subgraph cluster_35 {
color=red
169 [label="Enter class I2" style="filled" fillcolor=red];
170 [label="Exit class I2" style="filled" fillcolor=red];
}
169 -> {170} [color=green];
subgraph cluster_36 {
color=red
171 [label="Enter function test4" style="filled" fillcolor=red];
subgraph cluster_37 {
color=blue
172 [label="Enter block"];
173 [label="Access variable R|<local>/x|"];
174 [label="Access variable <Unresolved name: x>#"];
175 [label="Access variable R|<local>/x|"];
176 [label="Access variable <Unresolved name: y>#"];
177 [label="Postponed enter to lambda"];
subgraph cluster_38 {
color=blue
191 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_39 {
color=blue
192 [label="Enter block"];
193 [label="Access variable R|<local>/x|"];
194 [label="Type operator: (R|<local>/x| as R|I1|)"];
195 [label="Access variable R|<local>/x|"];
196 [label="Smart cast: R|<local>/x|"];
197 [label="Access variable <Unresolved name: y>#"];
198 [label="Function call: R|/n|<R|kotlin/Int?|>()"];
199 [label="Exit block"];
}
200 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
179 [label="Postponed exit from lambda"];
180 [label="Postponed enter to lambda"];
subgraph cluster_40 {
color=blue
201 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_41 {
color=blue
202 [label="Enter block"];
203 [label="Access variable R|<local>/x|"];
204 [label="Type operator: (R|<local>/x| as R|I2|)"];
205 [label="Access variable R|<local>/x|"];
206 [label="Smart cast: R|<local>/x|"];
207 [label="Access variable <Unresolved name: x>#"];
208 [label="Const: Int(123)"];
209 [label="Exit block"];
}
210 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
178 [label="Call arguments union" style="filled" fillcolor=yellow];
181 [label="Postponed exit from lambda"];
182 [label="Function call: R|/run2|<R|kotlin/Int?|>(...)"];
183 [label="Access variable R|<local>/x|"];
184 [label="Smart cast: R|<local>/x|"];
185 [label="Access variable R|/I1.x|"];
186 [label="Access variable R|<local>/x|"];
187 [label="Smart cast: R|<local>/x|"];
188 [label="Access variable R|/I2.y|"];
189 [label="Exit block"];
}
190 [label="Exit function test4" style="filled" fillcolor=red];
}
171 -> {172};
172 -> {173};
173 -> {174};
174 -> {175};
175 -> {176};
176 -> {177};
177 -> {191};
177 -> {179} [color=red];
177 -> {191} [style=dashed];
178 -> {182} [color=red];
179 -> {180};
180 -> {201};
180 -> {181} [color=red];
180 -> {201} [style=dashed];
181 -> {182} [color=green];
182 -> {183};
183 -> {184};
184 -> {185};
185 -> {186};
186 -> {187};
187 -> {188};
188 -> {189};
189 -> {190};
191 -> {192};
192 -> {193};
193 -> {194};
194 -> {195};
195 -> {196};
196 -> {197};
197 -> {198};
198 -> {199};
199 -> {200};
200 -> {178} [color=red];
200 -> {179} [color=green];
201 -> {202};
202 -> {203};
203 -> {204};
204 -> {205};
205 -> {206};
206 -> {207};
207 -> {208};
208 -> {209};
209 -> {210};
210 -> {178} [color=red];
210 -> {181} [color=green];
}