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:
+24
-22
@@ -4,22 +4,13 @@ digraph initBlock_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 Foo" style="filled" fillcolor=red];
|
||||
10 [label="Part of class initialization"];
|
||||
subgraph cluster_2 {
|
||||
subgraph cluster_1 {
|
||||
color=blue
|
||||
3 [label="Enter init block" style="filled" fillcolor=red];
|
||||
subgraph cluster_3 {
|
||||
subgraph cluster_2 {
|
||||
color=blue
|
||||
4 [label="Enter block"];
|
||||
5 [label="Const: Int(1)"];
|
||||
@@ -30,34 +21,35 @@ digraph initBlock_kt {
|
||||
}
|
||||
11 [label="Exit class Foo" 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];
|
||||
10 -> {3} [style=dashed];
|
||||
11 -> {0} [color=green];
|
||||
11 -> {0} [style=dashed];
|
||||
3 -> {4};
|
||||
4 -> {5};
|
||||
5 -> {6};
|
||||
6 -> {7};
|
||||
7 -> {8};
|
||||
8 -> {11} [color=green];
|
||||
0 -> {1};
|
||||
1 -> {2};
|
||||
|
||||
subgraph cluster_4 {
|
||||
color=red
|
||||
12 [label="Enter function <init>" style="filled" fillcolor=red];
|
||||
13 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
|
||||
14 [label="Exit function <init>" style="filled" fillcolor=red];
|
||||
}
|
||||
12 -> {13};
|
||||
13 -> {14};
|
||||
|
||||
subgraph cluster_5 {
|
||||
color=red
|
||||
26 [label="Enter class Bar" style="filled" fillcolor=red];
|
||||
27 [label="Part of class initialization"];
|
||||
subgraph cluster_6 {
|
||||
subgraph cluster_5 {
|
||||
color=blue
|
||||
15 [label="Enter init block" style="filled" fillcolor=red];
|
||||
subgraph cluster_7 {
|
||||
subgraph cluster_6 {
|
||||
color=blue
|
||||
16 [label="Enter block"];
|
||||
17 [label="Const: Int(1)"];
|
||||
@@ -73,10 +65,18 @@ digraph initBlock_kt {
|
||||
}
|
||||
28 [label="Exit class Bar" style="filled" fillcolor=red style="filled" fillcolor=gray];
|
||||
}
|
||||
subgraph cluster_7 {
|
||||
color=blue
|
||||
12 [label="Enter function <init>" style="filled" fillcolor=red style="filled" fillcolor=gray];
|
||||
13 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
|
||||
14 [label="Exit function <init>" style="filled" fillcolor=red];
|
||||
}
|
||||
26 -> {27} [color=green];
|
||||
27 -> {15} [color=green];
|
||||
27 -> {28} [style=dotted];
|
||||
27 -> {15} [style=dashed];
|
||||
28 -> {12} [style=dotted];
|
||||
28 -> {12} [style=dashed];
|
||||
15 -> {16};
|
||||
16 -> {17};
|
||||
17 -> {18};
|
||||
@@ -88,5 +88,7 @@ digraph initBlock_kt {
|
||||
23 -> {24} [style=dotted];
|
||||
24 -> {25} [style=dotted];
|
||||
25 -> {28} [style=dotted];
|
||||
12 -> {13};
|
||||
13 -> {14};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user