[FIR] Fix incorrect cluster creating in CFG dumps

This commit is contained in:
Dmitriy Novozhilov
2020-10-12 11:09:52 +03:00
parent 3495ec198d
commit f794ced888
19 changed files with 4222 additions and 4274 deletions
@@ -117,206 +117,202 @@ digraph smartcastToNothing_kt {
subgraph cluster_10 {
color=red
38 [label="Enter class A" style="filled" fillcolor=red];
subgraph cluster_11 {
39 [label="Part of class initialization"];
40 [label="Part of class initialization"];
41 [label="Exit class A" style="filled" fillcolor=red];
}
38 -> {39} [color=green];
39 -> {40} [style=dotted];
39 -> {47} [color=green];
39 -> {47} [style=dashed];
40 -> {41} [style=dotted];
40 -> {52} [color=green];
40 -> {52} [style=dashed];
subgraph cluster_11 {
color=red
42 [label="Enter function <init>" style="filled" fillcolor=red];
43 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
44 [label="Exit function <init>" style="filled" fillcolor=red];
}
42 -> {43};
43 -> {44};
subgraph cluster_12 {
color=red
45 [label="Enter function getter" style="filled" fillcolor=red];
46 [label="Exit function getter" style="filled" fillcolor=red];
}
45 -> {46};
subgraph cluster_13 {
color=red
47 [label="Enter property" style="filled" fillcolor=red];
48 [label="Const: Int(1)"];
49 [label="Exit property" style="filled" fillcolor=red];
}
47 -> {48};
48 -> {49};
49 -> {40} [color=green];
subgraph cluster_14 {
color=red
50 [label="Enter function getter" style="filled" fillcolor=red];
51 [label="Exit function getter" style="filled" fillcolor=red];
}
50 -> {51};
subgraph cluster_15 {
color=red
52 [label="Enter property" style="filled" fillcolor=red];
53 [label="Const: Boolean(true)"];
54 [label="Exit property" style="filled" fillcolor=red];
}
52 -> {53};
53 -> {54};
54 -> {41} [color=green];
subgraph cluster_16 {
color=red
55 [label="Enter function test_0" style="filled" fillcolor=red];
subgraph cluster_17 {
color=blue
39 [label="Part of class initialization"];
subgraph cluster_12 {
color=blue
40 [label="Part of class initialization"];
41 [label="Exit class A" style="filled" fillcolor=red];
}
38 -> {39} [color=green];
39 -> {40} [style=dotted];
39 -> {47} [color=green];
39 -> {47} [style=dashed];
40 -> {41} [style=dotted];
40 -> {52} [color=green];
40 -> {52} [style=dashed];
subgraph cluster_13 {
color=red
42 [label="Enter function <init>" style="filled" fillcolor=red];
43 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
44 [label="Exit function <init>" style="filled" fillcolor=red];
}
42 -> {43};
43 -> {44};
subgraph cluster_14 {
color=red
45 [label="Enter function getter" style="filled" fillcolor=red];
46 [label="Exit function getter" style="filled" fillcolor=red];
}
45 -> {46};
subgraph cluster_15 {
color=red
47 [label="Enter property" style="filled" fillcolor=red];
48 [label="Const: Int(1)"];
49 [label="Exit property" style="filled" fillcolor=red];
}
47 -> {48};
48 -> {49};
49 -> {40} [color=green];
subgraph cluster_16 {
color=red
50 [label="Enter function getter" style="filled" fillcolor=red];
51 [label="Exit function getter" style="filled" fillcolor=red];
}
50 -> {51};
subgraph cluster_17 {
color=red
52 [label="Enter property" style="filled" fillcolor=red];
53 [label="Const: Boolean(true)"];
54 [label="Exit property" style="filled" fillcolor=red];
}
52 -> {53};
53 -> {54};
54 -> {41} [color=green];
56 [label="Enter block"];
57 [label="Const: Null(null)"];
58 [label="Variable declaration: lvar s: R|A?|"];
59 [label="Access variable R|<local>/results|"];
60 [label="Function call: R|<local>/results|.R|FakeOverride<kotlin/collections/List.iterator: R|kotlin/collections/Iterator<kotlin/Nothing>|>|()"];
61 [label="Variable declaration: lval <iterator>: R|kotlin/collections/Iterator<kotlin/Nothing>|"];
subgraph cluster_18 {
color=red
55 [label="Enter function test_0" style="filled" fillcolor=red];
color=blue
62 [label="Enter while loop"];
subgraph cluster_19 {
color=blue
56 [label="Enter block"];
57 [label="Const: Null(null)"];
58 [label="Variable declaration: lvar s: R|A?|"];
59 [label="Access variable R|<local>/results|"];
60 [label="Function call: R|<local>/results|.R|FakeOverride<kotlin/collections/List.iterator: R|kotlin/collections/Iterator<kotlin/Nothing>|>|()"];
61 [label="Variable declaration: lval <iterator>: R|kotlin/collections/Iterator<kotlin/Nothing>|"];
subgraph cluster_20 {
63 [label="Enter loop condition"];
64 [label="Access variable R|<local>/<iterator>|"];
65 [label="Function call: R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()"];
66 [label="Exit loop condition"];
}
subgraph cluster_20 {
color=blue
67 [label="Enter loop block"];
subgraph cluster_21 {
color=blue
62 [label="Enter while loop"];
subgraph cluster_21 {
color=blue
63 [label="Enter loop condition"];
64 [label="Access variable R|<local>/<iterator>|"];
65 [label="Function call: R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()"];
66 [label="Exit loop condition"];
}
68 [label="Enter block"];
69 [label="Access variable R|<local>/<iterator>|"];
70 [label="Function call: R|<local>/<iterator>|.R|FakeOverride<kotlin/collections/Iterator.next: R|kotlin/Nothing|>|()"];
71 [label="Stub" style="filled" fillcolor=gray];
72 [label="Variable declaration: lval result: R|kotlin/Nothing|" style="filled" fillcolor=gray];
73 [label="Access variable R|<local>/result|" style="filled" fillcolor=gray];
74 [label="Stub" style="filled" fillcolor=gray];
75 [label="Assignment: R|<local>/s|" style="filled" fillcolor=gray];
subgraph cluster_22 {
color=blue
67 [label="Enter loop block"];
76 [label="Enter when" style="filled" fillcolor=gray];
subgraph cluster_23 {
color=blue
68 [label="Enter block"];
69 [label="Access variable R|<local>/<iterator>|"];
70 [label="Function call: R|<local>/<iterator>|.R|FakeOverride<kotlin/collections/Iterator.next: R|kotlin/Nothing|>|()"];
71 [label="Stub" style="filled" fillcolor=gray];
72 [label="Variable declaration: lval result: R|kotlin/Nothing|" style="filled" fillcolor=gray];
73 [label="Access variable R|<local>/result|" style="filled" fillcolor=gray];
74 [label="Stub" style="filled" fillcolor=gray];
75 [label="Assignment: R|<local>/s|" style="filled" fillcolor=gray];
subgraph cluster_24 {
color=blue
76 [label="Enter when" style="filled" fillcolor=gray];
subgraph cluster_25 {
color=blue
77 [label="Enter when branch condition " style="filled" fillcolor=gray];
78 [label="Access variable R|<local>/result|" style="filled" fillcolor=gray];
79 [label="Stub" style="filled" fillcolor=gray];
80 [label="Access variable <Unresolved name: b>#" style="filled" fillcolor=gray];
81 [label="Exit when branch condition" style="filled" fillcolor=gray];
}
82 [label="Synthetic else branch" style="filled" fillcolor=gray];
83 [label="Enter when branch result" style="filled" fillcolor=gray];
subgraph cluster_26 {
color=blue
84 [label="Enter block" style="filled" fillcolor=gray];
85 [label="Jump: break@@@[R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()] " style="filled" fillcolor=gray];
86 [label="Stub" style="filled" fillcolor=gray];
87 [label="Exit block" style="filled" fillcolor=gray];
}
88 [label="Exit when branch result" style="filled" fillcolor=gray];
89 [label="Exit when" style="filled" fillcolor=gray];
}
90 [label="Exit block" style="filled" fillcolor=gray];
77 [label="Enter when branch condition " style="filled" fillcolor=gray];
78 [label="Access variable R|<local>/result|" style="filled" fillcolor=gray];
79 [label="Stub" style="filled" fillcolor=gray];
80 [label="Access variable <Unresolved name: b>#" style="filled" fillcolor=gray];
81 [label="Exit when branch condition" style="filled" fillcolor=gray];
}
91 [label="Exit loop block" style="filled" fillcolor=gray];
82 [label="Synthetic else branch" style="filled" fillcolor=gray];
83 [label="Enter when branch result" style="filled" fillcolor=gray];
subgraph cluster_24 {
color=blue
84 [label="Enter block" style="filled" fillcolor=gray];
85 [label="Jump: break@@@[R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()] " style="filled" fillcolor=gray];
86 [label="Stub" style="filled" fillcolor=gray];
87 [label="Exit block" style="filled" fillcolor=gray];
}
88 [label="Exit when branch result" style="filled" fillcolor=gray];
89 [label="Exit when" style="filled" fillcolor=gray];
}
92 [label="Exit whileloop"];
90 [label="Exit block" style="filled" fillcolor=gray];
}
93 [label="Access variable R|<local>/s|"];
94 [label="Enter safe call"];
95 [label="Postponed enter to lambda"];
subgraph cluster_27 {
color=blue
102 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_28 {
color=blue
103 [label="Enter block"];
104 [label="Access variable R|<local>/it|"];
105 [label="Access variable R|/A.a|"];
106 [label="Exit block"];
}
107 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
96 [label="Call arguments union" style="filled" fillcolor=yellow];
97 [label="Postponed exit from lambda"];
98 [label="Function call: $subj$.R|kotlin/let|<R|A|, R|kotlin/Int|>(...)"];
99 [label="Exit safe call"];
100 [label="Exit block"];
91 [label="Exit loop block" style="filled" fillcolor=gray];
}
101 [label="Exit function test_0" style="filled" fillcolor=red];
92 [label="Exit whileloop"];
}
55 -> {56};
56 -> {57};
57 -> {58};
58 -> {59};
59 -> {60};
60 -> {61};
61 -> {62};
62 -> {63};
63 -> {64};
64 -> {65};
65 -> {66};
66 -> {92 67};
67 -> {68};
68 -> {69};
69 -> {70};
70 -> {101};
70 -> {71} [style=dotted];
71 -> {72} [style=dotted];
72 -> {73} [style=dotted];
73 -> {101 74} [style=dotted];
74 -> {75} [style=dotted];
75 -> {76} [style=dotted];
76 -> {77} [style=dotted];
77 -> {78} [style=dotted];
78 -> {101 79} [style=dotted];
79 -> {80} [style=dotted];
80 -> {81} [style=dotted];
81 -> {83 82} [style=dotted];
82 -> {89} [style=dotted];
83 -> {84} [style=dotted];
84 -> {85} [style=dotted];
85 -> {92 86} [style=dotted];
86 -> {87} [style=dotted];
87 -> {88} [style=dotted];
88 -> {89} [style=dotted];
89 -> {90} [style=dotted];
90 -> {91} [style=dotted];
91 -> {63} [color=green style=dotted];
92 -> {93};
93 -> {94 99};
94 -> {95};
95 -> {102};
95 -> {97} [color=red];
95 -> {102} [style=dashed];
96 -> {98} [color=red];
97 -> {98} [color=green];
98 -> {99};
99 -> {100};
100 -> {101};
102 -> {103};
103 -> {104};
104 -> {105};
105 -> {106};
106 -> {107};
107 -> {96} [color=red];
107 -> {97} [color=green];
93 [label="Access variable R|<local>/s|"];
94 [label="Enter safe call"];
95 [label="Postponed enter to lambda"];
subgraph cluster_25 {
color=blue
102 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_26 {
color=blue
103 [label="Enter block"];
104 [label="Access variable R|<local>/it|"];
105 [label="Access variable R|/A.a|"];
106 [label="Exit block"];
}
107 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
96 [label="Call arguments union" style="filled" fillcolor=yellow];
97 [label="Postponed exit from lambda"];
98 [label="Function call: $subj$.R|kotlin/let|<R|A|, R|kotlin/Int|>(...)"];
99 [label="Exit safe call"];
100 [label="Exit block"];
}
101 [label="Exit function test_0" style="filled" fillcolor=red];
}
55 -> {56};
56 -> {57};
57 -> {58};
58 -> {59};
59 -> {60};
60 -> {61};
61 -> {62};
62 -> {63};
63 -> {64};
64 -> {65};
65 -> {66};
66 -> {92 67};
67 -> {68};
68 -> {69};
69 -> {70};
70 -> {101};
70 -> {71} [style=dotted];
71 -> {72} [style=dotted];
72 -> {73} [style=dotted];
73 -> {101 74} [style=dotted];
74 -> {75} [style=dotted];
75 -> {76} [style=dotted];
76 -> {77} [style=dotted];
77 -> {78} [style=dotted];
78 -> {101 79} [style=dotted];
79 -> {80} [style=dotted];
80 -> {81} [style=dotted];
81 -> {83 82} [style=dotted];
82 -> {89} [style=dotted];
83 -> {84} [style=dotted];
84 -> {85} [style=dotted];
85 -> {92 86} [style=dotted];
86 -> {87} [style=dotted];
87 -> {88} [style=dotted];
88 -> {89} [style=dotted];
89 -> {90} [style=dotted];
90 -> {91} [style=dotted];
91 -> {63} [color=green style=dotted];
92 -> {93};
93 -> {94 99};
94 -> {95};
95 -> {102};
95 -> {97} [color=red];
95 -> {102} [style=dashed];
96 -> {98} [color=red];
97 -> {98} [color=green];
98 -> {99};
99 -> {100};
100 -> {101};
102 -> {103};
103 -> {104};
104 -> {105};
105 -> {106};
106 -> {107};
107 -> {96} [color=red];
107 -> {97} [color=green];
}