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
@@ -18,93 +18,87 @@ digraph inAnonymousObject_kt {
subgraph cluster_3 {
color=blue
5 [label="Enter class <anonymous object>" style="filled" fillcolor=red];
6 [label="Part of class initialization"];
subgraph cluster_4 {
color=blue
7 [label="Enter property" style="filled" fillcolor=red];
8 [label="Access variable R|<local>/a|"];
9 [label="Exit property" 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];
}
10 [label="Part of class initialization"];
subgraph cluster_5 {
color=blue
11 [label="Enter init block" style="filled" fillcolor=red];
9 [label="Enter init block" style="filled" fillcolor=red];
subgraph cluster_6 {
color=blue
12 [label="Enter block"];
13 [label="Access variable R|<local>/b|"];
14 [label="Assignment: R|/<anonymous>.leaked|"];
15 [label="Exit block"];
10 [label="Enter block"];
11 [label="Access variable R|<local>/b|"];
12 [label="Assignment: R|/<anonymous>.leaked|"];
13 [label="Exit block"];
}
16 [label="Exit init block" style="filled" fillcolor=red];
14 [label="Exit init block" style="filled" fillcolor=red];
}
17 [label="Exit class <anonymous object>" style="filled" fillcolor=red];
15 [label="Exit class <anonymous object>" style="filled" fillcolor=red];
}
18 [label="Exit anonymous object"];
19 [label="Exit anonymous object expression"];
20 [label="Variable declaration: lval obj: R|<anonymous>|"];
21 [label="Access variable R|<local>/obj|"];
22 [label="Function call: R|<local>/obj|.R|/<anonymous>.run|()" style="filled" fillcolor=yellow];
23 [label="Function call: R|<local>/d|.R|SubstitutionOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()" style="filled" fillcolor=yellow];
24 [label="Exit block"];
16 [label="Exit anonymous object"];
17 [label="Exit anonymous object expression"];
18 [label="Variable declaration: lval obj: R|<anonymous>|"];
19 [label="Access variable R|<local>/obj|"];
20 [label="Function call: R|<local>/obj|.R|/<anonymous>.run|()" style="filled" fillcolor=yellow];
21 [label="Function call: R|<local>/d|.R|SubstitutionOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()" style="filled" fillcolor=yellow];
22 [label="Exit block"];
}
25 [label="Exit function foo" style="filled" fillcolor=red];
23 [label="Exit function foo" style="filled" fillcolor=red];
}
subgraph cluster_7 {
color=blue
26 [label="Enter function run" style="filled" fillcolor=red];
24 [label="Enter function run" style="filled" fillcolor=red];
subgraph cluster_8 {
color=blue
27 [label="Enter block"];
28 [label="Function call: R|<local>/c|.R|SubstitutionOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()" style="filled" fillcolor=yellow];
29 [label="Exit block"];
25 [label="Enter block"];
26 [label="Function call: R|<local>/c|.R|SubstitutionOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()" style="filled" fillcolor=yellow];
27 [label="Exit block"];
}
30 [label="Exit function run" style="filled" fillcolor=red];
28 [label="Exit function run" style="filled" fillcolor=red];
}
subgraph cluster_9 {
color=blue
31 [label="Enter function <init>" style="filled" fillcolor=red];
32 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
33 [label="Exit function <init>" style="filled" fillcolor=red];
29 [label="Enter function <init>" style="filled" fillcolor=red];
30 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
31 [label="Exit function <init>" style="filled" fillcolor=red];
}
0 -> {1};
1 -> {2};
2 -> {3};
3 -> {4};
4 -> {5};
4 -> {18} [color=red];
4 -> {16} [color=red];
4 -> {5} [style=dashed];
5 -> {6} [color=green];
5 -> {7 11 26 31} [color=red];
6 -> {7} [color=green];
6 -> {10} [style=dotted];
6 -> {7} [style=dashed];
5 -> {6};
5 -> {9 24 29} [color=red];
5 -> {15} [style=dotted];
5 -> {6 9} [style=dashed];
6 -> {7};
7 -> {8};
8 -> {9};
9 -> {10} [color=green];
10 -> {11} [color=green];
10 -> {17} [style=dotted];
10 -> {11} [style=dashed];
8 -> {9} [color=green];
9 -> {10};
10 -> {11};
11 -> {12};
12 -> {13};
13 -> {14};
14 -> {15};
15 -> {16};
16 -> {17} [color=green];
17 -> {18 26 31} [color=green];
17 -> {26 31} [style=dashed];
14 -> {15} [color=green];
15 -> {16 24 29} [color=green];
15 -> {24 29} [style=dashed];
16 -> {17};
17 -> {18};
18 -> {19};
19 -> {20};
20 -> {21};
21 -> {22};
22 -> {23};
23 -> {24};
24 -> {25};
25 -> {26};
26 -> {27};
27 -> {28};
28 -> {29};
29 -> {30};
31 -> {32};
32 -> {33};
30 -> {31};
}
@@ -25,50 +25,48 @@ digraph inLocalClass_kt {
subgraph cluster_3 {
color=blue
10 [label="Enter class LocalClass" style="filled" fillcolor=red];
11 [label="Part of class initialization"];
subgraph cluster_4 {
color=blue
12 [label="Enter property" style="filled" fillcolor=red];
13 [label="Access variable R|<local>/a|"];
14 [label="Exit property" style="filled" fillcolor=red];
11 [label="Enter property" style="filled" fillcolor=red];
12 [label="Access variable R|<local>/a|"];
13 [label="Exit property" style="filled" fillcolor=red];
}
15 [label="Part of class initialization"];
subgraph cluster_5 {
color=blue
16 [label="Enter init block" style="filled" fillcolor=red];
14 [label="Enter init block" style="filled" fillcolor=red];
subgraph cluster_6 {
color=blue
17 [label="Enter block"];
18 [label="Access variable R|<local>/c|"];
19 [label="Assignment: R|<local>/leaked|"];
20 [label="Exit block"];
15 [label="Enter block"];
16 [label="Access variable R|<local>/c|"];
17 [label="Assignment: R|<local>/leaked|"];
18 [label="Exit block"];
}
21 [label="Exit init block" style="filled" fillcolor=red];
19 [label="Exit init block" style="filled" fillcolor=red];
}
22 [label="Exit class LocalClass" style="filled" fillcolor=red];
20 [label="Exit class LocalClass" style="filled" fillcolor=red];
}
subgraph cluster_7 {
color=blue
23 [label="Enter function run" style="filled" fillcolor=red];
21 [label="Enter function run" style="filled" fillcolor=red];
subgraph cluster_8 {
color=blue
24 [label="Enter block"];
25 [label="Function call: R|<local>/d|.R|SubstitutionOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()" style="filled" fillcolor=yellow];
26 [label="Exit block"];
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"];
}
27 [label="Exit function run" style="filled" fillcolor=red];
25 [label="Exit function run" style="filled" fillcolor=red];
}
subgraph cluster_9 {
color=blue
28 [label="Enter function <init>" style="filled" fillcolor=red];
29 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
26 [label="Enter function <init>" style="filled" fillcolor=red];
27 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
subgraph cluster_10 {
color=blue
30 [label="Enter block"];
31 [label="Function call: R|<local>/b|.R|SubstitutionOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()" style="filled" fillcolor=yellow];
32 [label="Exit block"];
28 [label="Enter block"];
29 [label="Function call: R|<local>/b|.R|SubstitutionOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()" style="filled" fillcolor=yellow];
30 [label="Exit block"];
}
33 [label="Exit function <init>" style="filled" fillcolor=red];
31 [label="Exit function <init>" style="filled" fillcolor=red];
}
0 -> {1};
1 -> {2};
@@ -80,33 +78,29 @@ digraph inLocalClass_kt {
6 -> {7};
7 -> {8};
8 -> {9};
10 -> {11} [color=green];
10 -> {12 16 23 28} [color=red];
11 -> {12} [color=green];
11 -> {15} [style=dotted];
11 -> {12} [style=dashed];
10 -> {11};
10 -> {14 21 26} [color=red];
10 -> {20} [style=dotted];
10 -> {11 14} [style=dashed];
11 -> {12};
12 -> {13};
13 -> {14};
14 -> {15} [color=green];
15 -> {16} [color=green];
15 -> {22} [style=dotted];
15 -> {16} [style=dashed];
13 -> {14} [color=green];
14 -> {15};
15 -> {16};
16 -> {17};
17 -> {18};
18 -> {19};
19 -> {20};
20 -> {21};
21 -> {22} [color=green];
22 -> {23 28} [color=green];
22 -> {23 28} [style=dashed];
19 -> {20} [color=green];
20 -> {21 26} [color=green];
20 -> {21 26} [style=dashed];
21 -> {22};
22 -> {23};
23 -> {24};
24 -> {25};
25 -> {26};
26 -> {27};
27 -> {28};
28 -> {29};
29 -> {30};
30 -> {31};
31 -> {32};
32 -> {33};
}