[FIR] Rewind DFA after call arguments for correct receiver smartcasting

^KT-63709 Fixed
This commit is contained in:
Brian Norman
2023-11-27 13:48:09 -06:00
committed by Space Team
parent 38d5e56530
commit 0881910a1b
128 changed files with 22457 additions and 16148 deletions
@@ -53,17 +53,22 @@ digraph elvis_kt {
subgraph cluster_7 {
color=blue
23 [label="Enter block"];
24 [label="Access variable R|<local>/x|"];
25 [label="Smart cast: R|<local>/x|"];
26 [label="Function call: R|<local>/x|.R|/A.foo|()" style="filled" fillcolor=yellow];
27 [label="Exit block"];
subgraph cluster_8 {
color=blue
24 [label="Function call arguments enter"];
25 [label="Access variable R|<local>/x|"];
26 [label="Smart cast: R|<local>/x|"];
27 [label="Function call arguments exit"];
}
28 [label="Function call: R|<local>/x|.R|/A.foo|()" style="filled" fillcolor=yellow];
29 [label="Exit block"];
}
28 [label="Exit when branch result"];
29 [label="Exit when"];
30 [label="Exit when branch result"];
31 [label="Exit when"];
}
30 [label="Exit block"];
32 [label="Exit block"];
}
31 [label="Exit function test_1" style="filled" fillcolor=red];
33 [label="Exit function test_1" style="filled" fillcolor=red];
}
6 -> {7};
7 -> {8};
@@ -75,13 +80,13 @@ digraph elvis_kt {
13 -> {14};
14 -> {15 18};
15 -> {16};
16 -> {31};
16 -> {33};
16 -> {17} [style=dotted];
17 -> {19} [style=dotted];
18 -> {19};
19 -> {20};
20 -> {21 22};
21 -> {29};
21 -> {31};
22 -> {23};
23 -> {24};
24 -> {25};
@@ -91,116 +96,118 @@ digraph elvis_kt {
28 -> {29};
29 -> {30};
30 -> {31};
31 -> {32};
32 -> {33};
subgraph cluster_8 {
subgraph cluster_9 {
color=red
32 [label="Enter function test2" style="filled" fillcolor=red];
subgraph cluster_9 {
34 [label="Enter function test2" style="filled" fillcolor=red];
subgraph cluster_10 {
color=blue
33 [label="Enter block"];
subgraph cluster_10 {
35 [label="Enter block"];
subgraph cluster_11 {
color=blue
34 [label="Enter when"];
subgraph cluster_11 {
color=blue
35 [label="Enter when branch condition "];
36 [label="Access variable R|<local>/b|"];
37 [label="Type operator: (R|<local>/b| !is R|kotlin/String|)"];
38 [label="Exit when branch condition"];
}
39 [label="Synthetic else branch"];
40 [label="Enter when branch result"];
36 [label="Enter when"];
subgraph cluster_12 {
color=blue
41 [label="Enter block"];
42 [label="Const: String()"];
43 [label="Jump: ^test2 String()"];
44 [label="Stub" style="filled" fillcolor=gray];
45 [label="Exit block" style="filled" fillcolor=gray];
37 [label="Enter when branch condition "];
38 [label="Access variable R|<local>/b|"];
39 [label="Type operator: (R|<local>/b| !is R|kotlin/String|)"];
40 [label="Exit when branch condition"];
}
46 [label="Exit when branch result" style="filled" fillcolor=gray];
47 [label="Exit when"];
}
subgraph cluster_13 {
color=blue
48 [label="Enter when"];
subgraph cluster_14 {
41 [label="Synthetic else branch"];
42 [label="Enter when branch result"];
subgraph cluster_13 {
color=blue
49 [label="Enter when branch condition "];
50 [label="Access variable R|<local>/a|"];
51 [label="Type operator: (R|<local>/a| !is R|kotlin/String?|)"];
52 [label="Exit when branch condition"];
43 [label="Enter block"];
44 [label="Const: String()"];
45 [label="Jump: ^test2 String()"];
46 [label="Stub" style="filled" fillcolor=gray];
47 [label="Exit block" style="filled" fillcolor=gray];
}
53 [label="Synthetic else branch"];
54 [label="Enter when branch result"];
48 [label="Exit when branch result" style="filled" fillcolor=gray];
49 [label="Exit when"];
}
subgraph cluster_14 {
color=blue
50 [label="Enter when"];
subgraph cluster_15 {
color=blue
55 [label="Enter block"];
56 [label="Const: String()"];
57 [label="Jump: ^test2 String()"];
58 [label="Stub" style="filled" fillcolor=gray];
59 [label="Exit block" style="filled" fillcolor=gray];
51 [label="Enter when branch condition "];
52 [label="Access variable R|<local>/a|"];
53 [label="Type operator: (R|<local>/a| !is R|kotlin/String?|)"];
54 [label="Exit when branch condition"];
}
60 [label="Exit when branch result" style="filled" fillcolor=gray];
61 [label="Exit when"];
55 [label="Synthetic else branch"];
56 [label="Enter when branch result"];
subgraph cluster_16 {
color=blue
57 [label="Enter block"];
58 [label="Const: String()"];
59 [label="Jump: ^test2 String()"];
60 [label="Stub" style="filled" fillcolor=gray];
61 [label="Exit block" style="filled" fillcolor=gray];
}
62 [label="Exit when branch result" style="filled" fillcolor=gray];
63 [label="Exit when"];
}
62 [label="Access variable R|<local>/a|"];
63 [label="Smart cast: R|<local>/a|"];
64 [label="Exit lhs of ?:"];
65 [label="Enter rhs of ?:"];
66 [label="Access variable R|<local>/b|"];
67 [label="Smart cast: R|<local>/b|"];
68 [label="Lhs of ?: is not null"];
69 [label="Exit ?:"];
70 [label="Jump: ^test2 R|<local>/a| ?: R|<local>/b|"];
71 [label="Stub" style="filled" fillcolor=gray];
72 [label="Exit block" style="filled" fillcolor=gray];
64 [label="Access variable R|<local>/a|"];
65 [label="Smart cast: R|<local>/a|"];
66 [label="Exit lhs of ?:"];
67 [label="Enter rhs of ?:"];
68 [label="Access variable R|<local>/b|"];
69 [label="Smart cast: R|<local>/b|"];
70 [label="Lhs of ?: is not null"];
71 [label="Exit ?:"];
72 [label="Jump: ^test2 R|<local>/a| ?: R|<local>/b|"];
73 [label="Stub" style="filled" fillcolor=gray];
74 [label="Exit block" style="filled" fillcolor=gray];
}
73 [label="Exit function test2" style="filled" fillcolor=red];
75 [label="Exit function test2" style="filled" fillcolor=red];
}
32 -> {33};
33 -> {34};
34 -> {35};
35 -> {36};
36 -> {37};
37 -> {38};
38 -> {39 40};
39 -> {47};
40 -> {41};
41 -> {42};
38 -> {39};
39 -> {40};
40 -> {41 42};
41 -> {49};
42 -> {43};
43 -> {73};
43 -> {44} [style=dotted];
44 -> {45} [style=dotted];
43 -> {44};
44 -> {45};
45 -> {75};
45 -> {46} [style=dotted];
46 -> {47} [style=dotted];
47 -> {48};
48 -> {49};
47 -> {48} [style=dotted];
48 -> {49} [style=dotted];
49 -> {50};
50 -> {51};
51 -> {52};
52 -> {53 54};
53 -> {61};
54 -> {55};
55 -> {56};
52 -> {53};
53 -> {54};
54 -> {55 56};
55 -> {63};
56 -> {57};
57 -> {73};
57 -> {58} [style=dotted];
58 -> {59} [style=dotted];
57 -> {58};
58 -> {59};
59 -> {75};
59 -> {60} [style=dotted];
60 -> {61} [style=dotted];
61 -> {62};
62 -> {63};
61 -> {62} [style=dotted];
62 -> {63} [style=dotted];
63 -> {64};
64 -> {65 68};
64 -> {65};
65 -> {66};
66 -> {67};
67 -> {69};
66 -> {67 70};
67 -> {68};
68 -> {69};
69 -> {70};
70 -> {73};
70 -> {71} [style=dotted];
71 -> {72} [style=dotted];
69 -> {71};
70 -> {71};
71 -> {72};
72 -> {75};
72 -> {73} [style=dotted];
73 -> {74} [style=dotted];
74 -> {75} [style=dotted];
}
@@ -242,36 +242,61 @@ digraph returns_kt {
subgraph cluster_28 {
color=blue
87 [label="Enter block"];
88 [label="Access variable R|<local>/x|"];
89 [label="Smart cast: R|<local>/x|"];
90 [label="Function call: R|<local>/x|.R|/C.baz|()" style="filled" fillcolor=yellow];
91 [label="Exit block"];
subgraph cluster_29 {
color=blue
88 [label="Function call arguments enter"];
89 [label="Access variable R|<local>/x|"];
90 [label="Smart cast: R|<local>/x|"];
91 [label="Function call arguments exit"];
}
92 [label="Function call: R|<local>/x|.R|/C.baz|()" style="filled" fillcolor=yellow];
93 [label="Exit block"];
}
92 [label="Exit when branch result"];
93 [label="Enter when branch result"];
subgraph cluster_29 {
94 [label="Exit when branch result"];
95 [label="Enter when branch result"];
subgraph cluster_30 {
color=blue
94 [label="Enter block"];
95 [label="Access variable R|<local>/x|"];
96 [label="Smart cast: R|<local>/x|"];
97 [label="Function call: R|<local>/x|.R|/B.bar|()" style="filled" fillcolor=yellow];
98 [label="Exit block"];
96 [label="Enter block"];
subgraph cluster_31 {
color=blue
97 [label="Function call arguments enter"];
98 [label="Access variable R|<local>/x|"];
99 [label="Smart cast: R|<local>/x|"];
100 [label="Function call arguments exit"];
}
101 [label="Function call: R|<local>/x|.R|/B.bar|()" style="filled" fillcolor=yellow];
102 [label="Exit block"];
}
99 [label="Exit when branch result"];
100 [label="Exit when"];
103 [label="Exit when branch result"];
104 [label="Exit when"];
}
101 [label="Access variable R|<local>/x|"];
102 [label="Smart cast: R|<local>/x|"];
103 [label="Function call: R|<local>/x|.R|/A.foo|()" style="filled" fillcolor=yellow];
104 [label="Access variable R|<local>/x|"];
105 [label="Smart cast: R|<local>/x|"];
106 [label="Function call: R|<local>/x|.<Unresolved name: bar>#()" style="filled" fillcolor=yellow];
107 [label="Access variable R|<local>/x|"];
108 [label="Smart cast: R|<local>/x|"];
109 [label="Function call: R|<local>/x|.<Unresolved name: baz>#()" style="filled" fillcolor=yellow];
110 [label="Exit block"];
subgraph cluster_32 {
color=blue
105 [label="Function call arguments enter"];
106 [label="Access variable R|<local>/x|"];
107 [label="Smart cast: R|<local>/x|"];
108 [label="Function call arguments exit"];
}
109 [label="Function call: R|<local>/x|.R|/A.foo|()" style="filled" fillcolor=yellow];
subgraph cluster_33 {
color=blue
110 [label="Function call arguments enter"];
111 [label="Access variable R|<local>/x|"];
112 [label="Smart cast: R|<local>/x|"];
113 [label="Function call arguments exit"];
}
114 [label="Function call: R|<local>/x|.<Unresolved name: bar>#()" style="filled" fillcolor=yellow];
subgraph cluster_34 {
color=blue
115 [label="Function call arguments enter"];
116 [label="Access variable R|<local>/x|"];
117 [label="Smart cast: R|<local>/x|"];
118 [label="Function call arguments exit"];
}
119 [label="Function call: R|<local>/x|.<Unresolved name: baz>#()" style="filled" fillcolor=yellow];
120 [label="Exit block"];
}
111 [label="Exit function test_2" style="filled" fillcolor=red];
121 [label="Exit function test_2" style="filled" fillcolor=red];
}
67 -> {68};
68 -> {69};
@@ -279,7 +304,7 @@ digraph returns_kt {
70 -> {71};
71 -> {72};
72 -> {73};
73 -> {74 93};
73 -> {74 95};
74 -> {75};
75 -> {76};
76 -> {77};
@@ -288,20 +313,20 @@ digraph returns_kt {
79 -> {80};
80 -> {81};
81 -> {82};
82 -> {111};
82 -> {121};
82 -> {83} [style=dotted];
83 -> {84} [style=dotted];
84 -> {85} [style=dotted];
85 -> {100} [style=dotted];
85 -> {104} [style=dotted];
86 -> {87};
87 -> {88};
88 -> {89};
89 -> {90};
90 -> {91};
91 -> {92};
92 -> {100};
92 -> {93};
93 -> {94};
94 -> {95};
94 -> {104};
95 -> {96};
96 -> {97};
97 -> {98};
@@ -318,85 +343,110 @@ digraph returns_kt {
108 -> {109};
109 -> {110};
110 -> {111};
subgraph cluster_30 {
color=red
112 [label="Enter function test_3" style="filled" fillcolor=red];
subgraph cluster_31 {
color=blue
113 [label="Enter block"];
subgraph cluster_32 {
color=blue
114 [label="Enter when"];
subgraph cluster_33 {
color=blue
115 [label="Enter when branch condition "];
116 [label="Access variable R|<local>/x|"];
117 [label="Type operator: (R|<local>/x| is R|B|)"];
118 [label="Exit when branch condition"];
}
subgraph cluster_34 {
color=blue
119 [label="Enter when branch condition "];
120 [label="Access variable R|<local>/x|"];
121 [label="Type operator: (R|<local>/x| is R|C|)"];
122 [label="Exit when branch condition"];
}
123 [label="Synthetic else branch"];
124 [label="Enter when branch result"];
subgraph cluster_35 {
color=blue
125 [label="Enter block"];
126 [label="Access variable R|<local>/x|"];
127 [label="Smart cast: R|<local>/x|"];
128 [label="Function call: R|<local>/x|.R|/C.baz|()" style="filled" fillcolor=yellow];
129 [label="Exit block"];
}
130 [label="Exit when branch result"];
131 [label="Enter when branch result"];
subgraph cluster_36 {
color=blue
132 [label="Enter block"];
133 [label="Access variable R|<local>/x|"];
134 [label="Smart cast: R|<local>/x|"];
135 [label="Function call: R|<local>/x|.R|/B.bar|()" style="filled" fillcolor=yellow];
136 [label="Exit block"];
}
137 [label="Exit when branch result"];
138 [label="Exit when"];
}
139 [label="Access variable R|<local>/x|"];
140 [label="Function call: R|<local>/x|.<Unresolved name: foo>#()" style="filled" fillcolor=yellow];
141 [label="Access variable R|<local>/x|"];
142 [label="Function call: R|<local>/x|.<Unresolved name: bar>#()" style="filled" fillcolor=yellow];
143 [label="Access variable R|<local>/x|"];
144 [label="Function call: R|<local>/x|.<Unresolved name: baz>#()" style="filled" fillcolor=yellow];
145 [label="Exit block"];
}
146 [label="Exit function test_3" style="filled" fillcolor=red];
}
111 -> {112};
112 -> {113};
113 -> {114};
114 -> {115};
115 -> {116};
116 -> {117};
117 -> {118};
118 -> {119 131};
118 -> {119};
119 -> {120};
120 -> {121};
121 -> {122};
122 -> {123 124};
123 -> {138};
subgraph cluster_35 {
color=red
122 [label="Enter function test_3" style="filled" fillcolor=red];
subgraph cluster_36 {
color=blue
123 [label="Enter block"];
subgraph cluster_37 {
color=blue
124 [label="Enter when"];
subgraph cluster_38 {
color=blue
125 [label="Enter when branch condition "];
126 [label="Access variable R|<local>/x|"];
127 [label="Type operator: (R|<local>/x| is R|B|)"];
128 [label="Exit when branch condition"];
}
subgraph cluster_39 {
color=blue
129 [label="Enter when branch condition "];
130 [label="Access variable R|<local>/x|"];
131 [label="Type operator: (R|<local>/x| is R|C|)"];
132 [label="Exit when branch condition"];
}
133 [label="Synthetic else branch"];
134 [label="Enter when branch result"];
subgraph cluster_40 {
color=blue
135 [label="Enter block"];
subgraph cluster_41 {
color=blue
136 [label="Function call arguments enter"];
137 [label="Access variable R|<local>/x|"];
138 [label="Smart cast: R|<local>/x|"];
139 [label="Function call arguments exit"];
}
140 [label="Function call: R|<local>/x|.R|/C.baz|()" style="filled" fillcolor=yellow];
141 [label="Exit block"];
}
142 [label="Exit when branch result"];
143 [label="Enter when branch result"];
subgraph cluster_42 {
color=blue
144 [label="Enter block"];
subgraph cluster_43 {
color=blue
145 [label="Function call arguments enter"];
146 [label="Access variable R|<local>/x|"];
147 [label="Smart cast: R|<local>/x|"];
148 [label="Function call arguments exit"];
}
149 [label="Function call: R|<local>/x|.R|/B.bar|()" style="filled" fillcolor=yellow];
150 [label="Exit block"];
}
151 [label="Exit when branch result"];
152 [label="Exit when"];
}
subgraph cluster_44 {
color=blue
153 [label="Function call arguments enter"];
154 [label="Access variable R|<local>/x|"];
155 [label="Function call arguments exit"];
}
156 [label="Function call: R|<local>/x|.<Unresolved name: foo>#()" style="filled" fillcolor=yellow];
subgraph cluster_45 {
color=blue
157 [label="Function call arguments enter"];
158 [label="Access variable R|<local>/x|"];
159 [label="Function call arguments exit"];
}
160 [label="Function call: R|<local>/x|.<Unresolved name: bar>#()" style="filled" fillcolor=yellow];
subgraph cluster_46 {
color=blue
161 [label="Function call arguments enter"];
162 [label="Access variable R|<local>/x|"];
163 [label="Function call arguments exit"];
}
164 [label="Function call: R|<local>/x|.<Unresolved name: baz>#()" style="filled" fillcolor=yellow];
165 [label="Exit block"];
}
166 [label="Exit function test_3" style="filled" fillcolor=red];
}
122 -> {123};
123 -> {124};
124 -> {125};
125 -> {126};
126 -> {127};
127 -> {128};
128 -> {129};
128 -> {129 143};
129 -> {130};
130 -> {138};
130 -> {131};
131 -> {132};
132 -> {133};
133 -> {134};
132 -> {133 134};
133 -> {152};
134 -> {135};
135 -> {136};
136 -> {137};
@@ -405,120 +455,154 @@ digraph returns_kt {
139 -> {140};
140 -> {141};
141 -> {142};
142 -> {143};
142 -> {152};
143 -> {144};
144 -> {145};
145 -> {146};
subgraph cluster_37 {
color=red
147 [label="Enter function runHigherOrder" style="filled" fillcolor=red];
subgraph cluster_38 {
color=blue
148 [label="Enter block"];
149 [label="Function call: R|<local>/f|.R|SubstitutionOverride<kotlin/Function0.invoke: R|T|>|()" style="filled" fillcolor=yellow];
150 [label="Jump: ^runHigherOrder R|<local>/f|.R|SubstitutionOverride<kotlin/Function0.invoke: R|T|>|()"];
151 [label="Stub" style="filled" fillcolor=gray];
152 [label="Exit block" style="filled" fillcolor=gray];
}
153 [label="Exit function runHigherOrder" style="filled" fillcolor=red];
}
146 -> {147};
147 -> {148};
148 -> {149};
149 -> {150};
150 -> {153};
150 -> {151} [style=dotted];
151 -> {152} [style=dotted];
152 -> {153} [style=dotted];
subgraph cluster_39 {
color=red
154 [label="Enter function <getter>" style="filled" fillcolor=red];
subgraph cluster_40 {
color=blue
155 [label="Enter block"];
156 [label="Access variable R|kotlin/String.length|"];
157 [label="Jump: ^ this@R|/ext|.R|kotlin/String.length|"];
158 [label="Stub" style="filled" fillcolor=gray];
159 [label="Exit block" style="filled" fillcolor=gray];
}
160 [label="Exit function <getter>" style="filled" fillcolor=red];
}
150 -> {151};
151 -> {152};
152 -> {153};
153 -> {154};
154 -> {155};
155 -> {156};
156 -> {157};
157 -> {160};
157 -> {158} [style=dotted];
158 -> {159} [style=dotted];
159 -> {160} [style=dotted];
subgraph cluster_41 {
color=red
161 [label="Enter function test_4" style="filled" fillcolor=red];
subgraph cluster_42 {
color=blue
162 [label="Enter block"];
163 [label="Access variable R|<local>/a|"];
164 [label="Type operator: (R|<local>/a| as? R|kotlin/String|)"];
165 [label="Variable declaration: lval s: R|kotlin/String?|"];
166 [label="Access variable R|<local>/s|"];
167 [label="Enter safe call"];
168 [label="Access variable R|/ext|"];
169 [label="Exit safe call"];
170 [label="Exit lhs of ?:"];
171 [label="Enter rhs of ?:"];
172 [label="Jump: ^test_4 Unit"];
173 [label="Stub" style="filled" fillcolor=gray];
174 [label="Lhs of ?: is not null"];
175 [label="Exit ?:"];
176 [label="Variable declaration: lval length: R|kotlin/Int|"];
177 [label="Postponed enter to lambda"];
subgraph cluster_43 {
color=blue
178 [label="Enter function <anonymous>" style="filled" fillcolor=red];
subgraph cluster_44 {
color=blue
179 [label="Enter block"];
180 [label="Access variable R|<local>/s|"];
181 [label="Smart cast: R|<local>/s|"];
182 [label="Access variable R|kotlin/String.length|"];
183 [label="Exit block"];
}
184 [label="Exit function <anonymous>" style="filled" fillcolor=red];
}
185 [label="Postponed exit from lambda"];
186 [label="Function call: R|/runHigherOrder|<R|kotlin/Int|>(...)" style="filled" fillcolor=yellow];
187 [label="Exit block"];
}
188 [label="Exit function test_4" style="filled" fillcolor=red];
}
157 -> {158};
158 -> {159};
159 -> {160};
160 -> {161};
161 -> {162};
162 -> {163};
163 -> {164};
164 -> {165};
165 -> {166};
166 -> {167 171};
subgraph cluster_47 {
color=red
167 [label="Enter function runHigherOrder" style="filled" fillcolor=red];
subgraph cluster_48 {
color=blue
168 [label="Enter block"];
subgraph cluster_49 {
color=blue
169 [label="Function call arguments enter"];
170 [label="Function call arguments exit"];
}
171 [label="Function call: R|<local>/f|.R|SubstitutionOverride<kotlin/Function0.invoke: R|T|>|()" style="filled" fillcolor=yellow];
172 [label="Jump: ^runHigherOrder R|<local>/f|.R|SubstitutionOverride<kotlin/Function0.invoke: R|T|>|()"];
173 [label="Stub" style="filled" fillcolor=gray];
174 [label="Exit block" style="filled" fillcolor=gray];
}
175 [label="Exit function runHigherOrder" style="filled" fillcolor=red];
}
167 -> {168};
168 -> {169};
169 -> {170};
170 -> {171 174};
170 -> {171};
171 -> {172};
172 -> {188};
172 -> {175};
172 -> {173} [style=dotted];
173 -> {175} [style=dotted];
174 -> {175};
175 -> {176};
173 -> {174} [style=dotted];
174 -> {175} [style=dotted];
subgraph cluster_50 {
color=red
176 [label="Enter function <getter>" style="filled" fillcolor=red];
subgraph cluster_51 {
color=blue
177 [label="Enter block"];
178 [label="Access variable R|kotlin/String.length|"];
179 [label="Jump: ^ this@R|/ext|.R|kotlin/String.length|"];
180 [label="Stub" style="filled" fillcolor=gray];
181 [label="Exit block" style="filled" fillcolor=gray];
}
182 [label="Exit function <getter>" style="filled" fillcolor=red];
}
176 -> {177};
177 -> {178 185 186};
177 -> {178} [style=dashed];
177 -> {178};
178 -> {179};
179 -> {180};
180 -> {181};
181 -> {182};
182 -> {183};
179 -> {182};
179 -> {180} [style=dotted];
180 -> {181} [style=dotted];
181 -> {182} [style=dotted];
subgraph cluster_52 {
color=red
183 [label="Enter function test_4" style="filled" fillcolor=red];
subgraph cluster_53 {
color=blue
184 [label="Enter block"];
185 [label="Access variable R|<local>/a|"];
186 [label="Type operator: (R|<local>/a| as? R|kotlin/String|)"];
187 [label="Variable declaration: lval s: R|kotlin/String?|"];
188 [label="Access variable R|<local>/s|"];
189 [label="Enter safe call"];
190 [label="Access variable R|/ext|"];
191 [label="Exit safe call"];
192 [label="Exit lhs of ?:"];
193 [label="Enter rhs of ?:"];
194 [label="Jump: ^test_4 Unit"];
195 [label="Stub" style="filled" fillcolor=gray];
196 [label="Lhs of ?: is not null"];
197 [label="Exit ?:"];
198 [label="Variable declaration: lval length: R|kotlin/Int|"];
subgraph cluster_54 {
color=blue
199 [label="Function call arguments enter"];
200 [label="Postponed enter to lambda"];
subgraph cluster_55 {
color=blue
201 [label="Enter function <anonymous>" style="filled" fillcolor=red];
subgraph cluster_56 {
color=blue
202 [label="Enter block"];
203 [label="Access variable R|<local>/s|"];
204 [label="Smart cast: R|<local>/s|"];
205 [label="Access variable R|kotlin/String.length|"];
206 [label="Exit block"];
}
207 [label="Exit function <anonymous>" style="filled" fillcolor=red];
}
208 [label="Function call arguments exit"];
}
209 [label="Postponed exit from lambda"];
210 [label="Function call: R|/runHigherOrder|<R|kotlin/Int|>(...)" style="filled" fillcolor=yellow];
211 [label="Exit block"];
}
212 [label="Exit function test_4" style="filled" fillcolor=red];
}
183 -> {184};
184 -> {185};
185 -> {186};
186 -> {187};
187 -> {188};
188 -> {189 193};
189 -> {190};
190 -> {191};
191 -> {192};
192 -> {193 196};
193 -> {194};
194 -> {212};
194 -> {195} [style=dotted];
195 -> {197} [style=dotted];
196 -> {197};
197 -> {198};
198 -> {199};
199 -> {200};
200 -> {201 208 209};
200 -> {201} [style=dashed];
201 -> {202};
202 -> {203};
203 -> {204};
204 -> {205};
205 -> {206};
206 -> {207};
208 -> {210};
209 -> {210};
210 -> {211};
211 -> {212};
}
@@ -160,31 +160,36 @@ digraph simpleIf_kt {
60 [label="Access variable R|<local>/x|"];
61 [label="Smart cast: R|<local>/x|"];
62 [label="Access variable R|kotlin/String.length|"];
63 [label="Access variable R|<local>/x|"];
64 [label="Smart cast: R|<local>/x|"];
65 [label="Function call: R|<local>/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow];
66 [label="Exit block"];
subgraph cluster_18 {
color=blue
63 [label="Function call arguments enter"];
64 [label="Access variable R|<local>/x|"];
65 [label="Smart cast: R|<local>/x|"];
66 [label="Function call arguments exit"];
}
67 [label="Function call: R|<local>/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow];
68 [label="Exit block"];
}
67 [label="Exit when branch result"];
68 [label="Enter when branch result"];
subgraph cluster_18 {
color=blue
69 [label="Enter block"];
70 [label="Exit block"];
}
71 [label="Exit when branch result"];
72 [label="Enter when branch result"];
69 [label="Exit when branch result"];
70 [label="Enter when branch result"];
subgraph cluster_19 {
color=blue
73 [label="Enter block"];
74 [label="Exit block"];
71 [label="Enter block"];
72 [label="Exit block"];
}
75 [label="Exit when branch result"];
76 [label="Exit when"];
73 [label="Exit when branch result"];
74 [label="Enter when branch result"];
subgraph cluster_20 {
color=blue
75 [label="Enter block"];
76 [label="Exit block"];
}
77 [label="Exit when branch result"];
78 [label="Exit when"];
}
77 [label="Exit block"];
79 [label="Exit block"];
}
78 [label="Exit function test_3" style="filled" fillcolor=red];
80 [label="Exit function test_3" style="filled" fillcolor=red];
}
44 -> {45};
45 -> {46};
@@ -192,12 +197,12 @@ digraph simpleIf_kt {
47 -> {48};
48 -> {49};
49 -> {50};
50 -> {51 72};
50 -> {51 74};
51 -> {52};
52 -> {53};
53 -> {54};
54 -> {55};
55 -> {56 68};
55 -> {56 70};
56 -> {57};
57 -> {58};
58 -> {59};
@@ -209,16 +214,18 @@ digraph simpleIf_kt {
64 -> {65};
65 -> {66};
66 -> {67};
67 -> {76};
67 -> {68};
68 -> {69};
69 -> {70};
69 -> {78};
70 -> {71};
71 -> {76};
71 -> {72};
72 -> {73};
73 -> {74};
73 -> {78};
74 -> {75};
75 -> {76};
76 -> {77};
77 -> {78};
78 -> {79};
79 -> {80};
}
@@ -57,33 +57,43 @@ digraph smartcastFromArgument_kt {
subgraph cluster_8 {
color=blue
16 [label="Enter when branch condition "];
17 [label="Access variable R|<local>/a|"];
18 [label="Type operator: (R|<local>/a| as? R|A|)"];
19 [label="Exit lhs of ?:"];
20 [label="Enter rhs of ?:"];
21 [label="Jump: ^test Unit"];
22 [label="Stub" style="filled" fillcolor=gray];
23 [label="Lhs of ?: is not null"];
24 [label="Exit ?:"];
25 [label="Function call: R|/takeA|(...)" style="filled" fillcolor=yellow];
26 [label="Exit when branch condition"];
subgraph cluster_9 {
color=blue
17 [label="Function call arguments enter"];
18 [label="Access variable R|<local>/a|"];
19 [label="Type operator: (R|<local>/a| as? R|A|)"];
20 [label="Exit lhs of ?:"];
21 [label="Enter rhs of ?:"];
22 [label="Jump: ^test Unit"];
23 [label="Stub" style="filled" fillcolor=gray];
24 [label="Lhs of ?: is not null"];
25 [label="Exit ?:"];
26 [label="Function call arguments exit"];
}
27 [label="Function call: R|/takeA|(...)" style="filled" fillcolor=yellow];
28 [label="Exit when branch condition"];
}
27 [label="Synthetic else branch"];
28 [label="Enter when branch result"];
subgraph cluster_9 {
29 [label="Synthetic else branch"];
30 [label="Enter when branch result"];
subgraph cluster_10 {
color=blue
29 [label="Enter block"];
30 [label="Access variable R|<local>/a|"];
31 [label="Smart cast: R|<local>/a|"];
32 [label="Function call: R|<local>/a|.R|/A.foo|()" style="filled" fillcolor=yellow];
33 [label="Exit block"];
31 [label="Enter block"];
subgraph cluster_11 {
color=blue
32 [label="Function call arguments enter"];
33 [label="Access variable R|<local>/a|"];
34 [label="Smart cast: R|<local>/a|"];
35 [label="Function call arguments exit"];
}
36 [label="Function call: R|<local>/a|.R|/A.foo|()" style="filled" fillcolor=yellow];
37 [label="Exit block"];
}
34 [label="Exit when branch result"];
35 [label="Exit when"];
38 [label="Exit when branch result"];
39 [label="Exit when"];
}
36 [label="Exit block"];
40 [label="Exit block"];
}
37 [label="Exit function test" style="filled" fillcolor=red];
41 [label="Exit function test" style="filled" fillcolor=red];
}
13 -> {14};
14 -> {15};
@@ -91,18 +101,18 @@ digraph smartcastFromArgument_kt {
16 -> {17};
17 -> {18};
18 -> {19};
19 -> {20 23};
20 -> {21};
21 -> {37};
21 -> {22} [style=dotted];
22 -> {24} [style=dotted];
23 -> {24};
19 -> {20};
20 -> {21 24};
21 -> {22};
22 -> {41};
22 -> {23} [style=dotted];
23 -> {25} [style=dotted];
24 -> {25};
25 -> {26};
26 -> {27 28};
27 -> {35};
28 -> {29};
29 -> {30};
26 -> {27};
27 -> {28};
28 -> {29 30};
29 -> {39};
30 -> {31};
31 -> {32};
32 -> {33};
@@ -110,5 +120,9 @@ digraph smartcastFromArgument_kt {
34 -> {35};
35 -> {36};
36 -> {37};
37 -> {38};
38 -> {39};
39 -> {40};
40 -> {41};
}
File diff suppressed because it is too large Load Diff
@@ -44,33 +44,38 @@ digraph whenSubjectExpression_kt {
subgraph cluster_7 {
color=blue
18 [label="Enter block"];
19 [label="Access variable R|<local>/x|"];
20 [label="Smart cast: R|<local>/x|"];
21 [label="Function call: R|<local>/x|.R|kotlin/Double.toInt|()" style="filled" fillcolor=yellow];
22 [label="Exit block"];
subgraph cluster_8 {
color=blue
19 [label="Function call arguments enter"];
20 [label="Access variable R|<local>/x|"];
21 [label="Smart cast: R|<local>/x|"];
22 [label="Function call arguments exit"];
}
23 [label="Function call: R|<local>/x|.R|kotlin/Double.toInt|()" style="filled" fillcolor=yellow];
24 [label="Exit block"];
}
23 [label="Exit when branch result"];
24 [label="Enter when branch result"];
subgraph cluster_8 {
color=blue
25 [label="Enter block"];
26 [label="Const: Int(0)"];
27 [label="Exit block"];
}
28 [label="Exit when branch result"];
29 [label="Enter when branch result"];
25 [label="Exit when branch result"];
26 [label="Enter when branch result"];
subgraph cluster_9 {
color=blue
30 [label="Enter block"];
31 [label="Const: Int(-1)"];
32 [label="Exit block"];
27 [label="Enter block"];
28 [label="Const: Int(0)"];
29 [label="Exit block"];
}
33 [label="Exit when branch result"];
34 [label="Exit when"];
30 [label="Exit when branch result"];
31 [label="Enter when branch result"];
subgraph cluster_10 {
color=blue
32 [label="Enter block"];
33 [label="Const: Int(-1)"];
34 [label="Exit block"];
}
35 [label="Exit when branch result"];
36 [label="Exit when"];
}
35 [label="Exit block"];
37 [label="Exit block"];
}
36 [label="Exit function whenWithSubjectExpression" style="filled" fillcolor=red];
38 [label="Exit function whenWithSubjectExpression" style="filled" fillcolor=red];
}
2 -> {3};
3 -> {4};
@@ -79,12 +84,12 @@ digraph whenSubjectExpression_kt {
6 -> {7};
7 -> {8};
8 -> {9};
9 -> {10 29};
9 -> {10 31};
10 -> {11};
11 -> {12};
12 -> {13};
13 -> {14};
14 -> {15 24};
14 -> {15 26};
15 -> {16};
16 -> {17};
17 -> {18};
@@ -93,117 +98,126 @@ digraph whenSubjectExpression_kt {
20 -> {21};
21 -> {22};
22 -> {23};
23 -> {34};
23 -> {24};
24 -> {25};
25 -> {26};
25 -> {36};
26 -> {27};
27 -> {28};
28 -> {34};
28 -> {29};
29 -> {30};
30 -> {31};
30 -> {36};
31 -> {32};
32 -> {33};
33 -> {34};
34 -> {35};
35 -> {36};
36 -> {37};
37 -> {38};
subgraph cluster_10 {
subgraph cluster_11 {
color=red
37 [label="Enter function whenWithSubjectVariable" style="filled" fillcolor=red];
subgraph cluster_11 {
39 [label="Enter function whenWithSubjectVariable" style="filled" fillcolor=red];
subgraph cluster_12 {
color=blue
38 [label="Enter block"];
subgraph cluster_12 {
40 [label="Enter block"];
subgraph cluster_13 {
color=blue
39 [label="Enter when"];
40 [label="Access variable R|<local>/x|"];
41 [label="Variable declaration: lval y: R|kotlin/Any|"];
subgraph cluster_13 {
color=blue
42 [label="Enter when branch condition "];
43 [label="Exit $subj"];
44 [label="Type operator: ($subj$ !is R|kotlin/Double|)"];
45 [label="Exit when branch condition"];
}
41 [label="Enter when"];
42 [label="Access variable R|<local>/x|"];
43 [label="Variable declaration: lval y: R|kotlin/Any|"];
subgraph cluster_14 {
color=blue
46 [label="Enter when branch condition "];
47 [label="Exit $subj"];
48 [label="Const: Double(0.0)"];
49 [label="Equality operator =="];
50 [label="Exit when branch condition"];
44 [label="Enter when branch condition "];
45 [label="Exit $subj"];
46 [label="Type operator: ($subj$ !is R|kotlin/Double|)"];
47 [label="Exit when branch condition"];
}
subgraph cluster_15 {
color=blue
51 [label="Enter when branch condition else"];
48 [label="Enter when branch condition "];
49 [label="Exit $subj"];
50 [label="Const: Double(0.0)"];
51 [label="Equality operator =="];
52 [label="Exit when branch condition"];
}
53 [label="Enter when branch result"];
subgraph cluster_16 {
color=blue
54 [label="Enter block"];
55 [label="Access variable R|<local>/y|"];
56 [label="Smart cast: R|<local>/y|"];
57 [label="Function call: R|<local>/y|.R|kotlin/Double.toInt|()" style="filled" fillcolor=yellow];
58 [label="Exit block"];
53 [label="Enter when branch condition else"];
54 [label="Exit when branch condition"];
}
59 [label="Exit when branch result"];
60 [label="Enter when branch result"];
55 [label="Enter when branch result"];
subgraph cluster_17 {
color=blue
61 [label="Enter block"];
62 [label="Const: Int(0)"];
63 [label="Exit block"];
56 [label="Enter block"];
subgraph cluster_18 {
color=blue
57 [label="Function call arguments enter"];
58 [label="Access variable R|<local>/y|"];
59 [label="Smart cast: R|<local>/y|"];
60 [label="Function call arguments exit"];
}
61 [label="Function call: R|<local>/y|.R|kotlin/Double.toInt|()" style="filled" fillcolor=yellow];
62 [label="Exit block"];
}
64 [label="Exit when branch result"];
65 [label="Enter when branch result"];
subgraph cluster_18 {
63 [label="Exit when branch result"];
64 [label="Enter when branch result"];
subgraph cluster_19 {
color=blue
66 [label="Enter block"];
67 [label="Const: Int(-1)"];
68 [label="Exit block"];
65 [label="Enter block"];
66 [label="Const: Int(0)"];
67 [label="Exit block"];
}
69 [label="Exit when branch result"];
70 [label="Exit when"];
68 [label="Exit when branch result"];
69 [label="Enter when branch result"];
subgraph cluster_20 {
color=blue
70 [label="Enter block"];
71 [label="Const: Int(-1)"];
72 [label="Exit block"];
}
73 [label="Exit when branch result"];
74 [label="Exit when"];
}
71 [label="Exit block"];
75 [label="Exit block"];
}
72 [label="Exit function whenWithSubjectVariable" style="filled" fillcolor=red];
76 [label="Exit function whenWithSubjectVariable" style="filled" fillcolor=red];
}
37 -> {38};
38 -> {39};
39 -> {40};
40 -> {41};
41 -> {42};
42 -> {43};
43 -> {44};
44 -> {45};
45 -> {46 65};
45 -> {46};
46 -> {47};
47 -> {48};
47 -> {48 69};
48 -> {49};
49 -> {50};
50 -> {51 60};
50 -> {51};
51 -> {52};
52 -> {53};
52 -> {53 64};
53 -> {54};
54 -> {55};
55 -> {56};
56 -> {57};
57 -> {58};
58 -> {59};
59 -> {70};
59 -> {60};
60 -> {61};
61 -> {62};
62 -> {63};
63 -> {64};
64 -> {70};
63 -> {74};
64 -> {65};
65 -> {66};
66 -> {67};
67 -> {68};
68 -> {69};
68 -> {74};
69 -> {70};
70 -> {71};
71 -> {72};
72 -> {73};
73 -> {74};
74 -> {75};
75 -> {76};
}