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
115 lines
3.6 KiB
Plaintext
Vendored
115 lines
3.6 KiB
Plaintext
Vendored
digraph smartcastFromArgument_kt {
|
|
graph [nodesep=3]
|
|
node [shape=box penwidth=2]
|
|
edge [penwidth=2]
|
|
|
|
subgraph cluster_0 {
|
|
color=red
|
|
0 [label="Enter file smartcastFromArgument.kt" style="filled" fillcolor=red];
|
|
1 [label="Exit file smartcastFromArgument.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 function takeA" style="filled" fillcolor=red];
|
|
subgraph cluster_4 {
|
|
color=blue
|
|
7 [label="Enter block"];
|
|
8 [label="Const: Boolean(true)"];
|
|
9 [label="Jump: ^takeA Boolean(true)"];
|
|
10 [label="Stub" style="filled" fillcolor=gray];
|
|
11 [label="Exit block" style="filled" fillcolor=gray];
|
|
}
|
|
12 [label="Exit function takeA" style="filled" fillcolor=red];
|
|
}
|
|
6 -> {7};
|
|
7 -> {8};
|
|
8 -> {9};
|
|
9 -> {12};
|
|
9 -> {10} [style=dotted];
|
|
10 -> {11} [style=dotted];
|
|
11 -> {12} [style=dotted];
|
|
|
|
subgraph cluster_5 {
|
|
color=red
|
|
13 [label="Enter function test" style="filled" fillcolor=red];
|
|
subgraph cluster_6 {
|
|
color=blue
|
|
14 [label="Enter block"];
|
|
subgraph cluster_7 {
|
|
color=blue
|
|
15 [label="Enter when"];
|
|
subgraph cluster_8 {
|
|
color=blue
|
|
16 [label="Enter when branch condition "];
|
|
17 [label="Access variable R|<local>/a|"];
|
|
18 [label="Type operator: (R|<local>/a| as? R|A|)"];
|
|
19 [label="Exit lhs of ?:"];
|
|
20 [label="Enter rhs of ?:"];
|
|
21 [label="Jump: ^test Unit"];
|
|
22 [label="Stub" style="filled" fillcolor=gray];
|
|
23 [label="Lhs of ?: is not null"];
|
|
24 [label="Exit ?:"];
|
|
25 [label="Function call: R|/takeA|(...)" style="filled" fillcolor=yellow];
|
|
26 [label="Exit when branch condition"];
|
|
}
|
|
27 [label="Synthetic else branch"];
|
|
28 [label="Enter when branch result"];
|
|
subgraph cluster_9 {
|
|
color=blue
|
|
29 [label="Enter block"];
|
|
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="Exit block"];
|
|
}
|
|
37 [label="Exit function test" style="filled" fillcolor=red];
|
|
}
|
|
13 -> {14};
|
|
14 -> {15};
|
|
15 -> {16};
|
|
16 -> {17};
|
|
17 -> {18};
|
|
18 -> {19};
|
|
19 -> {20 23};
|
|
20 -> {21};
|
|
21 -> {37};
|
|
21 -> {22} [style=dotted];
|
|
22 -> {24} [style=dotted];
|
|
23 -> {24};
|
|
24 -> {25};
|
|
25 -> {26};
|
|
26 -> {27 28};
|
|
27 -> {35};
|
|
28 -> {29};
|
|
29 -> {30};
|
|
30 -> {31};
|
|
31 -> {32};
|
|
32 -> {33};
|
|
33 -> {34};
|
|
34 -> {35};
|
|
35 -> {36};
|
|
36 -> {37};
|
|
|
|
}
|