[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
@@ -33,104 +33,119 @@ digraph overridenOpenVal_kt {
subgraph cluster_3 {
color=red
8 [label="Enter function <init>" style="filled" fillcolor=red];
9 [label="Access variable R|<local>/x|"];
10 [label="Delegated constructor call: super<R|A|>(...)"];
11 [label="Exit function <init>" style="filled" fillcolor=red];
8 [label="Enter class A" style="filled" fillcolor=red];
9 [label="Exit class A" style="filled" fillcolor=red];
}
8 -> {9};
9 -> {10};
10 -> {11};
subgraph cluster_4 {
color=red
12 [label="Enter function test_1" style="filled" fillcolor=red];
subgraph cluster_5 {
color=blue
13 [label="Enter when"];
subgraph cluster_6 {
color=blue
14 [label="Enter when branch condition "];
15 [label="Access variable R|/A.x|"];
16 [label="Type operator: (this@R|/B|.R|/A.x| is R|kotlin/String|)"];
17 [label="Exit when branch condition"];
}
18 [label="Synthetic else branch"];
19 [label="Enter when branch result"];
subgraph cluster_7 {
color=blue
20 [label="Enter block"];
21 [label="Access variable R|/A.x|"];
22 [label="Access variable R|kotlin/String.length|"];
23 [label="Exit block"];
}
24 [label="Exit when branch result"];
25 [label="Exit when"];
}
26 [label="Exit function test_1" style="filled" fillcolor=red];
10 [label="Enter function <init>" style="filled" fillcolor=red];
11 [label="Access variable R|<local>/x|"];
12 [label="Delegated constructor call: super<R|A|>(...)"];
13 [label="Exit function <init>" style="filled" fillcolor=red];
}
10 -> {11};
11 -> {12};
12 -> {13};
13 -> {14};
subgraph cluster_5 {
color=red
14 [label="Enter function test_1" style="filled" fillcolor=red];
subgraph cluster_6 {
color=blue
15 [label="Enter when"];
subgraph cluster_7 {
color=blue
16 [label="Enter when branch condition "];
17 [label="Access variable R|/A.x|"];
18 [label="Type operator: (this@R|/B|.R|/A.x| is R|kotlin/String|)"];
19 [label="Exit when branch condition"];
}
20 [label="Synthetic else branch"];
21 [label="Enter when branch result"];
subgraph cluster_8 {
color=blue
22 [label="Enter block"];
23 [label="Access variable R|/A.x|"];
24 [label="Access variable R|kotlin/String.length|"];
25 [label="Exit block"];
}
26 [label="Exit when branch result"];
27 [label="Exit when"];
}
28 [label="Exit function test_1" style="filled" fillcolor=red];
}
14 -> {15};
15 -> {16};
16 -> {17};
17 -> {19 18};
18 -> {25};
19 -> {20};
20 -> {21};
17 -> {18};
18 -> {19};
19 -> {21 20};
20 -> {27};
21 -> {22};
22 -> {23};
23 -> {24};
24 -> {25};
25 -> {26};
26 -> {27};
27 -> {28};
subgraph cluster_8 {
subgraph cluster_9 {
color=red
27 [label="Enter function test_2" style="filled" fillcolor=red];
subgraph cluster_9 {
color=blue
28 [label="Enter when"];
subgraph cluster_10 {
color=blue
29 [label="Enter when branch condition "];
30 [label="Access variable R|<local>/b|"];
31 [label="Access variable R|/A.x|"];
32 [label="Type operator: (R|<local>/b|.R|/A.x| is R|kotlin/String|)"];
33 [label="Exit when branch condition"];
}
34 [label="Synthetic else branch"];
35 [label="Enter when branch result"];
subgraph cluster_11 {
color=blue
36 [label="Enter block"];
37 [label="Access variable R|<local>/b|"];
38 [label="Access variable R|/A.x|"];
39 [label="Access variable R|kotlin/String.length|"];
40 [label="Exit block"];
}
41 [label="Exit when branch result"];
42 [label="Exit when"];
}
43 [label="Exit function test_2" style="filled" fillcolor=red];
29 [label="Enter class B" style="filled" fillcolor=red];
30 [label="Exit class B" style="filled" fillcolor=red];
}
29 -> {30} [color=green];
subgraph cluster_10 {
color=red
31 [label="Enter function test_2" style="filled" fillcolor=red];
subgraph cluster_11 {
color=blue
32 [label="Enter when"];
subgraph cluster_12 {
color=blue
33 [label="Enter when branch condition "];
34 [label="Access variable R|<local>/b|"];
35 [label="Access variable R|/A.x|"];
36 [label="Type operator: (R|<local>/b|.R|/A.x| is R|kotlin/String|)"];
37 [label="Exit when branch condition"];
}
38 [label="Synthetic else branch"];
39 [label="Enter when branch result"];
subgraph cluster_13 {
color=blue
40 [label="Enter block"];
41 [label="Access variable R|<local>/b|"];
42 [label="Access variable R|/A.x|"];
43 [label="Access variable R|kotlin/String.length|"];
44 [label="Exit block"];
}
45 [label="Exit when branch result"];
46 [label="Exit when"];
}
47 [label="Exit function test_2" style="filled" fillcolor=red];
}
27 -> {28};
28 -> {29};
29 -> {30};
30 -> {31};
31 -> {32};
32 -> {33};
33 -> {35 34};
34 -> {42};
33 -> {34};
34 -> {35};
35 -> {36};
36 -> {37};
37 -> {38};
38 -> {39};
37 -> {39 38};
38 -> {46};
39 -> {40};
40 -> {41};
41 -> {42};
42 -> {43};
43 -> {44};
44 -> {45};
45 -> {46};
46 -> {47};
}