[FIR] Add control flow graph to inplace lambdas

This commit is contained in:
Dmitriy Novozhilov
2020-03-31 15:23:32 +03:00
parent 1d39270b3e
commit bcd2e5ed2c
20 changed files with 983 additions and 996 deletions
@@ -61,153 +61,153 @@ digraph propertiesAndInitBlocks_kt {
subgraph cluster_6 {
color=red
29 [label="Enter function <init>" style="filled" fillcolor=red];
31 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
30 [label="Exit function <init>" style="filled" fillcolor=red];
35 [label="Enter function <init>" style="filled" fillcolor=red];
37 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
36 [label="Exit function <init>" style="filled" fillcolor=red];
}
29 -> {31};
31 -> {30};
35 -> {37};
37 -> {36};
subgraph cluster_7 {
color=red
40 [label="Enter class LocalClass" style="filled" fillcolor=red];
46 [label="Enter class LocalClass" style="filled" fillcolor=red];
subgraph cluster_8 {
color=blue
32 [label="Enter init block" style="filled" fillcolor=red];
38 [label="Enter init block" style="filled" fillcolor=red];
subgraph cluster_9 {
color=blue
34 [label="Enter block"];
35 [label="Function call: R|java/lang/Exception.Exception|()"];
36 [label="Throw: throw R|java/lang/Exception.Exception|()"];
37 [label="Stub" style="filled" fillcolor=gray];
38 [label="Const: Int(1)" style="filled" fillcolor=gray];
39 [label="Exit block" style="filled" fillcolor=gray];
40 [label="Enter block"];
41 [label="Function call: R|java/lang/Exception.Exception|()"];
42 [label="Throw: throw R|java/lang/Exception.Exception|()"];
43 [label="Stub" style="filled" fillcolor=gray];
44 [label="Const: Int(1)" style="filled" fillcolor=gray];
45 [label="Exit block" style="filled" fillcolor=gray];
}
33 [label="Exit init block" style="filled" fillcolor=red];
39 [label="Exit init block" style="filled" fillcolor=red];
}
41 [label="Exit class LocalClass" style="filled" fillcolor=red];
47 [label="Exit class LocalClass" style="filled" fillcolor=red];
}
40 -> {32} [color=green];
32 -> {34};
33 -> {41} [color=green];
34 -> {35};
35 -> {36};
36 -> {33};
36 -> {37} [style=dotted];
37 -> {38} [style=dotted];
38 -> {39} [style=dotted];
39 -> {33} [style=dotted];
46 -> {38} [color=green];
38 -> {40};
39 -> {47} [color=green];
40 -> {41};
41 -> {42};
42 -> {39};
42 -> {43} [style=dotted];
43 -> {44} [style=dotted];
44 -> {45} [style=dotted];
45 -> {39} [style=dotted];
subgraph cluster_10 {
color=red
45 [label="Enter function <init>" style="filled" fillcolor=red];
47 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
46 [label="Exit function <init>" style="filled" fillcolor=red];
51 [label="Enter function <init>" style="filled" fillcolor=red];
53 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
52 [label="Exit function <init>" style="filled" fillcolor=red];
}
45 -> {47};
47 -> {46};
51 -> {53};
53 -> {52};
subgraph cluster_11 {
color=red
55 [label="Enter class LocalClass" style="filled" fillcolor=red];
61 [label="Enter class LocalClass" style="filled" fillcolor=red];
subgraph cluster_12 {
color=blue
48 [label="Enter init block" style="filled" fillcolor=red];
54 [label="Enter init block" style="filled" fillcolor=red];
subgraph cluster_13 {
color=blue
50 [label="Enter block"];
51 [label="Function call: R|java/lang/Exception.Exception|()"];
52 [label="Throw: throw R|java/lang/Exception.Exception|()"];
53 [label="Stub" style="filled" fillcolor=gray];
54 [label="Exit block" style="filled" fillcolor=gray];
56 [label="Enter block"];
57 [label="Function call: R|java/lang/Exception.Exception|()"];
58 [label="Throw: throw R|java/lang/Exception.Exception|()"];
59 [label="Stub" style="filled" fillcolor=gray];
60 [label="Exit block" style="filled" fillcolor=gray];
}
49 [label="Exit init block" style="filled" fillcolor=red];
55 [label="Exit init block" style="filled" fillcolor=red];
}
56 [label="Exit class LocalClass" style="filled" fillcolor=red];
62 [label="Exit class LocalClass" style="filled" fillcolor=red];
}
55 -> {48} [color=green];
48 -> {50};
49 -> {56} [color=green];
50 -> {51};
51 -> {52};
52 -> {49};
52 -> {53} [style=dotted];
53 -> {54} [style=dotted];
54 -> {49} [style=dotted];
61 -> {54} [color=green];
54 -> {56};
55 -> {62} [color=green];
56 -> {57};
57 -> {58};
58 -> {55};
58 -> {59} [style=dotted];
59 -> {60} [style=dotted];
60 -> {55} [style=dotted];
subgraph cluster_14 {
color=red
57 [label="Enter property" style="filled" fillcolor=red];
63 [label="Enter property" style="filled" fillcolor=red];
subgraph cluster_15 {
color=blue
42 [label="Enter function getter" style="filled" fillcolor=red];
44 [label="Exit local class <getter>"];
43 [label="Exit function getter" style="filled" fillcolor=red];
48 [label="Enter function getter" style="filled" fillcolor=red];
50 [label="Exit local class <getter>"];
49 [label="Exit function getter" style="filled" fillcolor=red];
}
subgraph cluster_16 {
color=blue
45 [label="Enter function <init>" style="filled" fillcolor=red];
47 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
46 [label="Exit function <init>" style="filled" fillcolor=red];
51 [label="Enter function <init>" style="filled" fillcolor=red];
53 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
52 [label="Exit function <init>" style="filled" fillcolor=red];
}
59 [label="Postponed enter to lambda"];
65 [label="Postponed enter to lambda"];
subgraph cluster_17 {
color=blue
61 [label="Enter function anonymousFunction"];
63 [label="Exit local class val x3"];
64 [label="Function call: R|java/lang/Exception.Exception|()"];
65 [label="Throw: throw R|java/lang/Exception.Exception|()"];
66 [label="Stub" style="filled" fillcolor=gray];
20 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
22 [label="Exit local class <anonymous>"];
23 [label="Function call: R|java/lang/Exception.Exception|()"];
24 [label="Throw: throw R|java/lang/Exception.Exception|()"];
25 [label="Stub" style="filled" fillcolor=gray];
subgraph cluster_18 {
color=blue
29 [label="Enter function <init>" style="filled" fillcolor=red];
31 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
30 [label="Exit function <init>" style="filled" fillcolor=red];
35 [label="Enter function <init>" style="filled" fillcolor=red];
37 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
36 [label="Exit function <init>" style="filled" fillcolor=red];
}
subgraph cluster_19 {
color=blue
20 [label="Enter function foo" style="filled" fillcolor=red];
22 [label="Const: Int(1)"];
23 [label="Const: Int(1)"];
24 [label="Function call: Int(1).R|kotlin/Int.plus|(...)"];
25 [label="Variable declaration: lval c: R|kotlin/Int|"];
26 [label="Function call: R|java/lang/Exception.Exception|()"];
27 [label="Throw: throw R|java/lang/Exception.Exception|()"];
28 [label="Stub" style="filled" fillcolor=gray];
21 [label="Exit function foo" style="filled" fillcolor=red];
26 [label="Enter function foo" style="filled" fillcolor=red];
28 [label="Const: Int(1)"];
29 [label="Const: Int(1)"];
30 [label="Function call: Int(1).R|kotlin/Int.plus|(...)"];
31 [label="Variable declaration: lval c: R|kotlin/Int|"];
32 [label="Function call: R|java/lang/Exception.Exception|()"];
33 [label="Throw: throw R|java/lang/Exception.Exception|()"];
34 [label="Stub" style="filled" fillcolor=gray];
27 [label="Exit function foo" style="filled" fillcolor=red];
}
62 [label="Exit function anonymousFunction"];
21 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
60 [label="Postponed exit from lambda"];
66 [label="Postponed exit from lambda"];
67 [label="Function call: R|/run|(...)"];
58 [label="Exit property" style="filled" fillcolor=red];
64 [label="Exit property" style="filled" fillcolor=red];
}
57 -> {59};
59 -> {61};
59 -> {60} [color=red];
60 -> {67};
61 -> {62 63};
61 -> {20 29} [color=red];
62 -> {61};
62 -> {60} [color=green];
63 -> {64};
64 -> {65};
65 -> {58};
65 -> {66} [style=dotted];
66 -> {62} [style=dotted];
67 -> {58};
20 -> {22};
63 -> {65};
65 -> {20};
65 -> {66} [color=red];
66 -> {67};
67 -> {64};
20 -> {21 22};
20 -> {26 35} [color=red];
21 -> {20};
21 -> {66} [color=green];
22 -> {23};
23 -> {24};
24 -> {25};
25 -> {26};
26 -> {27};
27 -> {21};
27 -> {28} [style=dotted];
28 -> {21} [style=dotted];
42 -> {44};
42 -> {45} [color=red];
44 -> {43};
24 -> {64};
24 -> {25} [style=dotted];
25 -> {21} [style=dotted];
26 -> {28};
28 -> {29};
29 -> {30};
30 -> {31};
31 -> {32};
32 -> {33};
33 -> {27};
33 -> {34} [style=dotted];
34 -> {27} [style=dotted];
48 -> {50};
48 -> {51} [color=red];
50 -> {49};
subgraph cluster_20 {
color=red