[FIR] Introduce new algorithm for building CFG for declarations
This commit is contained in:
Vendored
+86
-65
@@ -6,12 +6,17 @@ digraph smartcastAfterReassignment_kt {
|
||||
subgraph cluster_0 {
|
||||
color=red
|
||||
0 [label="Enter function test_1" style="filled" fillcolor=red];
|
||||
2 [label="Const: Int(1)"];
|
||||
3 [label="Variable declaration: lvar x: R|kotlin/Any|"];
|
||||
4 [label="Const: String()"];
|
||||
5 [label="Assignment: R|<local>/x|"];
|
||||
6 [label="Access variable R|<local>/x|"];
|
||||
7 [label="Access variable R|kotlin/String.length|"];
|
||||
subgraph cluster_1 {
|
||||
color=blue
|
||||
2 [label="Enter block"];
|
||||
3 [label="Const: Int(1)"];
|
||||
4 [label="Variable declaration: lvar x: R|kotlin/Any|"];
|
||||
5 [label="Const: String()"];
|
||||
6 [label="Assignment: R|<local>/x|"];
|
||||
7 [label="Access variable R|<local>/x|"];
|
||||
8 [label="Access variable R|kotlin/String.length|"];
|
||||
9 [label="Exit block"];
|
||||
}
|
||||
1 [label="Exit function test_1" style="filled" fillcolor=red];
|
||||
}
|
||||
0 -> {2};
|
||||
@@ -20,85 +25,101 @@ digraph smartcastAfterReassignment_kt {
|
||||
4 -> {5};
|
||||
5 -> {6};
|
||||
6 -> {7};
|
||||
7 -> {1};
|
||||
7 -> {8};
|
||||
8 -> {9};
|
||||
9 -> {1};
|
||||
|
||||
subgraph cluster_1 {
|
||||
subgraph cluster_2 {
|
||||
color=red
|
||||
8 [label="Enter function test_2" style="filled" fillcolor=red];
|
||||
10 [label="Const: Null(null)"];
|
||||
11 [label="Variable declaration: lvar x: R|kotlin/String?|"];
|
||||
subgraph cluster_2 {
|
||||
10 [label="Enter function test_2" style="filled" fillcolor=red];
|
||||
subgraph cluster_3 {
|
||||
color=blue
|
||||
12 [label="Enter when"];
|
||||
subgraph cluster_3 {
|
||||
color=blue
|
||||
14 [label="Enter when branch condition "];
|
||||
15 [label="Access variable R|<local>/x|"];
|
||||
16 [label="Const: Null(null)"];
|
||||
17 [label="Operator =="];
|
||||
18 [label="Exit when branch condition"];
|
||||
}
|
||||
25 [label="Synthetic else branch"];
|
||||
19 [label="Enter when branch result"];
|
||||
12 [label="Enter block"];
|
||||
13 [label="Const: Null(null)"];
|
||||
14 [label="Variable declaration: lvar x: R|kotlin/String?|"];
|
||||
subgraph cluster_4 {
|
||||
color=blue
|
||||
20 [label="Enter block"];
|
||||
21 [label="Const: String()"];
|
||||
22 [label="Assignment: R|<local>/x|"];
|
||||
23 [label="Exit block"];
|
||||
15 [label="Enter when"];
|
||||
subgraph cluster_5 {
|
||||
color=blue
|
||||
17 [label="Enter when branch condition "];
|
||||
18 [label="Access variable R|<local>/x|"];
|
||||
19 [label="Const: Null(null)"];
|
||||
20 [label="Operator =="];
|
||||
21 [label="Exit when branch condition"];
|
||||
}
|
||||
28 [label="Synthetic else branch"];
|
||||
22 [label="Enter when branch result"];
|
||||
subgraph cluster_6 {
|
||||
color=blue
|
||||
23 [label="Enter block"];
|
||||
24 [label="Const: String()"];
|
||||
25 [label="Assignment: R|<local>/x|"];
|
||||
26 [label="Exit block"];
|
||||
}
|
||||
27 [label="Exit when branch result"];
|
||||
16 [label="Exit when"];
|
||||
}
|
||||
24 [label="Exit when branch result"];
|
||||
13 [label="Exit when"];
|
||||
29 [label="Access variable R|<local>/x|"];
|
||||
30 [label="Access variable R|kotlin/String.length|"];
|
||||
31 [label="Exit block"];
|
||||
}
|
||||
26 [label="Access variable R|<local>/x|"];
|
||||
27 [label="Access variable R|kotlin/String.length|"];
|
||||
9 [label="Exit function test_2" style="filled" fillcolor=red];
|
||||
11 [label="Exit function test_2" style="filled" fillcolor=red];
|
||||
}
|
||||
8 -> {10};
|
||||
10 -> {11};
|
||||
11 -> {12};
|
||||
12 -> {14};
|
||||
13 -> {26};
|
||||
10 -> {12};
|
||||
12 -> {13};
|
||||
13 -> {14};
|
||||
14 -> {15};
|
||||
15 -> {16};
|
||||
16 -> {17};
|
||||
15 -> {17};
|
||||
16 -> {29};
|
||||
17 -> {18};
|
||||
18 -> {19 25};
|
||||
18 -> {19};
|
||||
19 -> {20};
|
||||
20 -> {21};
|
||||
21 -> {22};
|
||||
21 -> {22 28};
|
||||
22 -> {23};
|
||||
23 -> {24};
|
||||
24 -> {13};
|
||||
25 -> {13};
|
||||
24 -> {25};
|
||||
25 -> {26};
|
||||
26 -> {27};
|
||||
27 -> {9};
|
||||
|
||||
subgraph cluster_5 {
|
||||
color=red
|
||||
28 [label="Enter function test_3" style="filled" fillcolor=red];
|
||||
30 [label="Const: Null(null)"];
|
||||
31 [label="Variable declaration: lvar x: R|kotlin/String?|"];
|
||||
32 [label="Const: String()"];
|
||||
33 [label="Assignment: R|<local>/x|"];
|
||||
34 [label="Access variable R|<local>/x|"];
|
||||
35 [label="Access variable R|kotlin/String.length|"];
|
||||
36 [label="Const: Null(null)"];
|
||||
37 [label="Assignment: R|<local>/x|"];
|
||||
38 [label="Access variable R|<local>/x|"];
|
||||
39 [label="Access variable <Inapplicable(WRONG_RECEIVER): [kotlin/String.length]>#"];
|
||||
29 [label="Exit function test_3" style="filled" fillcolor=red];
|
||||
}
|
||||
28 -> {30};
|
||||
27 -> {16};
|
||||
28 -> {16};
|
||||
29 -> {30};
|
||||
30 -> {31};
|
||||
31 -> {32};
|
||||
32 -> {33};
|
||||
33 -> {34};
|
||||
31 -> {11};
|
||||
|
||||
subgraph cluster_7 {
|
||||
color=red
|
||||
32 [label="Enter function test_3" style="filled" fillcolor=red];
|
||||
subgraph cluster_8 {
|
||||
color=blue
|
||||
34 [label="Enter block"];
|
||||
35 [label="Const: Null(null)"];
|
||||
36 [label="Variable declaration: lvar x: R|kotlin/String?|"];
|
||||
37 [label="Const: String()"];
|
||||
38 [label="Assignment: R|<local>/x|"];
|
||||
39 [label="Access variable R|<local>/x|"];
|
||||
40 [label="Access variable R|kotlin/String.length|"];
|
||||
41 [label="Const: Null(null)"];
|
||||
42 [label="Assignment: R|<local>/x|"];
|
||||
43 [label="Access variable R|<local>/x|"];
|
||||
44 [label="Access variable <Inapplicable(WRONG_RECEIVER): [kotlin/String.length]>#"];
|
||||
45 [label="Exit block"];
|
||||
}
|
||||
33 [label="Exit function test_3" style="filled" fillcolor=red];
|
||||
}
|
||||
32 -> {34};
|
||||
34 -> {35};
|
||||
35 -> {36};
|
||||
36 -> {37};
|
||||
37 -> {38};
|
||||
38 -> {39};
|
||||
39 -> {29};
|
||||
39 -> {40};
|
||||
40 -> {41};
|
||||
41 -> {42};
|
||||
42 -> {43};
|
||||
43 -> {44};
|
||||
44 -> {45};
|
||||
45 -> {33};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user