FIR CFA: attach method graphs to class exit node

Even for non-local classes. This ensures that the CFG edges in this case
will only go to a subgraph, not to an unrelated graph.
This commit is contained in:
pyos
2022-12-09 13:22:17 +01:00
committed by Dmitriy Novozhilov
parent aadea0e26f
commit 74758278d7
47 changed files with 1245 additions and 1181 deletions
@@ -4,19 +4,10 @@ digraph overridenOpenVal_kt {
edge [penwidth=2]
subgraph cluster_0 {
color=red
0 [label="Enter function <init>" style="filled" fillcolor=red];
1 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
2 [label="Exit function <init>" style="filled" fillcolor=red];
}
0 -> {1};
1 -> {2};
subgraph cluster_1 {
color=red
6 [label="Enter class A" style="filled" fillcolor=red];
7 [label="Part of class initialization"];
subgraph cluster_2 {
subgraph cluster_1 {
color=blue
3 [label="Enter property" style="filled" fillcolor=red];
4 [label="Access variable R|<local>/x|"];
@@ -24,27 +15,31 @@ digraph overridenOpenVal_kt {
}
8 [label="Exit class A" style="filled" fillcolor=red];
}
subgraph cluster_2 {
color=blue
0 [label="Enter function <init>" style="filled" fillcolor=red];
1 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
2 [label="Exit function <init>" style="filled" fillcolor=red];
}
6 -> {7} [color=green];
7 -> {3} [color=green];
7 -> {8} [style=dotted];
7 -> {3} [style=dashed];
8 -> {0} [color=green];
8 -> {0} [style=dashed];
3 -> {4};
4 -> {5};
5 -> {8} [color=green];
0 -> {1};
1 -> {2};
subgraph cluster_3 {
color=red
9 [label="Enter function <init>" style="filled" fillcolor=red];
10 [label="Access variable R|<local>/x|"];
11 [label="Delegated constructor call: super<R|A|>(...)" style="filled" fillcolor=yellow];
12 [label="Exit function <init>" style="filled" fillcolor=red];
31 [label="Enter class B" style="filled" fillcolor=red];
32 [label="Exit class B" style="filled" fillcolor=red];
}
9 -> {10};
10 -> {11};
11 -> {12};
subgraph cluster_4 {
color=red
color=blue
13 [label="Enter function test_1" style="filled" fillcolor=red];
subgraph cluster_5 {
color=blue
@@ -76,6 +71,19 @@ digraph overridenOpenVal_kt {
}
30 [label="Exit function test_1" style="filled" fillcolor=red];
}
subgraph cluster_9 {
color=blue
9 [label="Enter function <init>" style="filled" fillcolor=red];
10 [label="Access variable R|<local>/x|"];
11 [label="Delegated constructor call: super<R|A|>(...)" style="filled" fillcolor=yellow];
12 [label="Exit function <init>" style="filled" fillcolor=red];
}
31 -> {32} [color=green];
32 -> {9 13} [color=green];
32 -> {9 13} [style=dashed];
9 -> {10};
10 -> {11};
11 -> {12};
13 -> {14};
14 -> {15};
15 -> {16};
@@ -94,13 +102,6 @@ digraph overridenOpenVal_kt {
28 -> {29};
29 -> {30};
subgraph cluster_9 {
color=red
31 [label="Enter class B" style="filled" fillcolor=red];
32 [label="Exit class B" style="filled" fillcolor=red];
}
31 -> {32} [color=green];
subgraph cluster_10 {
color=red
33 [label="Enter function test_2" style="filled" fillcolor=red];