[FIR] Introduce new algorithm for building CFG for declarations

This commit is contained in:
Dmitriy Novozhilov
2020-06-05 15:47:57 +03:00
parent 950bbfe3a5
commit 87859b0faa
95 changed files with 16070 additions and 13199 deletions
@@ -14,25 +14,26 @@ digraph overridenOpenVal_kt {
subgraph cluster_1 {
color=red
8 [label="Enter class A" style="filled" fillcolor=red];
subgraph cluster_2 {
color=blue
3 [label="Enter function getter" style="filled" fillcolor=red];
4 [label="Exit function getter" style="filled" fillcolor=red];
}
3 [label="Enter function getter" style="filled" fillcolor=red];
4 [label="Exit function getter" style="filled" fillcolor=red];
}
3 -> {4};
subgraph cluster_2 {
color=red
9 [label="Enter class A" style="filled" fillcolor=red];
subgraph cluster_3 {
color=blue
5 [label="Enter property" style="filled" fillcolor=red];
7 [label="Access variable R|<local>/x|"];
6 [label="Exit property" style="filled" fillcolor=red];
}
9 [label="Exit class A" style="filled" fillcolor=red];
8 [label="Exit class A" style="filled" fillcolor=red];
}
8 -> {5} [color=green];
9 -> {5} [color=green];
5 -> {7};
6 -> {9} [color=green];
6 -> {8} [color=green];
7 -> {6};
3 -> {4};
subgraph cluster_4 {
color=red
@@ -50,94 +51,108 @@ digraph overridenOpenVal_kt {
14 [label="Enter function test_1" style="filled" fillcolor=red];
subgraph cluster_6 {
color=blue
16 [label="Enter when"];
16 [label="Enter block"];
subgraph cluster_7 {
color=blue
18 [label="Enter when branch condition "];
19 [label="Access variable R|/A.x|"];
20 [label="Type operator: (this@R|/B|.R|/A.x| is R|kotlin/String|)"];
21 [label="Exit when branch condition"];
17 [label="Enter when"];
subgraph cluster_8 {
color=blue
19 [label="Enter when branch condition "];
20 [label="Access variable R|/A.x|"];
21 [label="Type operator: (this@R|/B|.R|/A.x| is R|kotlin/String|)"];
22 [label="Exit when branch condition"];
}
29 [label="Synthetic else branch"];
23 [label="Enter when branch result"];
subgraph cluster_9 {
color=blue
24 [label="Enter block"];
25 [label="Access variable R|/A.x|"];
26 [label="Access variable R|kotlin/String.length|"];
27 [label="Exit block"];
}
28 [label="Exit when branch result"];
18 [label="Exit when"];
}
28 [label="Synthetic else branch"];
22 [label="Enter when branch result"];
subgraph cluster_8 {
color=blue
23 [label="Enter block"];
24 [label="Access variable R|/A.x|"];
25 [label="Access variable R|kotlin/String.length|"];
26 [label="Exit block"];
}
27 [label="Exit when branch result"];
17 [label="Exit when"];
30 [label="Exit block"];
}
15 [label="Exit function test_1" style="filled" fillcolor=red];
}
14 -> {16};
16 -> {18};
17 -> {15};
18 -> {19};
16 -> {17};
17 -> {19};
18 -> {30};
19 -> {20};
20 -> {21};
21 -> {22 28};
22 -> {23};
21 -> {22};
22 -> {23 29};
23 -> {24};
24 -> {25};
25 -> {26};
26 -> {27};
27 -> {17};
28 -> {17};
subgraph cluster_9 {
color=red
29 [label="Enter class B" style="filled" fillcolor=red];
30 [label="Exit class B" style="filled" fillcolor=red];
}
29 -> {30} [color=green];
27 -> {28};
28 -> {18};
29 -> {18};
30 -> {15};
subgraph cluster_10 {
color=red
31 [label="Enter function test_2" style="filled" fillcolor=red];
subgraph cluster_11 {
32 [label="Enter class B" style="filled" fillcolor=red];
31 [label="Exit class B" style="filled" fillcolor=red];
}
32 -> {31} [color=green];
subgraph cluster_11 {
color=red
33 [label="Enter function test_2" style="filled" fillcolor=red];
subgraph cluster_12 {
color=blue
33 [label="Enter when"];
subgraph cluster_12 {
color=blue
35 [label="Enter when branch condition "];
36 [label="Access variable R|<local>/b|"];
37 [label="Access variable R|/A.x|"];
38 [label="Type operator: (R|<local>/b|.R|/A.x| is R|kotlin/String|)"];
39 [label="Exit when branch condition"];
}
47 [label="Synthetic else branch"];
40 [label="Enter when branch result"];
35 [label="Enter block"];
subgraph cluster_13 {
color=blue
41 [label="Enter block"];
42 [label="Access variable R|<local>/b|"];
43 [label="Access variable R|/A.x|"];
44 [label="Access variable R|kotlin/String.length|"];
45 [label="Exit block"];
36 [label="Enter when"];
subgraph cluster_14 {
color=blue
38 [label="Enter when branch condition "];
39 [label="Access variable R|<local>/b|"];
40 [label="Access variable R|/A.x|"];
41 [label="Type operator: (R|<local>/b|.R|/A.x| is R|kotlin/String|)"];
42 [label="Exit when branch condition"];
}
50 [label="Synthetic else branch"];
43 [label="Enter when branch result"];
subgraph cluster_15 {
color=blue
44 [label="Enter block"];
45 [label="Access variable R|<local>/b|"];
46 [label="Access variable R|/A.x|"];
47 [label="Access variable R|kotlin/String.length|"];
48 [label="Exit block"];
}
49 [label="Exit when branch result"];
37 [label="Exit when"];
}
46 [label="Exit when branch result"];
34 [label="Exit when"];
51 [label="Exit block"];
}
32 [label="Exit function test_2" style="filled" fillcolor=red];
34 [label="Exit function test_2" style="filled" fillcolor=red];
}
31 -> {33};
33 -> {35};
34 -> {32};
35 -> {36};
36 -> {37};
37 -> {38};
36 -> {38};
37 -> {51};
38 -> {39};
39 -> {40 47};
39 -> {40};
40 -> {41};
41 -> {42};
42 -> {43};
42 -> {43 50};
43 -> {44};
44 -> {45};
45 -> {46};
46 -> {34};
47 -> {34};
46 -> {47};
47 -> {48};
48 -> {49};
49 -> {37};
50 -> {37};
51 -> {34};
}