Files
kotlin-fork/compiler/fir/analysis-tests/testData/resolveWithStdlib/smartcasts/tryWithLambdaInside.dot
T
Brian Norman f51b7faa1b [FIR] Only track assignment nodes for uncaught exception edges in CFG
UncaughtExceptionPath edges are used to influence smart-casting within
catch and finally blocks. Previously these edges were added from every
node which could throw an exception. But only assignment nodes influence
smart-casts by resetting inference back to some less specific type.
Therefore, instead of tracking every possible node which could throw an
exception - even though almost every statement node can - only add edges
from assignment nodes to catch and finally blocks. This fixes many
missing exception cases and also reduces the total number of incoming
edges to catch and finally blocks.

#KT-56872 Fixed
2023-09-05 11:59:13 +00:00

227 lines
7.7 KiB
Plaintext
Vendored

digraph tryWithLambdaInside_kt {
graph [nodesep=3]
node [shape=box penwidth=2]
edge [penwidth=2]
subgraph cluster_0 {
color=red
0 [label="Enter file tryWithLambdaInside.kt" style="filled" fillcolor=red];
1 [label="Exit file tryWithLambdaInside.kt" style="filled" fillcolor=red];
}
0 -> {1} [color=green];
subgraph cluster_1 {
color=red
2 [label="Enter function notInPlaceFilter" style="filled" fillcolor=red];
subgraph cluster_2 {
color=blue
3 [label="Enter block"];
4 [label="Access variable this@R|/notInPlaceFilter|"];
5 [label="Jump: ^notInPlaceFilter this@R|/notInPlaceFilter|"];
6 [label="Stub" style="filled" fillcolor=gray];
7 [label="Exit block" style="filled" fillcolor=gray];
}
8 [label="Exit function notInPlaceFilter" style="filled" fillcolor=red];
}
2 -> {3};
3 -> {4};
4 -> {5};
5 -> {8};
5 -> {6} [style=dotted];
6 -> {7} [style=dotted];
7 -> {8} [style=dotted];
subgraph cluster_3 {
color=red
9 [label="Enter function foo" style="filled" fillcolor=red];
subgraph cluster_4 {
color=blue
10 [label="Enter block"];
11 [label="Exit block"];
}
12 [label="Exit function foo" style="filled" fillcolor=red];
}
9 -> {10};
10 -> {11};
11 -> {12};
subgraph cluster_5 {
color=red
13 [label="Enter function testInPlace" style="filled" fillcolor=red];
subgraph cluster_6 {
color=blue
14 [label="Enter block"];
subgraph cluster_7 {
color=blue
15 [label="Try expression enter"];
subgraph cluster_8 {
color=blue
16 [label="Try main block enter"];
subgraph cluster_9 {
color=blue
17 [label="Enter block"];
18 [label="Access variable R|<local>/list|"];
19 [label="Postponed enter to lambda"];
subgraph cluster_10 {
color=blue
20 [label="Enter function <anonymous>" style="filled" fillcolor=red];
subgraph cluster_11 {
color=blue
21 [label="Enter block"];
22 [label="Access variable R|<local>/it|"];
23 [label="Exit block"];
}
24 [label="Exit function <anonymous>" style="filled" fillcolor=red];
}
25 [label="Postponed exit from lambda"];
26 [label="Function call: R|<local>/list|.R|kotlin/collections/filter|<R|kotlin/Boolean|>(...)" style="filled" fillcolor=yellow];
27 [label="Exit block"];
}
28 [label="Try main block exit"];
}
subgraph cluster_12 {
color=blue
29 [label="Enter finally"];
subgraph cluster_13 {
color=blue
30 [label="Enter block"];
31 [label="Exit block"];
}
32 [label="Exit finally"];
}
33 [label="Try expression exit"];
}
34 [label="Jump: ^testInPlace try {
R|<local>/list|.R|kotlin/collections/filter|<R|kotlin/Boolean|>(<L> = filter@fun <anonymous>(it: R|kotlin/Boolean|): R|kotlin/Boolean| <inline=Inline, kind=UNKNOWN> {
^ R|<local>/it|
}
)
}
finally {
}
"];
35 [label="Stub" style="filled" fillcolor=gray];
36 [label="Exit block" style="filled" fillcolor=gray];
}
37 [label="Exit function testInPlace" style="filled" fillcolor=red];
}
13 -> {14};
14 -> {15};
15 -> {16};
15 -> {29} [label="onUncaughtException"];
16 -> {17};
17 -> {18};
18 -> {19};
19 -> {20 25 26};
19 -> {20} [style=dashed];
20 -> {21};
21 -> {22};
22 -> {23};
23 -> {24};
24 -> {25};
25 -> {19} [color=green style=dashed];
25 -> {26} [color=green];
25 -> {33} [color=red];
26 -> {27};
27 -> {28};
28 -> {29};
29 -> {30};
30 -> {31};
31 -> {32};
32 -> {33};
33 -> {34};
34 -> {37};
34 -> {35} [style=dotted];
35 -> {36} [style=dotted];
36 -> {37} [style=dotted];
subgraph cluster_14 {
color=red
38 [label="Enter function testNotInPlace" style="filled" fillcolor=red];
subgraph cluster_15 {
color=blue
39 [label="Enter block"];
subgraph cluster_16 {
color=blue
40 [label="Try expression enter"];
subgraph cluster_17 {
color=blue
41 [label="Try main block enter"];
subgraph cluster_18 {
color=blue
42 [label="Enter block"];
43 [label="Access variable R|<local>/list|"];
44 [label="Postponed enter to lambda"];
subgraph cluster_19 {
color=blue
45 [label="Enter function <anonymous>" style="filled" fillcolor=red];
subgraph cluster_20 {
color=blue
46 [label="Enter block"];
47 [label="Access variable R|<local>/it|"];
48 [label="Exit block"];
}
49 [label="Exit function <anonymous>" style="filled" fillcolor=red];
}
50 [label="Postponed exit from lambda"];
51 [label="Function call: R|<local>/list|.R|/notInPlaceFilter|<R|kotlin/Boolean|>(...)" style="filled" fillcolor=yellow];
52 [label="Exit block"];
}
53 [label="Try main block exit"];
}
subgraph cluster_21 {
color=blue
54 [label="Enter finally"];
subgraph cluster_22 {
color=blue
55 [label="Enter block"];
56 [label="Exit block"];
}
57 [label="Exit finally"];
}
58 [label="Try expression exit"];
}
59 [label="Jump: ^testNotInPlace try {
R|<local>/list|.R|/notInPlaceFilter|<R|kotlin/Boolean|>(<L> = notInPlaceFilter@fun <anonymous>(it: R|kotlin/Boolean|): R|kotlin/Boolean| <inline=NoInline> {
^ R|<local>/it|
}
)
}
finally {
}
"];
60 [label="Stub" style="filled" fillcolor=gray];
61 [label="Exit block" style="filled" fillcolor=gray];
}
62 [label="Exit function testNotInPlace" style="filled" fillcolor=red];
}
38 -> {39};
39 -> {40};
40 -> {41};
40 -> {54} [label="onUncaughtException"];
41 -> {42};
42 -> {43};
43 -> {44};
44 -> {45 50 51};
44 -> {45} [style=dashed];
45 -> {46};
46 -> {47};
47 -> {48};
48 -> {49};
50 -> {51} [color=green];
50 -> {58} [color=red];
51 -> {52};
52 -> {53};
53 -> {54};
54 -> {55};
55 -> {56};
56 -> {57};
57 -> {58};
58 -> {59};
59 -> {62};
59 -> {60} [style=dotted];
60 -> {61} [style=dotted];
61 -> {62} [style=dotted];
}