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
@@ -341,15 +341,15 @@ digraph boundSmartcasts_kt {
125 [label="Enter class D" style="filled" fillcolor=red];
subgraph cluster_28 {
color=blue
126 [label="Enter function <init>" style="filled" fillcolor=red];
127 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
128 [label="Exit function <init>" style="filled" fillcolor=red];
126 [label="Enter property" style="filled" fillcolor=red];
127 [label="Access variable R|<local>/any|"];
128 [label="Exit property" style="filled" fillcolor=red];
}
subgraph cluster_29 {
color=blue
129 [label="Enter property" style="filled" fillcolor=red];
130 [label="Access variable R|<local>/any|"];
131 [label="Exit property" style="filled" fillcolor=red];
129 [label="Enter function <init>" style="filled" fillcolor=red];
130 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
131 [label="Exit function <init>" style="filled" fillcolor=red];
}
132 [label="Exit class D" style="filled" fillcolor=red];
}
@@ -8,15 +8,15 @@ digraph boundSmartcastsInBranches_kt {
0 [label="Enter class A" style="filled" fillcolor=red];
subgraph cluster_1 {
color=blue
1 [label="Enter function <init>" style="filled" fillcolor=red];
2 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
3 [label="Exit function <init>" style="filled" fillcolor=red];
1 [label="Enter property" style="filled" fillcolor=red];
2 [label="Const: String()"];
3 [label="Exit property" style="filled" fillcolor=red];
}
subgraph cluster_2 {
color=blue
4 [label="Enter property" style="filled" fillcolor=red];
5 [label="Const: String()"];
6 [label="Exit property" style="filled" fillcolor=red];
4 [label="Enter function <init>" style="filled" fillcolor=red];
5 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
6 [label="Exit function <init>" style="filled" fillcolor=red];
}
7 [label="Exit class A" style="filled" fillcolor=red];
}
@@ -26,15 +26,15 @@ digraph functionCallBound_kt {
5 [label="Enter class Sub" style="filled" fillcolor=red];
subgraph cluster_3 {
color=blue
6 [label="Enter function <init>" style="filled" fillcolor=red];
7 [label="Delegated constructor call: super<R|Base|>()" 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>/data|"];
8 [label="Exit property" style="filled" fillcolor=red];
}
subgraph cluster_4 {
color=blue
9 [label="Enter property" style="filled" fillcolor=red];
10 [label="Access variable R|<local>/data|"];
11 [label="Exit property" style="filled" fillcolor=red];
9 [label="Enter function <init>" style="filled" fillcolor=red];
10 [label="Delegated constructor call: super<R|Base|>()" style="filled" fillcolor=yellow];
11 [label="Exit function <init>" style="filled" fillcolor=red];
}
12 [label="Exit class Sub" style="filled" fillcolor=red];
}
@@ -26,15 +26,15 @@ digraph lambdaInWhenBranch_kt {
5 [label="Enter class SubClass1" style="filled" fillcolor=red];
subgraph cluster_3 {
color=blue
6 [label="Enter function <init>" style="filled" fillcolor=red];
7 [label="Delegated constructor call: super<R|Sealed|>()" 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>/t|"];
8 [label="Exit property" style="filled" fillcolor=red];
}
subgraph cluster_4 {
color=blue
9 [label="Enter property" style="filled" fillcolor=red];
10 [label="Access variable R|<local>/t|"];
11 [label="Exit property" style="filled" fillcolor=red];
9 [label="Enter function <init>" style="filled" fillcolor=red];
10 [label="Delegated constructor call: super<R|Sealed|>()" style="filled" fillcolor=yellow];
11 [label="Exit function <init>" style="filled" fillcolor=red];
}
12 [label="Exit class SubClass1" style="filled" fillcolor=red];
}
@@ -59,15 +59,15 @@ digraph nullability_kt {
14 [label="Enter class QImpl" style="filled" fillcolor=red];
subgraph cluster_8 {
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];
15 [label="Enter property" style="filled" fillcolor=red];
16 [label="Access variable R|<local>/data|"];
17 [label="Exit property" style="filled" fillcolor=red];
}
subgraph cluster_9 {
color=blue
18 [label="Enter property" style="filled" fillcolor=red];
19 [label="Access variable R|<local>/data|"];
20 [label="Exit property" style="filled" fillcolor=red];
18 [label="Enter function <init>" style="filled" fillcolor=red];
19 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
20 [label="Exit function <init>" style="filled" fillcolor=red];
}
21 [label="Exit class QImpl" style="filled" fillcolor=red];
}
@@ -108,15 +108,15 @@ digraph nullability_kt {
29 [label="Enter class QImplMutable" style="filled" fillcolor=red];
subgraph cluster_13 {
color=blue
30 [label="Enter function <init>" style="filled" fillcolor=red];
31 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
32 [label="Exit function <init>" style="filled" fillcolor=red];
30 [label="Enter property" style="filled" fillcolor=red];
31 [label="Access variable R|<local>/data|"];
32 [label="Exit property" style="filled" fillcolor=red];
}
subgraph cluster_14 {
color=blue
33 [label="Enter property" style="filled" fillcolor=red];
34 [label="Access variable R|<local>/data|"];
35 [label="Exit property" style="filled" fillcolor=red];
33 [label="Enter function <init>" style="filled" fillcolor=red];
34 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
35 [label="Exit function <init>" style="filled" fillcolor=red];
}
36 [label="Exit class QImplMutable" style="filled" fillcolor=red];
}
@@ -8,15 +8,15 @@ digraph assignSafeCall_kt {
0 [label="Enter class A" style="filled" fillcolor=red];
subgraph cluster_1 {
color=blue
1 [label="Enter function <init>" style="filled" fillcolor=red];
2 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
3 [label="Exit function <init>" style="filled" fillcolor=red];
1 [label="Enter property" style="filled" fillcolor=red];
2 [label="Const: Int(1)"];
3 [label="Exit property" style="filled" fillcolor=red];
}
subgraph cluster_2 {
color=blue
4 [label="Enter property" style="filled" fillcolor=red];
5 [label="Const: Int(1)"];
6 [label="Exit property" style="filled" fillcolor=red];
4 [label="Enter function <init>" style="filled" fillcolor=red];
5 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
6 [label="Exit function <init>" style="filled" fillcolor=red];
}
7 [label="Exit class A" style="filled" fillcolor=red];
}
@@ -52,39 +52,39 @@ digraph smartCastInInit_kt {
14 [label="Enter class Main" style="filled" fillcolor=red];
subgraph cluster_6 {
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];
}
subgraph cluster_7 {
color=blue
18 [label="Enter init block" style="filled" fillcolor=red];
subgraph cluster_8 {
15 [label="Enter init block" style="filled" fillcolor=red];
subgraph cluster_7 {
color=blue
19 [label="Enter block"];
20 [label="Function call: R|/s|()" style="filled" fillcolor=yellow];
21 [label="Assignment: R|/Main.x|"];
22 [label="Access variable R|/Main.x|"];
23 [label="Smart cast: this@R|/Main|.R|/Main.x|"];
24 [label="Function call: this@R|/Main|.R|/Main.x|.R|/S.foo|()" style="filled" fillcolor=yellow];
25 [label="Exit block"];
16 [label="Enter block"];
17 [label="Function call: R|/s|()" style="filled" fillcolor=yellow];
18 [label="Assignment: R|/Main.x|"];
19 [label="Access variable R|/Main.x|"];
20 [label="Smart cast: this@R|/Main|.R|/Main.x|"];
21 [label="Function call: this@R|/Main|.R|/Main.x|.R|/S.foo|()" style="filled" fillcolor=yellow];
22 [label="Exit block"];
}
26 [label="Exit init block" style="filled" fillcolor=red];
23 [label="Exit init block" style="filled" fillcolor=red];
}
subgraph cluster_8 {
color=blue
24 [label="Enter function <init>" style="filled" fillcolor=red];
25 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
26 [label="Exit function <init>" style="filled" fillcolor=red];
}
27 [label="Exit class Main" style="filled" fillcolor=red];
}
14 -> {15} [color=green];
14 -> {27} [style=dotted];
14 -> {15 18} [style=dashed];
14 -> {15 24} [style=dashed];
15 -> {16};
16 -> {17};
17 -> {18} [color=green];
17 -> {18};
18 -> {19};
19 -> {20};
20 -> {21};
21 -> {22};
22 -> {23};
23 -> {24};
23 -> {24} [color=green];
24 -> {25};
25 -> {26};
26 -> {27} [color=green];
@@ -8,21 +8,21 @@ digraph smartcastInByClause_kt {
0 [label="Enter class A" style="filled" fillcolor=red];
subgraph cluster_1 {
color=blue
1 [label="Enter function <init>" style="filled" fillcolor=red];
2 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
3 [label="Exit function <init>" style="filled" fillcolor=red];
1 [label="Enter property" style="filled" fillcolor=red];
2 [label="Access variable R|<local>/path|"];
3 [label="Exit property" style="filled" fillcolor=red];
}
subgraph cluster_2 {
color=blue
4 [label="Enter property" style="filled" fillcolor=red];
5 [label="Access variable R|<local>/path|"];
5 [label="Access variable R|<local>/index|"];
6 [label="Exit property" style="filled" fillcolor=red];
}
subgraph cluster_3 {
color=blue
7 [label="Enter property" style="filled" fillcolor=red];
8 [label="Access variable R|<local>/index|"];
9 [label="Exit property" style="filled" fillcolor=red];
7 [label="Enter function <init>" style="filled" fillcolor=red];
8 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
9 [label="Exit function <init>" style="filled" fillcolor=red];
}
10 [label="Exit class A" style="filled" fillcolor=red];
}
@@ -51,15 +51,15 @@ digraph smartcastInByClause_kt {
13 [label="Enter class Derived" style="filled" fillcolor=red];
subgraph cluster_6 {
color=blue
14 [label="Enter function <init>" style="filled" fillcolor=red];
15 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
16 [label="Exit function <init>" style="filled" fillcolor=red];
14 [label="Enter property" style="filled" fillcolor=red];
15 [label="Access variable R|<local>/index|"];
16 [label="Exit property" style="filled" fillcolor=red];
}
subgraph cluster_7 {
color=blue
17 [label="Enter property" style="filled" fillcolor=red];
18 [label="Access variable R|<local>/index|"];
19 [label="Exit property" style="filled" fillcolor=red];
17 [label="Enter function <init>" style="filled" fillcolor=red];
18 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
19 [label="Exit function <init>" style="filled" fillcolor=red];
}
20 [label="Exit class Derived" style="filled" fillcolor=red];
}
@@ -101,26 +101,26 @@ digraph smartcastInByClause_kt {
40 [label="Enter class <anonymous object>" style="filled" fillcolor=red];
subgraph cluster_11 {
color=blue
41 [label="Enter function <init>" style="filled" fillcolor=red];
42 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
43 [label="Exit function <init>" style="filled" fillcolor=red];
41 [label="Enter field" style="filled" fillcolor=red];
42 [label="Access variable R|<local>/a|"];
43 [label="Smart cast: R|<local>/a|"];
44 [label="Access variable R|/A.index|"];
45 [label="Function call: R|/Derived.Derived|(...)" style="filled" fillcolor=yellow];
46 [label="Exit field" style="filled" fillcolor=red];
}
subgraph cluster_12 {
color=blue
44 [label="Enter field" style="filled" fillcolor=red];
45 [label="Access variable R|<local>/a|"];
46 [label="Smart cast: R|<local>/a|"];
47 [label="Access variable R|/A.index|"];
48 [label="Function call: R|/Derived.Derived|(...)" style="filled" fillcolor=yellow];
49 [label="Exit field" style="filled" fillcolor=red];
47 [label="Enter property" style="filled" fillcolor=red];
48 [label="Access variable R|<local>/a|"];
49 [label="Smart cast: R|<local>/a|"];
50 [label="Access variable R|/A.index|"];
51 [label="Exit property" style="filled" fillcolor=red];
}
subgraph cluster_13 {
color=blue
50 [label="Enter property" style="filled" fillcolor=red];
51 [label="Access variable R|<local>/a|"];
52 [label="Smart cast: R|<local>/a|"];
53 [label="Access variable R|/A.index|"];
54 [label="Exit property" style="filled" fillcolor=red];
52 [label="Enter function <init>" style="filled" fillcolor=red];
53 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
54 [label="Exit function <init>" style="filled" fillcolor=red];
}
55 [label="Exit class <anonymous object>" style="filled" fillcolor=red];
}
@@ -183,22 +183,22 @@ digraph smartcastInByClause_kt {
39 -> {56} [style=dotted];
39 -> {40} [style=dashed];
40 -> {41};
40 -> {44 50 61} [color=red];
40 -> {47 52 61} [color=red];
40 -> {55} [style=dotted];
40 -> {41 44 50} [style=dashed];
40 -> {41 47 52} [style=dashed];
41 -> {42};
42 -> {43};
43 -> {44} [color=green];
43 -> {55} [color=red];
43 -> {44};
44 -> {45};
45 -> {46};
46 -> {47};
46 -> {47} [color=green];
46 -> {55} [color=red];
47 -> {48};
48 -> {49};
49 -> {50} [color=green];
49 -> {55} [color=red];
49 -> {50};
50 -> {51};
51 -> {52};
51 -> {52} [color=green];
51 -> {55} [color=red];
52 -> {53};
53 -> {54};
54 -> {55};
@@ -119,21 +119,21 @@ digraph smartcastToNothing_kt {
39 [label="Enter class A" style="filled" fillcolor=red];
subgraph cluster_11 {
color=blue
40 [label="Enter function <init>" style="filled" fillcolor=red];
41 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
42 [label="Exit function <init>" style="filled" fillcolor=red];
40 [label="Enter property" style="filled" fillcolor=red];
41 [label="Const: Int(1)"];
42 [label="Exit property" style="filled" fillcolor=red];
}
subgraph cluster_12 {
color=blue
43 [label="Enter property" style="filled" fillcolor=red];
44 [label="Const: Int(1)"];
44 [label="Const: Boolean(true)"];
45 [label="Exit property" style="filled" fillcolor=red];
}
subgraph cluster_13 {
color=blue
46 [label="Enter property" style="filled" fillcolor=red];
47 [label="Const: Boolean(true)"];
48 [label="Exit property" style="filled" fillcolor=red];
46 [label="Enter function <init>" style="filled" fillcolor=red];
47 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
48 [label="Exit function <init>" style="filled" fillcolor=red];
}
49 [label="Exit class A" style="filled" fillcolor=red];
}
@@ -8,15 +8,15 @@ digraph overridenOpenVal_kt {
0 [label="Enter class A" style="filled" fillcolor=red];
subgraph cluster_1 {
color=blue
1 [label="Enter function <init>" style="filled" fillcolor=red];
2 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
3 [label="Exit function <init>" style="filled" fillcolor=red];
1 [label="Enter property" style="filled" fillcolor=red];
2 [label="Access variable R|<local>/x|"];
3 [label="Exit property" style="filled" fillcolor=red];
}
subgraph cluster_2 {
color=blue
4 [label="Enter property" style="filled" fillcolor=red];
5 [label="Access variable R|<local>/x|"];
6 [label="Exit property" style="filled" fillcolor=red];
4 [label="Enter function <init>" style="filled" fillcolor=red];
5 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
6 [label="Exit function <init>" style="filled" fillcolor=red];
}
7 [label="Exit class A" style="filled" fillcolor=red];
}