[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
@@ -30,89 +30,127 @@ digraph complexPostponedCfg_kt {
subgraph cluster_4 {
color=blue
7 [label="Enter block"];
8 [label="Access variable R|<local>/statements|"];
9 [label="Function call: R|<local>/statements|.R|kotlin/collections/last|<R|FirBase|>()" style="filled" fillcolor=yellow];
10 [label="Type operator: (R|<local>/statements|.R|kotlin/collections/last|<R|FirBase|>() as R|FirFunctionCall|)"];
11 [label="Postponed enter to lambda"];
subgraph cluster_5 {
color=blue
12 [label="Enter function <anonymous>" style="filled" fillcolor=red];
8 [label="Function call arguments enter"];
subgraph cluster_6 {
color=blue
13 [label="Enter block"];
14 [label="Postponed enter to lambda"];
subgraph cluster_7 {
color=blue
15 [label="Enter function <anonymous>" style="filled" fillcolor=red];
subgraph cluster_8 {
color=blue
16 [label="Enter block"];
17 [label="Access variable this@R|special/anonymous|"];
18 [label="Function call: this@R|special/anonymous|.R|SubstitutionOverride<kotlin/collections/MutableList.add: R|kotlin/Boolean|>|(...)" style="filled" fillcolor=yellow];
19 [label="Access variable R|<local>/arguments|"];
20 [label="Function call: R|<local>/arguments|.R|kotlin/collections/last|<R|FirBase|>()" style="filled" fillcolor=yellow];
21 [label="Type operator: (R|<local>/arguments|.R|kotlin/collections/last|<R|FirBase|>() as R|FirFunctionCall|)"];
22 [label="Postponed enter to lambda"];
subgraph cluster_9 {
color=blue
23 [label="Enter function <anonymous>" style="filled" fillcolor=red];
subgraph cluster_10 {
color=blue
24 [label="Enter block"];
25 [label="Access variable this@R|special/anonymous|"];
26 [label="Function call: this@R|special/anonymous|.R|SubstitutionOverride<kotlin/collections/MutableList.add: R|kotlin/Boolean|>|(...)" style="filled" fillcolor=yellow];
27 [label="Access variable R|<local>/explicitReceiver|"];
28 [label="Type operator: (R|<local>/explicitReceiver| as R|FirFunctionCall|)"];
29 [label="Function call: this@R|special/anonymous|.R|SubstitutionOverride<kotlin/collections/MutableList.add: R|kotlin/Boolean|>|(...)" style="filled" fillcolor=yellow];
30 [label="Exit block"];
}
31 [label="Exit function <anonymous>" style="filled" fillcolor=red];
}
32 [label="Postponed exit from lambda"];
33 [label="Function call: R|kotlin/with|<R|FirFunctionCall|, R|kotlin/Unit|>(...)" style="filled" fillcolor=yellow];
34 [label="Exit block"];
}
35 [label="Exit function <anonymous>" style="filled" fillcolor=red];
}
36 [label="Postponed exit from lambda"];
37 [label="Function call: R|kotlin/collections/buildList|<R|FirFunctionCall|>(...)" style="filled" fillcolor=yellow];
38 [label="Exit block"];
9 [label="Function call arguments enter"];
10 [label="Access variable R|<local>/statements|"];
11 [label="Function call arguments exit"];
}
39 [label="Exit function <anonymous>" style="filled" fillcolor=red];
12 [label="Function call: R|<local>/statements|.R|kotlin/collections/last|<R|FirBase|>()" style="filled" fillcolor=yellow];
13 [label="Type operator: (R|<local>/statements|.R|kotlin/collections/last|<R|FirBase|>() as R|FirFunctionCall|)"];
14 [label="Postponed enter to lambda"];
subgraph cluster_7 {
color=blue
15 [label="Enter function <anonymous>" style="filled" fillcolor=red];
subgraph cluster_8 {
color=blue
16 [label="Enter block"];
subgraph cluster_9 {
color=blue
17 [label="Function call arguments enter"];
18 [label="Postponed enter to lambda"];
subgraph cluster_10 {
color=blue
19 [label="Enter function <anonymous>" style="filled" fillcolor=red];
subgraph cluster_11 {
color=blue
20 [label="Enter block"];
subgraph cluster_12 {
color=blue
21 [label="Function call arguments enter"];
22 [label="Access variable this@R|special/anonymous|"];
23 [label="Function call arguments exit"];
}
24 [label="Function call: this@R|special/anonymous|.R|SubstitutionOverride<kotlin/collections/MutableList.add: R|kotlin/Boolean|>|(...)" style="filled" fillcolor=yellow];
subgraph cluster_13 {
color=blue
25 [label="Function call arguments enter"];
subgraph cluster_14 {
color=blue
26 [label="Function call arguments enter"];
27 [label="Access variable R|<local>/arguments|"];
28 [label="Function call arguments exit"];
}
29 [label="Function call: R|<local>/arguments|.R|kotlin/collections/last|<R|FirBase|>()" style="filled" fillcolor=yellow];
30 [label="Type operator: (R|<local>/arguments|.R|kotlin/collections/last|<R|FirBase|>() as R|FirFunctionCall|)"];
31 [label="Postponed enter to lambda"];
subgraph cluster_15 {
color=blue
32 [label="Enter function <anonymous>" style="filled" fillcolor=red];
subgraph cluster_16 {
color=blue
33 [label="Enter block"];
subgraph cluster_17 {
color=blue
34 [label="Function call arguments enter"];
35 [label="Access variable this@R|special/anonymous|"];
36 [label="Function call arguments exit"];
}
37 [label="Function call: this@R|special/anonymous|.R|SubstitutionOverride<kotlin/collections/MutableList.add: R|kotlin/Boolean|>|(...)" style="filled" fillcolor=yellow];
subgraph cluster_18 {
color=blue
38 [label="Function call arguments enter"];
39 [label="Access variable R|<local>/explicitReceiver|"];
40 [label="Type operator: (R|<local>/explicitReceiver| as R|FirFunctionCall|)"];
41 [label="Function call arguments exit"];
}
42 [label="Function call: this@R|special/anonymous|.R|SubstitutionOverride<kotlin/collections/MutableList.add: R|kotlin/Boolean|>|(...)" style="filled" fillcolor=yellow];
43 [label="Exit block"];
}
44 [label="Exit function <anonymous>" style="filled" fillcolor=red];
}
45 [label="Function call arguments exit"];
}
46 [label="Postponed exit from lambda"];
47 [label="Function call: R|kotlin/with|<R|FirFunctionCall|, R|kotlin/Unit|>(...)" style="filled" fillcolor=yellow];
48 [label="Exit block"];
}
49 [label="Exit function <anonymous>" style="filled" fillcolor=red];
}
50 [label="Function call arguments exit"];
}
51 [label="Postponed exit from lambda"];
52 [label="Function call: R|kotlin/collections/buildList|<R|FirFunctionCall|>(...)" style="filled" fillcolor=yellow];
53 [label="Exit block"];
}
54 [label="Exit function <anonymous>" style="filled" fillcolor=red];
}
55 [label="Function call arguments exit"];
}
40 [label="Postponed exit from lambda"];
41 [label="Function call: R|kotlin/with|<R|FirFunctionCall|, R|kotlin/collections/List<FirFunctionCall>|>(...)" style="filled" fillcolor=yellow];
42 [label="Variable declaration: lval firstCalls: R|kotlin/collections/List<FirFunctionCall>|"];
43 [label="Access variable R|<local>/firstCalls|"];
44 [label="Jump: ^foo R|<local>/firstCalls|"];
45 [label="Stub" style="filled" fillcolor=gray];
46 [label="Exit block" style="filled" fillcolor=gray];
56 [label="Postponed exit from lambda"];
57 [label="Function call: R|kotlin/with|<R|FirFunctionCall|, R|kotlin/collections/List<FirFunctionCall>|>(...)" style="filled" fillcolor=yellow];
58 [label="Variable declaration: lval firstCalls: R|kotlin/collections/List<FirFunctionCall>|"];
59 [label="Access variable R|<local>/firstCalls|"];
60 [label="Jump: ^foo R|<local>/firstCalls|"];
61 [label="Stub" style="filled" fillcolor=gray];
62 [label="Exit block" style="filled" fillcolor=gray];
}
47 [label="Exit function foo" style="filled" fillcolor=red];
63 [label="Exit function foo" style="filled" fillcolor=red];
}
6 -> {7};
7 -> {8};
8 -> {9};
9 -> {10};
10 -> {11};
11 -> {12 41};
11 -> {40} [style=dotted];
11 -> {12} [style=dashed];
11 -> {12};
12 -> {13};
13 -> {14};
14 -> {15 37};
14 -> {36} [style=dotted];
14 -> {15 55};
14 -> {56} [style=dotted];
14 -> {15} [style=dashed];
15 -> {16};
16 -> {17};
17 -> {18};
18 -> {19};
18 -> {19 50};
18 -> {51} [style=dotted];
18 -> {19} [style=dashed];
19 -> {20};
20 -> {21};
21 -> {22};
22 -> {23 33};
22 -> {32} [style=dotted];
22 -> {23} [style=dashed];
22 -> {23};
23 -> {24};
24 -> {25};
25 -> {26};
@@ -121,13 +159,14 @@ digraph complexPostponedCfg_kt {
28 -> {29};
29 -> {30};
30 -> {31};
31 -> {32};
31 -> {32 45};
31 -> {46} [style=dotted];
31 -> {32} [style=dashed];
32 -> {33};
33 -> {34};
34 -> {35};
35 -> {36};
36 -> {37} [color=green];
36 -> {41} [color=red];
36 -> {37};
37 -> {38};
38 -> {39};
39 -> {40};
@@ -135,9 +174,26 @@ digraph complexPostponedCfg_kt {
41 -> {42};
42 -> {43};
43 -> {44};
44 -> {47};
44 -> {45} [style=dotted];
45 -> {46} [style=dotted];
46 -> {47} [style=dotted];
44 -> {46};
45 -> {47};
46 -> {47};
47 -> {48};
48 -> {49};
49 -> {51};
50 -> {52};
51 -> {52} [color=green];
51 -> {57} [color=red];
52 -> {53};
53 -> {54};
54 -> {56};
55 -> {57};
56 -> {57};
57 -> {58};
58 -> {59};
59 -> {60};
60 -> {63};
60 -> {61} [style=dotted];
61 -> {62} [style=dotted];
62 -> {63} [style=dotted];
}