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
141 lines
4.3 KiB
Plaintext
Vendored
141 lines
4.3 KiB
Plaintext
Vendored
digraph smartcastAfterReassignment_kt {
|
|
graph [nodesep=3]
|
|
node [shape=box penwidth=2]
|
|
edge [penwidth=2]
|
|
|
|
subgraph cluster_0 {
|
|
color=red
|
|
0 [label="Enter file smartcastAfterReassignment.kt" style="filled" fillcolor=red];
|
|
1 [label="Exit file smartcastAfterReassignment.kt" style="filled" fillcolor=red];
|
|
}
|
|
0 -> {1} [color=green];
|
|
|
|
subgraph cluster_1 {
|
|
color=red
|
|
2 [label="Enter function test_1" style="filled" fillcolor=red];
|
|
subgraph cluster_2 {
|
|
color=blue
|
|
3 [label="Enter block"];
|
|
4 [label="Const: Int(1)"];
|
|
5 [label="Variable declaration: lvar x: R|kotlin/Any|"];
|
|
6 [label="Const: String()"];
|
|
7 [label="Assignment: R|<local>/x|"];
|
|
8 [label="Access variable R|<local>/x|"];
|
|
9 [label="Smart cast: R|<local>/x|"];
|
|
10 [label="Access variable R|kotlin/String.length|"];
|
|
11 [label="Exit block"];
|
|
}
|
|
12 [label="Exit function test_1" style="filled" fillcolor=red];
|
|
}
|
|
2 -> {3};
|
|
3 -> {4};
|
|
4 -> {5};
|
|
5 -> {6};
|
|
6 -> {7};
|
|
7 -> {8};
|
|
8 -> {9};
|
|
9 -> {10};
|
|
10 -> {11};
|
|
11 -> {12};
|
|
|
|
subgraph cluster_3 {
|
|
color=red
|
|
13 [label="Enter function test_2" style="filled" fillcolor=red];
|
|
subgraph cluster_4 {
|
|
color=blue
|
|
14 [label="Enter block"];
|
|
15 [label="Const: Null(null)"];
|
|
16 [label="Variable declaration: lvar x: R|kotlin/String?|"];
|
|
subgraph cluster_5 {
|
|
color=blue
|
|
17 [label="Enter when"];
|
|
subgraph cluster_6 {
|
|
color=blue
|
|
18 [label="Enter when branch condition "];
|
|
19 [label="Access variable R|<local>/x|"];
|
|
20 [label="Const: Null(null)"];
|
|
21 [label="Equality operator =="];
|
|
22 [label="Exit when branch condition"];
|
|
}
|
|
23 [label="Synthetic else branch"];
|
|
24 [label="Enter when branch result"];
|
|
subgraph cluster_7 {
|
|
color=blue
|
|
25 [label="Enter block"];
|
|
26 [label="Const: String()"];
|
|
27 [label="Assignment: R|<local>/x|"];
|
|
28 [label="Exit block"];
|
|
}
|
|
29 [label="Exit when branch result"];
|
|
30 [label="Exit when"];
|
|
}
|
|
31 [label="Access variable R|<local>/x|"];
|
|
32 [label="Smart cast: R|<local>/x|"];
|
|
33 [label="Access variable R|kotlin/String.length|"];
|
|
34 [label="Exit block"];
|
|
}
|
|
35 [label="Exit function test_2" style="filled" fillcolor=red];
|
|
}
|
|
13 -> {14};
|
|
14 -> {15};
|
|
15 -> {16};
|
|
16 -> {17};
|
|
17 -> {18};
|
|
18 -> {19};
|
|
19 -> {20};
|
|
20 -> {21};
|
|
21 -> {22};
|
|
22 -> {23 24};
|
|
23 -> {30};
|
|
24 -> {25};
|
|
25 -> {26};
|
|
26 -> {27};
|
|
27 -> {28};
|
|
28 -> {29};
|
|
29 -> {30};
|
|
30 -> {31};
|
|
31 -> {32};
|
|
32 -> {33};
|
|
33 -> {34};
|
|
34 -> {35};
|
|
|
|
subgraph cluster_8 {
|
|
color=red
|
|
36 [label="Enter function test_3" style="filled" fillcolor=red];
|
|
subgraph cluster_9 {
|
|
color=blue
|
|
37 [label="Enter block"];
|
|
38 [label="Const: Null(null)"];
|
|
39 [label="Variable declaration: lvar x: R|kotlin/String?|"];
|
|
40 [label="Const: String()"];
|
|
41 [label="Assignment: R|<local>/x|"];
|
|
42 [label="Access variable R|<local>/x|"];
|
|
43 [label="Smart cast: R|<local>/x|"];
|
|
44 [label="Access variable R|kotlin/String.length|"];
|
|
45 [label="Const: Null(null)"];
|
|
46 [label="Assignment: R|<local>/x|"];
|
|
47 [label="Access variable R|<local>/x|"];
|
|
48 [label="Smart cast: R|<local>/x|"];
|
|
49 [label="Access variable R|kotlin/String.length<Inapplicable(UNSAFE_CALL): kotlin/String.length>#|"];
|
|
50 [label="Exit block"];
|
|
}
|
|
51 [label="Exit function test_3" 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 -> {48};
|
|
48 -> {49};
|
|
49 -> {50};
|
|
50 -> {51};
|
|
|
|
}
|