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
This commit is contained in:
Simon Ogorodnik
2022-08-02 00:49:24 +02:00
committed by teamcity
parent bc9db58b3c
commit 513af2dfbc
154 changed files with 9573 additions and 9320 deletions
@@ -47,15 +47,16 @@ digraph elvis_kt {
color=blue
21 [label="Enter block"];
22 [label="Access variable R|<local>/x|"];
23 [label="Function call: R|<local>/x|.R|/A.foo|()"];
24 [label="Exit block"];
23 [label="Smart cast: R|<local>/x|"];
24 [label="Function call: R|<local>/x|.R|/A.foo|()"];
25 [label="Exit block"];
}
25 [label="Exit when branch result"];
26 [label="Exit when"];
26 [label="Exit when branch result"];
27 [label="Exit when"];
}
27 [label="Exit block"];
28 [label="Exit block"];
}
28 [label="Exit function test_1" style="filled" fillcolor=red];
29 [label="Exit function test_1" style="filled" fillcolor=red];
}
4 -> {5};
5 -> {6};
@@ -69,13 +70,13 @@ digraph elvis_kt {
11 -> {12};
12 -> {16 13};
13 -> {14};
14 -> {28};
14 -> {29};
14 -> {15} [style=dotted];
15 -> {17} [style=dotted];
16 -> {17};
17 -> {18};
18 -> {20 19};
19 -> {26};
19 -> {27};
20 -> {21};
21 -> {22};
22 -> {23};
@@ -84,112 +85,117 @@ digraph elvis_kt {
25 -> {26};
26 -> {27};
27 -> {28};
28 -> {29};
subgraph cluster_7 {
color=red
29 [label="Enter function test2" style="filled" fillcolor=red];
30 [label="Enter function test2" style="filled" fillcolor=red];
subgraph cluster_8 {
color=blue
30 [label="Enter block"];
31 [label="Enter block"];
subgraph cluster_9 {
color=blue
31 [label="Enter when"];
32 [label="Enter when"];
subgraph cluster_10 {
color=blue
32 [label="Enter when branch condition "];
33 [label="Access variable R|<local>/b|"];
34 [label="Type operator: (R|<local>/b| !is R|kotlin/String|)"];
35 [label="Exit when branch condition"];
33 [label="Enter when branch condition "];
34 [label="Access variable R|<local>/b|"];
35 [label="Type operator: (R|<local>/b| !is R|kotlin/String|)"];
36 [label="Exit when branch condition"];
}
36 [label="Synthetic else branch"];
37 [label="Enter when branch result"];
37 [label="Synthetic else branch"];
38 [label="Enter when branch result"];
subgraph cluster_11 {
color=blue
38 [label="Enter block"];
39 [label="Const: String()"];
40 [label="Jump: ^test2 String()"];
41 [label="Stub" style="filled" fillcolor=gray];
42 [label="Exit block" style="filled" fillcolor=gray];
39 [label="Enter block"];
40 [label="Const: String()"];
41 [label="Jump: ^test2 String()"];
42 [label="Stub" style="filled" fillcolor=gray];
43 [label="Exit block" style="filled" fillcolor=gray];
}
43 [label="Exit when branch result" style="filled" fillcolor=gray];
44 [label="Exit when"];
44 [label="Exit when branch result" style="filled" fillcolor=gray];
45 [label="Exit when"];
}
subgraph cluster_12 {
color=blue
45 [label="Enter when"];
46 [label="Enter when"];
subgraph cluster_13 {
color=blue
46 [label="Enter when branch condition "];
47 [label="Access variable R|<local>/a|"];
48 [label="Type operator: (R|<local>/a| !is R|kotlin/String?|)"];
49 [label="Exit when branch condition"];
47 [label="Enter when branch condition "];
48 [label="Access variable R|<local>/a|"];
49 [label="Type operator: (R|<local>/a| !is R|kotlin/String?|)"];
50 [label="Exit when branch condition"];
}
50 [label="Synthetic else branch"];
51 [label="Enter when branch result"];
51 [label="Synthetic else branch"];
52 [label="Enter when branch result"];
subgraph cluster_14 {
color=blue
52 [label="Enter block"];
53 [label="Const: String()"];
54 [label="Jump: ^test2 String()"];
55 [label="Stub" style="filled" fillcolor=gray];
56 [label="Exit block" style="filled" fillcolor=gray];
53 [label="Enter block"];
54 [label="Const: String()"];
55 [label="Jump: ^test2 String()"];
56 [label="Stub" style="filled" fillcolor=gray];
57 [label="Exit block" style="filled" fillcolor=gray];
}
57 [label="Exit when branch result" style="filled" fillcolor=gray];
58 [label="Exit when"];
58 [label="Exit when branch result" style="filled" fillcolor=gray];
59 [label="Exit when"];
}
59 [label="Access variable R|<local>/a|"];
60 [label="Exit lhs of ?:"];
61 [label="Enter rhs of ?:"];
62 [label="Access variable R|<local>/b|"];
63 [label="Lhs of ?: is not null"];
64 [label="Exit ?:"];
65 [label="Jump: ^test2 R|<local>/a| ?: R|<local>/b|"];
66 [label="Stub" style="filled" fillcolor=gray];
67 [label="Exit block" style="filled" fillcolor=gray];
60 [label="Access variable R|<local>/a|"];
61 [label="Smart cast: R|<local>/a|"];
62 [label="Exit lhs of ?:"];
63 [label="Enter rhs of ?:"];
64 [label="Access variable R|<local>/b|"];
65 [label="Smart cast: R|<local>/b|"];
66 [label="Lhs of ?: is not null"];
67 [label="Exit ?:"];
68 [label="Jump: ^test2 R|<local>/a| ?: R|<local>/b|"];
69 [label="Stub" style="filled" fillcolor=gray];
70 [label="Exit block" style="filled" fillcolor=gray];
}
68 [label="Exit function test2" style="filled" fillcolor=red];
71 [label="Exit function test2" style="filled" fillcolor=red];
}
29 -> {30};
30 -> {31};
31 -> {32};
32 -> {33};
33 -> {34};
34 -> {35};
35 -> {37 36};
36 -> {44};
37 -> {38};
35 -> {36};
36 -> {38 37};
37 -> {45};
38 -> {39};
39 -> {40};
40 -> {68};
40 -> {41} [style=dotted];
40 -> {41};
41 -> {71};
41 -> {42} [style=dotted];
42 -> {43} [style=dotted];
43 -> {44} [style=dotted];
44 -> {45};
44 -> {45} [style=dotted];
45 -> {46};
46 -> {47};
47 -> {48};
48 -> {49};
49 -> {51 50};
50 -> {58};
51 -> {52};
49 -> {50};
50 -> {52 51};
51 -> {59};
52 -> {53};
53 -> {54};
54 -> {68};
54 -> {55} [style=dotted];
54 -> {55};
55 -> {71};
55 -> {56} [style=dotted];
56 -> {57} [style=dotted];
57 -> {58} [style=dotted];
58 -> {59};
58 -> {59} [style=dotted];
59 -> {60};
60 -> {63 61};
60 -> {61};
61 -> {62};
62 -> {64};
62 -> {66 63};
63 -> {64};
64 -> {65};
65 -> {68};
65 -> {66} [style=dotted];
66 -> {67} [style=dotted];
67 -> {68} [style=dotted];
65 -> {67};
66 -> {67};
67 -> {68};
68 -> {71};
68 -> {69} [style=dotted];
69 -> {70} [style=dotted];
70 -> {71} [style=dotted];
}
@@ -36,17 +36,18 @@ digraph returns_kt {
color=blue
14 [label="Enter block"];
15 [label="Access variable R|<local>/x|"];
16 [label="Access variable R|kotlin/String.length|"];
17 [label="Exit block"];
16 [label="Smart cast: R|<local>/x|"];
17 [label="Access variable R|kotlin/String.length|"];
18 [label="Exit block"];
}
18 [label="Exit when branch result"];
19 [label="Exit when"];
19 [label="Exit when branch result"];
20 [label="Exit when"];
}
20 [label="Access variable R|<local>/x|"];
21 [label="Access variable <Unresolved name: length>#"];
22 [label="Exit block"];
21 [label="Access variable R|<local>/x|"];
22 [label="Access variable <Unresolved name: length>#"];
23 [label="Exit block"];
}
23 [label="Exit function test_0" style="filled" fillcolor=red];
24 [label="Exit function test_0" style="filled" fillcolor=red];
}
0 -> {1};
1 -> {2};
@@ -60,7 +61,7 @@ digraph returns_kt {
9 -> {10};
10 -> {11};
11 -> {12};
12 -> {19};
12 -> {20};
13 -> {14};
14 -> {15};
15 -> {16};
@@ -71,71 +72,73 @@ digraph returns_kt {
20 -> {21};
21 -> {22};
22 -> {23};
23 -> {24};
subgraph cluster_7 {
color=red
24 [label="Enter function test_1" style="filled" fillcolor=red];
25 [label="Enter function test_1" style="filled" fillcolor=red];
subgraph cluster_8 {
color=blue
25 [label="Enter block"];
26 [label="Enter block"];
subgraph cluster_9 {
color=blue
26 [label="Enter when"];
27 [label="Enter when"];
subgraph cluster_10 {
color=blue
27 [label="Enter when branch condition "];
28 [label="Access variable R|<local>/x|"];
29 [label="Type operator: (R|<local>/x| is R|kotlin/String|)"];
30 [label="Exit when branch condition"];
28 [label="Enter when branch condition "];
29 [label="Access variable R|<local>/x|"];
30 [label="Type operator: (R|<local>/x| is R|kotlin/String|)"];
31 [label="Exit when branch condition"];
}
subgraph cluster_11 {
color=blue
31 [label="Enter when branch condition else"];
32 [label="Exit when branch condition"];
32 [label="Enter when branch condition else"];
33 [label="Exit when branch condition"];
}
33 [label="Enter when branch result"];
34 [label="Enter when branch result"];
subgraph cluster_12 {
color=blue
34 [label="Enter block"];
35 [label="Jump: ^test_1 Unit"];
36 [label="Stub" style="filled" fillcolor=gray];
37 [label="Exit block" style="filled" fillcolor=gray];
35 [label="Enter block"];
36 [label="Jump: ^test_1 Unit"];
37 [label="Stub" style="filled" fillcolor=gray];
38 [label="Exit block" style="filled" fillcolor=gray];
}
38 [label="Exit when branch result" style="filled" fillcolor=gray];
39 [label="Enter when branch result"];
39 [label="Exit when branch result" style="filled" fillcolor=gray];
40 [label="Enter when branch result"];
subgraph cluster_13 {
color=blue
40 [label="Enter block"];
41 [label="Access variable R|<local>/x|"];
42 [label="Access variable R|kotlin/String.length|"];
43 [label="Exit block"];
41 [label="Enter block"];
42 [label="Access variable R|<local>/x|"];
43 [label="Smart cast: R|<local>/x|"];
44 [label="Access variable R|kotlin/String.length|"];
45 [label="Exit block"];
}
44 [label="Exit when branch result"];
45 [label="Exit when"];
46 [label="Exit when branch result"];
47 [label="Exit when"];
}
46 [label="Access variable R|<local>/x|"];
47 [label="Access variable R|kotlin/String.length|"];
48 [label="Exit block"];
48 [label="Access variable R|<local>/x|"];
49 [label="Smart cast: R|<local>/x|"];
50 [label="Access variable R|kotlin/String.length|"];
51 [label="Exit block"];
}
49 [label="Exit function test_1" style="filled" fillcolor=red];
52 [label="Exit function test_1" style="filled" fillcolor=red];
}
24 -> {25};
25 -> {26};
26 -> {27};
27 -> {28};
28 -> {29};
29 -> {30};
30 -> {39 31};
31 -> {32};
30 -> {31};
31 -> {40 32};
32 -> {33};
33 -> {34};
34 -> {35};
35 -> {49};
35 -> {36} [style=dotted];
35 -> {36};
36 -> {52};
36 -> {37} [style=dotted];
37 -> {38} [style=dotted];
38 -> {45} [style=dotted];
39 -> {40};
38 -> {39} [style=dotted];
39 -> {47} [style=dotted];
40 -> {41};
41 -> {42};
42 -> {43};
@@ -145,146 +148,151 @@ digraph returns_kt {
46 -> {47};
47 -> {48};
48 -> {49};
49 -> {50};
50 -> {51};
51 -> {52};
subgraph cluster_14 {
color=red
50 [label="Enter function foo" style="filled" fillcolor=red];
51 [label="Exit function foo" style="filled" fillcolor=red];
53 [label="Enter function foo" style="filled" fillcolor=red];
54 [label="Exit function foo" style="filled" fillcolor=red];
}
50 -> {51};
53 -> {54};
subgraph cluster_15 {
color=red
52 [label="Enter class A" style="filled" fillcolor=red];
53 [label="Exit class A" style="filled" fillcolor=red];
55 [label="Enter class A" style="filled" fillcolor=red];
56 [label="Exit class A" style="filled" fillcolor=red];
}
52 -> {53} [color=green];
55 -> {56} [color=green];
subgraph cluster_16 {
color=red
54 [label="Enter function bar" style="filled" fillcolor=red];
55 [label="Exit function bar" style="filled" fillcolor=red];
57 [label="Enter function bar" style="filled" fillcolor=red];
58 [label="Exit function bar" style="filled" fillcolor=red];
}
54 -> {55};
57 -> {58};
subgraph cluster_17 {
color=red
56 [label="Enter class B" style="filled" fillcolor=red];
57 [label="Exit class B" style="filled" fillcolor=red];
59 [label="Enter class B" style="filled" fillcolor=red];
60 [label="Exit class B" style="filled" fillcolor=red];
}
56 -> {57} [color=green];
59 -> {60} [color=green];
subgraph cluster_18 {
color=red
58 [label="Enter function baz" style="filled" fillcolor=red];
59 [label="Exit function baz" style="filled" fillcolor=red];
61 [label="Enter function baz" style="filled" fillcolor=red];
62 [label="Exit function baz" style="filled" fillcolor=red];
}
58 -> {59};
61 -> {62};
subgraph cluster_19 {
color=red
60 [label="Enter class C" style="filled" fillcolor=red];
61 [label="Exit class C" style="filled" fillcolor=red];
63 [label="Enter class C" style="filled" fillcolor=red];
64 [label="Exit class C" style="filled" fillcolor=red];
}
60 -> {61} [color=green];
63 -> {64} [color=green];
subgraph cluster_20 {
color=red
62 [label="Enter function test_2" style="filled" fillcolor=red];
65 [label="Enter function test_2" style="filled" fillcolor=red];
subgraph cluster_21 {
color=blue
63 [label="Enter block"];
66 [label="Enter block"];
subgraph cluster_22 {
color=blue
64 [label="Enter when"];
67 [label="Enter when"];
subgraph cluster_23 {
color=blue
65 [label="Enter when branch condition "];
66 [label="Access variable R|<local>/x|"];
67 [label="Type operator: (R|<local>/x| is R|B|)"];
68 [label="Exit when branch condition"];
68 [label="Enter when branch condition "];
69 [label="Access variable R|<local>/x|"];
70 [label="Type operator: (R|<local>/x| is R|B|)"];
71 [label="Exit when branch condition"];
}
subgraph cluster_24 {
color=blue
69 [label="Enter when branch condition "];
70 [label="Access variable R|<local>/x|"];
71 [label="Type operator: (R|<local>/x| is R|C|)"];
72 [label="Exit when branch condition"];
72 [label="Enter when branch condition "];
73 [label="Access variable R|<local>/x|"];
74 [label="Type operator: (R|<local>/x| is R|C|)"];
75 [label="Exit when branch condition"];
}
subgraph cluster_25 {
color=blue
73 [label="Enter when branch condition else"];
74 [label="Exit when branch condition"];
76 [label="Enter when branch condition else"];
77 [label="Exit when branch condition"];
}
75 [label="Enter when branch result"];
78 [label="Enter when branch result"];
subgraph cluster_26 {
color=blue
76 [label="Enter block"];
77 [label="Jump: ^test_2 Unit"];
78 [label="Stub" style="filled" fillcolor=gray];
79 [label="Exit block" style="filled" fillcolor=gray];
79 [label="Enter block"];
80 [label="Jump: ^test_2 Unit"];
81 [label="Stub" style="filled" fillcolor=gray];
82 [label="Exit block" style="filled" fillcolor=gray];
}
80 [label="Exit when branch result" style="filled" fillcolor=gray];
81 [label="Enter when branch result"];
83 [label="Exit when branch result" style="filled" fillcolor=gray];
84 [label="Enter when branch result"];
subgraph cluster_27 {
color=blue
82 [label="Enter block"];
83 [label="Access variable R|<local>/x|"];
84 [label="Function call: R|<local>/x|.R|/C.baz|()"];
85 [label="Exit block"];
85 [label="Enter block"];
86 [label="Access variable R|<local>/x|"];
87 [label="Smart cast: R|<local>/x|"];
88 [label="Function call: R|<local>/x|.R|/C.baz|()"];
89 [label="Exit block"];
}
86 [label="Exit when branch result"];
87 [label="Enter when branch result"];
90 [label="Exit when branch result"];
91 [label="Enter when branch result"];
subgraph cluster_28 {
color=blue
88 [label="Enter block"];
89 [label="Access variable R|<local>/x|"];
90 [label="Function call: R|<local>/x|.R|/B.bar|()"];
91 [label="Exit block"];
92 [label="Enter block"];
93 [label="Access variable R|<local>/x|"];
94 [label="Smart cast: R|<local>/x|"];
95 [label="Function call: R|<local>/x|.R|/B.bar|()"];
96 [label="Exit block"];
}
92 [label="Exit when branch result"];
93 [label="Exit when"];
97 [label="Exit when branch result"];
98 [label="Exit when"];
}
94 [label="Access variable R|<local>/x|"];
95 [label="Function call: R|<local>/x|.R|/A.foo|()"];
96 [label="Access variable R|<local>/x|"];
97 [label="Function call: R|<local>/x|.<Unresolved name: bar>#()"];
98 [label="Access variable R|<local>/x|"];
99 [label="Function call: R|<local>/x|.<Unresolved name: baz>#()"];
100 [label="Exit block"];
99 [label="Access variable R|<local>/x|"];
100 [label="Smart cast: R|<local>/x|"];
101 [label="Function call: R|<local>/x|.R|/A.foo|()"];
102 [label="Access variable R|<local>/x|"];
103 [label="Smart cast: R|<local>/x|"];
104 [label="Function call: R|<local>/x|.<Unresolved name: bar>#()"];
105 [label="Access variable R|<local>/x|"];
106 [label="Smart cast: R|<local>/x|"];
107 [label="Function call: R|<local>/x|.<Unresolved name: baz>#()"];
108 [label="Exit block"];
}
101 [label="Exit function test_2" style="filled" fillcolor=red];
109 [label="Exit function test_2" style="filled" fillcolor=red];
}
62 -> {63};
63 -> {64};
64 -> {65};
65 -> {66};
66 -> {67};
67 -> {68};
68 -> {87 69};
68 -> {69};
69 -> {70};
70 -> {71};
71 -> {72};
72 -> {81 73};
71 -> {91 72};
72 -> {73};
73 -> {74};
74 -> {75};
75 -> {76};
75 -> {84 76};
76 -> {77};
77 -> {101};
77 -> {78} [style=dotted];
78 -> {79} [style=dotted];
79 -> {80} [style=dotted];
80 -> {93} [style=dotted];
81 -> {82};
82 -> {83};
83 -> {84};
77 -> {78};
78 -> {79};
79 -> {80};
80 -> {109};
80 -> {81} [style=dotted];
81 -> {82} [style=dotted];
82 -> {83} [style=dotted];
83 -> {98} [style=dotted];
84 -> {85};
85 -> {86};
86 -> {93};
86 -> {87};
87 -> {88};
88 -> {89};
89 -> {90};
90 -> {91};
90 -> {98};
91 -> {92};
92 -> {93};
93 -> {94};
@@ -295,203 +303,217 @@ digraph returns_kt {
98 -> {99};
99 -> {100};
100 -> {101};
subgraph cluster_29 {
color=red
102 [label="Enter function test_3" style="filled" fillcolor=red];
subgraph cluster_30 {
color=blue
103 [label="Enter block"];
subgraph cluster_31 {
color=blue
104 [label="Enter when"];
subgraph cluster_32 {
color=blue
105 [label="Enter when branch condition "];
106 [label="Access variable R|<local>/x|"];
107 [label="Type operator: (R|<local>/x| is R|B|)"];
108 [label="Exit when branch condition"];
}
subgraph cluster_33 {
color=blue
109 [label="Enter when branch condition "];
110 [label="Access variable R|<local>/x|"];
111 [label="Type operator: (R|<local>/x| is R|C|)"];
112 [label="Exit when branch condition"];
}
113 [label="Synthetic else branch"];
114 [label="Enter when branch result"];
subgraph cluster_34 {
color=blue
115 [label="Enter block"];
116 [label="Access variable R|<local>/x|"];
117 [label="Function call: R|<local>/x|.R|/C.baz|()"];
118 [label="Exit block"];
}
119 [label="Exit when branch result"];
120 [label="Enter when branch result"];
subgraph cluster_35 {
color=blue
121 [label="Enter block"];
122 [label="Access variable R|<local>/x|"];
123 [label="Function call: R|<local>/x|.R|/B.bar|()"];
124 [label="Exit block"];
}
125 [label="Exit when branch result"];
126 [label="Exit when"];
}
127 [label="Access variable R|<local>/x|"];
128 [label="Function call: R|<local>/x|.<Unresolved name: foo>#()"];
129 [label="Access variable R|<local>/x|"];
130 [label="Function call: R|<local>/x|.<Unresolved name: bar>#()"];
131 [label="Access variable R|<local>/x|"];
132 [label="Function call: R|<local>/x|.<Unresolved name: baz>#()"];
133 [label="Exit block"];
}
134 [label="Exit function test_3" style="filled" fillcolor=red];
}
101 -> {102};
102 -> {103};
103 -> {104};
104 -> {105};
105 -> {106};
106 -> {107};
107 -> {108};
108 -> {120 109};
109 -> {110};
108 -> {109};
subgraph cluster_29 {
color=red
110 [label="Enter function test_3" style="filled" fillcolor=red];
subgraph cluster_30 {
color=blue
111 [label="Enter block"];
subgraph cluster_31 {
color=blue
112 [label="Enter when"];
subgraph cluster_32 {
color=blue
113 [label="Enter when branch condition "];
114 [label="Access variable R|<local>/x|"];
115 [label="Type operator: (R|<local>/x| is R|B|)"];
116 [label="Exit when branch condition"];
}
subgraph cluster_33 {
color=blue
117 [label="Enter when branch condition "];
118 [label="Access variable R|<local>/x|"];
119 [label="Type operator: (R|<local>/x| is R|C|)"];
120 [label="Exit when branch condition"];
}
121 [label="Synthetic else branch"];
122 [label="Enter when branch result"];
subgraph cluster_34 {
color=blue
123 [label="Enter block"];
124 [label="Access variable R|<local>/x|"];
125 [label="Smart cast: R|<local>/x|"];
126 [label="Function call: R|<local>/x|.R|/C.baz|()"];
127 [label="Exit block"];
}
128 [label="Exit when branch result"];
129 [label="Enter when branch result"];
subgraph cluster_35 {
color=blue
130 [label="Enter block"];
131 [label="Access variable R|<local>/x|"];
132 [label="Smart cast: R|<local>/x|"];
133 [label="Function call: R|<local>/x|.R|/B.bar|()"];
134 [label="Exit block"];
}
135 [label="Exit when branch result"];
136 [label="Exit when"];
}
137 [label="Access variable R|<local>/x|"];
138 [label="Function call: R|<local>/x|.<Unresolved name: foo>#()"];
139 [label="Access variable R|<local>/x|"];
140 [label="Function call: R|<local>/x|.<Unresolved name: bar>#()"];
141 [label="Access variable R|<local>/x|"];
142 [label="Function call: R|<local>/x|.<Unresolved name: baz>#()"];
143 [label="Exit block"];
}
144 [label="Exit function test_3" style="filled" fillcolor=red];
}
110 -> {111};
111 -> {112};
112 -> {114 113};
113 -> {126};
112 -> {113};
113 -> {114};
114 -> {115};
115 -> {116};
116 -> {117};
116 -> {129 117};
117 -> {118};
118 -> {119};
119 -> {126};
120 -> {121};
121 -> {122};
119 -> {120};
120 -> {122 121};
121 -> {136};
122 -> {123};
123 -> {124};
124 -> {125};
125 -> {126};
126 -> {127};
127 -> {128};
128 -> {129};
128 -> {136};
129 -> {130};
130 -> {131};
131 -> {132};
132 -> {133};
133 -> {134};
subgraph cluster_36 {
color=red
135 [label="Enter function runHigherOrder" style="filled" fillcolor=red];
subgraph cluster_37 {
color=blue
136 [label="Enter block"];
137 [label="Function call: R|<local>/f|.R|SubstitutionOverride<kotlin/Function0.invoke: R|T|>|()"];
138 [label="Jump: ^runHigherOrder R|<local>/f|.R|SubstitutionOverride<kotlin/Function0.invoke: R|T|>|()"];
139 [label="Stub" style="filled" fillcolor=gray];
140 [label="Exit block" style="filled" fillcolor=gray];
}
141 [label="Exit function runHigherOrder" style="filled" fillcolor=red];
}
134 -> {135};
135 -> {136};
136 -> {137};
137 -> {138};
138 -> {141};
138 -> {139} [style=dotted];
139 -> {140} [style=dotted];
140 -> {141} [style=dotted];
138 -> {139};
139 -> {140};
140 -> {141};
141 -> {142};
142 -> {143};
143 -> {144};
subgraph cluster_36 {
color=red
145 [label="Enter function runHigherOrder" style="filled" fillcolor=red];
subgraph cluster_37 {
color=blue
146 [label="Enter block"];
147 [label="Function call: R|<local>/f|.R|SubstitutionOverride<kotlin/Function0.invoke: R|T|>|()"];
148 [label="Jump: ^runHigherOrder R|<local>/f|.R|SubstitutionOverride<kotlin/Function0.invoke: R|T|>|()"];
149 [label="Stub" style="filled" fillcolor=gray];
150 [label="Exit block" style="filled" fillcolor=gray];
}
151 [label="Exit function runHigherOrder" style="filled" fillcolor=red];
}
145 -> {146};
146 -> {147};
147 -> {148};
148 -> {151};
148 -> {149} [style=dotted];
149 -> {150} [style=dotted];
150 -> {151} [style=dotted];
subgraph cluster_38 {
color=red
142 [label="Enter function getter" style="filled" fillcolor=red];
152 [label="Enter function getter" style="filled" fillcolor=red];
subgraph cluster_39 {
color=blue
143 [label="Enter block"];
144 [label="Access variable R|kotlin/String.length|"];
145 [label="Jump: ^ this@R|/ext|.R|kotlin/String.length|"];
146 [label="Stub" style="filled" fillcolor=gray];
147 [label="Exit block" style="filled" fillcolor=gray];
153 [label="Enter block"];
154 [label="Access variable R|kotlin/String.length|"];
155 [label="Jump: ^ this@R|/ext|.R|kotlin/String.length|"];
156 [label="Stub" style="filled" fillcolor=gray];
157 [label="Exit block" style="filled" fillcolor=gray];
}
148 [label="Exit function getter" style="filled" fillcolor=red];
158 [label="Exit function getter" style="filled" fillcolor=red];
}
142 -> {143};
143 -> {144};
144 -> {145};
145 -> {148};
145 -> {146} [style=dotted];
146 -> {147} [style=dotted];
147 -> {148} [style=dotted];
subgraph cluster_40 {
color=red
149 [label="Enter function test_4" style="filled" fillcolor=red];
subgraph cluster_41 {
color=blue
150 [label="Enter block"];
151 [label="Access variable R|<local>/a|"];
152 [label="Type operator: (R|<local>/a| as? R|kotlin/String|)"];
153 [label="Variable declaration: lval s: R|kotlin/String?|"];
154 [label="Access variable R|<local>/s|"];
155 [label="Enter safe call"];
156 [label="Access variable R|/ext|"];
157 [label="Exit safe call"];
158 [label="Exit lhs of ?:"];
159 [label="Enter rhs of ?:"];
160 [label="Jump: ^test_4 Unit"];
161 [label="Stub" style="filled" fillcolor=gray];
162 [label="Lhs of ?: is not null"];
163 [label="Exit ?:"];
164 [label="Variable declaration: lval length: R|kotlin/Int|"];
165 [label="Postponed enter to lambda"];
subgraph cluster_42 {
color=blue
170 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_43 {
color=blue
171 [label="Enter block"];
172 [label="Access variable R|<local>/s|"];
173 [label="Access variable R|kotlin/String.length|"];
174 [label="Exit block"];
}
175 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
166 [label="Postponed exit from lambda"];
167 [label="Function call: R|/runHigherOrder|<R|kotlin/Int|>(...)"];
168 [label="Exit block"];
}
169 [label="Exit function test_4" style="filled" fillcolor=red];
}
149 -> {150};
150 -> {151};
151 -> {152};
152 -> {153};
153 -> {154};
154 -> {155};
154 -> {157} [color=red];
154 -> {159} [color=green];
155 -> {156};
156 -> {157};
157 -> {158};
158 -> {162 159};
155 -> {158};
155 -> {156} [style=dotted];
156 -> {157} [style=dotted];
157 -> {158} [style=dotted];
subgraph cluster_40 {
color=red
159 [label="Enter function test_4" style="filled" fillcolor=red];
subgraph cluster_41 {
color=blue
160 [label="Enter block"];
161 [label="Access variable R|<local>/a|"];
162 [label="Type operator: (R|<local>/a| as? R|kotlin/String|)"];
163 [label="Variable declaration: lval s: R|kotlin/String?|"];
164 [label="Access variable R|<local>/s|"];
165 [label="Enter safe call"];
166 [label="Access variable R|/ext|"];
167 [label="Exit safe call"];
168 [label="Exit lhs of ?:"];
169 [label="Enter rhs of ?:"];
170 [label="Jump: ^test_4 Unit"];
171 [label="Stub" style="filled" fillcolor=gray];
172 [label="Lhs of ?: is not null"];
173 [label="Exit ?:"];
174 [label="Variable declaration: lval length: R|kotlin/Int|"];
175 [label="Postponed enter to lambda"];
subgraph cluster_42 {
color=blue
180 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_43 {
color=blue
181 [label="Enter block"];
182 [label="Access variable R|<local>/s|"];
183 [label="Smart cast: R|<local>/s|"];
184 [label="Access variable R|kotlin/String.length|"];
185 [label="Exit block"];
}
186 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
176 [label="Postponed exit from lambda"];
177 [label="Function call: R|/runHigherOrder|<R|kotlin/Int|>(...)"];
178 [label="Exit block"];
}
179 [label="Exit function test_4" style="filled" fillcolor=red];
}
159 -> {160};
160 -> {169};
160 -> {161} [style=dotted];
161 -> {163} [style=dotted];
160 -> {161};
161 -> {162};
162 -> {163};
163 -> {164};
164 -> {165};
165 -> {166 170};
165 -> {170} [style=dashed];
164 -> {167} [color=red];
164 -> {169} [color=green];
165 -> {166};
166 -> {167};
167 -> {168};
168 -> {169};
170 -> {171};
171 -> {172};
168 -> {172 169};
169 -> {170};
170 -> {179};
170 -> {171} [style=dotted];
171 -> {173} [style=dotted];
172 -> {173};
173 -> {174};
174 -> {175};
175 -> {176 180};
175 -> {180} [style=dashed];
176 -> {177};
177 -> {178};
178 -> {179};
180 -> {181};
181 -> {182};
182 -> {183};
183 -> {184};
184 -> {185};
185 -> {186};
}
@@ -25,17 +25,18 @@ digraph simpleIf_kt {
color=blue
9 [label="Enter block"];
10 [label="Access variable R|<local>/x|"];
11 [label="Access variable R|kotlin/String.length|"];
12 [label="Exit block"];
11 [label="Smart cast: R|<local>/x|"];
12 [label="Access variable R|kotlin/String.length|"];
13 [label="Exit block"];
}
13 [label="Exit when branch result"];
14 [label="Exit when"];
14 [label="Exit when branch result"];
15 [label="Exit when"];
}
15 [label="Access variable R|<local>/x|"];
16 [label="Access variable <Unresolved name: length>#"];
17 [label="Exit block"];
16 [label="Access variable R|<local>/x|"];
17 [label="Access variable <Unresolved name: length>#"];
18 [label="Exit block"];
}
18 [label="Exit function test_1" style="filled" fillcolor=red];
19 [label="Exit function test_1" style="filled" fillcolor=red];
}
0 -> {1};
1 -> {2};
@@ -44,7 +45,7 @@ digraph simpleIf_kt {
4 -> {5};
5 -> {6};
6 -> {8 7};
7 -> {14};
7 -> {15};
8 -> {9};
9 -> {10};
10 -> {11};
@@ -55,44 +56,45 @@ digraph simpleIf_kt {
15 -> {16};
16 -> {17};
17 -> {18};
18 -> {19};
subgraph cluster_5 {
color=red
19 [label="Enter function test_2" style="filled" fillcolor=red];
20 [label="Enter function test_2" style="filled" fillcolor=red];
subgraph cluster_6 {
color=blue
20 [label="Enter block"];
21 [label="Access variable R|<local>/x|"];
22 [label="Type operator: (R|<local>/x| is R|kotlin/String|)"];
23 [label="Variable declaration: lval b: R|kotlin/Boolean|"];
21 [label="Enter block"];
22 [label="Access variable R|<local>/x|"];
23 [label="Type operator: (R|<local>/x| is R|kotlin/String|)"];
24 [label="Variable declaration: lval b: R|kotlin/Boolean|"];
subgraph cluster_7 {
color=blue
24 [label="Enter when"];
25 [label="Enter when"];
subgraph cluster_8 {
color=blue
25 [label="Enter when branch condition "];
26 [label="Access variable R|<local>/b|"];
27 [label="Exit when branch condition"];
26 [label="Enter when branch condition "];
27 [label="Access variable R|<local>/b|"];
28 [label="Exit when branch condition"];
}
28 [label="Synthetic else branch"];
29 [label="Enter when branch result"];
29 [label="Synthetic else branch"];
30 [label="Enter when branch result"];
subgraph cluster_9 {
color=blue
30 [label="Enter block"];
31 [label="Access variable R|<local>/x|"];
32 [label="Access variable R|kotlin/String.length|"];
33 [label="Exit block"];
31 [label="Enter block"];
32 [label="Access variable R|<local>/x|"];
33 [label="Smart cast: R|<local>/x|"];
34 [label="Access variable R|kotlin/String.length|"];
35 [label="Exit block"];
}
34 [label="Exit when branch result"];
35 [label="Exit when"];
36 [label="Exit when branch result"];
37 [label="Exit when"];
}
36 [label="Access variable R|<local>/x|"];
37 [label="Access variable <Unresolved name: length>#"];
38 [label="Exit block"];
38 [label="Access variable R|<local>/x|"];
39 [label="Access variable <Unresolved name: length>#"];
40 [label="Exit block"];
}
39 [label="Exit function test_2" style="filled" fillcolor=red];
41 [label="Exit function test_2" style="filled" fillcolor=red];
}
19 -> {20};
20 -> {21};
21 -> {22};
22 -> {23};
@@ -100,9 +102,9 @@ digraph simpleIf_kt {
24 -> {25};
25 -> {26};
26 -> {27};
27 -> {29 28};
28 -> {35};
29 -> {30};
27 -> {28};
28 -> {30 29};
29 -> {37};
30 -> {31};
31 -> {32};
32 -> {33};
@@ -112,96 +114,104 @@ digraph simpleIf_kt {
36 -> {37};
37 -> {38};
38 -> {39};
39 -> {40};
40 -> {41};
subgraph cluster_10 {
color=red
40 [label="Enter function test_3" style="filled" fillcolor=red];
42 [label="Enter function test_3" style="filled" fillcolor=red];
subgraph cluster_11 {
color=blue
41 [label="Enter block"];
43 [label="Enter block"];
subgraph cluster_12 {
color=blue
42 [label="Enter when"];
44 [label="Enter when"];
subgraph cluster_13 {
color=blue
43 [label="Enter when branch condition "];
44 [label="Access variable R|<local>/x|"];
45 [label="Type operator: (R|<local>/x| !is R|kotlin/String|)"];
46 [label="Exit when branch condition"];
45 [label="Enter when branch condition "];
46 [label="Access variable R|<local>/x|"];
47 [label="Type operator: (R|<local>/x| !is R|kotlin/String|)"];
48 [label="Exit when branch condition"];
}
subgraph cluster_14 {
color=blue
47 [label="Enter when branch condition "];
48 [label="Access variable R|<local>/x|"];
49 [label="Type operator: (R|<local>/x| !is R|kotlin/Int|)"];
50 [label="Exit when branch condition"];
49 [label="Enter when branch condition "];
50 [label="Access variable R|<local>/x|"];
51 [label="Smart cast: R|<local>/x|"];
52 [label="Type operator: (R|<local>/x| !is R|kotlin/Int|)"];
53 [label="Exit when branch condition"];
}
subgraph cluster_15 {
color=blue
51 [label="Enter when branch condition else"];
52 [label="Exit when branch condition"];
54 [label="Enter when branch condition else"];
55 [label="Exit when branch condition"];
}
53 [label="Enter when branch result"];
56 [label="Enter when branch result"];
subgraph cluster_16 {
color=blue
54 [label="Enter block"];
55 [label="Access variable R|<local>/x|"];
56 [label="Access variable R|kotlin/String.length|"];
57 [label="Access variable R|<local>/x|"];
58 [label="Function call: R|<local>/x|.R|kotlin/Int.inc|()"];
59 [label="Exit block"];
57 [label="Enter block"];
58 [label="Access variable R|<local>/x|"];
59 [label="Smart cast: R|<local>/x|"];
60 [label="Access variable R|kotlin/String.length|"];
61 [label="Access variable R|<local>/x|"];
62 [label="Smart cast: R|<local>/x|"];
63 [label="Function call: R|<local>/x|.R|kotlin/Int.inc|()"];
64 [label="Exit block"];
}
60 [label="Exit when branch result"];
61 [label="Enter when branch result"];
65 [label="Exit when branch result"];
66 [label="Enter when branch result"];
subgraph cluster_17 {
color=blue
62 [label="Enter block"];
63 [label="Exit block"];
67 [label="Enter block"];
68 [label="Exit block"];
}
64 [label="Exit when branch result"];
65 [label="Enter when branch result"];
69 [label="Exit when branch result"];
70 [label="Enter when branch result"];
subgraph cluster_18 {
color=blue
66 [label="Enter block"];
67 [label="Exit block"];
71 [label="Enter block"];
72 [label="Exit block"];
}
68 [label="Exit when branch result"];
69 [label="Exit when"];
73 [label="Exit when branch result"];
74 [label="Exit when"];
}
70 [label="Exit block"];
75 [label="Exit block"];
}
71 [label="Exit function test_3" style="filled" fillcolor=red];
76 [label="Exit function test_3" style="filled" fillcolor=red];
}
40 -> {41};
41 -> {42};
42 -> {43};
43 -> {44};
44 -> {45};
45 -> {46};
46 -> {65 47};
46 -> {47};
47 -> {48};
48 -> {49};
48 -> {70 49};
49 -> {50};
50 -> {61 51};
50 -> {51};
51 -> {52};
52 -> {53};
53 -> {54};
53 -> {66 54};
54 -> {55};
55 -> {56};
56 -> {57};
57 -> {58};
58 -> {59};
59 -> {60};
60 -> {69};
60 -> {61};
61 -> {62};
62 -> {63};
63 -> {64};
64 -> {69};
65 -> {66};
64 -> {65};
65 -> {74};
66 -> {67};
67 -> {68};
68 -> {69};
69 -> {70};
69 -> {74};
70 -> {71};
71 -> {72};
72 -> {73};
73 -> {74};
74 -> {75};
75 -> {76};
}
@@ -67,15 +67,16 @@ digraph smartcastFromArgument_kt {
color=blue
27 [label="Enter block"];
28 [label="Access variable R|<local>/a|"];
29 [label="Function call: R|<local>/a|.R|/A.foo|()"];
30 [label="Exit block"];
29 [label="Smart cast: R|<local>/a|"];
30 [label="Function call: R|<local>/a|.R|/A.foo|()"];
31 [label="Exit block"];
}
31 [label="Exit when branch result"];
32 [label="Exit when"];
32 [label="Exit when branch result"];
33 [label="Exit when"];
}
33 [label="Exit block"];
34 [label="Exit block"];
}
34 [label="Exit function test" style="filled" fillcolor=red];
35 [label="Exit function test" style="filled" fillcolor=red];
}
11 -> {12};
12 -> {13};
@@ -85,14 +86,14 @@ digraph smartcastFromArgument_kt {
16 -> {17};
17 -> {21 18};
18 -> {19};
19 -> {34};
19 -> {35};
19 -> {20} [style=dotted];
20 -> {22} [style=dotted];
21 -> {22};
22 -> {23};
23 -> {24};
24 -> {26 25};
25 -> {32};
25 -> {33};
26 -> {27};
27 -> {28};
28 -> {29};
@@ -101,5 +102,6 @@ digraph smartcastFromArgument_kt {
31 -> {32};
32 -> {33};
33 -> {34};
34 -> {35};
}
File diff suppressed because it is too large Load Diff
@@ -38,31 +38,32 @@ digraph whenSubjectExpression_kt {
color=blue
16 [label="Enter block"];
17 [label="Access variable R|<local>/x|"];
18 [label="Function call: R|<local>/x|.R|kotlin/Double.toInt|()"];
19 [label="Exit block"];
18 [label="Smart cast: R|<local>/x|"];
19 [label="Function call: R|<local>/x|.R|kotlin/Double.toInt|()"];
20 [label="Exit block"];
}
20 [label="Exit when branch result"];
21 [label="Enter when branch result"];
21 [label="Exit when branch result"];
22 [label="Enter when branch result"];
subgraph cluster_7 {
color=blue
22 [label="Enter block"];
23 [label="Const: Int(0)"];
24 [label="Exit block"];
23 [label="Enter block"];
24 [label="Const: Int(0)"];
25 [label="Exit block"];
}
25 [label="Exit when branch result"];
26 [label="Enter when branch result"];
26 [label="Exit when branch result"];
27 [label="Enter when branch result"];
subgraph cluster_8 {
color=blue
27 [label="Enter block"];
28 [label="Const: Int(-1)"];
29 [label="Exit block"];
28 [label="Enter block"];
29 [label="Const: Int(-1)"];
30 [label="Exit block"];
}
30 [label="Exit when branch result"];
31 [label="Exit when"];
31 [label="Exit when branch result"];
32 [label="Exit when"];
}
32 [label="Exit block"];
33 [label="Exit block"];
}
33 [label="Exit function whenWithSubjectExpression" style="filled" fillcolor=red];
34 [label="Exit function whenWithSubjectExpression" style="filled" fillcolor=red];
}
0 -> {1};
1 -> {2};
@@ -71,12 +72,12 @@ digraph whenSubjectExpression_kt {
4 -> {5};
5 -> {6};
6 -> {7};
7 -> {26 8};
7 -> {27 8};
8 -> {9};
9 -> {10};
10 -> {11};
11 -> {12};
12 -> {21 13};
12 -> {22 13};
13 -> {14};
14 -> {15};
15 -> {16};
@@ -84,83 +85,84 @@ digraph whenSubjectExpression_kt {
17 -> {18};
18 -> {19};
19 -> {20};
20 -> {31};
21 -> {22};
20 -> {21};
21 -> {32};
22 -> {23};
23 -> {24};
24 -> {25};
25 -> {31};
26 -> {27};
25 -> {26};
26 -> {32};
27 -> {28};
28 -> {29};
29 -> {30};
30 -> {31};
31 -> {32};
32 -> {33};
33 -> {34};
subgraph cluster_9 {
color=red
34 [label="Enter function whenWithSubjectVariable" style="filled" fillcolor=red];
35 [label="Enter function whenWithSubjectVariable" style="filled" fillcolor=red];
subgraph cluster_10 {
color=blue
35 [label="Enter block"];
36 [label="Enter block"];
subgraph cluster_11 {
color=blue
36 [label="Enter when"];
37 [label="Access variable R|<local>/x|"];
38 [label="Variable declaration: lval y: R|kotlin/Any|"];
37 [label="Enter when"];
38 [label="Access variable R|<local>/x|"];
39 [label="Variable declaration: lval y: R|kotlin/Any|"];
subgraph cluster_12 {
color=blue
39 [label="Enter when branch condition "];
40 [label="Exit $subj"];
41 [label="Type operator: ($subj$ !is R|kotlin/Double|)"];
42 [label="Exit when branch condition"];
40 [label="Enter when branch condition "];
41 [label="Exit $subj"];
42 [label="Type operator: ($subj$ !is R|kotlin/Double|)"];
43 [label="Exit when branch condition"];
}
subgraph cluster_13 {
color=blue
43 [label="Enter when branch condition "];
44 [label="Exit $subj"];
45 [label="Const: Double(0.0)"];
46 [label="Equality operator =="];
47 [label="Exit when branch condition"];
44 [label="Enter when branch condition "];
45 [label="Exit $subj"];
46 [label="Const: Double(0.0)"];
47 [label="Equality operator =="];
48 [label="Exit when branch condition"];
}
subgraph cluster_14 {
color=blue
48 [label="Enter when branch condition else"];
49 [label="Exit when branch condition"];
49 [label="Enter when branch condition else"];
50 [label="Exit when branch condition"];
}
50 [label="Enter when branch result"];
51 [label="Enter when branch result"];
subgraph cluster_15 {
color=blue
51 [label="Enter block"];
52 [label="Access variable R|<local>/y|"];
53 [label="Function call: R|<local>/y|.R|kotlin/Double.toInt|()"];
54 [label="Exit block"];
52 [label="Enter block"];
53 [label="Access variable R|<local>/y|"];
54 [label="Smart cast: R|<local>/y|"];
55 [label="Function call: R|<local>/y|.R|kotlin/Double.toInt|()"];
56 [label="Exit block"];
}
55 [label="Exit when branch result"];
56 [label="Enter when branch result"];
57 [label="Exit when branch result"];
58 [label="Enter when branch result"];
subgraph cluster_16 {
color=blue
57 [label="Enter block"];
58 [label="Const: Int(0)"];
59 [label="Exit block"];
59 [label="Enter block"];
60 [label="Const: Int(0)"];
61 [label="Exit block"];
}
60 [label="Exit when branch result"];
61 [label="Enter when branch result"];
62 [label="Exit when branch result"];
63 [label="Enter when branch result"];
subgraph cluster_17 {
color=blue
62 [label="Enter block"];
63 [label="Const: Int(-1)"];
64 [label="Exit block"];
64 [label="Enter block"];
65 [label="Const: Int(-1)"];
66 [label="Exit block"];
}
65 [label="Exit when branch result"];
66 [label="Exit when"];
67 [label="Exit when branch result"];
68 [label="Exit when"];
}
67 [label="Exit block"];
69 [label="Exit block"];
}
68 [label="Exit function whenWithSubjectVariable" style="filled" fillcolor=red];
70 [label="Exit function whenWithSubjectVariable" style="filled" fillcolor=red];
}
34 -> {35};
35 -> {36};
36 -> {37};
37 -> {38};
@@ -168,31 +170,33 @@ digraph whenSubjectExpression_kt {
39 -> {40};
40 -> {41};
41 -> {42};
42 -> {61 43};
43 -> {44};
42 -> {43};
43 -> {63 44};
44 -> {45};
45 -> {46};
46 -> {47};
47 -> {56 48};
48 -> {49};
47 -> {48};
48 -> {58 49};
49 -> {50};
50 -> {51};
51 -> {52};
52 -> {53};
53 -> {54};
54 -> {55};
55 -> {66};
55 -> {56};
56 -> {57};
57 -> {58};
57 -> {68};
58 -> {59};
59 -> {60};
60 -> {66};
60 -> {61};
61 -> {62};
62 -> {63};
62 -> {68};
63 -> {64};
64 -> {65};
65 -> {66};
66 -> {67};
67 -> {68};
68 -> {69};
69 -> {70};
}