Files
kotlin-fork/compiler/fir/analysis-tests/testData/resolve/smartcasts/casts.dot
T
Brian Norman b55fda0c55 [FIR] Create CFG for files to track top-level property initialization
In order to properly analyze top-level property initialization, a
control-flow graph must be created for FirFiles. This change adds the
foundation for the file CFG and updates body resolve to create the CFG.
Checking the CFG for proper initialization is separated into a following
change to ease code review.

KT-56683
2023-08-31 12:50:52 +00:00

417 lines
14 KiB
Plaintext
Vendored

digraph casts_kt {
graph [nodesep=3]
node [shape=box penwidth=2]
edge [penwidth=2]
subgraph cluster_0 {
color=red
0 [label="Enter file casts.kt" style="filled" fillcolor=red];
1 [label="Exit file casts.kt" style="filled" fillcolor=red];
}
0 -> {1} [color=green];
subgraph cluster_1 {
color=red
2 [label="Enter function test_1" style="filled" fillcolor=red];
subgraph cluster_2 {
color=blue
3 [label="Enter block"];
4 [label="Access variable R|<local>/x|"];
5 [label="Type operator: (R|<local>/x| as R|kotlin/String|)"];
6 [label="Access variable R|<local>/x|"];
7 [label="Smart cast: R|<local>/x|"];
8 [label="Access variable R|kotlin/String.length|"];
9 [label="Exit block"];
}
10 [label="Exit function test_1" style="filled" fillcolor=red];
}
2 -> {3};
3 -> {4};
4 -> {5};
5 -> {6};
6 -> {7};
7 -> {8};
8 -> {9};
9 -> {10};
subgraph cluster_3 {
color=red
11 [label="Enter function test_2" style="filled" fillcolor=red];
subgraph cluster_4 {
color=blue
12 [label="Enter block"];
subgraph cluster_5 {
color=blue
13 [label="Enter when"];
subgraph cluster_6 {
color=blue
14 [label="Enter when branch condition "];
15 [label="Access variable R|<local>/x|"];
16 [label="Type operator: (R|<local>/x| as R|kotlin/Boolean|)"];
17 [label="Exit when branch condition"];
}
18 [label="Synthetic else branch"];
19 [label="Enter when branch result"];
subgraph cluster_7 {
color=blue
20 [label="Enter block"];
21 [label="Access variable R|<local>/x|"];
22 [label="Smart cast: R|<local>/x|"];
23 [label="Function call: R|<local>/x|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow];
24 [label="Exit block"];
}
25 [label="Exit when branch result"];
26 [label="Exit when"];
}
27 [label="Access variable R|<local>/x|"];
28 [label="Smart cast: R|<local>/x|"];
29 [label="Function call: R|<local>/x|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow];
30 [label="Exit block"];
}
31 [label="Exit function test_2" style="filled" fillcolor=red];
}
11 -> {12};
12 -> {13};
13 -> {14};
14 -> {15};
15 -> {16};
16 -> {17};
17 -> {18 19};
18 -> {26};
19 -> {20};
20 -> {21};
21 -> {22};
22 -> {23};
23 -> {24};
24 -> {25};
25 -> {26};
26 -> {27};
27 -> {28};
28 -> {29};
29 -> {30};
30 -> {31};
subgraph cluster_8 {
color=red
32 [label="Enter function test_3" style="filled" fillcolor=red];
subgraph cluster_9 {
color=blue
33 [label="Enter block"];
subgraph cluster_10 {
color=blue
34 [label="Enter when"];
subgraph cluster_11 {
color=blue
35 [label="Enter when branch condition "];
subgraph cluster_12 {
color=blue
36 [label="Enter &&"];
37 [label="Access variable R|<local>/b|"];
38 [label="Exit left part of &&"];
39 [label="Enter right part of &&"];
40 [label="Access variable R|<local>/x|"];
41 [label="Type operator: (R|<local>/x| as R|kotlin/Boolean|)"];
42 [label="Exit &&"];
}
43 [label="Exit when branch condition"];
}
44 [label="Synthetic else branch"];
45 [label="Enter when branch result"];
subgraph cluster_13 {
color=blue
46 [label="Enter block"];
47 [label="Access variable R|<local>/x|"];
48 [label="Smart cast: R|<local>/x|"];
49 [label="Function call: R|<local>/x|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow];
50 [label="Exit block"];
}
51 [label="Exit when branch result"];
52 [label="Exit when"];
}
53 [label="Access variable R|<local>/x|"];
54 [label="Function call: R|<local>/x|.<Unresolved name: not>#()" style="filled" fillcolor=yellow];
subgraph cluster_14 {
color=blue
55 [label="Enter when"];
subgraph cluster_15 {
color=blue
56 [label="Enter when branch condition "];
subgraph cluster_16 {
color=blue
57 [label="Enter &&"];
58 [label="Access variable R|<local>/b|"];
59 [label="Exit left part of &&"];
60 [label="Enter right part of &&"];
61 [label="Access variable R|<local>/x|"];
62 [label="Type operator: (R|<local>/x| as R|kotlin/Boolean|)"];
63 [label="Const: Boolean(true)"];
64 [label="Equality operator =="];
65 [label="Exit &&"];
}
66 [label="Exit when branch condition"];
}
67 [label="Synthetic else branch"];
68 [label="Enter when branch result"];
subgraph cluster_17 {
color=blue
69 [label="Enter block"];
70 [label="Access variable R|<local>/x|"];
71 [label="Smart cast: R|<local>/x|"];
72 [label="Function call: R|<local>/x|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow];
73 [label="Exit block"];
}
74 [label="Exit when branch result"];
75 [label="Exit when"];
}
76 [label="Access variable R|<local>/x|"];
77 [label="Function call: R|<local>/x|.<Unresolved name: not>#()" style="filled" fillcolor=yellow];
subgraph cluster_18 {
color=blue
78 [label="Enter when"];
subgraph cluster_19 {
color=blue
79 [label="Enter when branch condition "];
subgraph cluster_20 {
color=blue
80 [label="Enter ||"];
81 [label="Access variable R|<local>/b|"];
82 [label="Exit left part of ||"];
83 [label="Enter right part of ||"];
84 [label="Access variable R|<local>/x|"];
85 [label="Type operator: (R|<local>/x| as R|kotlin/Boolean|)"];
86 [label="Exit ||"];
}
87 [label="Exit when branch condition"];
}
88 [label="Synthetic else branch"];
89 [label="Enter when branch result"];
subgraph cluster_21 {
color=blue
90 [label="Enter block"];
91 [label="Access variable R|<local>/x|"];
92 [label="Function call: R|<local>/x|.<Unresolved name: not>#()" style="filled" fillcolor=yellow];
93 [label="Exit block"];
}
94 [label="Exit when branch result"];
95 [label="Exit when"];
}
96 [label="Access variable R|<local>/x|"];
97 [label="Function call: R|<local>/x|.<Unresolved name: not>#()" style="filled" fillcolor=yellow];
98 [label="Exit block"];
}
99 [label="Exit function test_3" style="filled" fillcolor=red];
}
32 -> {33};
33 -> {34};
34 -> {35};
35 -> {36};
36 -> {37};
37 -> {38};
38 -> {39 42};
39 -> {40};
40 -> {41};
41 -> {42};
42 -> {43};
43 -> {44 45};
44 -> {52};
45 -> {46};
46 -> {47};
47 -> {48};
48 -> {49};
49 -> {50};
50 -> {51};
51 -> {52};
52 -> {53};
53 -> {54};
54 -> {55};
55 -> {56};
56 -> {57};
57 -> {58};
58 -> {59};
59 -> {60 65};
60 -> {61};
61 -> {62};
62 -> {63};
63 -> {64};
64 -> {65};
65 -> {66};
66 -> {67 68};
67 -> {75};
68 -> {69};
69 -> {70};
70 -> {71};
71 -> {72};
72 -> {73};
73 -> {74};
74 -> {75};
75 -> {76};
76 -> {77};
77 -> {78};
78 -> {79};
79 -> {80};
80 -> {81};
81 -> {82};
82 -> {83 86};
83 -> {84};
84 -> {85};
85 -> {86};
86 -> {87};
87 -> {88 89};
88 -> {95};
89 -> {90};
90 -> {91};
91 -> {92};
92 -> {93};
93 -> {94};
94 -> {95};
95 -> {96};
96 -> {97};
97 -> {98};
98 -> {99};
subgraph cluster_22 {
color=red
100 [label="Enter function test_4" style="filled" fillcolor=red];
subgraph cluster_23 {
color=blue
101 [label="Enter block"];
subgraph cluster_24 {
color=blue
102 [label="Enter when"];
subgraph cluster_25 {
color=blue
103 [label="Enter when branch condition "];
104 [label="Access variable R|<local>/b|"];
105 [label="Type operator: (R|<local>/b| as? R|kotlin/Boolean|)"];
106 [label="Const: Null(null)"];
107 [label="Equality operator !="];
108 [label="Exit when branch condition"];
}
subgraph cluster_26 {
color=blue
109 [label="Enter when branch condition else"];
110 [label="Exit when branch condition"];
}
111 [label="Enter when branch result"];
subgraph cluster_27 {
color=blue
112 [label="Enter block"];
113 [label="Access variable R|<local>/b|"];
114 [label="Function call: R|<local>/b|.<Unresolved name: not>#()" style="filled" fillcolor=yellow];
115 [label="Exit block"];
}
116 [label="Exit when branch result"];
117 [label="Enter when branch result"];
subgraph cluster_28 {
color=blue
118 [label="Enter block"];
119 [label="Access variable R|<local>/b|"];
120 [label="Smart cast: R|<local>/b|"];
121 [label="Function call: R|<local>/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow];
122 [label="Exit block"];
}
123 [label="Exit when branch result"];
124 [label="Exit when"];
}
125 [label="Access variable R|<local>/b|"];
126 [label="Function call: R|<local>/b|.<Unresolved name: not>#()" style="filled" fillcolor=yellow];
subgraph cluster_29 {
color=blue
127 [label="Enter when"];
subgraph cluster_30 {
color=blue
128 [label="Enter when branch condition "];
129 [label="Access variable R|<local>/b|"];
130 [label="Type operator: (R|<local>/b| as? R|kotlin/Boolean|)"];
131 [label="Const: Null(null)"];
132 [label="Equality operator =="];
133 [label="Exit when branch condition"];
}
subgraph cluster_31 {
color=blue
134 [label="Enter when branch condition else"];
135 [label="Exit when branch condition"];
}
136 [label="Enter when branch result"];
subgraph cluster_32 {
color=blue
137 [label="Enter block"];
138 [label="Access variable R|<local>/b|"];
139 [label="Smart cast: R|<local>/b|"];
140 [label="Function call: R|<local>/b|.R|kotlin/Boolean.not|()" style="filled" fillcolor=yellow];
141 [label="Exit block"];
}
142 [label="Exit when branch result"];
143 [label="Enter when branch result"];
subgraph cluster_33 {
color=blue
144 [label="Enter block"];
145 [label="Access variable R|<local>/b|"];
146 [label="Function call: R|<local>/b|.<Unresolved name: not>#()" style="filled" fillcolor=yellow];
147 [label="Exit block"];
}
148 [label="Exit when branch result"];
149 [label="Exit when"];
}
150 [label="Access variable R|<local>/b|"];
151 [label="Function call: R|<local>/b|.<Unresolved name: not>#()" style="filled" fillcolor=yellow];
152 [label="Exit block"];
}
153 [label="Exit function test_4" style="filled" fillcolor=red];
}
100 -> {101};
101 -> {102};
102 -> {103};
103 -> {104};
104 -> {105};
105 -> {106};
106 -> {107};
107 -> {108};
108 -> {109 117};
109 -> {110};
110 -> {111};
111 -> {112};
112 -> {113};
113 -> {114};
114 -> {115};
115 -> {116};
116 -> {124};
117 -> {118};
118 -> {119};
119 -> {120};
120 -> {121};
121 -> {122};
122 -> {123};
123 -> {124};
124 -> {125};
125 -> {126};
126 -> {127};
127 -> {128};
128 -> {129};
129 -> {130};
130 -> {131};
131 -> {132};
132 -> {133};
133 -> {134 143};
134 -> {135};
135 -> {136};
136 -> {137};
137 -> {138};
138 -> {139};
139 -> {140};
140 -> {141};
141 -> {142};
142 -> {149};
143 -> {144};
144 -> {145};
145 -> {146};
146 -> {147};
147 -> {148};
148 -> {149};
149 -> {150};
150 -> {151};
151 -> {152};
152 -> {153};
}