[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
@@ -91,38 +91,43 @@ digraph functionCallBound_kt {
26 [label="Access variable R|<local>/base|"];
27 [label="Type operator: (R|<local>/base| as? R|Sub|)"];
28 [label="Enter safe call"];
29 [label="Function call: $subj$.R|/isOk|()" style="filled" fillcolor=yellow];
30 [label="Exit safe call"];
31 [label="Const: Boolean(true)"];
32 [label="Equality operator =="];
33 [label="Exit when branch condition"];
}
subgraph cluster_12 {
color=blue
34 [label="Enter when branch condition else"];
subgraph cluster_12 {
color=blue
29 [label="Function call arguments enter"];
30 [label="Function call arguments exit"];
}
31 [label="Function call: $subj$.R|/isOk|()" style="filled" fillcolor=yellow];
32 [label="Exit safe call"];
33 [label="Const: Boolean(true)"];
34 [label="Equality operator =="];
35 [label="Exit when branch condition"];
}
36 [label="Enter when branch result"];
subgraph cluster_13 {
color=blue
37 [label="Enter block"];
38 [label="Access variable R|<local>/base|"];
39 [label="Exit block"];
36 [label="Enter when branch condition else"];
37 [label="Exit when branch condition"];
}
40 [label="Exit when branch result"];
41 [label="Enter when branch result"];
38 [label="Enter when branch result"];
subgraph cluster_14 {
color=blue
42 [label="Enter block"];
43 [label="Access variable R|<local>/base|"];
44 [label="Smart cast: R|<local>/base|"];
45 [label="Access variable R|/Sub.data|"];
46 [label="Exit block"];
39 [label="Enter block"];
40 [label="Access variable R|<local>/base|"];
41 [label="Exit block"];
}
47 [label="Exit when branch result"];
48 [label="Exit when"];
42 [label="Exit when branch result"];
43 [label="Enter when branch result"];
subgraph cluster_15 {
color=blue
44 [label="Enter block"];
45 [label="Access variable R|<local>/base|"];
46 [label="Smart cast: R|<local>/base|"];
47 [label="Access variable R|/Sub.data|"];
48 [label="Exit block"];
}
49 [label="Exit when branch result"];
50 [label="Exit when"];
}
49 [label="Jump: ^check when () {
51 [label="Jump: ^check when () {
==((R|<local>/base| as? R|Sub|)?.{ $subj$.R|/isOk|() }, Boolean(true)) -> {
R|<local>/base|.R|/Sub.data|
}
@@ -131,41 +136,43 @@ digraph functionCallBound_kt {
}
}
"];
50 [label="Stub" style="filled" fillcolor=gray];
51 [label="Exit block" style="filled" fillcolor=gray];
52 [label="Stub" style="filled" fillcolor=gray];
53 [label="Exit block" style="filled" fillcolor=gray];
}
52 [label="Exit function check" style="filled" fillcolor=red];
54 [label="Exit function check" style="filled" fillcolor=red];
}
22 -> {23};
23 -> {24};
24 -> {25};
25 -> {26};
26 -> {27};
27 -> {28 30};
27 -> {28 32};
28 -> {29};
29 -> {30};
30 -> {31};
31 -> {32};
32 -> {33};
33 -> {34 41};
33 -> {34};
34 -> {35};
35 -> {36};
35 -> {36 43};
36 -> {37};
37 -> {38};
38 -> {39};
39 -> {40};
40 -> {48};
40 -> {41};
41 -> {42};
42 -> {43};
42 -> {50};
43 -> {44};
44 -> {45};
45 -> {46};
46 -> {47};
47 -> {48};
48 -> {49};
49 -> {52};
49 -> {50} [style=dotted];
50 -> {51} [style=dotted];
49 -> {50};
50 -> {51};
51 -> {54};
51 -> {52} [style=dotted];
52 -> {53} [style=dotted];
53 -> {54} [style=dotted];
}