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
@@ -117,136 +117,132 @@ digraph smartcastToNothing_kt {
subgraph cluster_10 {
color=red
39 [label="Enter class A" style="filled" fillcolor=red];
40 [label="Part of class initialization"];
subgraph cluster_11 {
color=blue
41 [label="Enter property" style="filled" fillcolor=red];
42 [label="Const: Int(1)"];
43 [label="Exit property" 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];
}
44 [label="Part of class initialization"];
subgraph cluster_12 {
color=blue
45 [label="Enter property" style="filled" fillcolor=red];
46 [label="Const: Boolean(true)"];
47 [label="Exit property" style="filled" fillcolor=red];
43 [label="Enter property" style="filled" fillcolor=red];
44 [label="Const: Boolean(true)"];
45 [label="Exit property" style="filled" fillcolor=red];
}
48 [label="Exit class A" style="filled" fillcolor=red];
46 [label="Exit class A" style="filled" fillcolor=red];
}
subgraph cluster_13 {
color=blue
49 [label="Enter function <init>" style="filled" fillcolor=red];
50 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
51 [label="Exit function <init>" style="filled" fillcolor=red];
47 [label="Enter function <init>" style="filled" fillcolor=red];
48 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
49 [label="Exit function <init>" style="filled" fillcolor=red];
}
39 -> {40} [color=green];
40 -> {41} [color=green];
40 -> {44} [style=dotted];
40 -> {41} [style=dashed];
39 -> {46} [style=dotted];
39 -> {40 43} [style=dashed];
40 -> {41};
41 -> {42};
42 -> {43};
43 -> {44} [color=green];
44 -> {45} [color=green];
44 -> {48} [style=dotted];
44 -> {45} [style=dashed];
45 -> {46};
46 -> {47};
47 -> {48} [color=green];
48 -> {49} [color=green];
48 -> {49} [style=dashed];
49 -> {50};
50 -> {51};
42 -> {43} [color=green];
43 -> {44};
44 -> {45};
45 -> {46} [color=green];
46 -> {47} [color=green];
46 -> {47} [style=dashed];
47 -> {48};
48 -> {49};
subgraph cluster_14 {
color=red
52 [label="Enter function test_0" style="filled" fillcolor=red];
50 [label="Enter function test_0" style="filled" fillcolor=red];
subgraph cluster_15 {
color=blue
53 [label="Enter block"];
54 [label="Const: Null(null)"];
55 [label="Variable declaration: lvar s: R|A?|"];
51 [label="Enter block"];
52 [label="Const: Null(null)"];
53 [label="Variable declaration: lvar s: R|A?|"];
subgraph cluster_16 {
color=blue
56 [label="Enter block"];
57 [label="Access variable R|<local>/results|"];
58 [label="Function call: R|<local>/results|.R|SubstitutionOverride<kotlin/collections/List.iterator: R|kotlin/collections/Iterator<kotlin/Nothing>|>|()" style="filled" fillcolor=yellow];
59 [label="Variable declaration: lval <iterator>: R|kotlin/collections/Iterator<kotlin/Nothing>|"];
54 [label="Enter block"];
55 [label="Access variable R|<local>/results|"];
56 [label="Function call: R|<local>/results|.R|SubstitutionOverride<kotlin/collections/List.iterator: R|kotlin/collections/Iterator<kotlin/Nothing>|>|()" style="filled" fillcolor=yellow];
57 [label="Variable declaration: lval <iterator>: R|kotlin/collections/Iterator<kotlin/Nothing>|"];
subgraph cluster_17 {
color=blue
60 [label="Enter while loop"];
58 [label="Enter while loop"];
subgraph cluster_18 {
color=blue
61 [label="Enter loop condition"];
62 [label="Access variable R|<local>/<iterator>|"];
63 [label="Function call: R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.hasNext: R|kotlin/Boolean|>|()" style="filled" fillcolor=yellow];
64 [label="Exit loop condition"];
59 [label="Enter loop condition"];
60 [label="Access variable R|<local>/<iterator>|"];
61 [label="Function call: R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.hasNext: R|kotlin/Boolean|>|()" style="filled" fillcolor=yellow];
62 [label="Exit loop condition"];
}
subgraph cluster_19 {
color=blue
65 [label="Enter loop block"];
63 [label="Enter loop block"];
subgraph cluster_20 {
color=blue
66 [label="Enter block"];
67 [label="Access variable R|<local>/<iterator>|"];
68 [label="Function call: R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|kotlin/Nothing|>|()" style="filled" fillcolor=yellow];
69 [label="Stub" style="filled" fillcolor=gray];
70 [label="Variable declaration: lval result: R|kotlin/Nothing|" style="filled" fillcolor=gray];
71 [label="Access variable R|<local>/result|" style="filled" fillcolor=gray];
72 [label="Stub" style="filled" fillcolor=gray];
73 [label="Assignment: R|<local>/s|" style="filled" fillcolor=gray];
64 [label="Enter block"];
65 [label="Access variable R|<local>/<iterator>|"];
66 [label="Function call: R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|kotlin/Nothing|>|()" style="filled" fillcolor=yellow];
67 [label="Stub" style="filled" fillcolor=gray];
68 [label="Variable declaration: lval result: R|kotlin/Nothing|" style="filled" fillcolor=gray];
69 [label="Access variable R|<local>/result|" style="filled" fillcolor=gray];
70 [label="Stub" style="filled" fillcolor=gray];
71 [label="Assignment: R|<local>/s|" style="filled" fillcolor=gray];
subgraph cluster_21 {
color=blue
74 [label="Enter when" style="filled" fillcolor=gray];
72 [label="Enter when" style="filled" fillcolor=gray];
subgraph cluster_22 {
color=blue
75 [label="Enter when branch condition " style="filled" fillcolor=gray];
76 [label="Access variable R|<local>/result|" style="filled" fillcolor=gray];
77 [label="Stub" style="filled" fillcolor=gray];
78 [label="Access variable <Unresolved name: b>#" style="filled" fillcolor=gray];
79 [label="Exit when branch condition" style="filled" fillcolor=gray];
73 [label="Enter when branch condition " style="filled" fillcolor=gray];
74 [label="Access variable R|<local>/result|" style="filled" fillcolor=gray];
75 [label="Stub" style="filled" fillcolor=gray];
76 [label="Access variable <Unresolved name: b>#" style="filled" fillcolor=gray];
77 [label="Exit when branch condition" style="filled" fillcolor=gray];
}
80 [label="Synthetic else branch" style="filled" fillcolor=gray];
81 [label="Enter when branch result" style="filled" fillcolor=gray];
78 [label="Synthetic else branch" style="filled" fillcolor=gray];
79 [label="Enter when branch result" style="filled" fillcolor=gray];
subgraph cluster_23 {
color=blue
82 [label="Enter block" style="filled" fillcolor=gray];
83 [label="Jump: break@@@[R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.hasNext: R|kotlin/Boolean|>|()] " style="filled" fillcolor=gray];
84 [label="Stub" style="filled" fillcolor=gray];
85 [label="Exit block" style="filled" fillcolor=gray];
80 [label="Enter block" style="filled" fillcolor=gray];
81 [label="Jump: break@@@[R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.hasNext: R|kotlin/Boolean|>|()] " style="filled" fillcolor=gray];
82 [label="Stub" style="filled" fillcolor=gray];
83 [label="Exit block" style="filled" fillcolor=gray];
}
86 [label="Exit when branch result" style="filled" fillcolor=gray];
87 [label="Exit when" style="filled" fillcolor=gray];
84 [label="Exit when branch result" style="filled" fillcolor=gray];
85 [label="Exit when" style="filled" fillcolor=gray];
}
88 [label="Exit block" style="filled" fillcolor=gray];
86 [label="Exit block" style="filled" fillcolor=gray];
}
89 [label="Exit loop block" style="filled" fillcolor=gray];
87 [label="Exit loop block" style="filled" fillcolor=gray];
}
90 [label="Exit whileloop"];
88 [label="Exit whileloop"];
}
91 [label="Exit block"];
89 [label="Exit block"];
}
92 [label="Access variable R|<local>/s|"];
93 [label="Enter safe call"];
94 [label="Postponed enter to lambda"];
90 [label="Access variable R|<local>/s|"];
91 [label="Enter safe call"];
92 [label="Postponed enter to lambda"];
subgraph cluster_24 {
color=blue
95 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
93 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_25 {
color=blue
96 [label="Enter block"];
97 [label="Access variable R|<local>/it|"];
98 [label="Access variable R|/A.a|"];
99 [label="Exit block"];
94 [label="Enter block"];
95 [label="Access variable R|<local>/it|"];
96 [label="Access variable R|/A.a|"];
97 [label="Exit block"];
}
100 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
98 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
101 [label="Postponed exit from lambda"];
102 [label="Function call: $subj$.R|kotlin/let|<R|A|, R|kotlin/Int|>(...)" style="filled" fillcolor=yellow];
103 [label="Exit safe call"];
104 [label="Exit block"];
99 [label="Postponed exit from lambda"];
100 [label="Function call: $subj$.R|kotlin/let|<R|A|, R|kotlin/Int|>(...)" style="filled" fillcolor=yellow];
101 [label="Exit safe call"];
102 [label="Exit block"];
}
105 [label="Exit function test_0" style="filled" fillcolor=red];
103 [label="Exit function test_0" style="filled" fillcolor=red];
}
50 -> {51};
51 -> {52};
52 -> {53};
53 -> {54};
54 -> {55};
@@ -257,12 +253,12 @@ digraph smartcastToNothing_kt {
59 -> {60};
60 -> {61};
61 -> {62};
62 -> {63};
62 -> {63 88};
63 -> {64};
64 -> {65 90};
64 -> {65};
65 -> {66};
66 -> {67};
67 -> {68};
66 -> {67} [style=dotted];
67 -> {68} [style=dotted];
68 -> {69} [style=dotted];
69 -> {70} [style=dotted];
70 -> {71} [style=dotted];
@@ -272,26 +268,26 @@ digraph smartcastToNothing_kt {
74 -> {75} [style=dotted];
75 -> {76} [style=dotted];
76 -> {77} [style=dotted];
77 -> {78} [style=dotted];
78 -> {79} [style=dotted];
79 -> {80 81} [style=dotted];
80 -> {87} [style=dotted];
81 -> {82} [style=dotted];
77 -> {78 79} [style=dotted];
78 -> {85} [style=dotted];
79 -> {80} [style=dotted];
80 -> {81} [style=dotted];
81 -> {82 88} [style=dotted];
82 -> {83} [style=dotted];
83 -> {84 90} [style=dotted];
83 -> {84} [style=dotted];
84 -> {85} [style=dotted];
85 -> {86} [style=dotted];
86 -> {87} [style=dotted];
87 -> {88} [style=dotted];
88 -> {89} [style=dotted];
89 -> {61} [color=green style=dotted];
90 -> {91};
87 -> {59} [color=green style=dotted];
88 -> {89};
89 -> {90};
90 -> {91 101};
91 -> {92};
92 -> {93 103};
92 -> {93 100};
92 -> {99} [style=dotted];
92 -> {93} [style=dashed];
93 -> {94};
94 -> {95 102};
94 -> {101} [style=dotted];
94 -> {95} [style=dashed];
94 -> {95};
95 -> {96};
96 -> {97};
97 -> {98};
@@ -300,82 +296,82 @@ digraph smartcastToNothing_kt {
100 -> {101};
101 -> {102};
102 -> {103};
103 -> {104};
104 -> {105};
subgraph cluster_26 {
color=red
106 [label="Enter function test_1" style="filled" fillcolor=red];
104 [label="Enter function test_1" style="filled" fillcolor=red];
subgraph cluster_27 {
color=blue
107 [label="Enter block"];
105 [label="Enter block"];
subgraph cluster_28 {
color=blue
108 [label="Enter when"];
106 [label="Enter when"];
subgraph cluster_29 {
color=blue
109 [label="Enter when branch condition "];
110 [label="Access variable R|<local>/a|"];
111 [label="Type operator: (R|<local>/a| is R|kotlin/Nothing?|)"];
112 [label="Exit when branch condition"];
107 [label="Enter when branch condition "];
108 [label="Access variable R|<local>/a|"];
109 [label="Type operator: (R|<local>/a| is R|kotlin/Nothing?|)"];
110 [label="Exit when branch condition"];
}
113 [label="Synthetic else branch"];
114 [label="Enter when branch result"];
111 [label="Synthetic else branch"];
112 [label="Enter when branch result"];
subgraph cluster_30 {
color=blue
115 [label="Enter block"];
116 [label="Access variable R|<local>/a|"];
117 [label="Smart cast: R|<local>/a|"];
118 [label="Enter safe call"];
119 [label="Access variable R|kotlin/String.length|"];
120 [label="Exit safe call"];
121 [label="Variable declaration: lval b: R|kotlin/Int?|"];
122 [label="Exit block"];
113 [label="Enter block"];
114 [label="Access variable R|<local>/a|"];
115 [label="Smart cast: R|<local>/a|"];
116 [label="Enter safe call"];
117 [label="Access variable R|kotlin/String.length|"];
118 [label="Exit safe call"];
119 [label="Variable declaration: lval b: R|kotlin/Int?|"];
120 [label="Exit block"];
}
123 [label="Exit when branch result"];
124 [label="Exit when"];
121 [label="Exit when branch result"];
122 [label="Exit when"];
}
subgraph cluster_31 {
color=blue
125 [label="Enter when"];
123 [label="Enter when"];
subgraph cluster_32 {
color=blue
126 [label="Enter when branch condition "];
127 [label="Access variable R|<local>/a|"];
128 [label="Type operator: (R|<local>/a| is R|kotlin/Nothing|)"];
129 [label="Exit when branch condition"];
124 [label="Enter when branch condition "];
125 [label="Access variable R|<local>/a|"];
126 [label="Type operator: (R|<local>/a| is R|kotlin/Nothing|)"];
127 [label="Exit when branch condition"];
}
130 [label="Synthetic else branch"];
131 [label="Enter when branch result"];
128 [label="Synthetic else branch"];
129 [label="Enter when branch result"];
subgraph cluster_33 {
color=blue
132 [label="Enter block"];
133 [label="Access variable R|<local>/a|"];
134 [label="Smart cast: R|<local>/a|"];
135 [label="Stub" style="filled" fillcolor=gray];
136 [label="Access variable R|kotlin/String.length|" style="filled" fillcolor=gray];
137 [label="Variable declaration: lval b: R|kotlin/Int|" style="filled" fillcolor=gray];
138 [label="Exit block" style="filled" fillcolor=gray];
130 [label="Enter block"];
131 [label="Access variable R|<local>/a|"];
132 [label="Smart cast: R|<local>/a|"];
133 [label="Stub" style="filled" fillcolor=gray];
134 [label="Access variable R|kotlin/String.length|" style="filled" fillcolor=gray];
135 [label="Variable declaration: lval b: R|kotlin/Int|" style="filled" fillcolor=gray];
136 [label="Exit block" style="filled" fillcolor=gray];
}
139 [label="Exit when branch result" style="filled" fillcolor=gray];
140 [label="Exit when"];
137 [label="Exit when branch result" style="filled" fillcolor=gray];
138 [label="Exit when"];
}
141 [label="Exit block"];
139 [label="Exit block"];
}
142 [label="Exit function test_1" style="filled" fillcolor=red];
140 [label="Exit function test_1" style="filled" fillcolor=red];
}
104 -> {105};
105 -> {106};
106 -> {107};
107 -> {108};
108 -> {109};
109 -> {110};
110 -> {111};
111 -> {112};
112 -> {113 114};
113 -> {124};
110 -> {111 112};
111 -> {122};
112 -> {113};
113 -> {114};
114 -> {115};
115 -> {116};
115 -> {116 118};
116 -> {117};
117 -> {118 120};
117 -> {118};
118 -> {119};
119 -> {120};
120 -> {121};
@@ -385,20 +381,18 @@ digraph smartcastToNothing_kt {
124 -> {125};
125 -> {126};
126 -> {127};
127 -> {128};
128 -> {129};
129 -> {130 131};
130 -> {140};
127 -> {128 129};
128 -> {138};
129 -> {130};
130 -> {131};
131 -> {132};
132 -> {133};
133 -> {134};
132 -> {133} [style=dotted];
133 -> {134} [style=dotted];
134 -> {135} [style=dotted];
135 -> {136} [style=dotted];
136 -> {137} [style=dotted];
137 -> {138} [style=dotted];
138 -> {139} [style=dotted];
139 -> {140} [style=dotted];
140 -> {141};
141 -> {142};
138 -> {139};
139 -> {140};
}