b55fda0c55
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
420 lines
14 KiB
Plaintext
Vendored
420 lines
14 KiB
Plaintext
Vendored
digraph callsInPlace_kt {
|
|
graph [nodesep=3]
|
|
node [shape=box penwidth=2]
|
|
edge [penwidth=2]
|
|
|
|
subgraph cluster_0 {
|
|
color=red
|
|
0 [label="Enter file callsInPlace.kt" style="filled" fillcolor=red];
|
|
1 [label="Exit file callsInPlace.kt" style="filled" fillcolor=red];
|
|
}
|
|
0 -> {1} [color=green];
|
|
|
|
subgraph cluster_1 {
|
|
color=red
|
|
2 [label="Enter function test" style="filled" fillcolor=red];
|
|
subgraph cluster_2 {
|
|
color=blue
|
|
3 [label="Enter block"];
|
|
4 [label="Variable declaration: lval x: R|kotlin/Int|"];
|
|
5 [label="Postponed enter to lambda"];
|
|
subgraph cluster_3 {
|
|
color=blue
|
|
6 [label="Enter function <anonymous>" style="filled" fillcolor=red];
|
|
subgraph cluster_4 {
|
|
color=blue
|
|
7 [label="Enter block"];
|
|
8 [label="Const: Int(1)"];
|
|
9 [label="Assignment: R|<local>/x|"];
|
|
10 [label="Exit block"];
|
|
}
|
|
11 [label="Exit function <anonymous>" style="filled" fillcolor=red];
|
|
}
|
|
12 [label="Postponed exit from lambda"];
|
|
13 [label="Function call: R|kotlin/run|<R|kotlin/Unit|>(...)" style="filled" fillcolor=yellow];
|
|
14 [label="Access variable R|<local>/x|"];
|
|
15 [label="Function call: R|<local>/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow];
|
|
16 [label="Exit block"];
|
|
}
|
|
17 [label="Exit function test" style="filled" fillcolor=red];
|
|
}
|
|
2 -> {3};
|
|
3 -> {4};
|
|
4 -> {5};
|
|
5 -> {6 13};
|
|
5 -> {12} [style=dotted];
|
|
5 -> {6} [style=dashed];
|
|
6 -> {7};
|
|
7 -> {8};
|
|
8 -> {9};
|
|
9 -> {10};
|
|
10 -> {11};
|
|
11 -> {12};
|
|
12 -> {13};
|
|
13 -> {14};
|
|
14 -> {15};
|
|
15 -> {16};
|
|
16 -> {17};
|
|
|
|
subgraph cluster_5 {
|
|
color=red
|
|
18 [label="Enter function test_2" style="filled" fillcolor=red];
|
|
subgraph cluster_6 {
|
|
color=blue
|
|
19 [label="Enter block"];
|
|
20 [label="Const: Int(10)"];
|
|
21 [label="Postponed enter to lambda"];
|
|
subgraph cluster_7 {
|
|
color=blue
|
|
22 [label="Enter function <anonymous>" style="filled" fillcolor=red];
|
|
subgraph cluster_8 {
|
|
color=blue
|
|
23 [label="Enter block"];
|
|
24 [label="Const: String(test_2)"];
|
|
25 [label="Exit block"];
|
|
}
|
|
26 [label="Exit function <anonymous>" style="filled" fillcolor=red];
|
|
}
|
|
27 [label="Postponed exit from lambda"];
|
|
28 [label="Function call: R|kotlin/repeat|(...)" style="filled" fillcolor=yellow];
|
|
29 [label="Exit block"];
|
|
}
|
|
30 [label="Exit function test_2" style="filled" fillcolor=red];
|
|
}
|
|
18 -> {19};
|
|
19 -> {20};
|
|
20 -> {21};
|
|
21 -> {22 27 28};
|
|
21 -> {22} [style=dashed];
|
|
22 -> {23};
|
|
23 -> {24};
|
|
24 -> {25};
|
|
25 -> {26};
|
|
26 -> {27};
|
|
27 -> {28};
|
|
27 -> {21} [color=green style=dashed];
|
|
28 -> {29};
|
|
29 -> {30};
|
|
|
|
subgraph cluster_9 {
|
|
color=red
|
|
31 [label="Enter function test_3" style="filled" fillcolor=red];
|
|
subgraph cluster_10 {
|
|
color=blue
|
|
32 [label="Enter block"];
|
|
33 [label="Const: Int(10)"];
|
|
34 [label="Postponed enter to lambda"];
|
|
subgraph cluster_11 {
|
|
color=blue
|
|
35 [label="Enter function <anonymous>" style="filled" fillcolor=red];
|
|
subgraph cluster_12 {
|
|
color=blue
|
|
36 [label="Enter block"];
|
|
37 [label="Const: String(test_3)"];
|
|
38 [label="Exit block"];
|
|
}
|
|
39 [label="Exit function <anonymous>" style="filled" fillcolor=red];
|
|
}
|
|
40 [label="Postponed exit from lambda"];
|
|
41 [label="Function call: R|kotlin/repeat|(...)" style="filled" fillcolor=yellow];
|
|
42 [label="Exit block"];
|
|
}
|
|
43 [label="Exit function test_3" style="filled" fillcolor=red];
|
|
}
|
|
31 -> {32};
|
|
32 -> {33};
|
|
33 -> {34};
|
|
34 -> {35 40 41};
|
|
34 -> {35} [style=dashed];
|
|
35 -> {36};
|
|
36 -> {37};
|
|
37 -> {38};
|
|
38 -> {39};
|
|
39 -> {40};
|
|
40 -> {41};
|
|
40 -> {34} [color=green style=dashed];
|
|
41 -> {42};
|
|
42 -> {43};
|
|
|
|
subgraph cluster_13 {
|
|
color=red
|
|
44 [label="Enter function test_4" style="filled" fillcolor=red];
|
|
subgraph cluster_14 {
|
|
color=blue
|
|
45 [label="Enter block"];
|
|
46 [label="Const: Int(1)"];
|
|
47 [label="Postponed enter to lambda"];
|
|
subgraph cluster_15 {
|
|
color=blue
|
|
48 [label="Enter function <anonymous>" style="filled" fillcolor=red];
|
|
subgraph cluster_16 {
|
|
color=blue
|
|
49 [label="Enter block"];
|
|
50 [label="Const: String(test_4)"];
|
|
51 [label="Access variable R|<local>/it|"];
|
|
52 [label="Const: Int(0)"];
|
|
53 [label="Function call: R|<local>/it|.R|kotlin/Int.compareTo|(...)" style="filled" fillcolor=yellow];
|
|
54 [label="Comparison >"];
|
|
55 [label="Exit block"];
|
|
}
|
|
56 [label="Exit function <anonymous>" style="filled" fillcolor=red];
|
|
}
|
|
57 [label="Postponed exit from lambda"];
|
|
58 [label="Function call: Int(1).R|kotlin/takeUnless|<R|kotlin/Int|>(...)" style="filled" fillcolor=yellow];
|
|
59 [label="Exit block"];
|
|
}
|
|
60 [label="Exit function test_4" style="filled" fillcolor=red];
|
|
}
|
|
44 -> {45};
|
|
45 -> {46};
|
|
46 -> {47};
|
|
47 -> {48 58};
|
|
47 -> {57} [style=dotted];
|
|
47 -> {48} [style=dashed];
|
|
48 -> {49};
|
|
49 -> {50};
|
|
50 -> {51};
|
|
51 -> {52};
|
|
52 -> {53};
|
|
53 -> {54};
|
|
54 -> {55};
|
|
55 -> {56};
|
|
56 -> {57};
|
|
57 -> {58};
|
|
58 -> {59};
|
|
59 -> {60};
|
|
|
|
subgraph cluster_17 {
|
|
color=red
|
|
61 [label="Enter function test_5" style="filled" fillcolor=red];
|
|
subgraph cluster_18 {
|
|
color=blue
|
|
62 [label="Enter block"];
|
|
63 [label="Const: Int(1)"];
|
|
64 [label="Postponed enter to lambda"];
|
|
subgraph cluster_19 {
|
|
color=blue
|
|
65 [label="Enter function <anonymous>" style="filled" fillcolor=red];
|
|
subgraph cluster_20 {
|
|
color=blue
|
|
66 [label="Enter block"];
|
|
67 [label="Const: String(test_5)"];
|
|
68 [label="Access variable R|<local>/it|"];
|
|
69 [label="Const: Int(0)"];
|
|
70 [label="Function call: R|<local>/it|.R|kotlin/Int.compareTo|(...)" style="filled" fillcolor=yellow];
|
|
71 [label="Comparison >"];
|
|
72 [label="Exit block"];
|
|
}
|
|
73 [label="Exit function <anonymous>" style="filled" fillcolor=red];
|
|
}
|
|
74 [label="Postponed exit from lambda"];
|
|
75 [label="Function call: Int(1).R|kotlin/takeUnless|<R|kotlin/Int|>(...)" style="filled" fillcolor=yellow];
|
|
76 [label="Exit block"];
|
|
}
|
|
77 [label="Exit function test_5" style="filled" fillcolor=red];
|
|
}
|
|
61 -> {62};
|
|
62 -> {63};
|
|
63 -> {64};
|
|
64 -> {65 75};
|
|
64 -> {74} [style=dotted];
|
|
64 -> {65} [style=dashed];
|
|
65 -> {66};
|
|
66 -> {67};
|
|
67 -> {68};
|
|
68 -> {69};
|
|
69 -> {70};
|
|
70 -> {71};
|
|
71 -> {72};
|
|
72 -> {73};
|
|
73 -> {74};
|
|
74 -> {75};
|
|
75 -> {76};
|
|
76 -> {77};
|
|
|
|
subgraph cluster_21 {
|
|
color=red
|
|
78 [label="Enter function myRun" style="filled" fillcolor=red];
|
|
subgraph cluster_22 {
|
|
color=blue
|
|
79 [label="Enter block"];
|
|
80 [label="Function call: R|<local>/block1|.R|SubstitutionOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()" style="filled" fillcolor=yellow];
|
|
81 [label="Function call: R|<local>/block2|.R|SubstitutionOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()" style="filled" fillcolor=yellow];
|
|
82 [label="Exit block"];
|
|
}
|
|
83 [label="Exit function myRun" style="filled" fillcolor=red];
|
|
}
|
|
78 -> {79};
|
|
79 -> {80};
|
|
80 -> {81};
|
|
81 -> {82};
|
|
82 -> {83};
|
|
|
|
subgraph cluster_23 {
|
|
color=red
|
|
84 [label="Enter function test_6" style="filled" fillcolor=red];
|
|
subgraph cluster_24 {
|
|
color=blue
|
|
85 [label="Enter block"];
|
|
86 [label="Postponed enter to lambda"];
|
|
subgraph cluster_25 {
|
|
color=blue
|
|
87 [label="Enter function <anonymous>" style="filled" fillcolor=red];
|
|
subgraph cluster_26 {
|
|
color=blue
|
|
88 [label="Enter block"];
|
|
89 [label="Const: String(test_6_2)"];
|
|
90 [label="Exit block"];
|
|
}
|
|
91 [label="Exit function <anonymous>" style="filled" fillcolor=red];
|
|
}
|
|
subgraph cluster_27 {
|
|
color=blue
|
|
92 [label="Enter function <anonymous>" style="filled" fillcolor=red];
|
|
subgraph cluster_28 {
|
|
color=blue
|
|
93 [label="Enter block"];
|
|
94 [label="Const: String(test_6_1)"];
|
|
95 [label="Exit block"];
|
|
}
|
|
96 [label="Exit function <anonymous>" style="filled" fillcolor=red];
|
|
}
|
|
97 [label="Postponed exit from lambda"];
|
|
98 [label="Postponed exit from lambda"];
|
|
99 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow];
|
|
100 [label="Exit block"];
|
|
}
|
|
101 [label="Exit function test_6" style="filled" fillcolor=red];
|
|
}
|
|
84 -> {85};
|
|
85 -> {86};
|
|
86 -> {87 92 97 98 99};
|
|
86 -> {87 92} [style=dashed];
|
|
87 -> {88};
|
|
88 -> {89};
|
|
89 -> {90};
|
|
90 -> {91};
|
|
91 -> {97};
|
|
92 -> {93};
|
|
93 -> {94};
|
|
94 -> {95};
|
|
95 -> {96};
|
|
96 -> {98};
|
|
97 -> {99};
|
|
97 -> {86} [color=green style=dashed];
|
|
98 -> {99};
|
|
98 -> {86} [color=green style=dashed];
|
|
99 -> {100};
|
|
100 -> {101};
|
|
|
|
subgraph cluster_29 {
|
|
color=red
|
|
102 [label="Enter function test_7" style="filled" fillcolor=red];
|
|
subgraph cluster_30 {
|
|
color=blue
|
|
103 [label="Enter block"];
|
|
104 [label="Postponed enter to lambda"];
|
|
subgraph cluster_31 {
|
|
color=blue
|
|
105 [label="Enter function <anonymous>" style="filled" fillcolor=red];
|
|
subgraph cluster_32 {
|
|
color=blue
|
|
106 [label="Enter block"];
|
|
107 [label="Const: String(test_7_1)"];
|
|
108 [label="Exit block"];
|
|
}
|
|
109 [label="Exit function <anonymous>" style="filled" fillcolor=red];
|
|
}
|
|
subgraph cluster_33 {
|
|
color=blue
|
|
110 [label="Enter function <anonymous>" style="filled" fillcolor=red];
|
|
subgraph cluster_34 {
|
|
color=blue
|
|
111 [label="Enter block"];
|
|
112 [label="Const: String(test_7_2)"];
|
|
113 [label="Exit block"];
|
|
}
|
|
114 [label="Exit function <anonymous>" style="filled" fillcolor=red];
|
|
}
|
|
115 [label="Postponed exit from lambda"];
|
|
116 [label="Postponed exit from lambda"];
|
|
117 [label="Function call: R|/myRun|(...)" style="filled" fillcolor=yellow];
|
|
118 [label="Exit block"];
|
|
}
|
|
119 [label="Exit function test_7" style="filled" fillcolor=red];
|
|
}
|
|
102 -> {103};
|
|
103 -> {104};
|
|
104 -> {105 110 115 116 117};
|
|
104 -> {105 110} [style=dashed];
|
|
105 -> {106};
|
|
106 -> {107};
|
|
107 -> {108};
|
|
108 -> {109};
|
|
109 -> {115};
|
|
110 -> {111};
|
|
111 -> {112};
|
|
112 -> {113};
|
|
113 -> {114};
|
|
114 -> {116};
|
|
115 -> {117};
|
|
115 -> {104} [color=green style=dashed];
|
|
116 -> {117};
|
|
116 -> {104} [color=green style=dashed];
|
|
117 -> {118};
|
|
118 -> {119};
|
|
|
|
subgraph cluster_35 {
|
|
color=red
|
|
120 [label="Enter function myDummyRun" style="filled" fillcolor=red];
|
|
subgraph cluster_36 {
|
|
color=blue
|
|
121 [label="Enter block"];
|
|
122 [label="Function call: R|<local>/block|.R|SubstitutionOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()" style="filled" fillcolor=yellow];
|
|
123 [label="Exit block"];
|
|
}
|
|
124 [label="Exit function myDummyRun" style="filled" fillcolor=red];
|
|
}
|
|
120 -> {121};
|
|
121 -> {122};
|
|
122 -> {123};
|
|
123 -> {124};
|
|
|
|
subgraph cluster_37 {
|
|
color=red
|
|
125 [label="Enter function test_8" style="filled" fillcolor=red];
|
|
subgraph cluster_38 {
|
|
color=blue
|
|
126 [label="Enter block"];
|
|
127 [label="Postponed enter to lambda"];
|
|
subgraph cluster_39 {
|
|
color=blue
|
|
128 [label="Enter function <anonymous>" style="filled" fillcolor=red];
|
|
subgraph cluster_40 {
|
|
color=blue
|
|
129 [label="Enter block"];
|
|
130 [label="Const: String(test_8)"];
|
|
131 [label="Exit block"];
|
|
}
|
|
132 [label="Exit function <anonymous>" style="filled" fillcolor=red];
|
|
}
|
|
133 [label="Postponed exit from lambda"];
|
|
134 [label="Function call: R|/myDummyRun|(...)" style="filled" fillcolor=yellow];
|
|
135 [label="Exit block"];
|
|
}
|
|
136 [label="Exit function test_8" style="filled" fillcolor=red];
|
|
}
|
|
125 -> {126};
|
|
126 -> {127};
|
|
127 -> {128 133 134};
|
|
127 -> {128} [style=dashed];
|
|
128 -> {129};
|
|
129 -> {130};
|
|
130 -> {131};
|
|
131 -> {132};
|
|
133 -> {134};
|
|
134 -> {135};
|
|
135 -> {136};
|
|
|
|
}
|