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,18 +4,19 @@ digraph elvis_kt {
edge [penwidth=2]
subgraph cluster_0 {
color=red
0 [label="Enter function foo" style="filled" fillcolor=red];
1 [label="Exit function foo" style="filled" fillcolor=red];
}
0 -> {1};
subgraph cluster_1 {
color=red
2 [label="Enter class A" style="filled" fillcolor=red];
3 [label="Exit class A" style="filled" fillcolor=red];
}
subgraph cluster_1 {
color=blue
0 [label="Enter function foo" style="filled" fillcolor=red];
1 [label="Exit function foo" style="filled" fillcolor=red];
}
2 -> {3} [color=green];
3 -> {0} [color=green];
3 -> {0} [style=dashed];
0 -> {1};
subgraph cluster_2 {
color=red
@@ -153,46 +153,49 @@ digraph returns_kt {
51 -> {52};
subgraph cluster_14 {
color=red
53 [label="Enter function foo" style="filled" fillcolor=red];
54 [label="Exit function foo" style="filled" fillcolor=red];
}
53 -> {54};
subgraph cluster_15 {
color=red
55 [label="Enter class A" style="filled" fillcolor=red];
56 [label="Exit class A" style="filled" fillcolor=red];
}
subgraph cluster_15 {
color=blue
53 [label="Enter function foo" style="filled" fillcolor=red];
54 [label="Exit function foo" style="filled" fillcolor=red];
}
55 -> {56} [color=green];
56 -> {53} [color=green];
56 -> {53} [style=dashed];
53 -> {54};
subgraph cluster_16 {
color=red
57 [label="Enter function bar" style="filled" fillcolor=red];
58 [label="Exit function bar" style="filled" fillcolor=red];
}
57 -> {58};
subgraph cluster_17 {
color=red
59 [label="Enter class B" style="filled" fillcolor=red];
60 [label="Exit class B" style="filled" fillcolor=red];
}
subgraph cluster_17 {
color=blue
57 [label="Enter function bar" style="filled" fillcolor=red];
58 [label="Exit function bar" style="filled" fillcolor=red];
}
59 -> {60} [color=green];
60 -> {57} [color=green];
60 -> {57} [style=dashed];
57 -> {58};
subgraph cluster_18 {
color=red
61 [label="Enter function baz" style="filled" fillcolor=red];
62 [label="Exit function baz" style="filled" fillcolor=red];
}
61 -> {62};
subgraph cluster_19 {
color=red
63 [label="Enter class C" style="filled" fillcolor=red];
64 [label="Exit class C" style="filled" fillcolor=red];
}
subgraph cluster_19 {
color=blue
61 [label="Enter function baz" style="filled" fillcolor=red];
62 [label="Exit function baz" style="filled" fillcolor=red];
}
63 -> {64} [color=green];
64 -> {61} [color=green];
64 -> {61} [style=dashed];
61 -> {62};
subgraph cluster_20 {
color=red
@@ -4,18 +4,19 @@ digraph smartcastFromArgument_kt {
edge [penwidth=2]
subgraph cluster_0 {
color=red
0 [label="Enter function foo" style="filled" fillcolor=red];
1 [label="Exit function foo" style="filled" fillcolor=red];
}
0 -> {1};
subgraph cluster_1 {
color=red
2 [label="Enter class A" style="filled" fillcolor=red];
3 [label="Exit class A" style="filled" fillcolor=red];
}
subgraph cluster_1 {
color=blue
0 [label="Enter function foo" style="filled" fillcolor=red];
1 [label="Exit function foo" style="filled" fillcolor=red];
}
2 -> {3} [color=green];
3 -> {0} [color=green];
3 -> {0} [style=dashed];
0 -> {1};
subgraph cluster_2 {
color=red
@@ -4,32 +4,34 @@ digraph when_kt {
edge [penwidth=2]
subgraph cluster_0 {
color=red
0 [label="Enter function foo" style="filled" fillcolor=red];
1 [label="Exit function foo" style="filled" fillcolor=red];
}
0 -> {1};
subgraph cluster_1 {
color=red
2 [label="Enter class A" style="filled" fillcolor=red];
3 [label="Exit class A" style="filled" fillcolor=red];
}
subgraph cluster_1 {
color=blue
0 [label="Enter function foo" style="filled" fillcolor=red];
1 [label="Exit function foo" style="filled" fillcolor=red];
}
2 -> {3} [color=green];
3 -> {0} [color=green];
3 -> {0} [style=dashed];
0 -> {1};
subgraph cluster_2 {
color=red
4 [label="Enter function bar" style="filled" fillcolor=red];
5 [label="Exit function bar" style="filled" fillcolor=red];
}
4 -> {5};
subgraph cluster_3 {
color=red
6 [label="Enter class B" style="filled" fillcolor=red];
7 [label="Exit class B" style="filled" fillcolor=red];
}
subgraph cluster_3 {
color=blue
4 [label="Enter function bar" style="filled" fillcolor=red];
5 [label="Exit function bar" style="filled" fillcolor=red];
}
6 -> {7} [color=green];
7 -> {4} [color=green];
7 -> {4} [style=dashed];
4 -> {5};
subgraph cluster_4 {
color=red