FIR CFA: remove redundant "uncaught exception path" edges

These are not real, and in fact tricked the compiler into thinking some
blocks that do not terminate do somehow terminate.
This commit is contained in:
pyos
2022-11-27 23:03:00 +01:00
committed by Dmitriy Novozhilov
parent fa0ea1504e
commit ef2fa01a8d
23 changed files with 277 additions and 88 deletions
@@ -52,7 +52,6 @@ digraph jumpFromRhsOfOperator_kt {
10 -> {11 15};
11 -> {12};
12 -> {13};
13 -> {20} [label="onUncaughtException"];
13 -> {14} [style=dotted];
14 -> {15} [style=dotted];
15 -> {16};
@@ -96,7 +95,6 @@ digraph jumpFromRhsOfOperator_kt {
27 -> {28 32};
28 -> {29};
29 -> {30};
30 -> {37} [label="onUncaughtException"];
30 -> {31} [style=dotted];
31 -> {32} [style=dotted];
32 -> {33};
@@ -163,7 +161,6 @@ digraph jumpFromRhsOfOperator_kt {
46 -> {47 51};
47 -> {48};
48 -> {49};
49 -> {66} [label="onUncaughtException"];
49 -> {50} [style=dotted];
50 -> {51} [style=dotted];
51 -> {52};
@@ -240,7 +237,6 @@ digraph jumpFromRhsOfOperator_kt {
75 -> {76 80};
76 -> {77};
77 -> {78};
78 -> {95} [label="onUncaughtException"];
78 -> {79} [style=dotted];
79 -> {80} [style=dotted];
80 -> {81};
@@ -294,7 +290,6 @@ digraph jumpFromRhsOfOperator_kt {
102 -> {103 107};
103 -> {104};
104 -> {105};
105 -> {112} [label="onUncaughtException"];
105 -> {106} [style=dotted];
106 -> {107} [style=dotted];
107 -> {108};
@@ -338,7 +333,6 @@ digraph jumpFromRhsOfOperator_kt {
119 -> {120 124};
120 -> {121};
121 -> {122};
122 -> {129} [label="onUncaughtException"];
122 -> {123} [style=dotted];
123 -> {124} [style=dotted];
124 -> {125};
@@ -405,7 +399,6 @@ digraph jumpFromRhsOfOperator_kt {
138 -> {139 143};
139 -> {140};
140 -> {141};
141 -> {158} [label="onUncaughtException"];
141 -> {142} [style=dotted];
142 -> {143} [style=dotted];
143 -> {144};
@@ -482,7 +475,6 @@ digraph jumpFromRhsOfOperator_kt {
167 -> {168 172};
168 -> {169};
169 -> {170};
170 -> {187} [label="onUncaughtException"];
170 -> {171} [style=dotted];
171 -> {172} [style=dotted];
172 -> {173};
@@ -871,7 +871,6 @@ digraph boundSmartcastsInBranches_kt {
309 -> {310};
310 -> {311};
311 -> {312};
312 -> {341} [label="onUncaughtException"];
312 -> {313} [style=dotted];
313 -> {314} [style=dotted];
314 -> {315} [style=dotted];
@@ -1207,7 +1206,6 @@ digraph boundSmartcastsInBranches_kt {
446 -> {447};
447 -> {448};
448 -> {449};
449 -> {479} [label="onUncaughtException"];
449 -> {450} [style=dotted];
450 -> {451} [style=dotted];
451 -> {452} [style=dotted];
@@ -295,7 +295,6 @@ digraph safeCalls_kt {
97 -> {98 99} [style=dotted];
97 -> {112} [style=dashed];
98 -> {99} [style=dotted];
99 -> {111} [style=dotted label="onUncaughtException"];
99 -> {100} [style=dotted];
100 -> {101 106} [style=dotted];
101 -> {102} [style=dotted];
@@ -36,11 +36,10 @@ digraph smartCastInInit_kt {
11 [label="Stub" style="filled" fillcolor=gray];
12 [label="Exit block" style="filled" fillcolor=gray];
}
13 [label="Exit function s" style="filled" fillcolor=red];
13 [label="Exit function s" style="filled" fillcolor=red style="filled" fillcolor=gray];
}
6 -> {7};
7 -> {8};
8 -> {13} [label="onUncaughtException"];
8 -> {9} [style=dotted];
9 -> {10} [style=dotted];
10 -> {11 13} [style=dotted];
@@ -16,12 +16,11 @@ digraph smartcastToNothing_kt {
6 [label="Stub" style="filled" fillcolor=gray];
7 [label="Exit block" style="filled" fillcolor=gray];
}
8 [label="Exit function getNothing" style="filled" fillcolor=red];
8 [label="Exit function getNothing" style="filled" fillcolor=red style="filled" fillcolor=gray];
}
0 -> {1};
1 -> {2};
2 -> {3};
3 -> {8} [label="onUncaughtException"];
3 -> {4} [style=dotted];
4 -> {5} [style=dotted];
5 -> {6 8} [style=dotted];
@@ -104,12 +103,11 @@ digraph smartcastToNothing_kt {
36 [label="Stub" style="filled" fillcolor=gray];
37 [label="Exit block" style="filled" fillcolor=gray];
}
38 [label="Exit function myListOf" style="filled" fillcolor=red];
38 [label="Exit function myListOf" style="filled" fillcolor=red style="filled" fillcolor=gray];
}
30 -> {31};
31 -> {32};
32 -> {33};
33 -> {38} [label="onUncaughtException"];
33 -> {34} [style=dotted];
34 -> {35} [style=dotted];
35 -> {36 38} [style=dotted];
@@ -266,17 +264,14 @@ digraph smartcastToNothing_kt {
65 -> {66};
66 -> {67};
67 -> {68};
68 -> {93} [label="onUncaughtException"];
68 -> {69} [style=dotted];
69 -> {70} [style=dotted];
70 -> {71} [style=dotted];
71 -> {93} [style=dotted label="onUncaughtException"];
71 -> {72} [style=dotted];
72 -> {73} [style=dotted];
73 -> {74} [style=dotted];
74 -> {75} [style=dotted];
75 -> {76} [style=dotted];
76 -> {93} [style=dotted label="onUncaughtException"];
76 -> {77} [style=dotted];
77 -> {78} [style=dotted];
78 -> {79} [style=dotted];
@@ -398,7 +393,6 @@ digraph smartcastToNothing_kt {
131 -> {132};
132 -> {133};
133 -> {134};
134 -> {142} [label="onUncaughtException"];
134 -> {135} [style=dotted];
135 -> {136} [style=dotted];
136 -> {137} [style=dotted];