[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
@@ -57,33 +57,43 @@ digraph smartcastFromArgument_kt {
subgraph cluster_8 {
color=blue
16 [label="Enter when branch condition "];
17 [label="Access variable R|<local>/a|"];
18 [label="Type operator: (R|<local>/a| as? R|A|)"];
19 [label="Exit lhs of ?:"];
20 [label="Enter rhs of ?:"];
21 [label="Jump: ^test Unit"];
22 [label="Stub" style="filled" fillcolor=gray];
23 [label="Lhs of ?: is not null"];
24 [label="Exit ?:"];
25 [label="Function call: R|/takeA|(...)" style="filled" fillcolor=yellow];
26 [label="Exit when branch condition"];
subgraph cluster_9 {
color=blue
17 [label="Function call arguments enter"];
18 [label="Access variable R|<local>/a|"];
19 [label="Type operator: (R|<local>/a| as? R|A|)"];
20 [label="Exit lhs of ?:"];
21 [label="Enter rhs of ?:"];
22 [label="Jump: ^test Unit"];
23 [label="Stub" style="filled" fillcolor=gray];
24 [label="Lhs of ?: is not null"];
25 [label="Exit ?:"];
26 [label="Function call arguments exit"];
}
27 [label="Function call: R|/takeA|(...)" style="filled" fillcolor=yellow];
28 [label="Exit when branch condition"];
}
27 [label="Synthetic else branch"];
28 [label="Enter when branch result"];
subgraph cluster_9 {
29 [label="Synthetic else branch"];
30 [label="Enter when branch result"];
subgraph cluster_10 {
color=blue
29 [label="Enter block"];
30 [label="Access variable R|<local>/a|"];
31 [label="Smart cast: R|<local>/a|"];
32 [label="Function call: R|<local>/a|.R|/A.foo|()" style="filled" fillcolor=yellow];
33 [label="Exit block"];
31 [label="Enter block"];
subgraph cluster_11 {
color=blue
32 [label="Function call arguments enter"];
33 [label="Access variable R|<local>/a|"];
34 [label="Smart cast: R|<local>/a|"];
35 [label="Function call arguments exit"];
}
36 [label="Function call: R|<local>/a|.R|/A.foo|()" style="filled" fillcolor=yellow];
37 [label="Exit block"];
}
34 [label="Exit when branch result"];
35 [label="Exit when"];
38 [label="Exit when branch result"];
39 [label="Exit when"];
}
36 [label="Exit block"];
40 [label="Exit block"];
}
37 [label="Exit function test" style="filled" fillcolor=red];
41 [label="Exit function test" style="filled" fillcolor=red];
}
13 -> {14};
14 -> {15};
@@ -91,18 +101,18 @@ digraph smartcastFromArgument_kt {
16 -> {17};
17 -> {18};
18 -> {19};
19 -> {20 23};
20 -> {21};
21 -> {37};
21 -> {22} [style=dotted];
22 -> {24} [style=dotted];
23 -> {24};
19 -> {20};
20 -> {21 24};
21 -> {22};
22 -> {41};
22 -> {23} [style=dotted];
23 -> {25} [style=dotted];
24 -> {25};
25 -> {26};
26 -> {27 28};
27 -> {35};
28 -> {29};
29 -> {30};
26 -> {27};
27 -> {28};
28 -> {29 30};
29 -> {39};
30 -> {31};
31 -> {32};
32 -> {33};
@@ -110,5 +120,9 @@ digraph smartcastFromArgument_kt {
34 -> {35};
35 -> {36};
36 -> {37};
37 -> {38};
38 -> {39};
39 -> {40};
40 -> {41};
}