Files
kotlin-fork/compiler/fir/analysis-tests/testData/resolve/smartcasts/lambdas/lambdaInWhenBranch.dot
T
pyos c4c05f5248 FIR CFG: remove ordering from control flow through in-place lambdas
Old graph:

  arg -> lambda enter -> ... -> lambda exit -> lambda enter -> ... ->
   -> lambda exit -> call

New graph:

  arg -+-> lambda enter -> ... -> lambda exit -+-> call
       \-> lambda enter -> ... -> lambda exit -/
2022-12-08 10:19:31 +00:00

262 lines
8.6 KiB
Plaintext
Vendored

digraph lambdaInWhenBranch_kt {
graph [nodesep=3]
node [shape=box penwidth=2]
edge [penwidth=2]
subgraph cluster_0 {
color=red
0 [label="Enter function <init>" style="filled" fillcolor=red];
1 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
2 [label="Exit function <init>" style="filled" fillcolor=red];
}
0 -> {1};
1 -> {2};
subgraph cluster_1 {
color=red
3 [label="Enter class Sealed" style="filled" fillcolor=red];
4 [label="Exit class Sealed" style="filled" fillcolor=red];
}
3 -> {4} [color=green];
subgraph cluster_2 {
color=red
5 [label="Enter function <init>" style="filled" fillcolor=red];
6 [label="Delegated constructor call: super<R|Sealed|>()" style="filled" fillcolor=yellow];
7 [label="Exit function <init>" style="filled" fillcolor=red];
}
5 -> {6};
6 -> {7};
subgraph cluster_3 {
color=red
8 [label="Enter property" style="filled" fillcolor=red];
9 [label="Access variable R|<local>/t|"];
10 [label="Exit property" style="filled" fillcolor=red];
}
8 -> {9};
9 -> {10};
10 -> {20} [color=green];
subgraph cluster_4 {
color=red
11 [label="Enter function component1" style="filled" fillcolor=red];
12 [label="Exit function component1" style="filled" fillcolor=red];
}
11 -> {12};
subgraph cluster_5 {
color=red
13 [label="Enter function copy" style="filled" fillcolor=red];
subgraph cluster_6 {
color=blue
15 [label="Enter default value of t" style="filled" fillcolor=red];
16 [label="Access variable R|/SubClass1.t|"];
17 [label="Exit default value of t" style="filled" fillcolor=red];
}
14 [label="Exit function copy" style="filled" fillcolor=red];
}
13 -> {15 14};
15 -> {16};
15 -> {15} [style=dashed];
16 -> {17};
subgraph cluster_7 {
color=red
18 [label="Enter class SubClass1" style="filled" fillcolor=red];
19 [label="Part of class initialization"];
20 [label="Exit class SubClass1" style="filled" fillcolor=red];
}
18 -> {19} [color=green];
19 -> {20} [style=dotted];
19 -> {8} [color=green];
19 -> {8} [style=dashed];
subgraph cluster_8 {
color=red
21 [label="Enter function <init>" style="filled" fillcolor=red];
22 [label="Delegated constructor call: super<R|Sealed|>()" style="filled" fillcolor=yellow];
23 [label="Exit function <init>" style="filled" fillcolor=red];
}
21 -> {22};
22 -> {23};
subgraph cluster_9 {
color=red
24 [label="Enter function copy" style="filled" fillcolor=red];
25 [label="Exit function copy" style="filled" fillcolor=red];
}
24 -> {25};
subgraph cluster_10 {
color=red
26 [label="Enter class SubClass2" style="filled" fillcolor=red];
27 [label="Exit class SubClass2" style="filled" fillcolor=red];
}
26 -> {27} [color=green];
subgraph cluster_11 {
color=red
28 [label="Enter function foo" style="filled" fillcolor=red];
subgraph cluster_12 {
color=blue
29 [label="Enter block"];
subgraph cluster_13 {
color=blue
30 [label="Enter when"];
31 [label="Access variable R|<local>/p|"];
subgraph cluster_14 {
color=blue
32 [label="Enter when branch condition "];
33 [label="Exit $subj"];
34 [label="Type operator: ($subj$ is R|SubClass1|)"];
35 [label="Exit when branch condition"];
}
subgraph cluster_15 {
color=blue
36 [label="Enter when branch condition "];
37 [label="Exit $subj"];
38 [label="Type operator: ($subj$ is R|SubClass2|)"];
39 [label="Exit when branch condition"];
}
40 [label="Enter when branch result"];
subgraph cluster_16 {
color=blue
41 [label="Enter block"];
42 [label="Const: String()"];
43 [label="Exit block"];
}
44 [label="Exit when branch result"];
45 [label="Enter when branch result"];
subgraph cluster_17 {
color=blue
46 [label="Enter block"];
47 [label="Const: String()"];
48 [label="Postponed enter to lambda"];
subgraph cluster_18 {
color=blue
82 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_19 {
color=blue
83 [label="Enter block"];
84 [label="Access variable R|<local>/it|"];
85 [label="Exit block"];
}
86 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
49 [label="Postponed exit from lambda"];
50 [label="Function call: String().R|kotlin/let|<R|kotlin/String|, R|kotlin/String|>(...)" style="filled" fillcolor=yellow];
51 [label="Exit block"];
}
52 [label="Exit when branch result"];
53 [label="Exit when"];
}
54 [label="Access variable R|<local>/p|"];
55 [label="Access variable <Unresolved name: t>#"];
subgraph cluster_20 {
color=blue
56 [label="Enter when"];
57 [label="Access variable R|<local>/p|"];
subgraph cluster_21 {
color=blue
58 [label="Enter when branch condition "];
59 [label="Exit $subj"];
60 [label="Type operator: ($subj$ is R|SubClass1|)"];
61 [label="Exit when branch condition"];
}
subgraph cluster_22 {
color=blue
62 [label="Enter when branch condition "];
63 [label="Exit $subj"];
64 [label="Type operator: ($subj$ is R|SubClass2|)"];
65 [label="Exit when branch condition"];
}
66 [label="Enter when branch result"];
subgraph cluster_23 {
color=blue
67 [label="Enter block"];
68 [label="Const: String(2)"];
69 [label="Exit block"];
}
70 [label="Exit when branch result"];
71 [label="Enter when branch result"];
subgraph cluster_24 {
color=blue
72 [label="Enter block"];
73 [label="Access variable R|<local>/p|"];
74 [label="Smart cast: R|<local>/p|"];
75 [label="Access variable R|/SubClass1.t|"];
76 [label="Exit block"];
}
77 [label="Exit when branch result"];
78 [label="Exit when"];
}
79 [label="Access variable R|kotlin/String.length|"];
80 [label="Exit block"];
}
81 [label="Exit function foo" style="filled" fillcolor=red];
}
28 -> {29};
29 -> {30};
30 -> {31};
31 -> {32};
32 -> {33};
33 -> {34};
34 -> {35};
35 -> {45 36};
36 -> {37};
37 -> {38};
38 -> {39};
39 -> {40};
40 -> {41};
41 -> {42};
42 -> {43};
43 -> {44};
44 -> {53};
45 -> {46};
46 -> {47};
47 -> {48};
48 -> {82 50};
48 -> {49} [style=dotted];
48 -> {82} [style=dashed];
49 -> {53} [color=red];
49 -> {50} [color=green];
50 -> {51};
51 -> {52};
52 -> {53};
53 -> {54};
54 -> {55};
55 -> {56};
56 -> {57};
57 -> {58};
58 -> {59};
59 -> {60};
60 -> {61};
61 -> {71 62};
62 -> {63};
63 -> {64};
64 -> {65};
65 -> {66};
66 -> {67};
67 -> {68};
68 -> {69};
69 -> {70};
70 -> {78};
71 -> {72};
72 -> {73};
73 -> {74};
74 -> {75};
75 -> {76};
76 -> {77};
77 -> {78};
78 -> {79};
79 -> {80};
80 -> {81};
82 -> {83};
83 -> {84};
84 -> {85};
85 -> {86};
86 -> {49};
}