FIR CFA: remove class initializer part nodes

Instead, attach subgraphs directly to the class enter node.
This commit is contained in:
pyos
2022-12-11 13:43:55 +01:00
committed by Dmitriy Novozhilov
parent b9f366af05
commit c6e9afb788
25 changed files with 3271 additions and 3385 deletions
@@ -6,133 +6,123 @@ digraph smartcastInByClause_kt {
subgraph cluster_0 {
color=red
0 [label="Enter class A" style="filled" fillcolor=red];
1 [label="Part of class initialization"];
subgraph cluster_1 {
color=blue
2 [label="Enter property" style="filled" fillcolor=red];
3 [label="Access variable R|<local>/path|"];
4 [label="Exit property" 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];
}
5 [label="Part of class initialization"];
subgraph cluster_2 {
color=blue
6 [label="Enter property" style="filled" fillcolor=red];
7 [label="Access variable R|<local>/index|"];
8 [label="Exit property" style="filled" fillcolor=red];
4 [label="Enter property" style="filled" fillcolor=red];
5 [label="Access variable R|<local>/index|"];
6 [label="Exit property" style="filled" fillcolor=red];
}
9 [label="Exit class A" style="filled" fillcolor=red];
7 [label="Exit class A" style="filled" fillcolor=red];
}
subgraph cluster_3 {
color=blue
10 [label="Enter function <init>" style="filled" fillcolor=red];
11 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
12 [label="Exit function <init>" style="filled" fillcolor=red];
8 [label="Enter function <init>" style="filled" fillcolor=red];
9 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
10 [label="Exit function <init>" style="filled" fillcolor=red];
}
0 -> {1} [color=green];
1 -> {2} [color=green];
1 -> {5} [style=dotted];
1 -> {2} [style=dashed];
0 -> {7} [style=dotted];
0 -> {1 4} [style=dashed];
1 -> {2};
2 -> {3};
3 -> {4};
4 -> {5} [color=green];
5 -> {6} [color=green];
5 -> {9} [style=dotted];
5 -> {6} [style=dashed];
6 -> {7};
7 -> {8};
8 -> {9} [color=green];
9 -> {10} [color=green];
9 -> {10} [style=dashed];
10 -> {11};
11 -> {12};
3 -> {4} [color=green];
4 -> {5};
5 -> {6};
6 -> {7} [color=green];
7 -> {8} [color=green];
7 -> {8} [style=dashed];
8 -> {9};
9 -> {10};
subgraph cluster_4 {
color=red
13 [label="Enter class Base" style="filled" fillcolor=red];
14 [label="Exit class Base" style="filled" fillcolor=red];
11 [label="Enter class Base" style="filled" fillcolor=red];
12 [label="Exit class Base" style="filled" fillcolor=red];
}
13 -> {14} [color=green];
11 -> {12} [color=green];
subgraph cluster_5 {
color=red
15 [label="Enter class Derived" style="filled" fillcolor=red];
16 [label="Part of class initialization"];
13 [label="Enter class Derived" style="filled" fillcolor=red];
subgraph cluster_6 {
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];
14 [label="Enter property" style="filled" fillcolor=red];
15 [label="Access variable R|<local>/index|"];
16 [label="Exit property" style="filled" fillcolor=red];
}
20 [label="Exit class Derived" style="filled" fillcolor=red];
17 [label="Exit class Derived" style="filled" fillcolor=red];
}
subgraph cluster_7 {
color=blue
21 [label="Enter function <init>" style="filled" fillcolor=red];
22 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
23 [label="Exit function <init>" 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];
}
15 -> {16} [color=green];
13 -> {14} [color=green];
13 -> {17} [style=dotted];
13 -> {14} [style=dashed];
14 -> {15};
15 -> {16};
16 -> {17} [color=green];
16 -> {20} [style=dotted];
16 -> {17} [style=dashed];
17 -> {18};
17 -> {18} [color=green];
17 -> {18} [style=dashed];
18 -> {19};
19 -> {20} [color=green];
20 -> {21} [color=green];
20 -> {21} [style=dashed];
21 -> {22};
22 -> {23};
19 -> {20};
subgraph cluster_8 {
color=red
24 [label="Enter function test" style="filled" fillcolor=red];
21 [label="Enter function test" style="filled" fillcolor=red];
subgraph cluster_9 {
color=blue
25 [label="Enter block"];
26 [label="Access variable R|<local>/a|"];
27 [label="Enter safe call"];
28 [label="Access variable R|/A.path|"];
29 [label="Exit safe call"];
30 [label="Exit lhs of ?:"];
31 [label="Enter rhs of ?:"];
32 [label="Const: Null(null)"];
33 [label="Jump: ^test Null(null)"];
34 [label="Stub" style="filled" fillcolor=gray];
35 [label="Lhs of ?: is not null"];
36 [label="Exit ?:"];
37 [label="Variable declaration: lval path: R|kotlin/String|"];
38 [label="Access variable R|<local>/a|"];
39 [label="Smart cast: R|<local>/a|"];
40 [label="Access variable R|/A.index|"];
41 [label="Function call: R|/takeInt|(...)" style="filled" fillcolor=yellow];
42 [label="Enter anonymous object"];
22 [label="Enter block"];
23 [label="Access variable R|<local>/a|"];
24 [label="Enter safe call"];
25 [label="Access variable R|/A.path|"];
26 [label="Exit safe call"];
27 [label="Exit lhs of ?:"];
28 [label="Enter rhs of ?:"];
29 [label="Const: Null(null)"];
30 [label="Jump: ^test Null(null)"];
31 [label="Stub" style="filled" fillcolor=gray];
32 [label="Lhs of ?: is not null"];
33 [label="Exit ?:"];
34 [label="Variable declaration: lval path: R|kotlin/String|"];
35 [label="Access variable R|<local>/a|"];
36 [label="Smart cast: R|<local>/a|"];
37 [label="Access variable R|/A.index|"];
38 [label="Function call: R|/takeInt|(...)" style="filled" fillcolor=yellow];
39 [label="Enter anonymous object"];
subgraph cluster_10 {
color=blue
43 [label="Enter class <anonymous object>" style="filled" fillcolor=red];
44 [label="Part of class initialization"];
40 [label="Enter class <anonymous object>" style="filled" fillcolor=red];
subgraph cluster_11 {
color=blue
45 [label="Enter field" style="filled" fillcolor=red];
46 [label="Access variable R|<local>/a|"];
47 [label="Smart cast: R|<local>/a|"];
48 [label="Access variable R|/A.index|"];
49 [label="Function call: R|/Derived.Derived|(...)" style="filled" fillcolor=yellow];
50 [label="Exit field" 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];
}
51 [label="Part of class initialization"];
subgraph cluster_12 {
color=blue
52 [label="Enter property" style="filled" fillcolor=red];
53 [label="Access variable R|<local>/a|"];
54 [label="Smart cast: R|<local>/a|"];
55 [label="Access variable R|/A.index|"];
56 [label="Exit property" 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];
}
57 [label="Exit class <anonymous object>" style="filled" fillcolor=red];
52 [label="Exit class <anonymous object>" style="filled" fillcolor=red];
}
58 [label="Exit anonymous object"];
59 [label="Exit anonymous object expression"];
60 [label="Jump: ^test object : R|Base| {
53 [label="Exit anonymous object"];
54 [label="Exit anonymous object expression"];
55 [label="Jump: ^test object : R|Base| {
private constructor(): R|<anonymous>| {
super<R|kotlin/Any|>()
}
@@ -148,102 +138,98 @@ digraph smartcastInByClause_kt {
}
"];
61 [label="Stub" style="filled" fillcolor=gray];
62 [label="Exit block" style="filled" fillcolor=gray];
56 [label="Stub" style="filled" fillcolor=gray];
57 [label="Exit block" style="filled" fillcolor=gray];
}
63 [label="Exit function test" style="filled" fillcolor=red];
58 [label="Exit function test" style="filled" fillcolor=red];
}
subgraph cluster_13 {
color=blue
64 [label="Enter function foo" style="filled" fillcolor=red];
59 [label="Enter function foo" style="filled" fillcolor=red];
subgraph cluster_14 {
color=blue
65 [label="Enter block"];
66 [label="Access variable R|<local>/a|"];
67 [label="Smart cast: R|<local>/a|"];
68 [label="Access variable R|/A.index|"];
69 [label="Function call: R|/takeInt|(...)" style="filled" fillcolor=yellow];
70 [label="Exit block"];
60 [label="Enter block"];
61 [label="Access variable R|<local>/a|"];
62 [label="Smart cast: R|<local>/a|"];
63 [label="Access variable R|/A.index|"];
64 [label="Function call: R|/takeInt|(...)" style="filled" fillcolor=yellow];
65 [label="Exit block"];
}
71 [label="Exit function foo" style="filled" fillcolor=red];
66 [label="Exit function foo" style="filled" fillcolor=red];
}
subgraph cluster_15 {
color=blue
72 [label="Enter function <init>" style="filled" fillcolor=red];
73 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
74 [label="Exit function <init>" style="filled" fillcolor=red];
67 [label="Enter function <init>" style="filled" fillcolor=red];
68 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
69 [label="Exit function <init>" style="filled" fillcolor=red];
}
21 -> {22};
22 -> {23};
23 -> {24 28};
24 -> {25};
25 -> {26};
26 -> {27 31};
27 -> {28};
26 -> {27};
27 -> {28 32};
28 -> {29};
29 -> {30};
30 -> {31 35};
31 -> {32};
30 -> {58};
30 -> {31} [style=dotted];
31 -> {33} [style=dotted];
32 -> {33};
33 -> {63};
33 -> {34} [style=dotted];
34 -> {36} [style=dotted];
33 -> {34};
34 -> {35};
35 -> {36};
36 -> {37};
37 -> {38};
38 -> {39};
39 -> {40};
39 -> {53} [color=red];
39 -> {40} [style=dashed];
40 -> {41};
40 -> {47 59 67} [color=red];
40 -> {52} [style=dotted];
40 -> {41 47} [style=dashed];
41 -> {42};
42 -> {43};
42 -> {58} [color=red];
42 -> {43} [style=dashed];
43 -> {44} [color=green];
43 -> {45 52 64 72} [color=red];
44 -> {45} [color=green];
44 -> {51} [style=dotted];
44 -> {45} [style=dashed];
43 -> {44};
44 -> {45};
45 -> {46};
46 -> {47};
46 -> {47} [color=green];
47 -> {48};
48 -> {49};
49 -> {50};
50 -> {51} [color=green];
50 -> {51};
51 -> {52} [color=green];
51 -> {57} [style=dotted];
51 -> {52} [style=dashed];
52 -> {53};
52 -> {53 59 67} [color=green];
52 -> {59 67} [style=dashed];
53 -> {54};
54 -> {55};
55 -> {56};
56 -> {57} [color=green];
57 -> {58 64 72} [color=green];
57 -> {64 72} [style=dashed];
58 -> {59};
55 -> {58};
55 -> {56} [style=dotted];
56 -> {57} [style=dotted];
57 -> {58} [style=dotted];
59 -> {60};
60 -> {63};
60 -> {61} [style=dotted];
61 -> {62} [style=dotted];
62 -> {63} [style=dotted];
60 -> {61};
61 -> {62};
62 -> {63};
63 -> {64};
64 -> {65};
65 -> {66};
66 -> {67};
67 -> {68};
68 -> {69};
69 -> {70};
70 -> {71};
72 -> {73};
73 -> {74};
subgraph cluster_16 {
color=red
75 [label="Enter function takeInt" style="filled" fillcolor=red];
70 [label="Enter function takeInt" style="filled" fillcolor=red];
subgraph cluster_17 {
color=blue
76 [label="Enter block"];
77 [label="Exit block"];
71 [label="Enter block"];
72 [label="Exit block"];
}
78 [label="Exit function takeInt" style="filled" fillcolor=red];
73 [label="Exit function takeInt" style="filled" fillcolor=red];
}
75 -> {76};
76 -> {77};
77 -> {78};
70 -> {71};
71 -> {72};
72 -> {73};
}