[FIR] Rewind DFA after call arguments for correct receiver smartcasting

^KT-63709 Fixed
This commit is contained in:
Brian Norman
2023-11-27 13:48:09 -06:00
committed by Space Team
parent 38d5e56530
commit 0881910a1b
128 changed files with 22457 additions and 16148 deletions
@@ -37,62 +37,83 @@ digraph smartCastInInit_kt {
subgraph cluster_5 {
color=blue
9 [label="Enter block"];
10 [label="Function call: R|kotlin/TODO|()" style="filled" fillcolor=yellow];
11 [label="Stub" style="filled" fillcolor=gray];
12 [label="Jump: ^s R|kotlin/TODO|()" style="filled" fillcolor=gray];
subgraph cluster_6 {
color=blue
10 [label="Function call arguments enter"];
11 [label="Function call arguments exit"];
}
12 [label="Function call: R|kotlin/TODO|()" style="filled" fillcolor=yellow];
13 [label="Stub" style="filled" fillcolor=gray];
14 [label="Exit block" style="filled" fillcolor=gray];
14 [label="Jump: ^s R|kotlin/TODO|()" style="filled" fillcolor=gray];
15 [label="Stub" style="filled" fillcolor=gray];
16 [label="Exit block" style="filled" fillcolor=gray];
}
15 [label="Exit function s" style="filled" fillcolor=gray];
17 [label="Exit function s" style="filled" fillcolor=gray];
}
8 -> {9};
9 -> {10};
10 -> {11} [style=dotted];
11 -> {12} [style=dotted];
12 -> {13 15} [style=dotted];
10 -> {11};
11 -> {12};
12 -> {13} [style=dotted];
13 -> {14} [style=dotted];
14 -> {15} [style=dotted];
14 -> {15 17} [style=dotted];
15 -> {16} [style=dotted];
16 -> {17} [style=dotted];
subgraph cluster_6 {
subgraph cluster_7 {
color=red
16 [label="Enter class Main" style="filled" fillcolor=red];
subgraph cluster_7 {
18 [label="Enter class Main" style="filled" fillcolor=red];
subgraph cluster_8 {
color=blue
17 [label="Enter init block" style="filled" fillcolor=red];
subgraph cluster_8 {
19 [label="Enter init block" style="filled" fillcolor=red];
subgraph cluster_9 {
color=blue
18 [label="Enter block"];
19 [label="Function call: R|/s|()" style="filled" fillcolor=yellow];
20 [label="Assignment: R|/Main.x|"];
21 [label="Access variable R|/Main.x|"];
22 [label="Smart cast: this@R|/Main|.R|/Main.x|"];
23 [label="Function call: this@R|/Main|.R|/Main.x|.R|/S.foo|()" style="filled" fillcolor=yellow];
24 [label="Exit block"];
20 [label="Enter block"];
subgraph cluster_10 {
color=blue
21 [label="Function call arguments enter"];
22 [label="Function call arguments exit"];
}
23 [label="Function call: R|/s|()" style="filled" fillcolor=yellow];
24 [label="Assignment: R|/Main.x|"];
subgraph cluster_11 {
color=blue
25 [label="Function call arguments enter"];
26 [label="Access variable R|/Main.x|"];
27 [label="Smart cast: this@R|/Main|.R|/Main.x|"];
28 [label="Function call arguments exit"];
}
29 [label="Function call: this@R|/Main|.R|/Main.x|.R|/S.foo|()" style="filled" fillcolor=yellow];
30 [label="Exit block"];
}
25 [label="Exit init block" style="filled" fillcolor=red];
31 [label="Exit init block" style="filled" fillcolor=red];
}
subgraph cluster_9 {
subgraph cluster_12 {
color=blue
26 [label="Enter function <init>" style="filled" fillcolor=red];
27 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
28 [label="Exit function <init>" style="filled" fillcolor=red];
32 [label="Enter function <init>" style="filled" fillcolor=red];
33 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
34 [label="Exit function <init>" style="filled" fillcolor=red];
}
29 [label="Exit class Main" style="filled" fillcolor=red];
35 [label="Exit class Main" style="filled" fillcolor=red];
}
16 -> {17} [color=green];
16 -> {29} [style=dotted];
16 -> {17 26} [style=dashed];
17 -> {18};
18 -> {19};
18 -> {19} [color=green];
18 -> {35} [style=dotted];
18 -> {19 32} [style=dashed];
19 -> {20};
20 -> {21};
21 -> {22};
22 -> {23};
23 -> {24};
24 -> {25};
25 -> {26} [color=green];
25 -> {26};
26 -> {27};
27 -> {28};
28 -> {29} [color=green];
28 -> {29};
29 -> {30};
30 -> {31};
31 -> {32} [color=green];
32 -> {33};
33 -> {34};
34 -> {35} [color=green];
}