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
@@ -339,86 +339,85 @@ digraph boundSmartcasts_kt {
subgraph cluster_27 {
color=red
125 [label="Enter class D" style="filled" fillcolor=red];
126 [label="Part of class initialization"];
subgraph cluster_28 {
color=blue
127 [label="Enter property" style="filled" fillcolor=red];
128 [label="Access variable R|<local>/any|"];
129 [label="Exit property" 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];
}
130 [label="Exit class D" style="filled" fillcolor=red];
129 [label="Exit class D" style="filled" fillcolor=red];
}
subgraph cluster_29 {
color=blue
131 [label="Enter function <init>" style="filled" fillcolor=red];
132 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
133 [label="Exit function <init>" style="filled" fillcolor=red];
130 [label="Enter function <init>" style="filled" fillcolor=red];
131 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
132 [label="Exit function <init>" style="filled" fillcolor=red];
}
125 -> {126} [color=green];
126 -> {127} [color=green];
126 -> {130} [style=dotted];
126 -> {127} [style=dashed];
125 -> {129} [style=dotted];
125 -> {126} [style=dashed];
126 -> {127};
127 -> {128};
128 -> {129};
128 -> {129} [color=green];
129 -> {130} [color=green];
130 -> {131} [color=green];
130 -> {131} [style=dashed];
129 -> {130} [style=dashed];
130 -> {131};
131 -> {132};
132 -> {133};
subgraph cluster_30 {
color=red
134 [label="Enter function baz" style="filled" fillcolor=red];
133 [label="Enter function baz" style="filled" fillcolor=red];
subgraph cluster_31 {
color=blue
135 [label="Enter block"];
136 [label="Exit block"];
134 [label="Enter block"];
135 [label="Exit block"];
}
137 [label="Exit function baz" style="filled" fillcolor=red];
136 [label="Exit function baz" style="filled" fillcolor=red];
}
133 -> {134};
134 -> {135};
135 -> {136};
136 -> {137};
subgraph cluster_32 {
color=red
138 [label="Enter function test_5" style="filled" fillcolor=red];
137 [label="Enter function test_5" style="filled" fillcolor=red];
subgraph cluster_33 {
color=blue
139 [label="Enter block"];
140 [label="Access variable R|<local>/d|"];
141 [label="Access variable R|/D.any|"];
142 [label="Exit lhs of ?:"];
143 [label="Enter rhs of ?:"];
144 [label="Jump: ^test_5 Unit"];
145 [label="Stub" style="filled" fillcolor=gray];
146 [label="Lhs of ?: is not null"];
147 [label="Exit ?:"];
148 [label="Variable declaration: lval a: R|kotlin/Any|"];
149 [label="Access variable R|<local>/a|"];
150 [label="Function call: R|<local>/a|.R|/baz|()" style="filled" fillcolor=yellow];
151 [label="Access variable R|<local>/d|"];
152 [label="Access variable R|/D.any|"];
153 [label="Smart cast: R|<local>/d|.R|/D.any|"];
154 [label="Function call: R|<local>/d|.R|/D.any|.R|/baz|()" style="filled" fillcolor=yellow];
155 [label="Access variable R|<local>/a|"];
156 [label="Type operator: (R|<local>/a| as R|A|)"];
157 [label="Access variable R|<local>/a|"];
158 [label="Smart cast: R|<local>/a|"];
159 [label="Function call: R|<local>/a|.R|/A.foo|()" style="filled" fillcolor=yellow];
160 [label="Exit block"];
138 [label="Enter block"];
139 [label="Access variable R|<local>/d|"];
140 [label="Access variable R|/D.any|"];
141 [label="Exit lhs of ?:"];
142 [label="Enter rhs of ?:"];
143 [label="Jump: ^test_5 Unit"];
144 [label="Stub" style="filled" fillcolor=gray];
145 [label="Lhs of ?: is not null"];
146 [label="Exit ?:"];
147 [label="Variable declaration: lval a: R|kotlin/Any|"];
148 [label="Access variable R|<local>/a|"];
149 [label="Function call: R|<local>/a|.R|/baz|()" style="filled" fillcolor=yellow];
150 [label="Access variable R|<local>/d|"];
151 [label="Access variable R|/D.any|"];
152 [label="Smart cast: R|<local>/d|.R|/D.any|"];
153 [label="Function call: R|<local>/d|.R|/D.any|.R|/baz|()" style="filled" fillcolor=yellow];
154 [label="Access variable R|<local>/a|"];
155 [label="Type operator: (R|<local>/a| as R|A|)"];
156 [label="Access variable R|<local>/a|"];
157 [label="Smart cast: R|<local>/a|"];
158 [label="Function call: R|<local>/a|.R|/A.foo|()" style="filled" fillcolor=yellow];
159 [label="Exit block"];
}
161 [label="Exit function test_5" style="filled" fillcolor=red];
160 [label="Exit function test_5" style="filled" fillcolor=red];
}
137 -> {138};
138 -> {139};
139 -> {140};
140 -> {141};
141 -> {142};
142 -> {143 146};
143 -> {144};
144 -> {161};
144 -> {145} [style=dotted];
145 -> {147} [style=dotted];
141 -> {142 145};
142 -> {143};
143 -> {160};
143 -> {144} [style=dotted];
144 -> {146} [style=dotted];
145 -> {146};
146 -> {147};
147 -> {148};
148 -> {149};
@@ -433,34 +432,34 @@ digraph boundSmartcasts_kt {
157 -> {158};
158 -> {159};
159 -> {160};
160 -> {161};
subgraph cluster_34 {
color=red
162 [label="Enter function test_6" style="filled" fillcolor=red];
161 [label="Enter function test_6" style="filled" fillcolor=red];
subgraph cluster_35 {
color=blue
163 [label="Enter block"];
164 [label="Access variable R|<local>/d1|"];
165 [label="Access variable R|/D.any|"];
166 [label="Variable declaration: lval a: R|kotlin/Any?|"];
167 [label="Access variable R|<local>/a|"];
168 [label="Type operator: (R|<local>/a| as R|A|)"];
169 [label="Access variable R|<local>/a|"];
170 [label="Smart cast: R|<local>/a|"];
171 [label="Function call: R|<local>/a|.R|/A.foo|()" style="filled" fillcolor=yellow];
172 [label="Access variable R|<local>/d1|"];
173 [label="Access variable R|/D.any|"];
174 [label="Smart cast: R|<local>/d1|.R|/D.any|"];
175 [label="Function call: R|<local>/d1|.R|/D.any|.R|/A.foo|()" style="filled" fillcolor=yellow];
176 [label="Access variable R|<local>/d1|"];
177 [label="Access variable R|/D.any|"];
178 [label="Smart cast: R|<local>/d1|.R|/D.any|"];
179 [label="Function call: R|<local>/d1|.R|/D.any|.R|/baz|()" style="filled" fillcolor=yellow];
180 [label="Exit block"];
162 [label="Enter block"];
163 [label="Access variable R|<local>/d1|"];
164 [label="Access variable R|/D.any|"];
165 [label="Variable declaration: lval a: R|kotlin/Any?|"];
166 [label="Access variable R|<local>/a|"];
167 [label="Type operator: (R|<local>/a| as R|A|)"];
168 [label="Access variable R|<local>/a|"];
169 [label="Smart cast: R|<local>/a|"];
170 [label="Function call: R|<local>/a|.R|/A.foo|()" style="filled" fillcolor=yellow];
171 [label="Access variable R|<local>/d1|"];
172 [label="Access variable R|/D.any|"];
173 [label="Smart cast: R|<local>/d1|.R|/D.any|"];
174 [label="Function call: R|<local>/d1|.R|/D.any|.R|/A.foo|()" style="filled" fillcolor=yellow];
175 [label="Access variable R|<local>/d1|"];
176 [label="Access variable R|/D.any|"];
177 [label="Smart cast: R|<local>/d1|.R|/D.any|"];
178 [label="Function call: R|<local>/d1|.R|/D.any|.R|/baz|()" style="filled" fillcolor=yellow];
179 [label="Exit block"];
}
181 [label="Exit function test_6" style="filled" fillcolor=red];
180 [label="Exit function test_6" style="filled" fillcolor=red];
}
161 -> {162};
162 -> {163};
163 -> {164};
164 -> {165};
@@ -479,46 +478,46 @@ digraph boundSmartcasts_kt {
177 -> {178};
178 -> {179};
179 -> {180};
180 -> {181};
subgraph cluster_36 {
color=red
182 [label="Enter function test_7" style="filled" fillcolor=red];
181 [label="Enter function test_7" style="filled" fillcolor=red];
subgraph cluster_37 {
color=blue
183 [label="Enter block"];
184 [label="Access variable R|<local>/d1|"];
185 [label="Enter safe call"];
186 [label="Access variable R|/D.any|"];
187 [label="Exit safe call"];
188 [label="Variable declaration: lval a: R|kotlin/Any?|"];
189 [label="Access variable R|<local>/d2|"];
190 [label="Enter safe call"];
191 [label="Access variable R|/D.any|"];
192 [label="Exit safe call"];
193 [label="Variable declaration: lval b: R|kotlin/Any?|"];
194 [label="Access variable R|<local>/a|"];
195 [label="Type operator: (R|<local>/a| as R|A|)"];
196 [label="Access variable R|<local>/a|"];
197 [label="Smart cast: R|<local>/a|"];
198 [label="Function call: R|<local>/a|.R|/A.foo|()" style="filled" fillcolor=yellow];
199 [label="Access variable R|<local>/b|"];
200 [label="Type operator: (R|<local>/b| as R|B|)"];
201 [label="Access variable R|<local>/b|"];
202 [label="Smart cast: R|<local>/b|"];
203 [label="Function call: R|<local>/b|.R|/B.bar|()" style="filled" fillcolor=yellow];
204 [label="Exit block"];
182 [label="Enter block"];
183 [label="Access variable R|<local>/d1|"];
184 [label="Enter safe call"];
185 [label="Access variable R|/D.any|"];
186 [label="Exit safe call"];
187 [label="Variable declaration: lval a: R|kotlin/Any?|"];
188 [label="Access variable R|<local>/d2|"];
189 [label="Enter safe call"];
190 [label="Access variable R|/D.any|"];
191 [label="Exit safe call"];
192 [label="Variable declaration: lval b: R|kotlin/Any?|"];
193 [label="Access variable R|<local>/a|"];
194 [label="Type operator: (R|<local>/a| as R|A|)"];
195 [label="Access variable R|<local>/a|"];
196 [label="Smart cast: R|<local>/a|"];
197 [label="Function call: R|<local>/a|.R|/A.foo|()" style="filled" fillcolor=yellow];
198 [label="Access variable R|<local>/b|"];
199 [label="Type operator: (R|<local>/b| as R|B|)"];
200 [label="Access variable R|<local>/b|"];
201 [label="Smart cast: R|<local>/b|"];
202 [label="Function call: R|<local>/b|.R|/B.bar|()" style="filled" fillcolor=yellow];
203 [label="Exit block"];
}
205 [label="Exit function test_7" style="filled" fillcolor=red];
204 [label="Exit function test_7" style="filled" fillcolor=red];
}
181 -> {182};
182 -> {183};
183 -> {184};
184 -> {185 187};
183 -> {184 186};
184 -> {185};
185 -> {186};
186 -> {187};
187 -> {188};
188 -> {189};
189 -> {190 192};
188 -> {189 191};
189 -> {190};
190 -> {191};
191 -> {192};
192 -> {193};
@@ -533,6 +532,5 @@ digraph boundSmartcasts_kt {
201 -> {202};
202 -> {203};
203 -> {204};
204 -> {205};
}