Files
kotlin-fork/compiler/fir/analysis-tests/testData/resolve/cfg/loops.dot
T
2020-06-19 15:53:04 +03:00

546 lines
19 KiB
Plaintext
Vendored

digraph loops_kt {
graph [nodesep=3]
node [shape=box penwidth=2]
edge [penwidth=2]
subgraph cluster_0 {
color=red
0 [label="Enter function testWhile" style="filled" fillcolor=red];
subgraph cluster_1 {
color=blue
1 [label="Enter block"];
subgraph cluster_2 {
color=blue
2 [label="Enter while loop"];
subgraph cluster_3 {
color=blue
3 [label="Enter loop condition"];
4 [label="Access variable R|<local>/b|"];
5 [label="Exit loop condition"];
}
subgraph cluster_4 {
color=blue
6 [label="Enter loop block"];
subgraph cluster_5 {
color=blue
7 [label="Enter block"];
8 [label="Access variable R|<local>/x|"];
9 [label="Type operator: (R|<local>/x| is R|kotlin/String|)"];
10 [label="Variable declaration: lval y: R|kotlin/Boolean|"];
11 [label="Exit block"];
}
12 [label="Exit loop block"];
}
13 [label="Exit whileloop"];
}
14 [label="Access variable R|<local>/x|"];
15 [label="Type operator: (R|<local>/x| is R|kotlin/String|)"];
16 [label="Exit block"];
}
17 [label="Exit function testWhile" style="filled" fillcolor=red];
}
0 -> {1};
1 -> {2};
2 -> {3};
3 -> {4};
4 -> {5};
5 -> {13 6};
6 -> {7};
7 -> {8};
8 -> {9};
9 -> {10};
10 -> {11};
11 -> {12};
12 -> {3} [color=green style=dashed];
13 -> {14};
14 -> {15};
15 -> {16};
16 -> {17};
subgraph cluster_6 {
color=red
18 [label="Enter function testDoWhile" style="filled" fillcolor=red];
subgraph cluster_7 {
color=blue
19 [label="Enter block"];
subgraph cluster_8 {
color=blue
20 [label="Enter do-while loop"];
subgraph cluster_9 {
color=blue
21 [label="Enter loop block"];
subgraph cluster_10 {
color=blue
22 [label="Enter block"];
23 [label="Access variable R|<local>/x|"];
24 [label="Type operator: (R|<local>/x| is R|kotlin/String|)"];
25 [label="Variable declaration: lval y: R|kotlin/Boolean|"];
26 [label="Exit block"];
}
27 [label="Exit loop block"];
}
subgraph cluster_11 {
color=blue
28 [label="Enter loop condition"];
29 [label="Access variable R|<local>/b|"];
30 [label="Exit loop condition"];
}
31 [label="Exit do-whileloop"];
}
32 [label="Access variable R|<local>/x|"];
33 [label="Type operator: (R|<local>/x| is R|kotlin/String|)"];
34 [label="Exit block"];
}
35 [label="Exit function testDoWhile" style="filled" fillcolor=red];
}
18 -> {19};
19 -> {20};
20 -> {21};
21 -> {22};
22 -> {23};
23 -> {24};
24 -> {25};
25 -> {26};
26 -> {27};
27 -> {28};
28 -> {29};
29 -> {30};
30 -> {31};
30 -> {21} [color=green style=dashed];
31 -> {32};
32 -> {33};
33 -> {34};
34 -> {35};
subgraph cluster_12 {
color=red
36 [label="Enter function testFor" style="filled" fillcolor=red];
subgraph cluster_13 {
color=blue
37 [label="Enter block"];
38 [label="Const: Int(0)"];
39 [label="Const: Int(5)"];
40 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(...)"];
41 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(...).R|kotlin/ranges/IntProgression.iterator|()"];
42 [label="Variable declaration: lval <iterator>: R|kotlin/collections/IntIterator|"];
subgraph cluster_14 {
color=blue
43 [label="Enter while loop"];
subgraph cluster_15 {
color=blue
44 [label="Enter loop condition"];
45 [label="Access variable R|<local>/<iterator>|"];
46 [label="Function call: R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()"];
47 [label="Exit loop condition"];
}
subgraph cluster_16 {
color=blue
48 [label="Enter loop block"];
subgraph cluster_17 {
color=blue
49 [label="Enter block"];
50 [label="Access variable R|<local>/<iterator>|"];
51 [label="Function call: R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()"];
52 [label="Variable declaration: lval i: R|kotlin/Int|"];
53 [label="Access variable R|<local>/x|"];
54 [label="Type operator: (R|<local>/x| is R|kotlin/String|)"];
55 [label="Variable declaration: lval y: R|kotlin/Boolean|"];
56 [label="Exit block"];
}
57 [label="Exit loop block"];
}
58 [label="Exit whileloop"];
}
59 [label="Access variable R|<local>/x|"];
60 [label="Type operator: (R|<local>/x| is R|kotlin/String|)"];
61 [label="Exit block"];
}
62 [label="Exit function testFor" style="filled" fillcolor=red];
}
36 -> {37};
37 -> {38};
38 -> {39};
39 -> {40};
40 -> {41};
41 -> {42};
42 -> {43};
43 -> {44};
44 -> {45};
45 -> {46};
46 -> {47};
47 -> {58 48};
48 -> {49};
49 -> {50};
50 -> {51};
51 -> {52};
52 -> {53};
53 -> {54};
54 -> {55};
55 -> {56};
56 -> {57};
57 -> {44} [color=green style=dashed];
58 -> {59};
59 -> {60};
60 -> {61};
61 -> {62};
subgraph cluster_18 {
color=red
63 [label="Enter function testWhileTrue" style="filled" fillcolor=red];
subgraph cluster_19 {
color=blue
64 [label="Enter block"];
subgraph cluster_20 {
color=blue
65 [label="Enter while loop"];
subgraph cluster_21 {
color=blue
66 [label="Enter loop condition"];
67 [label="Const: Boolean(true)"];
68 [label="Exit loop condition"];
}
subgraph cluster_22 {
color=blue
69 [label="Enter loop block"];
subgraph cluster_23 {
color=blue
70 [label="Enter block"];
71 [label="Const: Int(1)"];
72 [label="Exit block"];
}
73 [label="Exit loop block"];
}
74 [label="Exit whileloop" style="filled" fillcolor=gray];
}
75 [label="Const: Int(1)" style="filled" fillcolor=gray];
76 [label="Exit block" style="filled" fillcolor=gray];
}
77 [label="Exit function testWhileTrue" style="filled" fillcolor=red style="filled" fillcolor=gray];
}
63 -> {64};
64 -> {65};
65 -> {66};
66 -> {67};
67 -> {68};
68 -> {69};
68 -> {74} [style=dotted];
69 -> {70};
70 -> {71};
71 -> {72};
72 -> {73};
73 -> {66} [color=green style=dashed];
74 -> {75} [style=dotted];
75 -> {76} [style=dotted];
76 -> {77} [style=dotted];
subgraph cluster_24 {
color=red
78 [label="Enter function testWhileTrueWithBreak" style="filled" fillcolor=red];
subgraph cluster_25 {
color=blue
79 [label="Enter block"];
subgraph cluster_26 {
color=blue
80 [label="Enter while loop"];
subgraph cluster_27 {
color=blue
81 [label="Enter loop condition"];
82 [label="Const: Boolean(true)"];
83 [label="Exit loop condition"];
}
subgraph cluster_28 {
color=blue
84 [label="Enter loop block"];
subgraph cluster_29 {
color=blue
85 [label="Enter block"];
subgraph cluster_30 {
color=blue
86 [label="Enter when"];
subgraph cluster_31 {
color=blue
87 [label="Enter when branch condition "];
88 [label="Access variable R|<local>/b|"];
89 [label="Exit when branch condition"];
}
90 [label="Synthetic else branch"];
91 [label="Enter when branch result"];
subgraph cluster_32 {
color=blue
92 [label="Enter block"];
93 [label="Jump: break@@@[Boolean(true)] "];
94 [label="Stub" style="filled" fillcolor=gray];
95 [label="Exit block" style="filled" fillcolor=gray];
}
96 [label="Exit when branch result" style="filled" fillcolor=gray];
97 [label="Exit when"];
}
98 [label="Exit block"];
}
99 [label="Exit loop block"];
}
100 [label="Exit whileloop"];
}
101 [label="Const: Int(1)"];
102 [label="Exit block"];
}
103 [label="Exit function testWhileTrueWithBreak" style="filled" fillcolor=red];
}
78 -> {79};
79 -> {80};
80 -> {81};
81 -> {82};
82 -> {83};
83 -> {84};
83 -> {100} [style=dotted];
84 -> {85};
85 -> {86};
86 -> {87};
87 -> {88};
88 -> {89};
89 -> {91 90};
90 -> {97};
91 -> {92};
92 -> {93};
93 -> {100};
93 -> {94} [style=dotted];
94 -> {95} [style=dotted];
95 -> {96} [style=dotted];
96 -> {97} [style=dotted];
97 -> {98};
98 -> {99};
99 -> {81} [color=green style=dashed];
100 -> {101};
101 -> {102};
102 -> {103};
subgraph cluster_33 {
color=red
104 [label="Enter function testWhileFalse" style="filled" fillcolor=red];
subgraph cluster_34 {
color=blue
105 [label="Enter block"];
subgraph cluster_35 {
color=blue
106 [label="Enter while loop"];
subgraph cluster_36 {
color=blue
107 [label="Enter loop condition"];
108 [label="Const: Boolean(false)"];
109 [label="Exit loop condition"];
}
subgraph cluster_37 {
color=blue
110 [label="Enter loop block" style="filled" fillcolor=gray];
subgraph cluster_38 {
color=blue
111 [label="Enter block" style="filled" fillcolor=gray];
112 [label="Const: Int(1)" style="filled" fillcolor=gray];
113 [label="Exit block" style="filled" fillcolor=gray];
}
114 [label="Exit loop block" style="filled" fillcolor=gray];
}
115 [label="Exit whileloop"];
}
116 [label="Const: Int(1)"];
117 [label="Exit block"];
}
118 [label="Exit function testWhileFalse" style="filled" fillcolor=red];
}
104 -> {105};
105 -> {106};
106 -> {107};
107 -> {108};
108 -> {109};
109 -> {115};
109 -> {110} [style=dotted];
110 -> {111} [style=dotted];
111 -> {112} [style=dotted];
112 -> {113} [style=dotted];
113 -> {114} [style=dotted];
114 -> {107} [color=green style=dotted];
115 -> {116};
116 -> {117};
117 -> {118};
subgraph cluster_39 {
color=red
119 [label="Enter function testDoWhileTrue" style="filled" fillcolor=red];
subgraph cluster_40 {
color=blue
120 [label="Enter block"];
subgraph cluster_41 {
color=blue
121 [label="Enter do-while loop"];
subgraph cluster_42 {
color=blue
122 [label="Enter loop block"];
subgraph cluster_43 {
color=blue
123 [label="Enter block"];
124 [label="Const: Int(1)"];
125 [label="Exit block"];
}
126 [label="Exit loop block"];
}
subgraph cluster_44 {
color=blue
127 [label="Enter loop condition"];
128 [label="Const: Boolean(true)"];
129 [label="Exit loop condition"];
}
130 [label="Exit do-whileloop" style="filled" fillcolor=gray];
}
131 [label="Const: Int(1)" style="filled" fillcolor=gray];
132 [label="Exit block" style="filled" fillcolor=gray];
}
133 [label="Exit function testDoWhileTrue" style="filled" fillcolor=red style="filled" fillcolor=gray];
}
119 -> {120};
120 -> {121};
121 -> {122};
122 -> {123};
123 -> {124};
124 -> {125};
125 -> {126};
126 -> {127};
127 -> {128};
128 -> {129};
129 -> {130} [style=dotted];
129 -> {122} [color=green style=dashed];
130 -> {131} [style=dotted];
131 -> {132} [style=dotted];
132 -> {133} [style=dotted];
subgraph cluster_45 {
color=red
134 [label="Enter function testDoWhileTrueWithBreak" style="filled" fillcolor=red];
subgraph cluster_46 {
color=blue
135 [label="Enter block"];
subgraph cluster_47 {
color=blue
136 [label="Enter do-while loop"];
subgraph cluster_48 {
color=blue
137 [label="Enter loop block"];
subgraph cluster_49 {
color=blue
138 [label="Enter block"];
subgraph cluster_50 {
color=blue
139 [label="Enter when"];
subgraph cluster_51 {
color=blue
140 [label="Enter when branch condition "];
141 [label="Access variable R|<local>/b|"];
142 [label="Exit when branch condition"];
}
143 [label="Synthetic else branch"];
144 [label="Enter when branch result"];
subgraph cluster_52 {
color=blue
145 [label="Enter block"];
146 [label="Jump: break@@@[Boolean(true)] "];
147 [label="Stub" style="filled" fillcolor=gray];
148 [label="Exit block" style="filled" fillcolor=gray];
}
149 [label="Exit when branch result" style="filled" fillcolor=gray];
150 [label="Exit when"];
}
151 [label="Exit block"];
}
152 [label="Exit loop block"];
}
subgraph cluster_53 {
color=blue
153 [label="Enter loop condition"];
154 [label="Const: Boolean(true)"];
155 [label="Exit loop condition"];
}
156 [label="Exit do-whileloop"];
}
157 [label="Const: Int(1)"];
158 [label="Exit block"];
}
159 [label="Exit function testDoWhileTrueWithBreak" style="filled" fillcolor=red];
}
134 -> {135};
135 -> {136};
136 -> {137};
137 -> {138};
138 -> {139};
139 -> {140};
140 -> {141};
141 -> {142};
142 -> {144 143};
143 -> {150};
144 -> {145};
145 -> {146};
146 -> {156};
146 -> {147} [style=dotted];
147 -> {148} [style=dotted];
148 -> {149} [style=dotted];
149 -> {150} [style=dotted];
150 -> {151};
151 -> {152};
152 -> {153};
153 -> {154};
154 -> {155};
155 -> {156} [style=dotted];
155 -> {137} [color=green style=dashed];
156 -> {157};
157 -> {158};
158 -> {159};
subgraph cluster_54 {
color=red
160 [label="Enter function testDoWhileFalse" style="filled" fillcolor=red];
subgraph cluster_55 {
color=blue
161 [label="Enter block"];
subgraph cluster_56 {
color=blue
162 [label="Enter do-while loop"];
subgraph cluster_57 {
color=blue
163 [label="Enter loop block"];
subgraph cluster_58 {
color=blue
164 [label="Enter block"];
165 [label="Const: Int(1)"];
166 [label="Exit block"];
}
167 [label="Exit loop block"];
}
subgraph cluster_59 {
color=blue
168 [label="Enter loop condition"];
169 [label="Const: Boolean(false)"];
170 [label="Exit loop condition"];
}
171 [label="Exit do-whileloop"];
}
172 [label="Const: Int(1)"];
173 [label="Exit block"];
}
174 [label="Exit function testDoWhileFalse" style="filled" fillcolor=red];
}
160 -> {161};
161 -> {162};
162 -> {163};
163 -> {164};
164 -> {165};
165 -> {166};
166 -> {167};
167 -> {168};
168 -> {169};
169 -> {170};
170 -> {171};
170 -> {163} [color=green style=dotted];
171 -> {172};
172 -> {173};
173 -> {174};
}