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
@@ -90,215 +90,213 @@ digraph propertiesAndInitBlocks_kt {
subgraph cluster_10 {
color=blue
29 [label="Enter class GetterLocalClass" style="filled" fillcolor=red];
30 [label="Part of class initialization"];
subgraph cluster_11 {
color=blue
31 [label="Enter init block" style="filled" fillcolor=red];
30 [label="Enter init block" style="filled" fillcolor=red];
subgraph cluster_12 {
color=blue
32 [label="Enter block"];
33 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow];
34 [label="Throw: throw R|java/lang/Exception.Exception|()"];
35 [label="Stub" style="filled" fillcolor=gray];
36 [label="Exit block" style="filled" fillcolor=gray];
31 [label="Enter block"];
32 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow];
33 [label="Throw: throw R|java/lang/Exception.Exception|()"];
34 [label="Stub" style="filled" fillcolor=gray];
35 [label="Exit block" style="filled" fillcolor=gray];
}
37 [label="Exit init block" style="filled" fillcolor=gray];
36 [label="Exit init block" style="filled" fillcolor=gray];
}
38 [label="Exit class GetterLocalClass" style="filled" fillcolor=gray];
37 [label="Exit class GetterLocalClass" style="filled" fillcolor=gray];
}
subgraph cluster_13 {
color=blue
39 [label="Enter function <init>" style="filled" fillcolor=gray];
40 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
41 [label="Exit function <init>" style="filled" fillcolor=red];
38 [label="Enter function <init>" style="filled" fillcolor=gray];
39 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=gray];
40 [label="Exit function <init>" style="filled" fillcolor=gray];
}
24 -> {25};
25 -> {26};
26 -> {27 29};
26 -> {29} [style=dashed];
27 -> {28};
29 -> {30} [color=green];
29 -> {31 39} [color=red];
30 -> {31} [color=green];
30 -> {38} [style=dotted];
30 -> {31} [style=dashed];
29 -> {30};
29 -> {38} [color=red];
29 -> {37} [style=dotted];
29 -> {30} [style=dashed];
30 -> {31};
31 -> {32};
32 -> {33};
33 -> {34};
33 -> {34} [style=dotted];
34 -> {35} [style=dotted];
35 -> {36} [style=dotted];
36 -> {37} [style=dotted];
37 -> {38} [style=dotted];
37 -> {38} [style=dashed];
38 -> {39} [style=dotted];
38 -> {39} [style=dashed];
39 -> {40};
40 -> {41};
39 -> {40} [style=dotted];
subgraph cluster_14 {
color=red
42 [label="Enter property" style="filled" fillcolor=red];
43 [label="Postponed enter to lambda"];
41 [label="Enter property" style="filled" fillcolor=red];
42 [label="Postponed enter to lambda"];
subgraph cluster_15 {
color=blue
44 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
43 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_16 {
color=blue
45 [label="Enter block"];
46 [label="Local function declaration <anonymous>"];
47 [label="Exit local class <anonymous>"];
48 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow];
49 [label="Throw: throw R|java/lang/Exception.Exception|()"];
50 [label="Stub" style="filled" fillcolor=gray];
51 [label="Exit block" style="filled" fillcolor=gray];
44 [label="Enter block"];
45 [label="Local function declaration <anonymous>"];
46 [label="Exit local class <anonymous>"];
47 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow];
48 [label="Throw: throw R|java/lang/Exception.Exception|()"];
49 [label="Stub" style="filled" fillcolor=gray];
50 [label="Exit block" style="filled" fillcolor=gray];
}
52 [label="Exit function anonymousFunction" style="filled" fillcolor=gray];
51 [label="Exit function anonymousFunction" style="filled" fillcolor=gray];
}
subgraph cluster_17 {
color=blue
53 [label="Enter class InitializerLocalClass" style="filled" fillcolor=red];
54 [label="Part of class initialization"];
52 [label="Enter class InitializerLocalClass" style="filled" fillcolor=red];
subgraph cluster_18 {
color=blue
55 [label="Enter init block" style="filled" fillcolor=red];
53 [label="Enter init block" style="filled" fillcolor=red];
subgraph cluster_19 {
color=blue
56 [label="Enter block"];
57 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow];
58 [label="Throw: throw R|java/lang/Exception.Exception|()"];
59 [label="Stub" style="filled" fillcolor=gray];
60 [label="Const: Int(1)" style="filled" fillcolor=gray];
61 [label="Exit block" style="filled" fillcolor=gray];
54 [label="Enter block"];
55 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow];
56 [label="Throw: throw R|java/lang/Exception.Exception|()"];
57 [label="Stub" style="filled" fillcolor=gray];
58 [label="Const: Int(1)" style="filled" fillcolor=gray];
59 [label="Exit block" style="filled" fillcolor=gray];
}
62 [label="Exit init block" style="filled" fillcolor=gray];
60 [label="Exit init block" style="filled" fillcolor=gray];
}
63 [label="Exit class InitializerLocalClass" style="filled" fillcolor=gray];
61 [label="Exit class InitializerLocalClass" style="filled" fillcolor=gray];
}
subgraph cluster_20 {
color=blue
64 [label="Enter function <init>" style="filled" fillcolor=gray];
65 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
66 [label="Exit function <init>" style="filled" fillcolor=red];
62 [label="Enter function <init>" style="filled" fillcolor=gray];
63 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=gray];
64 [label="Exit function <init>" style="filled" fillcolor=gray];
}
subgraph cluster_21 {
color=blue
67 [label="Enter function foo" style="filled" fillcolor=red];
65 [label="Enter function foo" style="filled" fillcolor=red];
subgraph cluster_22 {
color=blue
68 [label="Enter block"];
69 [label="Const: Int(1)"];
70 [label="Const: Int(1)"];
71 [label="Function call: Int(1).R|kotlin/Int.plus|(...)" style="filled" fillcolor=yellow];
72 [label="Variable declaration: lval c: R|kotlin/Int|"];
73 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow];
74 [label="Throw: throw R|java/lang/Exception.Exception|()"];
75 [label="Stub" style="filled" fillcolor=gray];
76 [label="Exit block" style="filled" fillcolor=gray];
66 [label="Enter block"];
67 [label="Const: Int(1)"];
68 [label="Const: Int(1)"];
69 [label="Function call: Int(1).R|kotlin/Int.plus|(...)" style="filled" fillcolor=yellow];
70 [label="Variable declaration: lval c: R|kotlin/Int|"];
71 [label="Function call: R|java/lang/Exception.Exception|()" style="filled" fillcolor=yellow];
72 [label="Throw: throw R|java/lang/Exception.Exception|()"];
73 [label="Stub" style="filled" fillcolor=gray];
74 [label="Exit block" style="filled" fillcolor=gray];
}
77 [label="Exit function foo" style="filled" fillcolor=gray];
75 [label="Exit function foo" style="filled" fillcolor=gray];
}
78 [label="Postponed exit from lambda"];
79 [label="Function call: R|/run|(...)" style="filled" fillcolor=yellow];
80 [label="Exit property" style="filled" fillcolor=red];
76 [label="Postponed exit from lambda"];
77 [label="Function call: R|/run|(...)" style="filled" fillcolor=yellow];
78 [label="Exit property" style="filled" fillcolor=red];
}
42 -> {43};
43 -> {44 78 79};
43 -> {44} [style=dashed];
41 -> {42};
42 -> {43 76 77};
42 -> {43} [style=dashed];
43 -> {44};
44 -> {45};
45 -> {46};
46 -> {47 67};
46 -> {67} [style=dashed];
47 -> {48 53};
47 -> {53} [style=dashed];
48 -> {49};
45 -> {46 65};
45 -> {65} [style=dashed];
46 -> {47 52};
46 -> {52} [style=dashed];
47 -> {48};
48 -> {49} [style=dotted];
49 -> {50} [style=dotted];
50 -> {51} [style=dotted];
51 -> {52} [style=dotted];
52 -> {78} [style=dotted];
53 -> {54} [color=green];
53 -> {55 64} [color=red];
54 -> {55} [color=green];
54 -> {63} [style=dotted];
54 -> {55} [style=dashed];
51 -> {76} [style=dotted];
52 -> {53};
52 -> {62} [color=red];
52 -> {61} [style=dotted];
52 -> {53} [style=dashed];
53 -> {54};
54 -> {55};
55 -> {56};
56 -> {57};
57 -> {58};
56 -> {57} [style=dotted];
57 -> {58} [style=dotted];
58 -> {59} [style=dotted];
59 -> {60} [style=dotted];
60 -> {61} [style=dotted];
61 -> {62} [style=dotted];
61 -> {62} [style=dashed];
62 -> {63} [style=dotted];
63 -> {64} [style=dotted];
63 -> {64} [style=dashed];
64 -> {65};
65 -> {66};
66 -> {67};
67 -> {68};
68 -> {69};
69 -> {70};
70 -> {71};
71 -> {72};
72 -> {73};
73 -> {74};
72 -> {73} [style=dotted];
73 -> {74} [style=dotted];
74 -> {75} [style=dotted];
75 -> {76} [style=dotted];
76 -> {77} [style=dotted];
78 -> {79};
78 -> {43} [color=green style=dashed];
79 -> {80};
76 -> {77};
76 -> {42} [color=green style=dashed];
77 -> {78};
subgraph cluster_23 {
color=red
81 [label="Enter property" style="filled" fillcolor=red];
79 [label="Enter property" style="filled" fillcolor=red];
subgraph cluster_24 {
color=blue
82 [label="Try expression enter"];
80 [label="Try expression enter"];
subgraph cluster_25 {
color=blue
83 [label="Try main block enter"];
81 [label="Try main block enter"];
subgraph cluster_26 {
color=blue
84 [label="Enter block"];
85 [label="Const: Int(1)"];
86 [label="Exit block"];
82 [label="Enter block"];
83 [label="Const: Int(1)"];
84 [label="Exit block"];
}
87 [label="Try main block exit"];
85 [label="Try main block exit"];
}
subgraph cluster_27 {
color=blue
88 [label="Catch enter"];
89 [label="Variable declaration: e: R|kotlin/Exception|"];
86 [label="Catch enter"];
87 [label="Variable declaration: e: R|kotlin/Exception|"];
subgraph cluster_28 {
color=blue
90 [label="Enter block"];
91 [label="Const: Int(2)"];
92 [label="Exit block"];
88 [label="Enter block"];
89 [label="Const: Int(2)"];
90 [label="Exit block"];
}
93 [label="Catch exit"];
91 [label="Catch exit"];
}
subgraph cluster_29 {
color=blue
94 [label="Enter finally"];
92 [label="Enter finally"];
subgraph cluster_30 {
color=blue
95 [label="Enter block"];
96 [label="Const: Int(0)"];
97 [label="Exit block"];
93 [label="Enter block"];
94 [label="Const: Int(0)"];
95 [label="Exit block"];
}
98 [label="Exit finally"];
96 [label="Exit finally"];
}
99 [label="Try expression exit"];
97 [label="Try expression exit"];
}
100 [label="Exit property" style="filled" fillcolor=red];
98 [label="Exit property" style="filled" fillcolor=red];
}
79 -> {80};
80 -> {81 86};
80 -> {92} [label="onUncaughtException"];
81 -> {82};
82 -> {83 88};
82 -> {94} [label="onUncaughtException"];
82 -> {83};
83 -> {84};
84 -> {85};
85 -> {86};
85 -> {86 92};
86 -> {87};
87 -> {88 94};
86 -> {92} [label="onUncaughtException"];
87 -> {88};
88 -> {89};
88 -> {94} [label="onUncaughtException"];
89 -> {90};
90 -> {91};
91 -> {92};
@@ -308,7 +306,5 @@ digraph propertiesAndInitBlocks_kt {
95 -> {96};
96 -> {97};
97 -> {98};
98 -> {99};
99 -> {100};
}