FIR CFA: add edges according to constructor delegation

This commit is contained in:
pyos
2023-01-18 12:02:00 +01:00
committed by teamcity
parent 29b7a8e435
commit 9f17b5de97
21 changed files with 593 additions and 562 deletions
@@ -20,27 +20,27 @@ digraph inAnonymousObject_kt {
5 [label="Enter class <anonymous object>" style="filled" fillcolor=red];
subgraph cluster_4 {
color=blue
6 [label="Enter function <init>" style="filled" fillcolor=red];
7 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
8 [label="Exit function <init>" style="filled" fillcolor=red];
6 [label="Enter property" style="filled" fillcolor=red];
7 [label="Access variable R|<local>/a|"];
8 [label="Exit property" style="filled" fillcolor=red];
}
subgraph cluster_5 {
color=blue
9 [label="Enter property" style="filled" fillcolor=red];
10 [label="Access variable R|<local>/a|"];
11 [label="Exit property" style="filled" fillcolor=red];
}
subgraph cluster_6 {
color=blue
12 [label="Enter init block" style="filled" fillcolor=red];
subgraph cluster_7 {
9 [label="Enter init block" style="filled" fillcolor=red];
subgraph cluster_6 {
color=blue
13 [label="Enter block"];
14 [label="Access variable R|<local>/b|"];
15 [label="Assignment: R|/<anonymous>.leaked|"];
16 [label="Exit block"];
10 [label="Enter block"];
11 [label="Access variable R|<local>/b|"];
12 [label="Assignment: R|/<anonymous>.leaked|"];
13 [label="Exit block"];
}
17 [label="Exit init block" style="filled" fillcolor=red];
14 [label="Exit init block" 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];
}
18 [label="Exit class <anonymous object>" style="filled" fillcolor=red];
}
@@ -72,20 +72,20 @@ digraph inAnonymousObject_kt {
4 -> {19} [style=dotted];
4 -> {5} [style=dashed];
5 -> {6};
5 -> {9 12 26} [color=red];
5 -> {9 15 26} [color=red];
5 -> {18} [style=dotted];
5 -> {6 9 12} [style=dashed];
5 -> {6 9 15} [style=dashed];
6 -> {7};
7 -> {8};
8 -> {9} [color=green];
8 -> {18} [color=red];
9 -> {10};
10 -> {11};
11 -> {12} [color=green];
11 -> {18} [color=red];
11 -> {12};
12 -> {13};
13 -> {14};
14 -> {15};
14 -> {15} [color=green];
14 -> {18} [color=red];
15 -> {16};
16 -> {17};
17 -> {18};
@@ -43,30 +43,30 @@ digraph inLocalClass_kt {
}
19 [label="Exit init block" style="filled" fillcolor=red];
}
20 [label="Exit class LocalClass" style="filled" fillcolor=red];
}
subgraph cluster_7 {
color=blue
21 [label="Enter function run" style="filled" fillcolor=red];
subgraph cluster_8 {
subgraph cluster_7 {
color=blue
22 [label="Enter block"];
23 [label="Function call: R|<local>/d|.R|SubstitutionOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()" style="filled" fillcolor=yellow];
24 [label="Exit block"];
20 [label="Enter function <init>" style="filled" fillcolor=red];
21 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
subgraph cluster_8 {
color=blue
22 [label="Enter block"];
23 [label="Function call: R|<local>/b|.R|SubstitutionOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()" style="filled" fillcolor=yellow];
24 [label="Exit block"];
}
25 [label="Exit function <init>" style="filled" fillcolor=red];
}
25 [label="Exit function run" style="filled" fillcolor=red];
26 [label="Exit class LocalClass" style="filled" fillcolor=red];
}
subgraph cluster_9 {
color=blue
26 [label="Enter function <init>" style="filled" fillcolor=red];
27 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
27 [label="Enter function run" style="filled" fillcolor=red];
subgraph cluster_10 {
color=blue
28 [label="Enter block"];
29 [label="Function call: R|<local>/b|.R|SubstitutionOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()" style="filled" fillcolor=yellow];
29 [label="Function call: R|<local>/d|.R|SubstitutionOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()" style="filled" fillcolor=yellow];
30 [label="Exit block"];
}
31 [label="Exit function <init>" style="filled" fillcolor=red];
31 [label="Exit function run" style="filled" fillcolor=red];
}
0 -> {1};
1 -> {2};
@@ -79,9 +79,9 @@ digraph inLocalClass_kt {
7 -> {8};
8 -> {9};
10 -> {11};
10 -> {14 21 26} [color=red];
10 -> {20} [style=dotted];
10 -> {11 14} [style=dashed];
10 -> {14 20 27} [color=red];
10 -> {26} [style=dotted];
10 -> {11 14 20} [style=dashed];
11 -> {12};
12 -> {13};
13 -> {14} [color=green];
@@ -91,13 +91,14 @@ digraph inLocalClass_kt {
17 -> {18};
18 -> {19};
19 -> {20} [color=green];
20 -> {21 26} [color=green];
20 -> {21 26} [style=dashed];
20 -> {21};
21 -> {22};
22 -> {23};
23 -> {24};
24 -> {25};
26 -> {27};
25 -> {26} [color=green];
26 -> {27} [color=green];
26 -> {27} [style=dashed];
27 -> {28};
28 -> {29};
29 -> {30};