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
210 lines
6.8 KiB
Plaintext
Vendored
210 lines
6.8 KiB
Plaintext
Vendored
digraph whenSubjectExpression_kt {
|
|
graph [nodesep=3]
|
|
node [shape=box penwidth=2]
|
|
edge [penwidth=2]
|
|
|
|
subgraph cluster_0 {
|
|
color=red
|
|
0 [label="Enter file whenSubjectExpression.kt" style="filled" fillcolor=red];
|
|
1 [label="Exit file whenSubjectExpression.kt" style="filled" fillcolor=red];
|
|
}
|
|
0 -> {1} [color=green];
|
|
|
|
subgraph cluster_1 {
|
|
color=red
|
|
2 [label="Enter function whenWithSubjectExpression" style="filled" fillcolor=red];
|
|
subgraph cluster_2 {
|
|
color=blue
|
|
3 [label="Enter block"];
|
|
subgraph cluster_3 {
|
|
color=blue
|
|
4 [label="Enter when"];
|
|
5 [label="Access variable R|<local>/x|"];
|
|
subgraph cluster_4 {
|
|
color=blue
|
|
6 [label="Enter when branch condition "];
|
|
7 [label="Exit $subj"];
|
|
8 [label="Type operator: ($subj$ !is R|kotlin/Double|)"];
|
|
9 [label="Exit when branch condition"];
|
|
}
|
|
subgraph cluster_5 {
|
|
color=blue
|
|
10 [label="Enter when branch condition "];
|
|
11 [label="Exit $subj"];
|
|
12 [label="Const: Double(0.0)"];
|
|
13 [label="Equality operator =="];
|
|
14 [label="Exit when branch condition"];
|
|
}
|
|
subgraph cluster_6 {
|
|
color=blue
|
|
15 [label="Enter when branch condition else"];
|
|
16 [label="Exit when branch condition"];
|
|
}
|
|
17 [label="Enter when branch result"];
|
|
subgraph cluster_7 {
|
|
color=blue
|
|
18 [label="Enter block"];
|
|
19 [label="Access variable R|<local>/x|"];
|
|
20 [label="Smart cast: R|<local>/x|"];
|
|
21 [label="Function call: R|<local>/x|.R|kotlin/Double.toInt|()" style="filled" fillcolor=yellow];
|
|
22 [label="Exit block"];
|
|
}
|
|
23 [label="Exit when branch result"];
|
|
24 [label="Enter when branch result"];
|
|
subgraph cluster_8 {
|
|
color=blue
|
|
25 [label="Enter block"];
|
|
26 [label="Const: Int(0)"];
|
|
27 [label="Exit block"];
|
|
}
|
|
28 [label="Exit when branch result"];
|
|
29 [label="Enter when branch result"];
|
|
subgraph cluster_9 {
|
|
color=blue
|
|
30 [label="Enter block"];
|
|
31 [label="Const: Int(-1)"];
|
|
32 [label="Exit block"];
|
|
}
|
|
33 [label="Exit when branch result"];
|
|
34 [label="Exit when"];
|
|
}
|
|
35 [label="Exit block"];
|
|
}
|
|
36 [label="Exit function whenWithSubjectExpression" style="filled" fillcolor=red];
|
|
}
|
|
2 -> {3};
|
|
3 -> {4};
|
|
4 -> {5};
|
|
5 -> {6};
|
|
6 -> {7};
|
|
7 -> {8};
|
|
8 -> {9};
|
|
9 -> {10 29};
|
|
10 -> {11};
|
|
11 -> {12};
|
|
12 -> {13};
|
|
13 -> {14};
|
|
14 -> {15 24};
|
|
15 -> {16};
|
|
16 -> {17};
|
|
17 -> {18};
|
|
18 -> {19};
|
|
19 -> {20};
|
|
20 -> {21};
|
|
21 -> {22};
|
|
22 -> {23};
|
|
23 -> {34};
|
|
24 -> {25};
|
|
25 -> {26};
|
|
26 -> {27};
|
|
27 -> {28};
|
|
28 -> {34};
|
|
29 -> {30};
|
|
30 -> {31};
|
|
31 -> {32};
|
|
32 -> {33};
|
|
33 -> {34};
|
|
34 -> {35};
|
|
35 -> {36};
|
|
|
|
subgraph cluster_10 {
|
|
color=red
|
|
37 [label="Enter function whenWithSubjectVariable" style="filled" fillcolor=red];
|
|
subgraph cluster_11 {
|
|
color=blue
|
|
38 [label="Enter block"];
|
|
subgraph cluster_12 {
|
|
color=blue
|
|
39 [label="Enter when"];
|
|
40 [label="Access variable R|<local>/x|"];
|
|
41 [label="Variable declaration: lval y: R|kotlin/Any|"];
|
|
subgraph cluster_13 {
|
|
color=blue
|
|
42 [label="Enter when branch condition "];
|
|
43 [label="Exit $subj"];
|
|
44 [label="Type operator: ($subj$ !is R|kotlin/Double|)"];
|
|
45 [label="Exit when branch condition"];
|
|
}
|
|
subgraph cluster_14 {
|
|
color=blue
|
|
46 [label="Enter when branch condition "];
|
|
47 [label="Exit $subj"];
|
|
48 [label="Const: Double(0.0)"];
|
|
49 [label="Equality operator =="];
|
|
50 [label="Exit when branch condition"];
|
|
}
|
|
subgraph cluster_15 {
|
|
color=blue
|
|
51 [label="Enter when branch condition else"];
|
|
52 [label="Exit when branch condition"];
|
|
}
|
|
53 [label="Enter when branch result"];
|
|
subgraph cluster_16 {
|
|
color=blue
|
|
54 [label="Enter block"];
|
|
55 [label="Access variable R|<local>/y|"];
|
|
56 [label="Smart cast: R|<local>/y|"];
|
|
57 [label="Function call: R|<local>/y|.R|kotlin/Double.toInt|()" style="filled" fillcolor=yellow];
|
|
58 [label="Exit block"];
|
|
}
|
|
59 [label="Exit when branch result"];
|
|
60 [label="Enter when branch result"];
|
|
subgraph cluster_17 {
|
|
color=blue
|
|
61 [label="Enter block"];
|
|
62 [label="Const: Int(0)"];
|
|
63 [label="Exit block"];
|
|
}
|
|
64 [label="Exit when branch result"];
|
|
65 [label="Enter when branch result"];
|
|
subgraph cluster_18 {
|
|
color=blue
|
|
66 [label="Enter block"];
|
|
67 [label="Const: Int(-1)"];
|
|
68 [label="Exit block"];
|
|
}
|
|
69 [label="Exit when branch result"];
|
|
70 [label="Exit when"];
|
|
}
|
|
71 [label="Exit block"];
|
|
}
|
|
72 [label="Exit function whenWithSubjectVariable" style="filled" fillcolor=red];
|
|
}
|
|
37 -> {38};
|
|
38 -> {39};
|
|
39 -> {40};
|
|
40 -> {41};
|
|
41 -> {42};
|
|
42 -> {43};
|
|
43 -> {44};
|
|
44 -> {45};
|
|
45 -> {46 65};
|
|
46 -> {47};
|
|
47 -> {48};
|
|
48 -> {49};
|
|
49 -> {50};
|
|
50 -> {51 60};
|
|
51 -> {52};
|
|
52 -> {53};
|
|
53 -> {54};
|
|
54 -> {55};
|
|
55 -> {56};
|
|
56 -> {57};
|
|
57 -> {58};
|
|
58 -> {59};
|
|
59 -> {70};
|
|
60 -> {61};
|
|
61 -> {62};
|
|
62 -> {63};
|
|
63 -> {64};
|
|
64 -> {70};
|
|
65 -> {66};
|
|
66 -> {67};
|
|
67 -> {68};
|
|
68 -> {69};
|
|
69 -> {70};
|
|
70 -> {71};
|
|
71 -> {72};
|
|
|
|
}
|