Files
kotlin-fork/compiler/fir/analysis-tests/testData/resolve/cfg/flowFromTwoInplaceLambdas.dot
T
pyos 3436535e7a FIR DFA: deprioritize branches with no reassignments in flow unions
callBothLambdas({ x = "..." }, { x is Int })
  // the assignment always executes, so x is String | (String & Int);
  // the latter is always a subtype of the former so it can be ignored
2022-11-22 15:44:27 +00:00

686 lines
24 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
40 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_10 {
color=blue
41 [label="Enter block"];
42 [label="Const: Null(null)"];
43 [label="Assignment: R|<local>/p|"];
44 [label="Function call: R|/n|<R|kotlin/Int?|>()"];
45 [label="Exit block"];
}
46 [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
47 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_12 {
color=blue
48 [label="Enter block"];
49 [label="Access variable R|<local>/p|"];
50 [label="Smart cast: R|<local>/p|"];
51 [label="Access variable <Inapplicable(UNSTABLE_SMARTCAST): kotlin/String.length>#"];
52 [label="Const: Int(123)"];
53 [label="Exit block"];
}
54 [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="Smart cast: R|<local>/p|"];
34 [label="Access variable <Inapplicable(UNSAFE_CALL): kotlin/String.length>#"];
35 [label="Exit block"];
}
36 [label="Exit when branch result"];
37 [label="Exit when"];
}
38 [label="Exit block"];
}
39 [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 -> {37};
24 -> {25};
25 -> {26};
26 -> {40};
26 -> {28} [color=red];
26 -> {40} [style=dashed];
27 -> {31} [color=red];
28 -> {29};
29 -> {47};
29 -> {30} [color=red];
29 -> {47} [style=dashed];
30 -> {31} [color=green];
31 -> {32};
32 -> {33};
33 -> {34};
34 -> {35};
35 -> {36};
36 -> {37};
37 -> {38};
38 -> {39};
40 -> {41};
41 -> {42};
42 -> {43};
43 -> {44};
44 -> {45};
45 -> {46};
46 -> {27} [color=red];
46 -> {28} [color=green];
47 -> {48};
48 -> {49};
49 -> {50};
50 -> {51};
51 -> {52};
52 -> {53};
53 -> {54};
54 -> {27} [color=red];
54 -> {30} [color=green];
subgraph cluster_13 {
color=red
55 [label="Enter function test1_tail" style="filled" fillcolor=red];
subgraph cluster_14 {
color=blue
56 [label="Enter block"];
57 [label="Access variable R|<local>/x|"];
58 [label="Variable declaration: lvar p: R|kotlin/String?|"];
subgraph cluster_15 {
color=blue
59 [label="Enter when"];
subgraph cluster_16 {
color=blue
60 [label="Enter when branch condition "];
61 [label="Access variable R|<local>/p|"];
62 [label="Const: Null(null)"];
63 [label="Equality operator !="];
64 [label="Exit when branch condition"];
}
65 [label="Synthetic else branch"];
66 [label="Enter when branch result"];
subgraph cluster_17 {
color=blue
67 [label="Enter block"];
68 [label="Postponed enter to lambda"];
subgraph cluster_18 {
color=blue
89 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_19 {
color=blue
90 [label="Enter block"];
91 [label="Access variable R|<local>/p|"];
92 [label="Smart cast: R|<local>/p|"];
93 [label="Access variable <Inapplicable(UNSTABLE_SMARTCAST): kotlin/String.length>#"];
94 [label="Const: Int(123)"];
95 [label="Exit block"];
}
96 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
70 [label="Postponed exit from lambda"];
71 [label="Postponed enter to lambda"];
subgraph cluster_20 {
color=blue
82 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_21 {
color=blue
83 [label="Enter block"];
84 [label="Const: Null(null)"];
85 [label="Assignment: R|<local>/p|"];
86 [label="Function call: R|/n|<R|kotlin/Int?|>()"];
87 [label="Exit block"];
}
88 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
69 [label="Call arguments union" style="filled" fillcolor=yellow];
72 [label="Postponed exit from lambda"];
73 [label="Function call: R|/run2|<R|kotlin/Int?|>(...)"];
74 [label="Access variable R|<local>/p|"];
75 [label="Smart cast: R|<local>/p|"];
76 [label="Access variable <Inapplicable(UNSAFE_CALL): kotlin/String.length>#"];
77 [label="Exit block"];
}
78 [label="Exit when branch result"];
79 [label="Exit when"];
}
80 [label="Exit block"];
}
81 [label="Exit function test1_tail" style="filled" fillcolor=red];
}
55 -> {56};
56 -> {57};
57 -> {58};
58 -> {59};
59 -> {60};
60 -> {61};
61 -> {62};
62 -> {63};
63 -> {64};
64 -> {66 65};
65 -> {79};
66 -> {67};
67 -> {68};
68 -> {89};
68 -> {70} [color=red];
68 -> {89} [style=dashed];
69 -> {73} [color=red];
70 -> {71};
71 -> {82};
71 -> {72} [color=red];
71 -> {82} [style=dashed];
72 -> {73} [color=green];
73 -> {74};
74 -> {75};
75 -> {76};
76 -> {77};
77 -> {78};
78 -> {79};
79 -> {80};
80 -> {81};
82 -> {83};
83 -> {84};
84 -> {85};
85 -> {86};
86 -> {87};
87 -> {88};
88 -> {69} [color=red];
88 -> {72} [color=green];
89 -> {90};
90 -> {91};
91 -> {92};
92 -> {93};
93 -> {94};
94 -> {95};
95 -> {96};
96 -> {69} [color=red];
96 -> {70} [color=green];
subgraph cluster_22 {
color=red
97 [label="Enter function test2" style="filled" fillcolor=red];
subgraph cluster_23 {
color=blue
98 [label="Enter block"];
99 [label="Access variable R|<local>/x|"];
100 [label="Variable declaration: lvar p: R|kotlin/Any?|"];
101 [label="Access variable R|<local>/p|"];
102 [label="Access variable <Unresolved name: length>#"];
103 [label="Postponed enter to lambda"];
subgraph cluster_24 {
color=blue
119 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_25 {
color=blue
120 [label="Enter block"];
121 [label="Const: Null(null)"];
122 [label="Assignment: R|<local>/p|"];
123 [label="Function call: R|/n|<R|kotlin/Int?|>()"];
124 [label="Exit block"];
}
125 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
105 [label="Postponed exit from lambda"];
106 [label="Postponed enter to lambda"];
subgraph cluster_26 {
color=blue
126 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_27 {
color=blue
127 [label="Enter block"];
128 [label="Access variable R|<local>/p|"];
129 [label="Type operator: (R|<local>/p| as R|kotlin/String|)"];
130 [label="Const: Int(123)"];
131 [label="Exit block"];
}
132 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
104 [label="Call arguments union" style="filled" fillcolor=yellow];
107 [label="Postponed exit from lambda"];
108 [label="Function call: R|/run2|<R|kotlin/Int?|>(...)"];
109 [label="Access variable R|<local>/p|"];
110 [label="Smart cast: R|<local>/p|"];
111 [label="Access variable <Unresolved name: length>#"];
112 [label="Access variable R|<local>/p|"];
113 [label="Smart cast: R|<local>/p|"];
114 [label="Enter safe call"];
115 [label="Access variable <Unresolved name: length>#"];
116 [label="Exit safe call"];
117 [label="Exit block"];
}
118 [label="Exit function test2" style="filled" fillcolor=red];
}
97 -> {98};
98 -> {99};
99 -> {100};
100 -> {101};
101 -> {102};
102 -> {103};
103 -> {119};
103 -> {105} [color=red];
103 -> {119} [style=dashed];
104 -> {108} [color=red];
105 -> {106};
106 -> {126};
106 -> {107} [color=red];
106 -> {126} [style=dashed];
107 -> {108} [color=green];
108 -> {109};
109 -> {110};
110 -> {111};
111 -> {112};
112 -> {113};
113 -> {114 116};
114 -> {115};
115 -> {116};
116 -> {117};
117 -> {118};
119 -> {120};
120 -> {121};
121 -> {122};
122 -> {123};
123 -> {124};
124 -> {125};
125 -> {104} [color=red];
125 -> {105} [color=green];
126 -> {127};
127 -> {128};
128 -> {129};
129 -> {130};
130 -> {131};
131 -> {132};
132 -> {104} [color=red];
132 -> {107} [color=green];
subgraph cluster_28 {
color=red
133 [label="Enter function test3" style="filled" fillcolor=red];
subgraph cluster_29 {
color=blue
134 [label="Enter block"];
135 [label="Access variable R|<local>/x|"];
136 [label="Variable declaration: lvar p: R|kotlin/Any?|"];
137 [label="Access variable R|<local>/p|"];
138 [label="Access variable <Unresolved name: length>#"];
139 [label="Postponed enter to lambda"];
subgraph cluster_30 {
color=blue
155 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_31 {
color=blue
156 [label="Enter block"];
157 [label="Const: Null(null)"];
158 [label="Assignment: R|<local>/p|"];
159 [label="Function call: R|/n|<R|kotlin/Int?|>()"];
160 [label="Exit block"];
}
161 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
141 [label="Postponed exit from lambda"];
142 [label="Postponed enter to lambda"];
subgraph cluster_32 {
color=blue
162 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_33 {
color=blue
163 [label="Enter block"];
164 [label="Const: String()"];
165 [label="Assignment: R|<local>/p|"];
166 [label="Const: Int(123)"];
167 [label="Exit block"];
}
168 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
140 [label="Call arguments union" style="filled" fillcolor=yellow];
143 [label="Postponed exit from lambda"];
144 [label="Function call: R|/run2|<R|kotlin/Int?|>(...)"];
145 [label="Access variable R|<local>/p|"];
146 [label="Smart cast: R|<local>/p|"];
147 [label="Access variable <Inapplicable(UNSAFE_CALL): kotlin/String.length>#"];
148 [label="Access variable R|<local>/p|"];
149 [label="Smart cast: R|<local>/p|"];
150 [label="Enter safe call"];
151 [label="Access variable R|kotlin/String.length|"];
152 [label="Exit safe call"];
153 [label="Exit block"];
}
154 [label="Exit function test3" style="filled" fillcolor=red];
}
133 -> {134};
134 -> {135};
135 -> {136};
136 -> {137};
137 -> {138};
138 -> {139};
139 -> {155};
139 -> {141} [color=red];
139 -> {155} [style=dashed];
140 -> {144} [color=red];
141 -> {142};
142 -> {162};
142 -> {143} [color=red];
142 -> {162} [style=dashed];
143 -> {144} [color=green];
144 -> {145};
145 -> {146};
146 -> {147};
147 -> {148};
148 -> {149};
149 -> {150 152};
150 -> {151};
151 -> {152};
152 -> {153};
153 -> {154};
155 -> {156};
156 -> {157};
157 -> {158};
158 -> {159};
159 -> {160};
160 -> {161};
161 -> {140} [color=red];
161 -> {141} [color=green];
162 -> {163};
163 -> {164};
164 -> {165};
165 -> {166};
166 -> {167};
167 -> {168};
168 -> {140} [color=red];
168 -> {143} [color=green];
subgraph cluster_34 {
color=red
169 [label="Enter class I1" style="filled" fillcolor=red];
170 [label="Exit class I1" style="filled" fillcolor=red];
}
169 -> {170} [color=green];
subgraph cluster_35 {
color=red
171 [label="Enter class I2" style="filled" fillcolor=red];
172 [label="Exit class I2" style="filled" fillcolor=red];
}
171 -> {172} [color=green];
subgraph cluster_36 {
color=red
173 [label="Enter function test4" style="filled" fillcolor=red];
subgraph cluster_37 {
color=blue
174 [label="Enter block"];
175 [label="Access variable R|<local>/x|"];
176 [label="Access variable <Unresolved name: x>#"];
177 [label="Access variable R|<local>/x|"];
178 [label="Access variable <Unresolved name: y>#"];
179 [label="Postponed enter to lambda"];
subgraph cluster_38 {
color=blue
193 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_39 {
color=blue
194 [label="Enter block"];
195 [label="Access variable R|<local>/x|"];
196 [label="Type operator: (R|<local>/x| as R|I1|)"];
197 [label="Access variable R|<local>/x|"];
198 [label="Smart cast: R|<local>/x|"];
199 [label="Access variable <Unresolved name: y>#"];
200 [label="Function call: R|/n|<R|kotlin/Int?|>()"];
201 [label="Exit block"];
}
202 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
181 [label="Postponed exit from lambda"];
182 [label="Postponed enter to lambda"];
subgraph cluster_40 {
color=blue
203 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_41 {
color=blue
204 [label="Enter block"];
205 [label="Access variable R|<local>/x|"];
206 [label="Type operator: (R|<local>/x| as R|I2|)"];
207 [label="Access variable R|<local>/x|"];
208 [label="Smart cast: R|<local>/x|"];
209 [label="Access variable <Unresolved name: x>#"];
210 [label="Const: Int(123)"];
211 [label="Exit block"];
}
212 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
180 [label="Call arguments union" style="filled" fillcolor=yellow];
183 [label="Postponed exit from lambda"];
184 [label="Function call: R|/run2|<R|kotlin/Int?|>(...)"];
185 [label="Access variable R|<local>/x|"];
186 [label="Smart cast: R|<local>/x|"];
187 [label="Access variable R|/I1.x|"];
188 [label="Access variable R|<local>/x|"];
189 [label="Smart cast: R|<local>/x|"];
190 [label="Access variable R|/I2.y|"];
191 [label="Exit block"];
}
192 [label="Exit function test4" style="filled" fillcolor=red];
}
173 -> {174};
174 -> {175};
175 -> {176};
176 -> {177};
177 -> {178};
178 -> {179};
179 -> {193};
179 -> {181} [color=red];
179 -> {193} [style=dashed];
180 -> {184} [color=red];
181 -> {182};
182 -> {203};
182 -> {183} [color=red];
182 -> {203} [style=dashed];
183 -> {184} [color=green];
184 -> {185};
185 -> {186};
186 -> {187};
187 -> {188};
188 -> {189};
189 -> {190};
190 -> {191};
191 -> {192};
193 -> {194};
194 -> {195};
195 -> {196};
196 -> {197};
197 -> {198};
198 -> {199};
199 -> {200};
200 -> {201};
201 -> {202};
202 -> {180} [color=red];
202 -> {181} [color=green];
203 -> {204};
204 -> {205};
205 -> {206};
206 -> {207};
207 -> {208};
208 -> {209};
209 -> {210};
210 -> {211};
211 -> {212};
212 -> {180} [color=red];
212 -> {183} [color=green];
subgraph cluster_42 {
color=red
213 [label="Enter function test5" style="filled" fillcolor=red];
subgraph cluster_43 {
color=blue
214 [label="Enter block"];
215 [label="Access variable R|<local>/x|"];
216 [label="Variable declaration: lvar p: R|kotlin/Any?|"];
217 [label="Access variable R|<local>/p|"];
218 [label="Access variable <Unresolved name: length>#"];
219 [label="Postponed enter to lambda"];
subgraph cluster_44 {
color=blue
235 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_45 {
color=blue
236 [label="Enter block"];
237 [label="Access variable R|<local>/p|"];
238 [label="Type operator: (R|<local>/p| as R|kotlin/Int|)"];
239 [label="Const: Int(123)"];
240 [label="Exit block"];
}
241 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
221 [label="Postponed exit from lambda"];
222 [label="Postponed enter to lambda"];
subgraph cluster_46 {
color=blue
242 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_47 {
color=blue
243 [label="Enter block"];
244 [label="Access variable R|<local>/q|"];
245 [label="Assignment: R|<local>/p|"];
246 [label="Function call: R|/n|<R|kotlin/Int?|>()"];
247 [label="Exit block"];
}
248 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
220 [label="Call arguments union" style="filled" fillcolor=yellow];
223 [label="Postponed exit from lambda"];
224 [label="Function call: R|/run2|<R|kotlin/Int?|>(...)"];
225 [label="Access variable R|<local>/p|"];
226 [label="Smart cast: R|<local>/p|"];
227 [label="Access variable <Inapplicable(UNSAFE_CALL): kotlin/String.length>#"];
228 [label="Access variable R|<local>/p|"];
229 [label="Smart cast: R|<local>/p|"];
230 [label="Enter safe call"];
231 [label="Access variable R|kotlin/String.length|"];
232 [label="Exit safe call"];
233 [label="Exit block"];
}
234 [label="Exit function test5" style="filled" fillcolor=red];
}
213 -> {214};
214 -> {215};
215 -> {216};
216 -> {217};
217 -> {218};
218 -> {219};
219 -> {235};
219 -> {221} [color=red];
219 -> {235} [style=dashed];
220 -> {224} [color=red];
221 -> {222};
222 -> {242};
222 -> {223} [color=red];
222 -> {242} [style=dashed];
223 -> {224} [color=green];
224 -> {225};
225 -> {226};
226 -> {227};
227 -> {228};
228 -> {229};
229 -> {230 232};
230 -> {231};
231 -> {232};
232 -> {233};
233 -> {234};
235 -> {236};
236 -> {237};
237 -> {238};
238 -> {239};
239 -> {240};
240 -> {241};
241 -> {220} [color=red];
241 -> {221} [color=green];
242 -> {243};
243 -> {244};
244 -> {245};
245 -> {246};
246 -> {247};
247 -> {248};
248 -> {220} [color=red];
248 -> {223} [color=green];
}