[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
+56 -56
View File
@@ -25,7 +25,7 @@ digraph lambdas_kt {
9 [label="Type operator: (R|<local>/x| is R|kotlin/Int|)"];
10 [label="Exit when branch condition"];
}
22 [label="Synthetic else branch"];
18 [label="Synthetic else branch"];
11 [label="Enter when branch result"];
subgraph cluster_4 {
color=blue
@@ -33,16 +33,16 @@ digraph lambdas_kt {
13 [label="Postponed enter to lambda"];
subgraph cluster_5 {
color=blue
15 [label="Enter function anonymousFunction"];
17 [label="Access variable R|<local>/x|"];
18 [label="Function call: R|<local>/x|.R|kotlin/Int.inc|()"];
16 [label="Exit function anonymousFunction"];
19 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
21 [label="Access variable R|<local>/x|"];
22 [label="Function call: R|<local>/x|.R|kotlin/Int.inc|()"];
20 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
14 [label="Postponed exit from lambda"];
19 [label="Function call: R|/run|(...)"];
20 [label="Exit block"];
15 [label="Function call: R|/run|(...)"];
16 [label="Exit block"];
}
21 [label="Exit when branch result"];
17 [label="Exit when branch result"];
6 [label="Exit when"];
}
4 [label="Exit function test_1" style="filled" fillcolor=red];
@@ -53,21 +53,21 @@ digraph lambdas_kt {
7 -> {8};
8 -> {9};
9 -> {10};
10 -> {11 22};
10 -> {11 18};
11 -> {12};
12 -> {13};
13 -> {15};
13 -> {19};
13 -> {14} [color=red];
14 -> {19};
15 -> {16 17};
16 -> {15};
16 -> {14} [color=green];
17 -> {18};
18 -> {16};
19 -> {20};
20 -> {21};
21 -> {6};
22 -> {6};
14 -> {15};
15 -> {16};
16 -> {17};
17 -> {6};
18 -> {6};
19 -> {20 21};
20 -> {19};
20 -> {14} [color=green];
21 -> {22};
22 -> {20};
subgraph cluster_6 {
color=red
@@ -142,36 +142,36 @@ digraph lambdas_kt {
49 [label="Postponed enter to lambda"];
subgraph cluster_13 {
color=blue
51 [label="Enter function anonymousFunction"];
53 [label="Const: Int(1)"];
54 [label="Jump: ^test_3 Int(1)"];
55 [label="Stub" style="filled" fillcolor=gray];
52 [label="Exit function anonymousFunction"];
54 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
56 [label="Const: Int(1)"];
57 [label="Jump: ^test_3 Int(1)"];
58 [label="Stub" style="filled" fillcolor=gray];
55 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
50 [label="Postponed exit from lambda"];
56 [label="Function call: R|/getInt|(...)"];
57 [label="Jump: ^test_3 R|/getInt|(<L> = getInt@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> {
51 [label="Function call: R|/getInt|(...)"];
52 [label="Jump: ^test_3 R|/getInt|(<L> = getInt@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> {
^test_3 Int(1)
}
)"];
58 [label="Stub" style="filled" fillcolor=gray];
53 [label="Stub" style="filled" fillcolor=gray];
48 [label="Exit function test_3" style="filled" fillcolor=red];
}
47 -> {49};
49 -> {51};
49 -> {54};
49 -> {50} [color=red];
50 -> {56};
51 -> {52 53};
52 -> {51};
52 -> {50} [color=green];
53 -> {54};
54 -> {48};
54 -> {55} [style=dotted];
55 -> {52} [style=dotted];
50 -> {51};
51 -> {52};
52 -> {48};
52 -> {53} [style=dotted];
53 -> {48} [style=dotted];
54 -> {55 56};
55 -> {54};
55 -> {50} [color=green];
56 -> {57};
57 -> {48};
57 -> {58} [style=dotted];
58 -> {48} [style=dotted];
58 -> {55} [style=dotted];
subgraph cluster_14 {
color=red
@@ -179,35 +179,35 @@ digraph lambdas_kt {
61 [label="Postponed enter to lambda"];
subgraph cluster_15 {
color=blue
63 [label="Enter function anonymousFunction"];
65 [label="Const: Int(1)"];
66 [label="Jump: ^test_4 Int(1)"];
67 [label="Stub" style="filled" fillcolor=gray];
64 [label="Exit function anonymousFunction"];
66 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
68 [label="Const: Int(1)"];
69 [label="Jump: ^test_4 Int(1)"];
70 [label="Stub" style="filled" fillcolor=gray];
67 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
62 [label="Postponed exit from lambda"];
68 [label="Function call: R|/getInt|(...)"];
69 [label="Jump: ^test_4 R|/getInt|(block = getInt@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> {
63 [label="Function call: R|/getInt|(...)"];
64 [label="Jump: ^test_4 R|/getInt|(block = getInt@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> {
^test_4 Int(1)
}
)"];
70 [label="Stub" style="filled" fillcolor=gray];
65 [label="Stub" style="filled" fillcolor=gray];
60 [label="Exit function test_4" style="filled" fillcolor=red];
}
59 -> {61};
61 -> {63};
61 -> {66};
61 -> {62} [color=red];
62 -> {68};
63 -> {64 65};
64 -> {63};
64 -> {62} [color=green];
65 -> {66};
66 -> {60};
66 -> {67} [style=dotted];
67 -> {64} [style=dotted];
62 -> {63};
63 -> {64};
64 -> {60};
64 -> {65} [style=dotted];
65 -> {60} [style=dotted];
66 -> {67 68};
67 -> {66};
67 -> {62} [color=green];
68 -> {69};
69 -> {60};
69 -> {70} [style=dotted];
70 -> {60} [style=dotted];
70 -> {67} [style=dotted];
}