FIR. Refactor smart-cast representation in FIR tree

Make smart-casts non-transparent expression without delegation
to underlying FirQualifiedAccessExpression, as children delegation in
fir tree has unclear semantics
Remove two different kinds of tree nodes for smart-casts
This commit is contained in:
Simon Ogorodnik
2022-08-02 00:49:24 +02:00
committed by teamcity
parent bc9db58b3c
commit 513af2dfbc
154 changed files with 9573 additions and 9320 deletions
@@ -70,17 +70,18 @@ digraph delayedAssignment_kt {
26 [label="Function call: R|/A.A|()"];
27 [label="Assignment: R|<local>/a|"];
28 [label="Access variable R|<local>/a|"];
29 [label="Function call: R|<local>/a|.R|/A.foo|()"];
30 [label="Exit block"];
29 [label="Smart cast: R|<local>/a|"];
30 [label="Function call: R|<local>/a|.R|/A.foo|()"];
31 [label="Exit block"];
}
31 [label="Exit when branch result"];
32 [label="Exit when"];
32 [label="Exit when branch result"];
33 [label="Exit when"];
}
33 [label="Access variable R|<local>/a|"];
34 [label="Function call: R|<local>/a|.<Inapplicable(UNSAFE_CALL): /A.foo>#()"];
35 [label="Exit block"];
34 [label="Access variable R|<local>/a|"];
35 [label="Function call: R|<local>/a|.<Inapplicable(UNSAFE_CALL): /A.foo>#()"];
36 [label="Exit block"];
}
36 [label="Exit function test" style="filled" fillcolor=red];
37 [label="Exit function test" style="filled" fillcolor=red];
}
9 -> {10};
10 -> {11};
@@ -96,7 +97,7 @@ digraph delayedAssignment_kt {
20 -> {21};
21 -> {22};
22 -> {23};
23 -> {32};
23 -> {33};
24 -> {25};
25 -> {26};
26 -> {27};
@@ -109,5 +110,6 @@ digraph delayedAssignment_kt {
33 -> {34};
34 -> {35};
35 -> {36};
36 -> {37};
}