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
125 lines
4.0 KiB
Plaintext
Vendored
125 lines
4.0 KiB
Plaintext
Vendored
digraph delayedAssignment_kt {
|
|
graph [nodesep=3]
|
|
node [shape=box penwidth=2]
|
|
edge [penwidth=2]
|
|
|
|
subgraph cluster_0 {
|
|
color=red
|
|
0 [label="Enter file delayedAssignment.kt" style="filled" fillcolor=red];
|
|
1 [label="Exit file delayedAssignment.kt" style="filled" fillcolor=red];
|
|
}
|
|
0 -> {1} [color=green];
|
|
|
|
subgraph cluster_1 {
|
|
color=red
|
|
2 [label="Enter class A" style="filled" fillcolor=red];
|
|
subgraph cluster_2 {
|
|
color=blue
|
|
3 [label="Enter function <init>" style="filled" fillcolor=red];
|
|
4 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
|
|
5 [label="Exit function <init>" style="filled" fillcolor=red];
|
|
}
|
|
6 [label="Exit class A" style="filled" fillcolor=red];
|
|
}
|
|
2 -> {3} [color=green];
|
|
2 -> {6} [style=dotted];
|
|
2 -> {3} [style=dashed];
|
|
3 -> {4};
|
|
4 -> {5};
|
|
5 -> {6} [color=green];
|
|
|
|
subgraph cluster_3 {
|
|
color=red
|
|
7 [label="Enter function foo" style="filled" fillcolor=red];
|
|
subgraph cluster_4 {
|
|
color=blue
|
|
8 [label="Enter block"];
|
|
9 [label="Exit block"];
|
|
}
|
|
10 [label="Exit function foo" style="filled" fillcolor=red];
|
|
}
|
|
7 -> {8};
|
|
8 -> {9};
|
|
9 -> {10};
|
|
|
|
subgraph cluster_5 {
|
|
color=red
|
|
11 [label="Enter function test" style="filled" fillcolor=red];
|
|
subgraph cluster_6 {
|
|
color=blue
|
|
12 [label="Enter block"];
|
|
13 [label="Variable declaration: lval a: R|A?|"];
|
|
subgraph cluster_7 {
|
|
color=blue
|
|
14 [label="Enter when"];
|
|
subgraph cluster_8 {
|
|
color=blue
|
|
15 [label="Enter when branch condition "];
|
|
16 [label="Access variable R|<local>/b|"];
|
|
17 [label="Exit when branch condition"];
|
|
}
|
|
subgraph cluster_9 {
|
|
color=blue
|
|
18 [label="Enter when branch condition else"];
|
|
19 [label="Exit when branch condition"];
|
|
}
|
|
20 [label="Enter when branch result"];
|
|
subgraph cluster_10 {
|
|
color=blue
|
|
21 [label="Enter block"];
|
|
22 [label="Const: Null(null)"];
|
|
23 [label="Assignment: R|<local>/a|"];
|
|
24 [label="Exit block"];
|
|
}
|
|
25 [label="Exit when branch result"];
|
|
26 [label="Enter when branch result"];
|
|
subgraph cluster_11 {
|
|
color=blue
|
|
27 [label="Enter block"];
|
|
28 [label="Function call: R|/A.A|()" style="filled" fillcolor=yellow];
|
|
29 [label="Assignment: R|<local>/a|"];
|
|
30 [label="Access variable R|<local>/a|"];
|
|
31 [label="Smart cast: R|<local>/a|"];
|
|
32 [label="Function call: R|<local>/a|.R|/A.foo|()" style="filled" fillcolor=yellow];
|
|
33 [label="Exit block"];
|
|
}
|
|
34 [label="Exit when branch result"];
|
|
35 [label="Exit when"];
|
|
}
|
|
36 [label="Access variable R|<local>/a|"];
|
|
37 [label="Function call: R|<local>/a|.R|/A.foo<Inapplicable(UNSAFE_CALL): /A.foo>#|()" style="filled" fillcolor=yellow];
|
|
38 [label="Exit block"];
|
|
}
|
|
39 [label="Exit function test" style="filled" fillcolor=red];
|
|
}
|
|
11 -> {12};
|
|
12 -> {13};
|
|
13 -> {14};
|
|
14 -> {15};
|
|
15 -> {16};
|
|
16 -> {17};
|
|
17 -> {18 26};
|
|
18 -> {19};
|
|
19 -> {20};
|
|
20 -> {21};
|
|
21 -> {22};
|
|
22 -> {23};
|
|
23 -> {24};
|
|
24 -> {25};
|
|
25 -> {35};
|
|
26 -> {27};
|
|
27 -> {28};
|
|
28 -> {29};
|
|
29 -> {30};
|
|
30 -> {31};
|
|
31 -> {32};
|
|
32 -> {33};
|
|
33 -> {34};
|
|
34 -> {35};
|
|
35 -> {36};
|
|
36 -> {37};
|
|
37 -> {38};
|
|
38 -> {39};
|
|
|
|
}
|