[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
+178 -143
View File
@@ -64,199 +64,204 @@ digraph NestedInnerClass_fir_kts {
subgraph cluster_7 {
color=blue
18 [label="Enter block [4]"];
19 [label="Function call: R|/function|() [4]" style="filled" fillcolor=yellow];
20 [label="Jump: ^f R|/function|() [4]"];
21 [label="Stub [4]" style="filled" fillcolor=gray];
22 [label="Exit block [4]" style="filled" fillcolor=gray];
subgraph cluster_8 {
color=blue
19 [label="Function call arguments enter [4]"];
20 [label="Function call arguments exit [4]"];
}
21 [label="Function call: R|/function|() [4]" style="filled" fillcolor=yellow];
22 [label="Jump: ^f R|/function|() [4]"];
23 [label="Stub [4]" style="filled" fillcolor=gray];
24 [label="Exit block [4]" style="filled" fillcolor=gray];
}
23 [label="Exit function f [4]" style="filled" fillcolor=red];
25 [label="Exit function f [4]" style="filled" fillcolor=red];
}
17 -> {18};
18 -> {19};
19 -> {20};
20 -> {23};
20 -> {21} [style=dotted];
21 -> {22} [style=dotted];
20 -> {21};
21 -> {22};
22 -> {25};
22 -> {23} [style=dotted];
23 -> {24} [style=dotted];
24 -> {25} [style=dotted];
subgraph cluster_8 {
subgraph cluster_9 {
color=red
24 [label="Enter function g [4]" style="filled" fillcolor=red];
subgraph cluster_9 {
26 [label="Enter function g [4]" style="filled" fillcolor=red];
subgraph cluster_10 {
color=blue
25 [label="Enter block [4]"];
26 [label="Access variable R|/property| [4]"];
27 [label="Jump: ^g R|/property| [4]"];
28 [label="Stub [4]" style="filled" fillcolor=gray];
29 [label="Exit block [4]" style="filled" fillcolor=gray];
27 [label="Enter block [4]"];
28 [label="Access variable R|/property| [4]"];
29 [label="Jump: ^g R|/property| [4]"];
30 [label="Stub [4]" style="filled" fillcolor=gray];
31 [label="Exit block [4]" style="filled" fillcolor=gray];
}
30 [label="Exit function g [4]" style="filled" fillcolor=red];
32 [label="Exit function g [4]" style="filled" fillcolor=red];
}
24 -> {25};
25 -> {26};
26 -> {27};
27 -> {30};
27 -> {28} [style=dotted];
28 -> {29} [style=dotted];
27 -> {28};
28 -> {29};
29 -> {32};
29 -> {30} [style=dotted];
30 -> {31} [style=dotted];
31 -> {32} [style=dotted];
subgraph cluster_10 {
subgraph cluster_11 {
color=red
31 [label="Enter class Inner [3]" style="filled" fillcolor=red];
subgraph cluster_11 {
color=blue
32 [label="Enter property [4]" style="filled" fillcolor=red];
33 [label="Access variable R|/property| [4]"];
34 [label="Exit property [4]" style="filled" fillcolor=red];
}
33 [label="Enter class Inner [3]" style="filled" fillcolor=red];
subgraph cluster_12 {
color=blue
35 [label="Enter property [4]" style="filled" fillcolor=red];
36 [label="Access variable this@NestedInnerClass# [4]"];
37 [label="Access variable <Unresolved name: property># [4]"];
38 [label="Exit property [4]" style="filled" fillcolor=red];
34 [label="Enter property [4]" style="filled" fillcolor=red];
35 [label="Access variable R|/property| [4]"];
36 [label="Exit property [4]" style="filled" fillcolor=red];
}
subgraph cluster_13 {
color=blue
39 [label="Enter function <init> [4]" style="filled" fillcolor=red];
40 [label="Delegated constructor call: super<R|kotlin/Any|>() [4]" style="filled" fillcolor=yellow];
41 [label="Exit function <init> [4]" style="filled" fillcolor=red];
37 [label="Enter property [4]" style="filled" fillcolor=red];
38 [label="Access variable this@NestedInnerClass# [4]"];
39 [label="Access variable <Unresolved name: property># [4]"];
40 [label="Exit property [4]" style="filled" fillcolor=red];
}
42 [label="Exit class Inner [3]" style="filled" fillcolor=red];
subgraph cluster_14 {
color=blue
41 [label="Enter function <init> [4]" style="filled" fillcolor=red];
42 [label="Delegated constructor call: super<R|kotlin/Any|>() [4]" style="filled" fillcolor=yellow];
43 [label="Exit function <init> [4]" style="filled" fillcolor=red];
}
44 [label="Exit class Inner [3]" style="filled" fillcolor=red];
}
31 -> {32} [color=green];
31 -> {42} [style=dotted];
31 -> {32 35 39} [style=dashed];
32 -> {33};
33 -> {34};
34 -> {35} [color=green];
33 -> {34} [color=green];
33 -> {44} [style=dotted];
33 -> {34 37 41} [style=dashed];
34 -> {35};
35 -> {36};
36 -> {37};
36 -> {37} [color=green];
37 -> {38};
38 -> {39} [color=green];
38 -> {39};
39 -> {40};
40 -> {41};
41 -> {42} [color=green];
40 -> {41} [color=green];
41 -> {42};
42 -> {43};
43 -> {44} [color=green];
subgraph cluster_14 {
subgraph cluster_15 {
color=red
43 [label="Enter function innerFun [4]" style="filled" fillcolor=red];
subgraph cluster_15 {
45 [label="Enter function innerFun [4]" style="filled" fillcolor=red];
subgraph cluster_16 {
color=blue
44 [label="Enter block [4]"];
45 [label="Function call: R|/function|() [4]" style="filled" fillcolor=yellow];
46 [label="Jump: ^innerFun R|/function|() [4]"];
47 [label="Stub [4]" style="filled" fillcolor=gray];
48 [label="Exit block [4]" style="filled" fillcolor=gray];
46 [label="Enter block [4]"];
subgraph cluster_17 {
color=blue
47 [label="Function call arguments enter [4]"];
48 [label="Function call arguments exit [4]"];
}
49 [label="Function call: R|/function|() [4]" style="filled" fillcolor=yellow];
50 [label="Jump: ^innerFun R|/function|() [4]"];
51 [label="Stub [4]" style="filled" fillcolor=gray];
52 [label="Exit block [4]" style="filled" fillcolor=gray];
}
49 [label="Exit function innerFun [4]" style="filled" fillcolor=red];
53 [label="Exit function innerFun [4]" style="filled" fillcolor=red];
}
43 -> {44};
44 -> {45};
45 -> {46};
46 -> {49};
46 -> {47} [style=dotted];
47 -> {48} [style=dotted];
48 -> {49} [style=dotted];
subgraph cluster_16 {
color=red
50 [label="Enter function innerThisFun [4]" style="filled" fillcolor=red];
subgraph cluster_17 {
color=blue
51 [label="Enter block [4]"];
52 [label="Access variable this@NestedInnerClass# [4]"];
53 [label="Function call: this@NestedInnerClass#.<Unresolved name: function>#() [4]" style="filled" fillcolor=yellow];
54 [label="Jump: ^innerThisFun this@NestedInnerClass#.<Unresolved name: function>#() [4]"];
55 [label="Stub [4]" style="filled" fillcolor=gray];
56 [label="Exit block [4]" style="filled" fillcolor=gray];
}
57 [label="Exit function innerThisFun [4]" style="filled" fillcolor=red];
}
50 -> {51};
51 -> {52};
52 -> {53};
53 -> {54};
54 -> {57};
54 -> {55} [style=dotted];
55 -> {56} [style=dotted];
56 -> {57} [style=dotted];
46 -> {47};
47 -> {48};
48 -> {49};
49 -> {50};
50 -> {53};
50 -> {51} [style=dotted];
51 -> {52} [style=dotted];
52 -> {53} [style=dotted];
subgraph cluster_18 {
color=red
58 [label="Enter class InnerInner [4]" style="filled" fillcolor=red];
54 [label="Enter function innerThisFun [4]" style="filled" fillcolor=red];
subgraph cluster_19 {
color=blue
59 [label="Enter function <init> [5]" style="filled" fillcolor=red];
60 [label="Delegated constructor call: super<R|kotlin/Any|>() [5]" style="filled" fillcolor=yellow];
61 [label="Exit function <init> [5]" style="filled" fillcolor=red];
55 [label="Enter block [4]"];
subgraph cluster_20 {
color=blue
56 [label="Function call arguments enter [4]"];
57 [label="Access variable this@NestedInnerClass# [4]"];
58 [label="Function call arguments exit [4]"];
}
59 [label="Function call: this@NestedInnerClass#.<Unresolved name: function>#() [4]" style="filled" fillcolor=yellow];
60 [label="Jump: ^innerThisFun this@NestedInnerClass#.<Unresolved name: function>#() [4]"];
61 [label="Stub [4]" style="filled" fillcolor=gray];
62 [label="Exit block [4]" style="filled" fillcolor=gray];
}
62 [label="Exit class InnerInner [4]" style="filled" fillcolor=red];
63 [label="Exit function innerThisFun [4]" style="filled" fillcolor=red];
}
58 -> {59} [color=green];
58 -> {62} [style=dotted];
58 -> {59} [style=dashed];
54 -> {55};
55 -> {56};
56 -> {57};
57 -> {58};
58 -> {59};
59 -> {60};
60 -> {61};
61 -> {62} [color=green];
60 -> {63};
60 -> {61} [style=dotted];
61 -> {62} [style=dotted];
62 -> {63} [style=dotted];
subgraph cluster_20 {
subgraph cluster_21 {
color=red
63 [label="Enter function f [5]" style="filled" fillcolor=red];
subgraph cluster_21 {
64 [label="Enter class InnerInner [4]" style="filled" fillcolor=red];
subgraph cluster_22 {
color=blue
64 [label="Enter block [5]"];
65 [label="Function call: this@R|/Inner|.R|/Inner.innerFun|() [5]" style="filled" fillcolor=yellow];
66 [label="Jump: ^f this@R|/Inner|.R|/Inner.innerFun|() [5]"];
67 [label="Stub [5]" style="filled" fillcolor=gray];
68 [label="Exit block [5]" style="filled" fillcolor=gray];
65 [label="Enter function <init> [5]" style="filled" fillcolor=red];
66 [label="Delegated constructor call: super<R|kotlin/Any|>() [5]" style="filled" fillcolor=yellow];
67 [label="Exit function <init> [5]" style="filled" fillcolor=red];
}
69 [label="Exit function f [5]" style="filled" fillcolor=red];
68 [label="Exit class InnerInner [4]" style="filled" fillcolor=red];
}
63 -> {64};
64 -> {65};
64 -> {65} [color=green];
64 -> {68} [style=dotted];
64 -> {65} [style=dashed];
65 -> {66};
66 -> {69};
66 -> {67} [style=dotted];
67 -> {68} [style=dotted];
68 -> {69} [style=dotted];
66 -> {67};
67 -> {68} [color=green];
subgraph cluster_22 {
subgraph cluster_23 {
color=red
70 [label="Enter function g [5]" style="filled" fillcolor=red];
subgraph cluster_23 {
69 [label="Enter function f [5]" style="filled" fillcolor=red];
subgraph cluster_24 {
color=blue
71 [label="Enter block [5]"];
72 [label="Access variable R|/Inner.innerProp| [5]"];
73 [label="Jump: ^g this@R|/Inner|.R|/Inner.innerProp| [5]"];
74 [label="Stub [5]" style="filled" fillcolor=gray];
75 [label="Exit block [5]" style="filled" fillcolor=gray];
70 [label="Enter block [5]"];
subgraph cluster_25 {
color=blue
71 [label="Function call arguments enter [5]"];
72 [label="Function call arguments exit [5]"];
}
73 [label="Function call: this@R|/Inner|.R|/Inner.innerFun|() [5]" style="filled" fillcolor=yellow];
74 [label="Jump: ^f this@R|/Inner|.R|/Inner.innerFun|() [5]"];
75 [label="Stub [5]" style="filled" fillcolor=gray];
76 [label="Exit block [5]" style="filled" fillcolor=gray];
}
76 [label="Exit function g [5]" style="filled" fillcolor=red];
77 [label="Exit function f [5]" style="filled" fillcolor=red];
}
69 -> {70};
70 -> {71};
71 -> {72};
72 -> {73};
73 -> {76};
73 -> {74} [style=dotted];
73 -> {74};
74 -> {77};
74 -> {75} [style=dotted];
75 -> {76} [style=dotted];
76 -> {77} [style=dotted];
subgraph cluster_24 {
subgraph cluster_26 {
color=red
77 [label="Enter function h [5]" style="filled" fillcolor=red];
subgraph cluster_25 {
78 [label="Enter function g [5]" style="filled" fillcolor=red];
subgraph cluster_27 {
color=blue
78 [label="Enter block [5]"];
79 [label="Access variable this@R|/Inner| [5]"];
80 [label="Function call: this@R|/Inner|.R|/Inner.innerFun|() [5]" style="filled" fillcolor=yellow];
81 [label="Jump: ^h this@R|/Inner|.R|/Inner.innerFun|() [5]"];
79 [label="Enter block [5]"];
80 [label="Access variable R|/Inner.innerProp| [5]"];
81 [label="Jump: ^g this@R|/Inner|.R|/Inner.innerProp| [5]"];
82 [label="Stub [5]" style="filled" fillcolor=gray];
83 [label="Exit block [5]" style="filled" fillcolor=gray];
}
84 [label="Exit function h [5]" style="filled" fillcolor=red];
84 [label="Exit function g [5]" style="filled" fillcolor=red];
}
77 -> {78};
78 -> {79};
79 -> {80};
80 -> {81};
@@ -265,27 +270,57 @@ digraph NestedInnerClass_fir_kts {
82 -> {83} [style=dotted];
83 -> {84} [style=dotted];
subgraph cluster_26 {
subgraph cluster_28 {
color=red
85 [label="Enter function i [5]" style="filled" fillcolor=red];
subgraph cluster_27 {
85 [label="Enter function h [5]" style="filled" fillcolor=red];
subgraph cluster_29 {
color=blue
86 [label="Enter block [5]"];
87 [label="Access variable this@R|/Inner| [5]"];
88 [label="Access variable R|/Inner.innerProp| [5]"];
89 [label="Jump: ^i this@R|/Inner|.R|/Inner.innerProp| [5]"];
90 [label="Stub [5]" style="filled" fillcolor=gray];
91 [label="Exit block [5]" style="filled" fillcolor=gray];
subgraph cluster_30 {
color=blue
87 [label="Function call arguments enter [5]"];
88 [label="Access variable this@R|/Inner| [5]"];
89 [label="Function call arguments exit [5]"];
}
90 [label="Function call: this@R|/Inner|.R|/Inner.innerFun|() [5]" style="filled" fillcolor=yellow];
91 [label="Jump: ^h this@R|/Inner|.R|/Inner.innerFun|() [5]"];
92 [label="Stub [5]" style="filled" fillcolor=gray];
93 [label="Exit block [5]" style="filled" fillcolor=gray];
}
92 [label="Exit function i [5]" style="filled" fillcolor=red];
94 [label="Exit function h [5]" style="filled" fillcolor=red];
}
85 -> {86};
86 -> {87};
87 -> {88};
88 -> {89};
89 -> {92};
89 -> {90} [style=dotted];
90 -> {91} [style=dotted];
89 -> {90};
90 -> {91};
91 -> {94};
91 -> {92} [style=dotted];
92 -> {93} [style=dotted];
93 -> {94} [style=dotted];
subgraph cluster_31 {
color=red
95 [label="Enter function i [5]" style="filled" fillcolor=red];
subgraph cluster_32 {
color=blue
96 [label="Enter block [5]"];
97 [label="Access variable this@R|/Inner| [5]"];
98 [label="Access variable R|/Inner.innerProp| [5]"];
99 [label="Jump: ^i this@R|/Inner|.R|/Inner.innerProp| [5]"];
100 [label="Stub [5]" style="filled" fillcolor=gray];
101 [label="Exit block [5]" style="filled" fillcolor=gray];
}
102 [label="Exit function i [5]" style="filled" fillcolor=red];
}
95 -> {96};
96 -> {97};
97 -> {98};
98 -> {99};
99 -> {102};
99 -> {100} [style=dotted];
100 -> {101} [style=dotted];
101 -> {102} [style=dotted];
}