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
246 lines
8.3 KiB
Plaintext
Vendored
246 lines
8.3 KiB
Plaintext
Vendored
digraph inPlaceLambdas_kt {
|
|
graph [nodesep=3]
|
|
node [shape=box penwidth=2]
|
|
edge [penwidth=2]
|
|
|
|
subgraph cluster_0 {
|
|
color=red
|
|
0 [label="Enter file inPlaceLambdas.kt" style="filled" fillcolor=red];
|
|
1 [label="Exit file inPlaceLambdas.kt" style="filled" fillcolor=red];
|
|
}
|
|
0 -> {1} [color=green];
|
|
|
|
subgraph cluster_1 {
|
|
color=red
|
|
2 [label="Enter class A" style="filled" fillcolor=red];
|
|
3 [label="Exit class A" style="filled" fillcolor=red];
|
|
}
|
|
2 -> {3} [color=green];
|
|
|
|
subgraph cluster_2 {
|
|
color=red
|
|
4 [label="Enter function foo" style="filled" fillcolor=red];
|
|
5 [label="Exit function foo" style="filled" fillcolor=red];
|
|
}
|
|
4 -> {5};
|
|
|
|
subgraph cluster_3 {
|
|
color=red
|
|
6 [label="Enter class B" style="filled" fillcolor=red];
|
|
7 [label="Exit class B" style="filled" fillcolor=red];
|
|
}
|
|
6 -> {7} [color=green];
|
|
|
|
subgraph cluster_4 {
|
|
color=red
|
|
8 [label="Enter function bar" style="filled" fillcolor=red];
|
|
9 [label="Exit function bar" style="filled" fillcolor=red];
|
|
}
|
|
8 -> {9};
|
|
|
|
subgraph cluster_5 {
|
|
color=red
|
|
10 [label="Enter function test_1" style="filled" fillcolor=red];
|
|
subgraph cluster_6 {
|
|
color=blue
|
|
11 [label="Enter block"];
|
|
subgraph cluster_7 {
|
|
color=blue
|
|
12 [label="Enter when"];
|
|
subgraph cluster_8 {
|
|
color=blue
|
|
13 [label="Enter when branch condition "];
|
|
14 [label="Access variable R|<local>/x|"];
|
|
15 [label="Type operator: (R|<local>/x| is R|A|)"];
|
|
16 [label="Exit when branch condition"];
|
|
}
|
|
17 [label="Synthetic else branch"];
|
|
18 [label="Enter when branch result"];
|
|
subgraph cluster_9 {
|
|
color=blue
|
|
19 [label="Enter block"];
|
|
20 [label="Postponed enter to lambda"];
|
|
subgraph cluster_10 {
|
|
color=blue
|
|
21 [label="Enter function <anonymous>" style="filled" fillcolor=red];
|
|
subgraph cluster_11 {
|
|
color=blue
|
|
22 [label="Enter block"];
|
|
23 [label="Access variable R|<local>/x|"];
|
|
24 [label="Smart cast: R|<local>/x|"];
|
|
25 [label="Function call: R|<local>/x|.R|/A.foo|()" style="filled" fillcolor=yellow];
|
|
26 [label="Exit block"];
|
|
}
|
|
27 [label="Exit function <anonymous>" style="filled" fillcolor=red];
|
|
}
|
|
28 [label="Postponed exit from lambda"];
|
|
29 [label="Function call: R|kotlin/run|<R|kotlin/Unit|>(...)" style="filled" fillcolor=yellow];
|
|
30 [label="Exit block"];
|
|
}
|
|
31 [label="Exit when branch result"];
|
|
32 [label="Exit when"];
|
|
}
|
|
33 [label="Exit block"];
|
|
}
|
|
34 [label="Exit function test_1" style="filled" fillcolor=red];
|
|
}
|
|
10 -> {11};
|
|
11 -> {12};
|
|
12 -> {13};
|
|
13 -> {14};
|
|
14 -> {15};
|
|
15 -> {16};
|
|
16 -> {17 18};
|
|
17 -> {32};
|
|
18 -> {19};
|
|
19 -> {20};
|
|
20 -> {21 29};
|
|
20 -> {28} [style=dotted];
|
|
20 -> {21} [style=dashed];
|
|
21 -> {22};
|
|
22 -> {23};
|
|
23 -> {24};
|
|
24 -> {25};
|
|
25 -> {26};
|
|
26 -> {27};
|
|
27 -> {28};
|
|
28 -> {29};
|
|
29 -> {30};
|
|
30 -> {31};
|
|
31 -> {32};
|
|
32 -> {33};
|
|
33 -> {34};
|
|
|
|
subgraph cluster_12 {
|
|
color=red
|
|
35 [label="Enter function test_2" style="filled" fillcolor=red];
|
|
subgraph cluster_13 {
|
|
color=blue
|
|
36 [label="Enter block"];
|
|
37 [label="Postponed enter to lambda"];
|
|
subgraph cluster_14 {
|
|
color=blue
|
|
38 [label="Enter function <anonymous>" style="filled" fillcolor=red];
|
|
subgraph cluster_15 {
|
|
color=blue
|
|
39 [label="Enter block"];
|
|
40 [label="Access variable R|<local>/x|"];
|
|
41 [label="Type operator: (R|<local>/x| as R|B|)"];
|
|
42 [label="Exit block"];
|
|
}
|
|
43 [label="Exit function <anonymous>" style="filled" fillcolor=red];
|
|
}
|
|
44 [label="Postponed exit from lambda"];
|
|
45 [label="Function call: R|kotlin/run|<R|B|>(...)" style="filled" fillcolor=yellow];
|
|
46 [label="Access variable R|<local>/x|"];
|
|
47 [label="Smart cast: R|<local>/x|"];
|
|
48 [label="Function call: R|<local>/x|.R|/B.bar|()" style="filled" fillcolor=yellow];
|
|
49 [label="Exit block"];
|
|
}
|
|
50 [label="Exit function test_2" style="filled" fillcolor=red];
|
|
}
|
|
35 -> {36};
|
|
36 -> {37};
|
|
37 -> {38 45};
|
|
37 -> {44} [style=dotted];
|
|
37 -> {38} [style=dashed];
|
|
38 -> {39};
|
|
39 -> {40};
|
|
40 -> {41};
|
|
41 -> {42};
|
|
42 -> {43};
|
|
43 -> {44};
|
|
44 -> {45};
|
|
45 -> {46};
|
|
46 -> {47};
|
|
47 -> {48};
|
|
48 -> {49};
|
|
49 -> {50};
|
|
|
|
subgraph cluster_16 {
|
|
color=red
|
|
51 [label="Enter function test_3" style="filled" fillcolor=red];
|
|
subgraph cluster_17 {
|
|
color=blue
|
|
52 [label="Enter block"];
|
|
subgraph cluster_18 {
|
|
color=blue
|
|
53 [label="Enter when"];
|
|
subgraph cluster_19 {
|
|
color=blue
|
|
54 [label="Enter when branch condition "];
|
|
55 [label="Access variable R|<local>/x|"];
|
|
56 [label="Type operator: (R|<local>/x| is R|A|)"];
|
|
57 [label="Exit when branch condition"];
|
|
}
|
|
58 [label="Synthetic else branch"];
|
|
59 [label="Enter when branch result"];
|
|
subgraph cluster_20 {
|
|
color=blue
|
|
60 [label="Enter block"];
|
|
61 [label="Postponed enter to lambda"];
|
|
subgraph cluster_21 {
|
|
color=blue
|
|
62 [label="Enter function <anonymous>" style="filled" fillcolor=red];
|
|
subgraph cluster_22 {
|
|
color=blue
|
|
63 [label="Enter block"];
|
|
64 [label="Access variable R|<local>/x|"];
|
|
65 [label="Smart cast: R|<local>/x|"];
|
|
66 [label="Function call: R|<local>/x|.R|/A.foo|()" style="filled" fillcolor=yellow];
|
|
67 [label="Access variable R|<local>/x|"];
|
|
68 [label="Smart cast: R|<local>/x|"];
|
|
69 [label="Type operator: (R|<local>/x| as R|B|)"];
|
|
70 [label="Exit block"];
|
|
}
|
|
71 [label="Exit function <anonymous>" style="filled" fillcolor=red];
|
|
}
|
|
72 [label="Postponed exit from lambda"];
|
|
73 [label="Function call: R|kotlin/run|<R|B|>(...)" style="filled" fillcolor=yellow];
|
|
74 [label="Access variable R|<local>/x|"];
|
|
75 [label="Smart cast: R|<local>/x|"];
|
|
76 [label="Function call: R|<local>/x|.R|/B.bar|()" style="filled" fillcolor=yellow];
|
|
77 [label="Exit block"];
|
|
}
|
|
78 [label="Exit when branch result"];
|
|
79 [label="Exit when"];
|
|
}
|
|
80 [label="Exit block"];
|
|
}
|
|
81 [label="Exit function test_3" style="filled" fillcolor=red];
|
|
}
|
|
51 -> {52};
|
|
52 -> {53};
|
|
53 -> {54};
|
|
54 -> {55};
|
|
55 -> {56};
|
|
56 -> {57};
|
|
57 -> {58 59};
|
|
58 -> {79};
|
|
59 -> {60};
|
|
60 -> {61};
|
|
61 -> {62 73};
|
|
61 -> {72} [style=dotted];
|
|
61 -> {62} [style=dashed];
|
|
62 -> {63};
|
|
63 -> {64};
|
|
64 -> {65};
|
|
65 -> {66};
|
|
66 -> {67};
|
|
67 -> {68};
|
|
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};
|
|
|
|
}
|