[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
@@ -15,85 +15,99 @@ digraph delayedAssignment_kt {
subgraph cluster_1 {
color=red
3 [label="Enter function foo" style="filled" fillcolor=red];
subgraph cluster_2 {
color=blue
5 [label="Enter block"];
6 [label="Exit block"];
}
4 [label="Exit function foo" style="filled" fillcolor=red];
}
3 -> {4};
subgraph cluster_2 {
color=red
5 [label="Enter class A" style="filled" fillcolor=red];
6 [label="Exit class A" style="filled" fillcolor=red];
}
5 -> {6} [color=green];
3 -> {5};
5 -> {6};
6 -> {4};
subgraph cluster_3 {
color=red
7 [label="Enter function test" style="filled" fillcolor=red];
9 [label="Variable declaration: lval a: R|A?|"];
subgraph cluster_4 {
8 [label="Enter class A" style="filled" fillcolor=red];
7 [label="Exit class A" style="filled" fillcolor=red];
}
8 -> {7} [color=green];
subgraph cluster_4 {
color=red
9 [label="Enter function test" style="filled" fillcolor=red];
subgraph cluster_5 {
color=blue
10 [label="Enter when"];
subgraph cluster_5 {
color=blue
12 [label="Enter when branch condition "];
13 [label="Access variable R|<local>/b|"];
14 [label="Exit when branch condition"];
}
11 [label="Enter block"];
12 [label="Variable declaration: lval a: R|A?|"];
subgraph cluster_6 {
color=blue
23 [label="Enter when branch condition else"];
24 [label="Exit when branch condition"];
13 [label="Enter when"];
subgraph cluster_7 {
color=blue
15 [label="Enter when branch condition "];
16 [label="Access variable R|<local>/b|"];
17 [label="Exit when branch condition"];
}
subgraph cluster_8 {
color=blue
26 [label="Enter when branch condition else"];
27 [label="Exit when branch condition"];
}
28 [label="Enter when branch result"];
subgraph cluster_9 {
color=blue
29 [label="Enter block"];
30 [label="Const: Null(null)"];
31 [label="Assignment: R|<local>/a|"];
32 [label="Exit block"];
}
33 [label="Exit when branch result"];
18 [label="Enter when branch result"];
subgraph cluster_10 {
color=blue
19 [label="Enter block"];
20 [label="Function call: R|/A.A|()"];
21 [label="Assignment: R|<local>/a|"];
22 [label="Access variable R|<local>/a|"];
23 [label="Function call: R|<local>/a|.R|/A.foo|()"];
24 [label="Exit block"];
}
25 [label="Exit when branch result"];
14 [label="Exit when"];
}
25 [label="Enter when branch result"];
subgraph cluster_7 {
color=blue
26 [label="Enter block"];
27 [label="Const: Null(null)"];
28 [label="Assignment: R|<local>/a|"];
29 [label="Exit block"];
}
30 [label="Exit when branch result"];
15 [label="Enter when branch result"];
subgraph cluster_8 {
color=blue
16 [label="Enter block"];
17 [label="Function call: R|/A.A|()"];
18 [label="Assignment: R|<local>/a|"];
19 [label="Access variable R|<local>/a|"];
20 [label="Function call: R|<local>/a|.R|/A.foo|()"];
21 [label="Exit block"];
}
22 [label="Exit when branch result"];
11 [label="Exit when"];
34 [label="Access variable R|<local>/a|"];
35 [label="Function call: R|<local>/a|.<Inapplicable(WRONG_RECEIVER): [/A.foo]>#()"];
36 [label="Exit block"];
}
31 [label="Access variable R|<local>/a|"];
32 [label="Function call: R|<local>/a|.<Inapplicable(WRONG_RECEIVER): [/A.foo]>#()"];
8 [label="Exit function test" style="filled" fillcolor=red];
10 [label="Exit function test" style="filled" fillcolor=red];
}
7 -> {9};
9 -> {10};
10 -> {12};
11 -> {31};
9 -> {11};
11 -> {12};
12 -> {13};
13 -> {14};
14 -> {15 23};
13 -> {15};
14 -> {34};
15 -> {16};
16 -> {17};
17 -> {18};
17 -> {18 26};
18 -> {19};
19 -> {20};
20 -> {21};
21 -> {22};
22 -> {11};
22 -> {23};
23 -> {24};
24 -> {25};
25 -> {26};
25 -> {14};
26 -> {27};
27 -> {28};
28 -> {29};
29 -> {30};
30 -> {11};
30 -> {31};
31 -> {32};
32 -> {8};
32 -> {33};
33 -> {14};
34 -> {35};
35 -> {36};
36 -> {10};
}