[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
+162 -152
View File
@@ -27,301 +27,311 @@ digraph tryCatch_kt {
subgraph cluster_5 {
color=blue
9 [label="Catch enter"];
10 [label="Variable declaration: e: R|kotlin/Exception|"];
subgraph cluster_6 {
color=blue
10 [label="Enter block"];
11 [label="Const: Int(3)"];
12 [label="Variable declaration: lval z: R|kotlin/Int|"];
13 [label="Exit block"];
11 [label="Enter block"];
12 [label="Const: Int(3)"];
13 [label="Variable declaration: lval z: R|kotlin/Int|"];
14 [label="Exit block"];
}
14 [label="Catch exit"];
15 [label="Catch exit"];
}
subgraph cluster_7 {
color=blue
15 [label="Catch enter"];
16 [label="Catch enter"];
17 [label="Variable declaration: e: R|kotlin/RuntimeException|"];
subgraph cluster_8 {
color=blue
16 [label="Enter block"];
17 [label="Const: Int(2)"];
18 [label="Variable declaration: lval y: R|kotlin/Int|"];
19 [label="Exit block"];
18 [label="Enter block"];
19 [label="Const: Int(2)"];
20 [label="Variable declaration: lval y: R|kotlin/Int|"];
21 [label="Exit block"];
}
20 [label="Catch exit"];
22 [label="Catch exit"];
}
21 [label="Try expression exit"];
23 [label="Try expression exit"];
}
22 [label="Exit block"];
24 [label="Exit block"];
}
23 [label="Exit function test_1" style="filled" fillcolor=red];
25 [label="Exit function test_1" style="filled" fillcolor=red];
}
0 -> {1};
1 -> {2};
2 -> {3 15 9};
2 -> {3 16 9};
3 -> {4};
4 -> {5};
5 -> {6};
6 -> {7};
7 -> {8};
8 -> {21 15 9};
8 -> {23 16 9};
9 -> {10};
9 -> {23} [label=onUncaughtException];
9 -> {25} [label=onUncaughtException];
10 -> {11};
11 -> {12};
12 -> {13};
13 -> {14};
14 -> {21};
15 -> {16};
15 -> {23} [label=onUncaughtException];
14 -> {15};
15 -> {23};
16 -> {17};
16 -> {25} [label=onUncaughtException];
17 -> {18};
18 -> {19};
19 -> {20};
20 -> {21};
21 -> {22};
22 -> {23};
23 -> {24};
24 -> {25};
subgraph cluster_9 {
color=red
24 [label="Enter function test_2" style="filled" fillcolor=red];
26 [label="Enter function test_2" style="filled" fillcolor=red];
subgraph cluster_10 {
color=blue
25 [label="Enter block"];
27 [label="Enter block"];
subgraph cluster_11 {
color=blue
26 [label="Try expression enter"];
28 [label="Try expression enter"];
subgraph cluster_12 {
color=blue
27 [label="Try main block enter"];
29 [label="Try main block enter"];
subgraph cluster_13 {
color=blue
28 [label="Enter block"];
29 [label="Const: Int(1)"];
30 [label="Exit block"];
30 [label="Enter block"];
31 [label="Const: Int(1)"];
32 [label="Exit block"];
}
31 [label="Try main block exit"];
33 [label="Try main block exit"];
}
subgraph cluster_14 {
color=blue
32 [label="Catch enter"];
34 [label="Catch enter"];
35 [label="Variable declaration: e: R|kotlin/Exception|"];
subgraph cluster_15 {
color=blue
33 [label="Enter block"];
34 [label="Const: Int(2)"];
35 [label="Exit block"];
36 [label="Enter block"];
37 [label="Const: Int(2)"];
38 [label="Exit block"];
}
36 [label="Catch exit"];
39 [label="Catch exit"];
}
37 [label="Try expression exit"];
40 [label="Try expression exit"];
}
38 [label="Variable declaration: lval x: R|kotlin/Int|"];
39 [label="Exit block"];
41 [label="Variable declaration: lval x: R|kotlin/Int|"];
42 [label="Exit block"];
}
40 [label="Exit function test_2" style="filled" fillcolor=red];
43 [label="Exit function test_2" style="filled" fillcolor=red];
}
24 -> {25};
25 -> {26};
26 -> {27 32};
26 -> {27};
27 -> {28};
28 -> {29};
28 -> {29 34};
29 -> {30};
30 -> {31};
31 -> {37 32};
31 -> {32};
32 -> {33};
32 -> {40} [label=onUncaughtException];
33 -> {34};
33 -> {40 34};
34 -> {35};
34 -> {43} [label=onUncaughtException];
35 -> {36};
36 -> {37};
37 -> {38};
38 -> {39};
39 -> {40};
40 -> {41};
41 -> {42};
42 -> {43};
subgraph cluster_16 {
color=red
41 [label="Enter function test_3" style="filled" fillcolor=red];
44 [label="Enter function test_3" style="filled" fillcolor=red];
subgraph cluster_17 {
color=blue
42 [label="Enter block"];
45 [label="Enter block"];
subgraph cluster_18 {
color=blue
43 [label="Enter while loop"];
46 [label="Enter while loop"];
subgraph cluster_19 {
color=blue
44 [label="Enter loop condition"];
45 [label="Const: Boolean(true)"];
46 [label="Exit loop condition"];
47 [label="Enter loop condition"];
48 [label="Const: Boolean(true)"];
49 [label="Exit loop condition"];
}
subgraph cluster_20 {
color=blue
47 [label="Enter loop block"];
50 [label="Enter loop block"];
subgraph cluster_21 {
color=blue
48 [label="Enter block"];
51 [label="Enter block"];
subgraph cluster_22 {
color=blue
49 [label="Try expression enter"];
52 [label="Try expression enter"];
subgraph cluster_23 {
color=blue
50 [label="Try main block enter"];
53 [label="Try main block enter"];
subgraph cluster_24 {
color=blue
51 [label="Enter block"];
54 [label="Enter block"];
subgraph cluster_25 {
color=blue
52 [label="Enter when"];
55 [label="Enter when"];
subgraph cluster_26 {
color=blue
53 [label="Enter when branch condition "];
54 [label="Access variable R|<local>/b|"];
55 [label="Exit when branch condition"];
56 [label="Enter when branch condition "];
57 [label="Access variable R|<local>/b|"];
58 [label="Exit when branch condition"];
}
56 [label="Synthetic else branch"];
57 [label="Enter when branch result"];
59 [label="Synthetic else branch"];
60 [label="Enter when branch result"];
subgraph cluster_27 {
color=blue
58 [label="Enter block"];
59 [label="Jump: ^test_3 Unit"];
60 [label="Stub" style="filled" fillcolor=gray];
61 [label="Exit block" style="filled" fillcolor=gray];
61 [label="Enter block"];
62 [label="Jump: ^test_3 Unit"];
63 [label="Stub" style="filled" fillcolor=gray];
64 [label="Exit block" style="filled" fillcolor=gray];
}
62 [label="Exit when branch result" style="filled" fillcolor=gray];
63 [label="Exit when"];
65 [label="Exit when branch result" style="filled" fillcolor=gray];
66 [label="Exit when"];
}
64 [label="Const: Int(1)"];
65 [label="Variable declaration: lval x: R|kotlin/Int|"];
67 [label="Const: Int(1)"];
68 [label="Variable declaration: lval x: R|kotlin/Int|"];
subgraph cluster_28 {
color=blue
66 [label="Enter when"];
69 [label="Enter when"];
subgraph cluster_29 {
color=blue
67 [label="Enter when branch condition "];
68 [label="Access variable R|<local>/b|"];
69 [label="Function call: R|<local>/b|.R|kotlin/Boolean.not|()"];
70 [label="Exit when branch condition"];
70 [label="Enter when branch condition "];
71 [label="Access variable R|<local>/b|"];
72 [label="Function call: R|<local>/b|.R|kotlin/Boolean.not|()"];
73 [label="Exit when branch condition"];
}
71 [label="Synthetic else branch"];
72 [label="Enter when branch result"];
74 [label="Synthetic else branch"];
75 [label="Enter when branch result"];
subgraph cluster_30 {
color=blue
73 [label="Enter block"];
74 [label="Jump: break@@@[Boolean(true)] "];
75 [label="Stub" style="filled" fillcolor=gray];
76 [label="Exit block" style="filled" fillcolor=gray];
76 [label="Enter block"];
77 [label="Jump: break@@@[Boolean(true)] "];
78 [label="Stub" style="filled" fillcolor=gray];
79 [label="Exit block" style="filled" fillcolor=gray];
}
77 [label="Exit when branch result" style="filled" fillcolor=gray];
78 [label="Exit when"];
80 [label="Exit when branch result" style="filled" fillcolor=gray];
81 [label="Exit when"];
}
79 [label="Exit block"];
82 [label="Exit block"];
}
80 [label="Try main block exit"];
83 [label="Try main block exit"];
}
subgraph cluster_31 {
color=blue
81 [label="Catch enter"];
84 [label="Catch enter"];
85 [label="Variable declaration: e: R|kotlin/RuntimeException|"];
subgraph cluster_32 {
color=blue
82 [label="Enter block"];
83 [label="Jump: break@@@[Boolean(true)] "];
84 [label="Stub" style="filled" fillcolor=gray];
85 [label="Exit block" style="filled" fillcolor=gray];
86 [label="Enter block"];
87 [label="Jump: break@@@[Boolean(true)] "];
88 [label="Stub" style="filled" fillcolor=gray];
89 [label="Exit block" style="filled" fillcolor=gray];
}
86 [label="Catch exit" style="filled" fillcolor=gray];
90 [label="Catch exit" style="filled" fillcolor=gray];
}
subgraph cluster_33 {
color=blue
91 [label="Catch enter"];
95 [label="Catch enter"];
96 [label="Variable declaration: e: R|kotlin/Exception|"];
subgraph cluster_34 {
color=blue
92 [label="Enter block"];
93 [label="Jump: continue@@@[Boolean(true)] "];
94 [label="Stub" style="filled" fillcolor=gray];
95 [label="Exit block" style="filled" fillcolor=gray];
97 [label="Enter block"];
98 [label="Jump: continue@@@[Boolean(true)] "];
99 [label="Stub" style="filled" fillcolor=gray];
100 [label="Exit block" style="filled" fillcolor=gray];
}
96 [label="Catch exit" style="filled" fillcolor=gray];
101 [label="Catch exit" style="filled" fillcolor=gray];
}
97 [label="Try expression exit"];
102 [label="Try expression exit"];
}
98 [label="Const: Int(2)"];
99 [label="Variable declaration: lval y: R|kotlin/Int|"];
100 [label="Exit block"];
103 [label="Const: Int(2)"];
104 [label="Variable declaration: lval y: R|kotlin/Int|"];
105 [label="Exit block"];
}
101 [label="Exit loop block"];
106 [label="Exit loop block"];
}
87 [label="Exit whileloop"];
91 [label="Exit whileloop"];
}
88 [label="Const: Int(3)"];
89 [label="Variable declaration: lval z: R|kotlin/Int|"];
90 [label="Exit block"];
92 [label="Const: Int(3)"];
93 [label="Variable declaration: lval z: R|kotlin/Int|"];
94 [label="Exit block"];
}
102 [label="Exit function test_3" style="filled" fillcolor=red];
107 [label="Exit function test_3" style="filled" fillcolor=red];
}
41 -> {42};
42 -> {43};
43 -> {44};
44 -> {45};
45 -> {46};
46 -> {47};
46 -> {87} [style=dotted];
47 -> {48};
48 -> {49};
49 -> {50 91 81};
49 -> {50};
49 -> {91} [style=dotted];
50 -> {51};
51 -> {52};
52 -> {53};
52 -> {53 95 84};
53 -> {54};
54 -> {55};
55 -> {57 56};
56 -> {63};
55 -> {56};
56 -> {57};
57 -> {58};
58 -> {59};
59 -> {102};
59 -> {60} [style=dotted];
60 -> {61} [style=dotted];
61 -> {62} [style=dotted];
58 -> {60 59};
59 -> {66};
60 -> {61};
61 -> {62};
62 -> {107};
62 -> {63} [style=dotted];
63 -> {64};
64 -> {65};
65 -> {66};
63 -> {64} [style=dotted];
64 -> {65} [style=dotted];
65 -> {66} [style=dotted];
66 -> {67};
67 -> {68};
68 -> {69};
69 -> {70};
70 -> {72 71};
71 -> {78};
70 -> {71};
71 -> {72};
72 -> {73};
73 -> {74};
74 -> {87};
74 -> {75} [style=dotted];
75 -> {76} [style=dotted];
76 -> {77} [style=dotted];
73 -> {75 74};
74 -> {81};
75 -> {76};
76 -> {77};
77 -> {91};
77 -> {78} [style=dotted];
78 -> {79};
79 -> {80};
80 -> {97 91 81};
78 -> {79} [style=dotted];
79 -> {80} [style=dotted];
80 -> {81} [style=dotted];
81 -> {82};
81 -> {102} [label=onUncaughtException];
82 -> {83};
83 -> {87};
83 -> {84} [style=dotted];
84 -> {85} [style=dotted];
85 -> {86} [style=dotted];
86 -> {97} [style=dotted];
87 -> {88};
88 -> {89};
89 -> {90};
90 -> {102};
83 -> {102 95 84};
84 -> {85};
84 -> {107} [label=onUncaughtException];
85 -> {86};
86 -> {87};
87 -> {91};
87 -> {88} [style=dotted];
88 -> {89} [style=dotted];
89 -> {90} [style=dotted];
90 -> {102} [style=dotted];
91 -> {92};
91 -> {102} [label=onUncaughtException];
92 -> {93};
93 -> {94} [style=dotted];
93 -> {43} [color=green style=dashed];
94 -> {95} [style=dotted];
95 -> {96} [style=dotted];
96 -> {97} [style=dotted];
93 -> {94};
94 -> {107};
95 -> {96};
95 -> {107} [label=onUncaughtException];
96 -> {97};
97 -> {98};
98 -> {99};
99 -> {100};
100 -> {101};
101 -> {44} [color=green style=dashed];
98 -> {99} [style=dotted];
98 -> {46} [color=green style=dashed];
99 -> {100} [style=dotted];
100 -> {101} [style=dotted];
101 -> {102} [style=dotted];
102 -> {103};
103 -> {104};
104 -> {105};
105 -> {106};
106 -> {47} [color=green style=dashed];
}