[FIR] do not create FirParameter for catch parameter

use FirProperty instead

^KT-55034
This commit is contained in:
Ilya Kirillov
2022-11-18 16:38:15 +01:00
parent 9671e20f1f
commit c8e3103af9
24 changed files with 450 additions and 368 deletions
+89 -87
View File
@@ -68,40 +68,41 @@ digraph complex_kt {
subgraph cluster_12 {
color=blue
27 [label="Catch enter"];
28 [label="Variable declaration: closeException: R|kotlin/Throwable|"];
subgraph cluster_13 {
color=blue
28 [label="Enter block"];
29 [label="Access variable R|<local>/cause|"];
30 [label="Smart cast: R|<local>/cause|"];
31 [label="Access variable R|<local>/closeException|"];
32 [label="Function call: R|<local>/cause|.R|kotlin/Throwable.addSuppressed|(...)"];
33 [label="Exit block"];
29 [label="Enter block"];
30 [label="Access variable R|<local>/cause|"];
31 [label="Smart cast: R|<local>/cause|"];
32 [label="Access variable R|<local>/closeException|"];
33 [label="Function call: R|<local>/cause|.R|kotlin/Throwable.addSuppressed|(...)"];
34 [label="Exit block"];
}
34 [label="Catch exit"];
35 [label="Catch exit"];
}
35 [label="Try expression exit"];
36 [label="Try expression exit"];
}
36 [label="Exit block"];
37 [label="Exit block"];
}
37 [label="Exit when branch result"];
38 [label="Enter when branch result"];
38 [label="Exit when branch result"];
39 [label="Enter when branch result"];
subgraph cluster_14 {
color=blue
39 [label="Enter block"];
40 [label="Function call: this@R|/closeFinally|.R|/AutoCloseable.close|()"];
41 [label="Exit block"];
40 [label="Enter block"];
41 [label="Function call: this@R|/closeFinally|.R|/AutoCloseable.close|()"];
42 [label="Exit block"];
}
42 [label="Exit when branch result"];
43 [label="Enter when branch result"];
43 [label="Exit when branch result"];
44 [label="Enter when branch result"];
subgraph cluster_15 {
color=blue
44 [label="Enter block"];
45 [label="Exit block"];
45 [label="Enter block"];
46 [label="Exit block"];
}
46 [label="Exit when branch result"];
47 [label="Exit when"];
47 [label="Exit when branch result"];
48 [label="Exit when"];
}
48 [label="Jump: ^closeFinally when () {
49 [label="Jump: ^closeFinally when () {
==(this@R|/closeFinally|, Null(null)) -> {
}
==(R|<local>/cause|, Null(null)) -> {
@@ -118,10 +119,10 @@ digraph complex_kt {
}
}
"];
49 [label="Stub" style="filled" fillcolor=gray];
50 [label="Exit block" style="filled" fillcolor=gray];
50 [label="Stub" style="filled" fillcolor=gray];
51 [label="Exit block" style="filled" fillcolor=gray];
}
51 [label="Exit function closeFinally" style="filled" fillcolor=red];
52 [label="Exit function closeFinally" style="filled" fillcolor=red];
}
4 -> {5};
5 -> {6};
@@ -130,12 +131,12 @@ digraph complex_kt {
8 -> {9};
9 -> {10};
10 -> {11};
11 -> {43 12};
11 -> {44 12};
12 -> {13};
13 -> {14};
14 -> {15};
15 -> {16};
16 -> {38 17};
16 -> {39 17};
17 -> {18};
18 -> {19};
19 -> {20};
@@ -145,9 +146,9 @@ digraph complex_kt {
23 -> {24};
24 -> {25};
25 -> {26};
26 -> {35 27};
26 -> {36 27};
27 -> {28};
27 -> {51} [label=onUncaughtException];
27 -> {52} [label=onUncaughtException];
28 -> {29};
29 -> {30};
30 -> {31};
@@ -157,93 +158,93 @@ digraph complex_kt {
34 -> {35};
35 -> {36};
36 -> {37};
37 -> {47};
38 -> {39};
37 -> {38};
38 -> {48};
39 -> {40};
40 -> {41};
41 -> {42};
42 -> {47};
43 -> {44};
42 -> {43};
43 -> {48};
44 -> {45};
45 -> {46};
46 -> {47};
47 -> {48};
48 -> {51};
48 -> {49} [style=dotted];
48 -> {49};
49 -> {52};
49 -> {50} [style=dotted];
50 -> {51} [style=dotted];
51 -> {52} [style=dotted];
subgraph cluster_16 {
color=red
52 [label="Enter function firstIsInstanceOrNull" style="filled" fillcolor=red];
53 [label="Enter function firstIsInstanceOrNull" style="filled" fillcolor=red];
subgraph cluster_17 {
color=blue
53 [label="Enter block"];
54 [label="Enter block"];
subgraph cluster_18 {
color=blue
54 [label="Enter block"];
55 [label="Access variable this@R|/firstIsInstanceOrNull|"];
56 [label="Function call: this@R|/firstIsInstanceOrNull|.R|SubstitutionOverride<kotlin/collections/List.iterator: R|kotlin/collections/Iterator<CapturedType(*)>|>|()"];
57 [label="Variable declaration: lval <iterator>: R|kotlin/collections/Iterator<kotlin/Any?>|"];
55 [label="Enter block"];
56 [label="Access variable this@R|/firstIsInstanceOrNull|"];
57 [label="Function call: this@R|/firstIsInstanceOrNull|.R|SubstitutionOverride<kotlin/collections/List.iterator: R|kotlin/collections/Iterator<CapturedType(*)>|>|()"];
58 [label="Variable declaration: lval <iterator>: R|kotlin/collections/Iterator<kotlin/Any?>|"];
subgraph cluster_19 {
color=blue
58 [label="Enter while loop"];
59 [label="Enter while loop"];
subgraph cluster_20 {
color=blue
59 [label="Enter loop condition"];
60 [label="Access variable R|<local>/<iterator>|"];
61 [label="Function call: R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.hasNext: R|kotlin/Boolean|>|()"];
62 [label="Exit loop condition"];
60 [label="Enter loop condition"];
61 [label="Access variable R|<local>/<iterator>|"];
62 [label="Function call: R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.hasNext: R|kotlin/Boolean|>|()"];
63 [label="Exit loop condition"];
}
subgraph cluster_21 {
color=blue
63 [label="Enter loop block"];
64 [label="Enter loop block"];
subgraph cluster_22 {
color=blue
64 [label="Enter block"];
65 [label="Access variable R|<local>/<iterator>|"];
66 [label="Function call: R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|kotlin/Any?|>|()"];
67 [label="Variable declaration: lval element: R|kotlin/Any?|"];
65 [label="Enter block"];
66 [label="Access variable R|<local>/<iterator>|"];
67 [label="Function call: R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|kotlin/Any?|>|()"];
68 [label="Variable declaration: lval element: R|kotlin/Any?|"];
subgraph cluster_23 {
color=blue
68 [label="Enter when"];
69 [label="Enter when"];
subgraph cluster_24 {
color=blue
69 [label="Enter when branch condition "];
70 [label="Access variable R|<local>/element|"];
71 [label="Type operator: (R|<local>/element| is R|T|)"];
72 [label="Exit when branch condition"];
70 [label="Enter when branch condition "];
71 [label="Access variable R|<local>/element|"];
72 [label="Type operator: (R|<local>/element| is R|T|)"];
73 [label="Exit when branch condition"];
}
73 [label="Synthetic else branch"];
74 [label="Enter when branch result"];
74 [label="Synthetic else branch"];
75 [label="Enter when branch result"];
subgraph cluster_25 {
color=blue
75 [label="Enter block"];
76 [label="Access variable R|<local>/element|"];
77 [label="Smart cast: R|<local>/element|"];
78 [label="Jump: ^firstIsInstanceOrNull R|<local>/element|"];
79 [label="Stub" style="filled" fillcolor=gray];
80 [label="Exit block" style="filled" fillcolor=gray];
76 [label="Enter block"];
77 [label="Access variable R|<local>/element|"];
78 [label="Smart cast: R|<local>/element|"];
79 [label="Jump: ^firstIsInstanceOrNull R|<local>/element|"];
80 [label="Stub" style="filled" fillcolor=gray];
81 [label="Exit block" style="filled" fillcolor=gray];
}
81 [label="Exit when branch result" style="filled" fillcolor=gray];
82 [label="Exit when"];
82 [label="Exit when branch result" style="filled" fillcolor=gray];
83 [label="Exit when"];
}
83 [label="Exit block"];
84 [label="Exit block"];
}
84 [label="Exit loop block"];
85 [label="Exit loop block"];
}
85 [label="Exit whileloop"];
86 [label="Exit whileloop"];
}
86 [label="Exit block"];
87 [label="Exit block"];
}
87 [label="Const: Null(null)"];
88 [label="Jump: ^firstIsInstanceOrNull Null(null)"];
89 [label="Stub" style="filled" fillcolor=gray];
90 [label="Exit block" style="filled" fillcolor=gray];
88 [label="Const: Null(null)"];
89 [label="Jump: ^firstIsInstanceOrNull Null(null)"];
90 [label="Stub" style="filled" fillcolor=gray];
91 [label="Exit block" style="filled" fillcolor=gray];
}
91 [label="Exit function firstIsInstanceOrNull" style="filled" fillcolor=red];
92 [label="Exit function firstIsInstanceOrNull" style="filled" fillcolor=red];
}
52 -> {53};
53 -> {54};
54 -> {55};
55 -> {56};
@@ -253,8 +254,8 @@ digraph complex_kt {
59 -> {60};
60 -> {61};
61 -> {62};
62 -> {85 63};
63 -> {64};
62 -> {63};
63 -> {86 64};
64 -> {65};
65 -> {66};
66 -> {67};
@@ -263,26 +264,27 @@ digraph complex_kt {
69 -> {70};
70 -> {71};
71 -> {72};
72 -> {74 73};
73 -> {82};
74 -> {75};
72 -> {73};
73 -> {75 74};
74 -> {83};
75 -> {76};
76 -> {77};
77 -> {78};
78 -> {91};
78 -> {79} [style=dotted];
78 -> {79};
79 -> {92};
79 -> {80} [style=dotted];
80 -> {81} [style=dotted];
81 -> {82} [style=dotted];
82 -> {83};
82 -> {83} [style=dotted];
83 -> {84};
84 -> {59} [color=green style=dashed];
85 -> {86};
84 -> {85};
85 -> {60} [color=green style=dashed];
86 -> {87};
87 -> {88};
88 -> {91};
88 -> {89} [style=dotted];
88 -> {89};
89 -> {92};
89 -> {90} [style=dotted];
90 -> {91} [style=dotted];
91 -> {92} [style=dotted];
}