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,26 +4,17 @@ digraph smartcastInByClause_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
9 [label="Enter class A" style="filled" fillcolor=red];
10 [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>/path|"];
5 [label="Exit property" style="filled" fillcolor=red];
}
11 [label="Part of class initialization"];
subgraph cluster_3 {
subgraph cluster_2 {
color=blue
6 [label="Enter property" style="filled" fillcolor=red];
7 [label="Access variable R|<local>/index|"];
@@ -31,6 +22,12 @@ digraph smartcastInByClause_kt {
}
12 [label="Exit class A" style="filled" fillcolor=red];
}
subgraph cluster_3 {
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];
}
9 -> {10} [color=green];
10 -> {3} [color=green];
10 -> {11} [style=dotted];
@@ -38,12 +35,16 @@ digraph smartcastInByClause_kt {
11 -> {6} [color=green];
11 -> {12} [style=dotted];
11 -> {6} [style=dashed];
12 -> {0} [color=green];
12 -> {0} [style=dashed];
3 -> {4};
4 -> {5};
5 -> {11} [color=green];
6 -> {7};
7 -> {8};
8 -> {12} [color=green];
0 -> {1};
1 -> {2};
subgraph cluster_4 {
color=red
@@ -53,19 +54,10 @@ digraph smartcastInByClause_kt {
13 -> {14} [color=green];
subgraph cluster_5 {
color=red
15 [label="Enter function <init>" style="filled" fillcolor=red];
16 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
17 [label="Exit function <init>" style="filled" fillcolor=red];
}
15 -> {16};
16 -> {17};
subgraph cluster_6 {
color=red
21 [label="Enter class Derived" style="filled" fillcolor=red];
22 [label="Part of class initialization"];
subgraph cluster_7 {
subgraph cluster_6 {
color=blue
18 [label="Enter property" style="filled" fillcolor=red];
19 [label="Access variable R|<local>/index|"];
@@ -73,13 +65,23 @@ digraph smartcastInByClause_kt {
}
23 [label="Exit class Derived" style="filled" fillcolor=red];
}
subgraph cluster_7 {
color=blue
15 [label="Enter function <init>" style="filled" fillcolor=red];
16 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
17 [label="Exit function <init>" style="filled" fillcolor=red];
}
21 -> {22} [color=green];
22 -> {18} [color=green];
22 -> {23} [style=dotted];
22 -> {18} [style=dashed];
23 -> {15} [color=green];
23 -> {15} [style=dashed];
18 -> {19};
19 -> {20};
20 -> {23} [color=green];
15 -> {16};
16 -> {17};
subgraph cluster_8 {
color=red
@@ -195,8 +197,6 @@ digraph smartcastInByClause_kt {
42 -> {43} [color=red];
42 -> {49} [style=dashed];
43 -> {44};
43 -> {64 67} [color=green];
43 -> {64 67} [style=dashed];
44 -> {45};
45 -> {48};
45 -> {46} [style=dotted];
@@ -209,7 +209,8 @@ digraph smartcastInByClause_kt {
51 -> {59} [color=green];
51 -> {52} [style=dotted];
51 -> {59} [style=dashed];
52 -> {43} [color=green];
52 -> {43 64 67} [color=green];
52 -> {64 67} [style=dashed];
53 -> {54};
54 -> {55};
55 -> {56};