[FIR] Add control flow graph for class initialization

This commit is contained in:
Dmitriy Novozhilov
2020-03-27 14:48:08 +03:00
parent ad9e6517c7
commit 8cb6e8f8af
43 changed files with 7687 additions and 7023 deletions
@@ -13,85 +13,91 @@ digraph smartcastFromArgument_kt {
subgraph cluster_1 {
color=red
2 [label="Enter function takeA" style="filled" fillcolor=red];
3 [label="Const: Boolean(true)"];
4 [label="Jump: ^takeA Boolean(true)"];
5 [label="Stub" style="filled" fillcolor=gray];
6 [label="Exit function takeA" style="filled" fillcolor=red];
2 [label="Enter class A" style="filled" fillcolor=red];
3 [label="Exit class A" style="filled" fillcolor=red];
}
2 -> {3};
3 -> {4};
4 -> {6};
4 -> {5} [style=dotted];
5 -> {6} [style=dotted];
2 -> {3} [color=green];
subgraph cluster_2 {
color=red
7 [label="Enter function test" style="filled" fillcolor=red];
subgraph cluster_3 {
color=blue
8 [label="Enter when"];
subgraph cluster_4 {
color=blue
9 [label="Enter when branch condition "];
subgraph cluster_5 {
color=blue
10 [label="Enter when"];
11 [label="Access variable R|<local>/a|"];
12 [label="Type operator: (R|<local>/a| as? R|A|)"];
13 [label="Variable declaration: lval <elvis>: R|A?|"];
subgraph cluster_6 {
color=blue
14 [label="Enter when branch condition "];
15 [label="Const: Null(null)"];
16 [label="Operator =="];
17 [label="Exit when branch condition"];
}
subgraph cluster_7 {
color=blue
18 [label="Enter when branch condition else"];
19 [label="Exit when branch condition"];
}
20 [label="Enter when branch result"];
subgraph cluster_8 {
color=blue
21 [label="Enter block"];
22 [label="Access variable R|<local>/<elvis>|"];
23 [label="Exit block"];
}
24 [label="Exit when branch result"];
25 [label="Enter when branch result"];
subgraph cluster_9 {
color=blue
26 [label="Enter block"];
27 [label="Jump: ^test Unit"];
28 [label="Stub" style="filled" fillcolor=gray];
29 [label="Exit block" style="filled" fillcolor=gray];
}
30 [label="Exit when branch result" style="filled" fillcolor=gray];
31 [label="Exit when"];
}
32 [label="Function call: R|/takeA|(...)"];
33 [label="Exit when branch condition"];
}
34 [label="Synthetic else branch"];
35 [label="Enter when branch result"];
subgraph cluster_10 {
color=blue
36 [label="Enter block"];
37 [label="Access variable R|<local>/a|"];
38 [label="Function call: R|<local>/a|.R|/A.foo|()"];
39 [label="Exit block"];
}
40 [label="Exit when branch result"];
41 [label="Exit when"];
}
42 [label="Exit function test" style="filled" fillcolor=red];
4 [label="Enter function takeA" style="filled" fillcolor=red];
5 [label="Const: Boolean(true)"];
6 [label="Jump: ^takeA Boolean(true)"];
7 [label="Stub" style="filled" fillcolor=gray];
8 [label="Exit function takeA" style="filled" fillcolor=red];
}
4 -> {5};
5 -> {6};
6 -> {8};
6 -> {7} [style=dotted];
7 -> {8} [style=dotted];
subgraph cluster_3 {
color=red
9 [label="Enter function test" style="filled" fillcolor=red];
subgraph cluster_4 {
color=blue
10 [label="Enter when"];
subgraph cluster_5 {
color=blue
11 [label="Enter when branch condition "];
subgraph cluster_6 {
color=blue
12 [label="Enter when"];
13 [label="Access variable R|<local>/a|"];
14 [label="Type operator: (R|<local>/a| as? R|A|)"];
15 [label="Variable declaration: lval <elvis>: R|A?|"];
subgraph cluster_7 {
color=blue
16 [label="Enter when branch condition "];
17 [label="Const: Null(null)"];
18 [label="Operator =="];
19 [label="Exit when branch condition"];
}
subgraph cluster_8 {
color=blue
20 [label="Enter when branch condition else"];
21 [label="Exit when branch condition"];
}
22 [label="Enter when branch result"];
subgraph cluster_9 {
color=blue
23 [label="Enter block"];
24 [label="Access variable R|<local>/<elvis>|"];
25 [label="Exit block"];
}
26 [label="Exit when branch result"];
27 [label="Enter when branch result"];
subgraph cluster_10 {
color=blue
28 [label="Enter block"];
29 [label="Jump: ^test Unit"];
30 [label="Stub" style="filled" fillcolor=gray];
31 [label="Exit block" style="filled" fillcolor=gray];
}
32 [label="Exit when branch result" style="filled" fillcolor=gray];
33 [label="Exit when"];
}
34 [label="Function call: R|/takeA|(...)"];
35 [label="Exit when branch condition"];
}
36 [label="Synthetic else branch"];
37 [label="Enter when branch result"];
subgraph cluster_11 {
color=blue
38 [label="Enter block"];
39 [label="Access variable R|<local>/a|"];
40 [label="Function call: R|<local>/a|.R|/A.foo|()"];
41 [label="Exit block"];
}
42 [label="Exit when branch result"];
43 [label="Exit when"];
}
44 [label="Exit function test" style="filled" fillcolor=red];
}
7 -> {8};
8 -> {9};
9 -> {10};
10 -> {11};
11 -> {12};
@@ -100,31 +106,33 @@ digraph smartcastFromArgument_kt {
14 -> {15};
15 -> {16};
16 -> {17};
17 -> {25 18};
17 -> {18};
18 -> {19};
19 -> {20};
19 -> {27 20};
20 -> {21};
21 -> {22};
22 -> {23};
23 -> {24};
24 -> {31};
24 -> {25};
25 -> {26};
26 -> {27};
27 -> {42};
27 -> {28} [style=dotted];
28 -> {29} [style=dotted];
26 -> {33};
27 -> {28};
28 -> {29};
29 -> {44};
29 -> {30} [style=dotted];
30 -> {31} [style=dotted];
31 -> {32};
32 -> {33};
33 -> {35 34};
34 -> {41};
35 -> {36};
36 -> {37};
31 -> {32} [style=dotted];
32 -> {33} [style=dotted];
33 -> {34};
34 -> {35};
35 -> {37 36};
36 -> {43};
37 -> {38};
38 -> {39};
39 -> {40};
40 -> {41};
41 -> {42};
42 -> {43};
43 -> {44};
}