[FIR] Add control flow graph for class initialization
This commit is contained in:
+175
-168
@@ -29,192 +29,199 @@ digraph elvis_kt {
|
||||
|
||||
subgraph cluster_3 {
|
||||
color=red
|
||||
6 [label="Enter function test_1" style="filled" fillcolor=red];
|
||||
subgraph cluster_4 {
|
||||
color=blue
|
||||
7 [label="Enter when"];
|
||||
subgraph cluster_5 {
|
||||
color=blue
|
||||
8 [label="Enter when branch condition "];
|
||||
subgraph cluster_6 {
|
||||
color=blue
|
||||
9 [label="Enter when"];
|
||||
10 [label="Access variable R|<local>/x|"];
|
||||
11 [label="Enter safe call"];
|
||||
12 [label="Access variable R|/A.b|"];
|
||||
13 [label="Exit safe call"];
|
||||
14 [label="Variable declaration: lval <elvis>: R|kotlin/Boolean?|"];
|
||||
subgraph cluster_7 {
|
||||
color=blue
|
||||
15 [label="Enter when branch condition "];
|
||||
16 [label="Const: Null(null)"];
|
||||
17 [label="Operator =="];
|
||||
18 [label="Exit when branch condition"];
|
||||
}
|
||||
subgraph cluster_8 {
|
||||
color=blue
|
||||
19 [label="Enter when branch condition else"];
|
||||
20 [label="Exit when branch condition"];
|
||||
}
|
||||
21 [label="Enter when branch result"];
|
||||
subgraph cluster_9 {
|
||||
color=blue
|
||||
22 [label="Enter block"];
|
||||
23 [label="Access variable R|<local>/<elvis>|"];
|
||||
24 [label="Exit block"];
|
||||
}
|
||||
25 [label="Exit when branch result"];
|
||||
26 [label="Enter when branch result"];
|
||||
subgraph cluster_10 {
|
||||
color=blue
|
||||
27 [label="Enter block"];
|
||||
28 [label="Jump: ^test_1 Unit"];
|
||||
29 [label="Stub" style="filled" fillcolor=gray];
|
||||
30 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
31 [label="Exit when branch result" style="filled" fillcolor=gray];
|
||||
32 [label="Exit when"];
|
||||
}
|
||||
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>/x|"];
|
||||
38 [label="Function call: R|<local>/x|.R|/A.foo|()"];
|
||||
39 [label="Exit block"];
|
||||
}
|
||||
40 [label="Exit when branch result"];
|
||||
41 [label="Exit when"];
|
||||
}
|
||||
42 [label="Exit function test_1" style="filled" fillcolor=red];
|
||||
6 [label="Enter class A" style="filled" fillcolor=red];
|
||||
7 [label="Exit class A" style="filled" fillcolor=red];
|
||||
}
|
||||
|
||||
|
||||
subgraph cluster_4 {
|
||||
color=red
|
||||
8 [label="Enter function test_1" style="filled" fillcolor=red];
|
||||
subgraph cluster_5 {
|
||||
color=blue
|
||||
9 [label="Enter when"];
|
||||
subgraph cluster_6 {
|
||||
color=blue
|
||||
10 [label="Enter when branch condition "];
|
||||
subgraph cluster_7 {
|
||||
color=blue
|
||||
11 [label="Enter when"];
|
||||
12 [label="Access variable R|<local>/x|"];
|
||||
13 [label="Enter safe call"];
|
||||
14 [label="Access variable R|/A.b|"];
|
||||
15 [label="Exit safe call"];
|
||||
16 [label="Variable declaration: lval <elvis>: R|kotlin/Boolean?|"];
|
||||
subgraph cluster_8 {
|
||||
color=blue
|
||||
17 [label="Enter when branch condition "];
|
||||
18 [label="Const: Null(null)"];
|
||||
19 [label="Operator =="];
|
||||
20 [label="Exit when branch condition"];
|
||||
}
|
||||
subgraph cluster_9 {
|
||||
color=blue
|
||||
21 [label="Enter when branch condition else"];
|
||||
22 [label="Exit when branch condition"];
|
||||
}
|
||||
23 [label="Enter when branch result"];
|
||||
subgraph cluster_10 {
|
||||
color=blue
|
||||
24 [label="Enter block"];
|
||||
25 [label="Access variable R|<local>/<elvis>|"];
|
||||
26 [label="Exit block"];
|
||||
}
|
||||
27 [label="Exit when branch result"];
|
||||
28 [label="Enter when branch result"];
|
||||
subgraph cluster_11 {
|
||||
color=blue
|
||||
29 [label="Enter block"];
|
||||
30 [label="Jump: ^test_1 Unit"];
|
||||
31 [label="Stub" style="filled" fillcolor=gray];
|
||||
32 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
33 [label="Exit when branch result" style="filled" fillcolor=gray];
|
||||
34 [label="Exit when"];
|
||||
}
|
||||
35 [label="Exit when branch condition"];
|
||||
}
|
||||
36 [label="Synthetic else branch"];
|
||||
37 [label="Enter when branch result"];
|
||||
subgraph cluster_12 {
|
||||
color=blue
|
||||
38 [label="Enter block"];
|
||||
39 [label="Access variable R|<local>/x|"];
|
||||
40 [label="Function call: R|<local>/x|.R|/A.foo|()"];
|
||||
41 [label="Exit block"];
|
||||
}
|
||||
42 [label="Exit when branch result"];
|
||||
43 [label="Exit when"];
|
||||
}
|
||||
44 [label="Exit function test_1" style="filled" fillcolor=red];
|
||||
}
|
||||
|
||||
6 -> {7};
|
||||
7 -> {8};
|
||||
8 -> {9};
|
||||
9 -> {10};
|
||||
10 -> {11 13};
|
||||
10 -> {11};
|
||||
11 -> {12};
|
||||
12 -> {13};
|
||||
12 -> {13 15};
|
||||
13 -> {14};
|
||||
14 -> {15};
|
||||
15 -> {16};
|
||||
16 -> {17};
|
||||
17 -> {18};
|
||||
18 -> {26 19};
|
||||
18 -> {19};
|
||||
19 -> {20};
|
||||
20 -> {21};
|
||||
20 -> {28 21};
|
||||
21 -> {22};
|
||||
22 -> {23};
|
||||
23 -> {24};
|
||||
24 -> {25};
|
||||
25 -> {32};
|
||||
25 -> {26};
|
||||
26 -> {27};
|
||||
27 -> {28};
|
||||
28 -> {42};
|
||||
28 -> {29} [style=dotted];
|
||||
29 -> {30} [style=dotted];
|
||||
27 -> {34};
|
||||
28 -> {29};
|
||||
29 -> {30};
|
||||
30 -> {44};
|
||||
30 -> {31} [style=dotted];
|
||||
31 -> {32} [style=dotted];
|
||||
32 -> {33};
|
||||
33 -> {35 34};
|
||||
34 -> {41};
|
||||
35 -> {36};
|
||||
36 -> {37};
|
||||
32 -> {33} [style=dotted];
|
||||
33 -> {34} [style=dotted];
|
||||
34 -> {35};
|
||||
35 -> {37 36};
|
||||
36 -> {43};
|
||||
37 -> {38};
|
||||
38 -> {39};
|
||||
39 -> {40};
|
||||
40 -> {41};
|
||||
41 -> {42};
|
||||
42 -> {43};
|
||||
43 -> {44};
|
||||
|
||||
subgraph cluster_12 {
|
||||
subgraph cluster_13 {
|
||||
color=red
|
||||
43 [label="Enter function test2" style="filled" fillcolor=red];
|
||||
subgraph cluster_13 {
|
||||
45 [label="Enter function test2" style="filled" fillcolor=red];
|
||||
subgraph cluster_14 {
|
||||
color=blue
|
||||
44 [label="Enter when"];
|
||||
subgraph cluster_14 {
|
||||
color=blue
|
||||
45 [label="Enter when branch condition "];
|
||||
46 [label="Access variable R|<local>/b|"];
|
||||
47 [label="Type operator: (R|<local>/b| !is R|kotlin/String|)"];
|
||||
48 [label="Exit when branch condition"];
|
||||
}
|
||||
49 [label="Synthetic else branch"];
|
||||
50 [label="Enter when branch result"];
|
||||
46 [label="Enter when"];
|
||||
subgraph cluster_15 {
|
||||
color=blue
|
||||
51 [label="Enter block"];
|
||||
52 [label="Const: String()"];
|
||||
53 [label="Jump: ^test2 String()"];
|
||||
54 [label="Stub" style="filled" fillcolor=gray];
|
||||
55 [label="Exit block" style="filled" fillcolor=gray];
|
||||
47 [label="Enter when branch condition "];
|
||||
48 [label="Access variable R|<local>/b|"];
|
||||
49 [label="Type operator: (R|<local>/b| !is R|kotlin/String|)"];
|
||||
50 [label="Exit when branch condition"];
|
||||
}
|
||||
56 [label="Exit when branch result" style="filled" fillcolor=gray];
|
||||
57 [label="Exit when"];
|
||||
}
|
||||
subgraph cluster_16 {
|
||||
color=blue
|
||||
58 [label="Enter when"];
|
||||
subgraph cluster_17 {
|
||||
51 [label="Synthetic else branch"];
|
||||
52 [label="Enter when branch result"];
|
||||
subgraph cluster_16 {
|
||||
color=blue
|
||||
59 [label="Enter when branch condition "];
|
||||
60 [label="Access variable R|<local>/a|"];
|
||||
61 [label="Type operator: (R|<local>/a| !is R|kotlin/String?|)"];
|
||||
62 [label="Exit when branch condition"];
|
||||
53 [label="Enter block"];
|
||||
54 [label="Const: String()"];
|
||||
55 [label="Jump: ^test2 String()"];
|
||||
56 [label="Stub" style="filled" fillcolor=gray];
|
||||
57 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
63 [label="Synthetic else branch"];
|
||||
64 [label="Enter when branch result"];
|
||||
58 [label="Exit when branch result" style="filled" fillcolor=gray];
|
||||
59 [label="Exit when"];
|
||||
}
|
||||
subgraph cluster_17 {
|
||||
color=blue
|
||||
60 [label="Enter when"];
|
||||
subgraph cluster_18 {
|
||||
color=blue
|
||||
65 [label="Enter block"];
|
||||
66 [label="Const: String()"];
|
||||
67 [label="Jump: ^test2 String()"];
|
||||
68 [label="Stub" style="filled" fillcolor=gray];
|
||||
69 [label="Exit block" style="filled" fillcolor=gray];
|
||||
61 [label="Enter when branch condition "];
|
||||
62 [label="Access variable R|<local>/a|"];
|
||||
63 [label="Type operator: (R|<local>/a| !is R|kotlin/String?|)"];
|
||||
64 [label="Exit when branch condition"];
|
||||
}
|
||||
70 [label="Exit when branch result" style="filled" fillcolor=gray];
|
||||
71 [label="Exit when"];
|
||||
}
|
||||
subgraph cluster_19 {
|
||||
color=blue
|
||||
72 [label="Enter when"];
|
||||
73 [label="Access variable R|<local>/a|"];
|
||||
74 [label="Variable declaration: lval <elvis>: R|kotlin/String?|"];
|
||||
subgraph cluster_20 {
|
||||
65 [label="Synthetic else branch"];
|
||||
66 [label="Enter when branch result"];
|
||||
subgraph cluster_19 {
|
||||
color=blue
|
||||
75 [label="Enter when branch condition "];
|
||||
76 [label="Const: Null(null)"];
|
||||
77 [label="Operator =="];
|
||||
78 [label="Exit when branch condition"];
|
||||
67 [label="Enter block"];
|
||||
68 [label="Const: String()"];
|
||||
69 [label="Jump: ^test2 String()"];
|
||||
70 [label="Stub" style="filled" fillcolor=gray];
|
||||
71 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
72 [label="Exit when branch result" style="filled" fillcolor=gray];
|
||||
73 [label="Exit when"];
|
||||
}
|
||||
subgraph cluster_20 {
|
||||
color=blue
|
||||
74 [label="Enter when"];
|
||||
75 [label="Access variable R|<local>/a|"];
|
||||
76 [label="Variable declaration: lval <elvis>: R|kotlin/String?|"];
|
||||
subgraph cluster_21 {
|
||||
color=blue
|
||||
79 [label="Enter when branch condition else"];
|
||||
77 [label="Enter when branch condition "];
|
||||
78 [label="Const: Null(null)"];
|
||||
79 [label="Operator =="];
|
||||
80 [label="Exit when branch condition"];
|
||||
}
|
||||
81 [label="Enter when branch result"];
|
||||
subgraph cluster_22 {
|
||||
color=blue
|
||||
82 [label="Enter block"];
|
||||
83 [label="Access variable R|<local>/<elvis>|"];
|
||||
84 [label="Exit block"];
|
||||
81 [label="Enter when branch condition else"];
|
||||
82 [label="Exit when branch condition"];
|
||||
}
|
||||
85 [label="Exit when branch result"];
|
||||
86 [label="Enter when branch result"];
|
||||
83 [label="Enter when branch result"];
|
||||
subgraph cluster_23 {
|
||||
color=blue
|
||||
87 [label="Enter block"];
|
||||
88 [label="Access variable R|<local>/b|"];
|
||||
89 [label="Exit block"];
|
||||
84 [label="Enter block"];
|
||||
85 [label="Access variable R|<local>/<elvis>|"];
|
||||
86 [label="Exit block"];
|
||||
}
|
||||
90 [label="Exit when branch result"];
|
||||
91 [label="Exit when"];
|
||||
87 [label="Exit when branch result"];
|
||||
88 [label="Enter when branch result"];
|
||||
subgraph cluster_24 {
|
||||
color=blue
|
||||
89 [label="Enter block"];
|
||||
90 [label="Access variable R|<local>/b|"];
|
||||
91 [label="Exit block"];
|
||||
}
|
||||
92 [label="Exit when branch result"];
|
||||
93 [label="Exit when"];
|
||||
}
|
||||
92 [label="Jump: ^test2 when (lval <elvis>: R|kotlin/String?| = R|<local>/a|) {
|
||||
94 [label="Jump: ^test2 when (lval <elvis>: R|kotlin/String?| = R|<local>/a|) {
|
||||
==($subj$, Null(null)) -> {
|
||||
R|<local>/b|
|
||||
}
|
||||
@@ -223,63 +230,63 @@ digraph elvis_kt {
|
||||
}
|
||||
}
|
||||
"];
|
||||
93 [label="Stub" style="filled" fillcolor=gray];
|
||||
94 [label="Exit function test2" style="filled" fillcolor=red];
|
||||
95 [label="Stub" style="filled" fillcolor=gray];
|
||||
96 [label="Exit function test2" style="filled" fillcolor=red];
|
||||
}
|
||||
|
||||
43 -> {44};
|
||||
44 -> {45};
|
||||
45 -> {46};
|
||||
46 -> {47};
|
||||
47 -> {48};
|
||||
48 -> {50 49};
|
||||
49 -> {57};
|
||||
50 -> {51};
|
||||
51 -> {52};
|
||||
48 -> {49};
|
||||
49 -> {50};
|
||||
50 -> {52 51};
|
||||
51 -> {59};
|
||||
52 -> {53};
|
||||
53 -> {94};
|
||||
53 -> {54} [style=dotted];
|
||||
54 -> {55} [style=dotted];
|
||||
53 -> {54};
|
||||
54 -> {55};
|
||||
55 -> {96};
|
||||
55 -> {56} [style=dotted];
|
||||
56 -> {57} [style=dotted];
|
||||
57 -> {58};
|
||||
58 -> {59};
|
||||
57 -> {58} [style=dotted];
|
||||
58 -> {59} [style=dotted];
|
||||
59 -> {60};
|
||||
60 -> {61};
|
||||
61 -> {62};
|
||||
62 -> {64 63};
|
||||
63 -> {71};
|
||||
64 -> {65};
|
||||
65 -> {66};
|
||||
62 -> {63};
|
||||
63 -> {64};
|
||||
64 -> {66 65};
|
||||
65 -> {73};
|
||||
66 -> {67};
|
||||
67 -> {94};
|
||||
67 -> {68} [style=dotted];
|
||||
68 -> {69} [style=dotted];
|
||||
67 -> {68};
|
||||
68 -> {69};
|
||||
69 -> {96};
|
||||
69 -> {70} [style=dotted];
|
||||
70 -> {71} [style=dotted];
|
||||
71 -> {72};
|
||||
72 -> {73};
|
||||
71 -> {72} [style=dotted];
|
||||
72 -> {73} [style=dotted];
|
||||
73 -> {74};
|
||||
74 -> {75};
|
||||
75 -> {76};
|
||||
76 -> {77};
|
||||
77 -> {78};
|
||||
78 -> {86 79};
|
||||
78 -> {79};
|
||||
79 -> {80};
|
||||
80 -> {81};
|
||||
80 -> {88 81};
|
||||
81 -> {82};
|
||||
82 -> {83};
|
||||
83 -> {84};
|
||||
84 -> {85};
|
||||
85 -> {91};
|
||||
85 -> {86};
|
||||
86 -> {87};
|
||||
87 -> {88};
|
||||
87 -> {93};
|
||||
88 -> {89};
|
||||
89 -> {90};
|
||||
90 -> {91};
|
||||
91 -> {92};
|
||||
92 -> {94};
|
||||
92 -> {93} [style=dotted];
|
||||
93 -> {94} [style=dotted];
|
||||
92 -> {93};
|
||||
93 -> {94};
|
||||
94 -> {96};
|
||||
94 -> {95} [style=dotted];
|
||||
95 -> {96} [style=dotted];
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user