提交 8cb6e8f8 编写于 作者: D Dmitriy Novozhilov

[FIR] Add control flow graph for class initialization

上级 ad9e6517
......@@ -13,93 +13,101 @@ digraph complex_kt {
subgraph cluster_1 {
color=red
2 [label="Enter function addSuppressed" style="filled" fillcolor=red];
3 [label="Exit function addSuppressed" style="filled" fillcolor=red];
2 [label="Enter class AutoCloseable" style="filled" fillcolor=red];
3 [label="Exit class AutoCloseable" style="filled" fillcolor=red];
}
2 -> {3};
2 -> {3} [color=green];
subgraph cluster_2 {
color=red
4 [label="Enter function closeFinally" style="filled" fillcolor=red];
subgraph cluster_3 {
4 [label="Enter function addSuppressed" style="filled" fillcolor=red];
5 [label="Exit function addSuppressed" style="filled" fillcolor=red];
}
4 -> {5};
subgraph cluster_3 {
color=red
6 [label="Enter function closeFinally" style="filled" fillcolor=red];
subgraph cluster_4 {
color=blue
5 [label="Enter when"];
subgraph cluster_4 {
color=blue
6 [label="Enter when branch condition "];
7 [label="Access variable this@R|/closeFinally|"];
8 [label="Const: Null(null)"];
9 [label="Operator =="];
10 [label="Exit when branch condition"];
}
7 [label="Enter when"];
subgraph cluster_5 {
color=blue
11 [label="Enter when branch condition "];
12 [label="Access variable R|<local>/cause|"];
13 [label="Const: Null(null)"];
14 [label="Operator =="];
15 [label="Exit when branch condition"];
8 [label="Enter when branch condition "];
9 [label="Access variable this@R|/closeFinally|"];
10 [label="Const: Null(null)"];
11 [label="Operator =="];
12 [label="Exit when branch condition"];
}
subgraph cluster_6 {
color=blue
16 [label="Enter when branch condition else"];
13 [label="Enter when branch condition "];
14 [label="Access variable R|<local>/cause|"];
15 [label="Const: Null(null)"];
16 [label="Operator =="];
17 [label="Exit when branch condition"];
}
18 [label="Enter when branch result"];
subgraph cluster_7 {
color=blue
19 [label="Enter block"];
subgraph cluster_8 {
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"];
subgraph cluster_9 {
color=blue
20 [label="Try expression enter"];
subgraph cluster_9 {
22 [label="Try expression enter"];
subgraph cluster_10 {
color=blue
21 [label="Try main block enter"];
subgraph cluster_10 {
23 [label="Try main block enter"];
subgraph cluster_11 {
color=blue
22 [label="Enter block"];
23 [label="Function call: this@R|/closeFinally|.R|/AutoCloseable.close|()"];
24 [label="Exit block"];
24 [label="Enter block"];
25 [label="Function call: this@R|/closeFinally|.R|/AutoCloseable.close|()"];
26 [label="Exit block"];
}
25 [label="Try main block exit"];
27 [label="Try main block exit"];
}
subgraph cluster_11 {
subgraph cluster_12 {
color=blue
26 [label="Catch enter"];
subgraph cluster_12 {
28 [label="Catch enter"];
subgraph cluster_13 {
color=blue
27 [label="Enter block"];
28 [label="Access variable R|<local>/cause|"];
29 [label="Access variable R|<local>/closeException|"];
30 [label="Function call: R|<local>/cause|.R|/addSuppressed|(...)"];
31 [label="Exit block"];
29 [label="Enter block"];
30 [label="Access variable R|<local>/cause|"];
31 [label="Access variable R|<local>/closeException|"];
32 [label="Function call: R|<local>/cause|.R|/addSuppressed|(...)"];
33 [label="Exit block"];
}
32 [label="Catch exit"];
34 [label="Catch exit"];
}
33 [label="Try expression exit"];
35 [label="Try expression exit"];
}
34 [label="Exit block"];
36 [label="Exit block"];
}
35 [label="Exit when branch result"];
36 [label="Enter when branch result"];
subgraph cluster_13 {
37 [label="Exit when branch result"];
38 [label="Enter when branch result"];
subgraph cluster_14 {
color=blue
37 [label="Enter block"];
38 [label="Function call: this@R|/closeFinally|.R|/AutoCloseable.close|()"];
39 [label="Exit block"];
39 [label="Enter block"];
40 [label="Function call: this@R|/closeFinally|.R|/AutoCloseable.close|()"];
41 [label="Exit block"];
}
40 [label="Exit when branch result"];
41 [label="Enter when branch result"];
subgraph cluster_14 {
42 [label="Exit when branch result"];
43 [label="Enter when branch result"];
subgraph cluster_15 {
color=blue
42 [label="Enter block"];
43 [label="Exit block"];
44 [label="Enter block"];
45 [label="Exit block"];
}
44 [label="Exit when branch result"];
45 [label="Exit when"];
46 [label="Exit when branch result"];
47 [label="Exit when"];
}
46 [label="Jump: ^closeFinally when () {
48 [label="Jump: ^closeFinally when () {
==(this@R|/closeFinally|, Null(null)) -> {
}
==(R|<local>/cause|, Null(null)) -> {
......@@ -116,127 +124,125 @@ digraph complex_kt {
}
}
"];
47 [label="Stub" style="filled" fillcolor=gray];
48 [label="Exit function closeFinally" style="filled" fillcolor=red];
49 [label="Stub" style="filled" fillcolor=gray];
50 [label="Exit function closeFinally" style="filled" fillcolor=red];
}
4 -> {5};
5 -> {6};
6 -> {7};
7 -> {8};
8 -> {9};
9 -> {10};
10 -> {41 11};
10 -> {11};
11 -> {12};
12 -> {13};
12 -> {43 13};
13 -> {14};
14 -> {15};
15 -> {36 16};
15 -> {16};
16 -> {17};
17 -> {18};
17 -> {38 18};
18 -> {19};
19 -> {20};
20 -> {21};
21 -> {48 26 22};
21 -> {22};
22 -> {23};
23 -> {24};
23 -> {50 28 24};
24 -> {25};
25 -> {33};
26 -> {48 27};
27 -> {28};
28 -> {29};
25 -> {26};
26 -> {27};
27 -> {35};
28 -> {50 29};
29 -> {30};
30 -> {31};
31 -> {32};
32 -> {33};
33 -> {34};
34 -> {35};
35 -> {45};
35 -> {36};
36 -> {37};
37 -> {38};
37 -> {47};
38 -> {39};
39 -> {40};
40 -> {45};
40 -> {41};
41 -> {42};
42 -> {43};
42 -> {47};
43 -> {44};
44 -> {45};
45 -> {46};
46 -> {48};
46 -> {47} [style=dotted];
47 -> {48} [style=dotted];
46 -> {47};
47 -> {48};
48 -> {50};
48 -> {49} [style=dotted];
49 -> {50} [style=dotted];
subgraph cluster_15 {
subgraph cluster_16 {
color=red
49 [label="Enter function firstIsInstanceOrNull" style="filled" fillcolor=red];
50 [label="Access variable this@R|/firstIsInstanceOrNull|"];
51 [label="Function call: this@R|/firstIsInstanceOrNull|.R|FakeOverride<kotlin/collections/List.iterator: R|kotlin/collections/Iterator<kotlin/Any?>|>|()"];
52 [label="Variable declaration: lval <iterator>: R|kotlin/collections/Iterator<kotlin/Any?>|"];
subgraph cluster_16 {
51 [label="Enter function firstIsInstanceOrNull" style="filled" fillcolor=red];
52 [label="Access variable this@R|/firstIsInstanceOrNull|"];
53 [label="Function call: this@R|/firstIsInstanceOrNull|.R|FakeOverride<kotlin/collections/List.iterator: R|kotlin/collections/Iterator<kotlin/Any?>|>|()"];
54 [label="Variable declaration: lval <iterator>: R|kotlin/collections/Iterator<kotlin/Any?>|"];
subgraph cluster_17 {
color=blue
53 [label="Enter while loop"];
subgraph cluster_17 {
55 [label="Enter while loop"];
subgraph cluster_18 {
color=blue
54 [label="Enter loop condition"];
55 [label="Access variable R|<local>/<iterator>|"];
56 [label="Function call: R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()"];
57 [label="Exit loop condition"];
56 [label="Enter loop condition"];
57 [label="Access variable R|<local>/<iterator>|"];
58 [label="Function call: R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()"];
59 [label="Exit loop condition"];
}
subgraph cluster_18 {
subgraph cluster_19 {
color=blue
58 [label="Enter loop block"];
subgraph cluster_19 {
60 [label="Enter loop block"];
subgraph cluster_20 {
color=blue
59 [label="Enter block"];
60 [label="Access variable R|<local>/<iterator>|"];
61 [label="Function call: R|<local>/<iterator>|.R|FakeOverride<kotlin/collections/Iterator.next: R|kotlin/Any?|>|()"];
62 [label="Variable declaration: lval element: R|kotlin/Any?|"];
subgraph cluster_20 {
61 [label="Enter block"];
62 [label="Access variable R|<local>/<iterator>|"];
63 [label="Function call: R|<local>/<iterator>|.R|FakeOverride<kotlin/collections/Iterator.next: R|kotlin/Any?|>|()"];
64 [label="Variable declaration: lval element: R|kotlin/Any?|"];
subgraph cluster_21 {
color=blue
63 [label="Enter when"];
subgraph cluster_21 {
65 [label="Enter when"];
subgraph cluster_22 {
color=blue
64 [label="Enter when branch condition "];
65 [label="Access variable R|<local>/element|"];
66 [label="Type operator: (R|<local>/element| is R|T|)"];
67 [label="Exit when branch condition"];
66 [label="Enter when branch condition "];
67 [label="Access variable R|<local>/element|"];
68 [label="Type operator: (R|<local>/element| is R|T|)"];
69 [label="Exit when branch condition"];
}
68 [label="Synthetic else branch"];
69 [label="Enter when branch result"];
subgraph cluster_22 {
70 [label="Synthetic else branch"];
71 [label="Enter when branch result"];
subgraph cluster_23 {
color=blue
70 [label="Enter block"];
71 [label="Access variable R|<local>/element|"];
72 [label="Jump: ^firstIsInstanceOrNull R|<local>/element|"];
73 [label="Stub" style="filled" fillcolor=gray];
74 [label="Exit block" style="filled" fillcolor=gray];
72 [label="Enter block"];
73 [label="Access variable R|<local>/element|"];
74 [label="Jump: ^firstIsInstanceOrNull R|<local>/element|"];
75 [label="Stub" style="filled" fillcolor=gray];
76 [label="Exit block" style="filled" fillcolor=gray];
}
75 [label="Exit when branch result" style="filled" fillcolor=gray];
76 [label="Exit when"];
77 [label="Exit when branch result" style="filled" fillcolor=gray];
78 [label="Exit when"];
}
77 [label="Exit block"];
79 [label="Exit block"];
}
78 [label="Exit loop block"];
80 [label="Exit loop block"];
}
79 [label="Exit whileloop"];
81 [label="Exit whileloop"];
}
80 [label="Const: Null(null)"];
81 [label="Jump: ^firstIsInstanceOrNull Null(null)"];
82 [label="Stub" style="filled" fillcolor=gray];
83 [label="Exit function firstIsInstanceOrNull" style="filled" fillcolor=red];
82 [label="Const: Null(null)"];
83 [label="Jump: ^firstIsInstanceOrNull Null(null)"];
84 [label="Stub" style="filled" fillcolor=gray];
85 [label="Exit function firstIsInstanceOrNull" style="filled" fillcolor=red];
}
49 -> {50};
50 -> {51};
51 -> {52};
52 -> {53};
53 -> {54};
54 -> {55};
55 -> {56};
56 -> {57};
57 -> {79 58};
57 -> {58};
58 -> {59};
59 -> {60};
59 -> {81 60};
60 -> {61};
61 -> {62};
62 -> {63};
......@@ -244,23 +250,25 @@ digraph complex_kt {
64 -> {65};
65 -> {66};
66 -> {67};
67 -> {69 68};
68 -> {76};
69 -> {70};
70 -> {71};
67 -> {68};
68 -> {69};
69 -> {71 70};
70 -> {78};
71 -> {72};
72 -> {83};
72 -> {73} [style=dotted];
73 -> {74} [style=dotted];
72 -> {73};
73 -> {74};
74 -> {85};
74 -> {75} [style=dotted];
75 -> {76} [style=dotted];
76 -> {77};
77 -> {78};
78 -> {54};
76 -> {77} [style=dotted];
77 -> {78} [style=dotted];
78 -> {79};
79 -> {80};
80 -> {81};
81 -> {83};
81 -> {82} [style=dotted];
82 -> {83} [style=dotted];
80 -> {56};
81 -> {82};
82 -> {83};
83 -> {85};
83 -> {84} [style=dotted];
84 -> {85} [style=dotted];
}
......@@ -34,42 +34,56 @@ digraph initBlock_kt {
subgraph cluster_3 {
color=red
9 [label="Enter function <init>" style="filled" fillcolor=red];
10 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
11 [label="Exit function <init>" style="filled" fillcolor=red];
9 [label="Enter class Foo" style="filled" fillcolor=red];
10 [label="Exit class Foo" style="filled" fillcolor=red];
}
9 -> {10};
10 -> {11};
subgraph cluster_4 {
color=red
12 [label="Enter init block" style="filled" fillcolor=red];
subgraph cluster_5 {
11 [label="Enter function <init>" style="filled" fillcolor=red];
12 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
13 [label="Exit function <init>" style="filled" fillcolor=red];
}
11 -> {12};
12 -> {13};
subgraph cluster_5 {
color=red
14 [label="Enter init block" style="filled" fillcolor=red];
subgraph cluster_6 {
color=blue
13 [label="Enter block"];
14 [label="Const: Int(1)"];
15 [label="Variable declaration: lval x: R|kotlin/Int|"];
16 [label="Function call: R|java/lang/Exception.Exception|()"];
17 [label="Throw: throw R|java/lang/Exception.Exception|()"];
18 [label="Stub" style="filled" fillcolor=gray];
19 [label="Const: Int(2)" style="filled" fillcolor=gray];
20 [label="Variable declaration: lval y: R|kotlin/Int|" style="filled" fillcolor=gray];
21 [label="Exit block" style="filled" fillcolor=gray];
15 [label="Enter block"];
16 [label="Const: Int(1)"];
17 [label="Variable declaration: lval x: R|kotlin/Int|"];
18 [label="Function call: R|java/lang/Exception.Exception|()"];
19 [label="Throw: throw R|java/lang/Exception.Exception|()"];
20 [label="Stub" style="filled" fillcolor=gray];
21 [label="Const: Int(2)" style="filled" fillcolor=gray];
22 [label="Variable declaration: lval y: R|kotlin/Int|" style="filled" fillcolor=gray];
23 [label="Exit block" style="filled" fillcolor=gray];
}
22 [label="Exit init block" style="filled" fillcolor=red];
24 [label="Exit init block" style="filled" fillcolor=red];
}
12 -> {13};
13 -> {14};
14 -> {15};
15 -> {16};
16 -> {17};
17 -> {22};
17 -> {18} [style=dotted];
18 -> {19} [style=dotted];
17 -> {18};
18 -> {19};
19 -> {24};
19 -> {20} [style=dotted];
20 -> {21} [style=dotted];
21 -> {22} [style=dotted];
22 -> {23} [style=dotted];
23 -> {24} [style=dotted];
subgraph cluster_7 {
color=red
25 [label="Enter class Bar" style="filled" fillcolor=red];
26 [label="Exit class Bar" style="filled" fillcolor=red];
}
}
......@@ -5,76 +5,98 @@ digraph initBlockAndInPlaceLambda_kt {
subgraph cluster_0 {
color=red
0 [label="Enter function getter" style="filled" fillcolor=red];
1 [label="Exit function getter" style="filled" fillcolor=red];
0 [label="Enter class B" style="filled" fillcolor=red];
1 [label="Exit class B" style="filled" fillcolor=red];
}
0 -> {1};
0 -> {1} [color=green];
subgraph cluster_1 {
color=red
2 [label="Enter property" style="filled" fillcolor=red];
3 [label="Exit property" style="filled" fillcolor=red];
2 [label="Enter function getter" style="filled" fillcolor=red];
3 [label="Exit function getter" style="filled" fillcolor=red];
}
2 -> {3};
subgraph cluster_2 {
color=red
4 [label="Enter function <init>" style="filled" fillcolor=red];
5 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
6 [label="Exit function <init>" style="filled" fillcolor=red];
4 [label="Enter property" style="filled" fillcolor=red];
5 [label="Exit property" style="filled" fillcolor=red];
}
4 -> {5};
5 -> {6};
subgraph cluster_3 {
color=red
7 [label="Enter init block" style="filled" fillcolor=red];
subgraph cluster_4 {
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 <init>" style="filled" fillcolor=red];
9 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
10 [label="Exit function <init>" style="filled" fillcolor=red];
}
8 -> {9};
9 -> {10};
subgraph cluster_5 {
color=red
11 [label="Enter init block" style="filled" fillcolor=red];
subgraph cluster_6 {
color=blue
8 [label="Enter block"];
9 [label="Access variable R|<local>/a|"];
10 [label="Access variable R|/A.b|"];
11 [label="Enter safe call"];
12 [label="Postponed enter to lambda"];
subgraph cluster_5 {
12 [label="Enter block"];
13 [label="Access variable R|<local>/a|"];
14 [label="Access variable R|/A.b|"];
15 [label="Enter safe call"];
16 [label="Postponed enter to lambda"];
subgraph cluster_7 {
color=blue
13 [label="Enter function anonymousFunction"];
14 [label="Access variable R|<local>/a|"];
15 [label="Access variable R|<local>/it|"];
16 [label="Function call: R|/C.C|(...)"];
17 [label="Exit function anonymousFunction"];
17 [label="Enter function anonymousFunction"];
18 [label="Access variable R|<local>/a|"];
19 [label="Access variable R|<local>/it|"];
20 [label="Function call: R|/C.C|(...)"];
21 [label="Exit function anonymousFunction"];
}
18 [label="Call arguments union" style="filled" fillcolor=yellow];
19 [label="Postponed exit from lambda"];
20 [label="Function call: R|<local>/a|.R|/A.b|?.R|kotlin/let|<R|B|, R|C|>(...)"];
21 [label="Exit safe call"];
22 [label="Variable declaration: lval c: R|C?|"];
23 [label="Exit block"];
22 [label="Call arguments union" style="filled" fillcolor=yellow];
23 [label="Postponed exit from lambda"];
24 [label="Function call: R|<local>/a|.R|/A.b|?.R|kotlin/let|<R|B|, R|C|>(...)"];
25 [label="Exit safe call"];
26 [label="Variable declaration: lval c: R|C?|"];
27 [label="Exit block"];
}
24 [label="Exit init block" style="filled" fillcolor=red];
28 [label="Exit init block" style="filled" fillcolor=red];
}
7 -> {8};
8 -> {9};
9 -> {10};
10 -> {11 21};
11 -> {12};
12 -> {13};
12 -> {19} [color=red];
13 -> {14};
14 -> {15};
14 -> {15 25};
15 -> {16};
16 -> {17};
17 -> {19} [color=green];
17 -> {18} [color=red];
18 -> {20} [color=red];
19 -> {20} [color=green];
16 -> {23} [color=red];
17 -> {18};
18 -> {19};
19 -> {20};
20 -> {21};
21 -> {22};
22 -> {23};
23 -> {24};
21 -> {23} [color=green];
21 -> {22} [color=red];
22 -> {24} [color=red];
23 -> {24} [color=green];
24 -> {25};
25 -> {26};
26 -> {27};
27 -> {28};
subgraph cluster_8 {
color=red
29 [label="Enter class C" style="filled" fillcolor=red];
30 [label="Exit class C" style="filled" fillcolor=red];
}
}
......@@ -5,63 +5,87 @@ digraph lambdaReturningObject_kt {
subgraph cluster_0 {
color=red
0 [label="Enter function bar" style="filled" fillcolor=red];
1 [label="Exit function bar" style="filled" fillcolor=red];
0 [label="Enter class Out" style="filled" fillcolor=red];
1 [label="Exit class Out" style="filled" fillcolor=red];
}
0 -> {1};
0 -> {1} [color=green];
subgraph cluster_1 {
color=red
2 [label="Enter function <init>" style="filled" fillcolor=red];
3 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
4 [label="Exit function <init>" style="filled" fillcolor=red];
2 [label="Enter function bar" style="filled" fillcolor=red];
3 [label="Exit function bar" style="filled" fillcolor=red];
}
2 -> {3};
3 -> {4};
subgraph cluster_2 {
color=red
5 [label="Enter function MyOut" style="filled" fillcolor=red];
6 [label="Function call: R|kotlin/TODO|()"];
7 [label="Stub" style="filled" fillcolor=gray];
8 [label="Jump: ^MyOut R|kotlin/TODO|()" style="filled" fillcolor=gray];
9 [label="Stub" style="filled" fillcolor=gray];
10 [label="Exit function MyOut" style="filled" fillcolor=red];
4 [label="Enter class IrTypeArgument" style="filled" fillcolor=red];
5 [label="Exit class IrTypeArgument" style="filled" fillcolor=red];
}
5 -> {6};
6 -> {10};
6 -> {7} [style=dotted];
7 -> {8} [style=dotted];
8 -> {10 9} [style=dotted];
9 -> {10} [style=dotted];
4 -> {5} [color=green];
subgraph cluster_3 {
color=red
11 [label="Enter function foo" style="filled" fillcolor=red];
12 [label="Postponed enter to lambda"];
13 [label="Postponed exit from lambda"];
14 [label="Function call: R|/MyOut|<R|IrStarProjectionImpl|>(...)"];
15 [label="Function call: R|/bar|(...)"];
16 [label="Exit function foo" style="filled" fillcolor=red];
6 [label="Enter function <init>" style="filled" fillcolor=red];
7 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
8 [label="Exit function <init>" style="filled" fillcolor=red];
}
11 -> {12};
12 -> {13 13} [color=green];
13 -> {14};
14 -> {15};
15 -> {16};
6 -> {7};
7 -> {8};
subgraph cluster_4 {
color=red
17 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
18 [label="Access qualifier /IrStarProjectionImpl"];
19 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
9 [label="Enter class IrStarProjectionImpl" style="filled" fillcolor=red];
10 [label="Exit class IrStarProjectionImpl" style="filled" fillcolor=red];
}
9 -> {10} [color=green];
subgraph cluster_5 {
color=red
11 [label="Enter function MyOut" style="filled" fillcolor=red];
12 [label="Function call: R|kotlin/TODO|()"];
13 [label="Stub" style="filled" fillcolor=gray];
14 [label="Jump: ^MyOut R|kotlin/TODO|()" style="filled" fillcolor=gray];
15 [label="Stub" style="filled" fillcolor=gray];
16 [label="Exit function MyOut" style="filled" fillcolor=red];
}
11 -> {12};
12 -> {16};
12 -> {13} [style=dotted];
13 -> {14} [style=dotted];
14 -> {16 15} [style=dotted];
15 -> {16} [style=dotted];
subgraph cluster_6 {
color=red
17 [label="Enter function foo" style="filled" fillcolor=red];
18 [label="Postponed enter to lambda"];
19 [label="Postponed exit from lambda"];
20 [label="Function call: R|/MyOut|<R|IrStarProjectionImpl|>(...)"];
21 [label="Function call: R|/bar|(...)"];
22 [label="Exit function foo" style="filled" fillcolor=red];
}
17 -> {18};
18 -> {19};
18 -> {19 19} [color=green];
19 -> {20};
20 -> {21};
21 -> {22};
subgraph cluster_7 {
color=red
23 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
24 [label="Access qualifier /IrStarProjectionImpl"];
25 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
23 -> {24};
24 -> {25};
}
......@@ -15,73 +15,88 @@ digraph postponedLambdaInConstructor_kt {
subgraph cluster_1 {
color=red
3 [label="Enter function <init>" style="filled" fillcolor=red];
4 [label="Access variable R|<local>/s|"];
5 [label="Postponed enter to lambda"];
subgraph cluster_2 {
3 [label="Enter class A" style="filled" fillcolor=red];
4 [label="Exit class A" style="filled" fillcolor=red];
}
3 -> {4} [color=green];
subgraph cluster_2 {
color=red
5 [label="Enter function <init>" style="filled" fillcolor=red];
6 [label="Access variable R|<local>/s|"];
7 [label="Postponed enter to lambda"];
subgraph cluster_3 {
color=blue
6 [label="Enter function anonymousFunction"];
7 [label="Postponed enter to lambda"];
8 [label="Postponed exit from lambda"];
9 [label="Exit function anonymousFunction"];
8 [label="Enter function anonymousFunction"];
9 [label="Postponed enter to lambda"];
10 [label="Postponed exit from lambda"];
11 [label="Exit function anonymousFunction"];
}
10 [label="Postponed exit from lambda"];
11 [label="Function call: R|<local>/s|.R|kotlin/let|<R|kotlin/String|, R|() -> kotlin/String|>(...)"];
12 [label="Call arguments union" style="filled" fillcolor=yellow];
13 [label="Delegated constructor call: super<R|A|>(...)"];
14 [label="Exit function <init>" style="filled" fillcolor=red];
12 [label="Postponed exit from lambda"];
13 [label="Function call: R|<local>/s|.R|kotlin/let|<R|kotlin/String|, R|() -> kotlin/String|>(...)"];
14 [label="Call arguments union" style="filled" fillcolor=yellow];
15 [label="Delegated constructor call: super<R|A|>(...)"];
16 [label="Exit function <init>" style="filled" fillcolor=red];
}
3 -> {4};
4 -> {5};
5 -> {6};
5 -> {10} [color=red];
6 -> {7};
7 -> {8 8} [color=green];
7 -> {8};
7 -> {12} [color=red];
8 -> {9};
9 -> {10} [color=green];
9 -> {12} [color=red];
9 -> {10 10} [color=green];
10 -> {11};
11 -> {12};
11 -> {12} [color=green];
11 -> {14} [color=red];
12 -> {13};
13 -> {14};
subgraph cluster_3 {
color=red
15 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
16 [label="Access variable R|<local>/it|"];
17 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
14 -> {15};
15 -> {16};
16 -> {17};
subgraph cluster_4 {
color=red
18 [label="Enter function getter" style="filled" fillcolor=red];
19 [label="Exit function getter" style="filled" fillcolor=red];
17 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
18 [label="Access variable R|<local>/it|"];
19 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
17 -> {18};
18 -> {19};
subgraph cluster_5 {
color=red
20 [label="Enter property" style="filled" fillcolor=red];
21 [label="Access variable R|<local>/s|"];
22 [label="Exit property" style="filled" fillcolor=red];
20 [label="Enter function getter" style="filled" fillcolor=red];
21 [label="Exit function getter" style="filled" fillcolor=red];
}
20 -> {21};
21 -> {22};
subgraph cluster_6 {
color=red
23 [label="Enter function foo" style="filled" fillcolor=red];
24 [label="Function call: this@R|/B|.R|/B.foo|()"];
25 [label="Exit function foo" style="filled" fillcolor=red];
22 [label="Enter property" style="filled" fillcolor=red];
23 [label="Access variable R|<local>/s|"];
24 [label="Exit property" style="filled" fillcolor=red];
}
22 -> {23};
23 -> {24};
24 -> {25};
subgraph cluster_7 {
color=red
25 [label="Enter function foo" style="filled" fillcolor=red];
26 [label="Function call: this@R|/B|.R|/B.foo|()"];
27 [label="Exit function foo" style="filled" fillcolor=red];
}
25 -> {26};
26 -> {27};
subgraph cluster_8 {
color=red
28 [label="Enter class B" style="filled" fillcolor=red];
29 [label="Exit class B" style="filled" fillcolor=red];
}
}
......@@ -127,143 +127,157 @@ digraph propertiesAndInitBlocks_kt {
subgraph cluster_10 {
color=red
40 [label="Enter function getter" style="filled" fillcolor=red];
41 [label="Exit function getter" style="filled" fillcolor=red];
40 [label="Enter class LocalClass" style="filled" fillcolor=red];
41 [label="Exit class LocalClass" style="filled" fillcolor=red];
}
40 -> {41};
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 [label="Enter function getter" style="filled" fillcolor=red];
43 [label="Exit function getter" style="filled" fillcolor=red];
}
42 -> {43};
43 -> {44};
subgraph cluster_12 {
color=red
45 [label="Enter init block" style="filled" fillcolor=red];
subgraph cluster_13 {
44 [label="Enter function <init>" style="filled" fillcolor=red];
45 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
46 [label="Exit function <init>" style="filled" fillcolor=red];
}
44 -> {45};
45 -> {46};
subgraph cluster_13 {
color=red
47 [label="Enter init block" style="filled" fillcolor=red];
subgraph cluster_14 {
color=blue
46 [label="Enter block"];
47 [label="Function call: R|java/lang/Exception.Exception|()"];
48 [label="Throw: throw R|java/lang/Exception.Exception|()"];
49 [label="Stub" style="filled" fillcolor=gray];
50 [label="Exit block" style="filled" fillcolor=gray];
48 [label="Enter block"];
49 [label="Function call: R|java/lang/Exception.Exception|()"];
50 [label="Throw: throw R|java/lang/Exception.Exception|()"];
51 [label="Stub" style="filled" fillcolor=gray];
52 [label="Exit block" style="filled" fillcolor=gray];
}
51 [label="Exit init block" style="filled" fillcolor=red];
53 [label="Exit init block" style="filled" fillcolor=red];
}
45 -> {46};
46 -> {47};
47 -> {48};
48 -> {51};
48 -> {49} [style=dotted];
49 -> {50} [style=dotted];
48 -> {49};
49 -> {50};
50 -> {53};
50 -> {51} [style=dotted];
51 -> {52} [style=dotted];
52 -> {53} [style=dotted];
subgraph cluster_14 {
subgraph cluster_15 {
color=red
54 [label="Enter class LocalClass" style="filled" fillcolor=red];
55 [label="Exit class LocalClass" style="filled" fillcolor=red];
}
subgraph cluster_16 {
color=red
52 [label="Enter property" style="filled" fillcolor=red];
53 [label="Postponed enter to lambda"];
subgraph cluster_15 {
56 [label="Enter property" style="filled" fillcolor=red];
57 [label="Postponed enter to lambda"];
subgraph cluster_17 {
color=blue
54 [label="Enter function anonymousFunction"];
55 [label="Function call: R|java/lang/Exception.Exception|()"];
56 [label="Throw: throw R|java/lang/Exception.Exception|()"];
57 [label="Stub" style="filled" fillcolor=gray];
58 [label="Exit function anonymousFunction"];
58 [label="Enter function anonymousFunction"];
59 [label="Function call: R|java/lang/Exception.Exception|()"];
60 [label="Throw: throw R|java/lang/Exception.Exception|()"];
61 [label="Stub" style="filled" fillcolor=gray];
62 [label="Exit function anonymousFunction"];
}
59 [label="Postponed exit from lambda"];
60 [label="Function call: R|/run|(...)"];
61 [label="Exit property" style="filled" fillcolor=red];
63 [label="Postponed exit from lambda"];
64 [label="Function call: R|/run|(...)"];
65 [label="Exit property" style="filled" fillcolor=red];
}
52 -> {53};
53 -> {54};
53 -> {59} [color=red];
54 -> {58 55};
55 -> {56};
56 -> {61};
56 -> {57} [style=dotted];
57 -> {58} [style=dotted];
58 -> {54};
58 -> {59} [color=green];
56 -> {57};
57 -> {58};
57 -> {63} [color=red];
58 -> {62 59};
59 -> {60};
60 -> {61};
60 -> {65};
60 -> {61} [style=dotted];
61 -> {62} [style=dotted];
62 -> {58};
62 -> {63} [color=green];
63 -> {64};
64 -> {65};
subgraph cluster_16 {
subgraph cluster_18 {
color=red
62 [label="Enter function getter" style="filled" fillcolor=red];
63 [label="Exit function getter" style="filled" fillcolor=red];
66 [label="Enter function getter" style="filled" fillcolor=red];
67 [label="Exit function getter" style="filled" fillcolor=red];
}
62 -> {63};
66 -> {67};
subgraph cluster_17 {
subgraph cluster_19 {
color=red
64 [label="Enter property" style="filled" fillcolor=red];
subgraph cluster_18 {
68 [label="Enter property" style="filled" fillcolor=red];
subgraph cluster_20 {
color=blue
65 [label="Try expression enter"];
subgraph cluster_19 {
color=blue
66 [label="Try main block enter"];
subgraph cluster_20 {
color=blue
67 [label="Enter block"];
68 [label="Const: Int(1)"];
69 [label="Exit block"];
}
70 [label="Try main block exit"];
}
69 [label="Try expression enter"];
subgraph cluster_21 {
color=blue
71 [label="Enter finally"];
70 [label="Try main block enter"];
subgraph cluster_22 {
color=blue
72 [label="Enter block"];
73 [label="Const: Int(0)"];
74 [label="Exit block"];
71 [label="Enter block"];
72 [label="Const: Int(1)"];
73 [label="Exit block"];
}
75 [label="Exit finally"];
74 [label="Try main block exit"];
}
subgraph cluster_23 {
color=blue
76 [label="Catch enter"];
75 [label="Enter finally"];
subgraph cluster_24 {
color=blue
77 [label="Enter block"];
78 [label="Const: Int(2)"];
79 [label="Exit block"];
76 [label="Enter block"];
77 [label="Const: Int(0)"];
78 [label="Exit block"];
}
80 [label="Catch exit"];
79 [label="Exit finally"];
}
81 [label="Try expression exit"];
subgraph cluster_25 {
color=blue
80 [label="Catch enter"];
subgraph cluster_26 {
color=blue
81 [label="Enter block"];
82 [label="Const: Int(2)"];
83 [label="Exit block"];
}
84 [label="Catch exit"];
}
85 [label="Try expression exit"];
}
82 [label="Exit property" style="filled" fillcolor=red];
86 [label="Exit property" style="filled" fillcolor=red];
}
64 -> {65};
65 -> {66};
66 -> {82 76 71 67};
67 -> {68};
68 -> {69};
69 -> {70};
70 -> {81};
70 -> {86 80 75 71};
71 -> {72};
72 -> {73};
73 -> {74};
74 -> {75};
75 -> {81};
76 -> {82 77};
74 -> {85};
75 -> {76};
76 -> {77};
77 -> {78};
78 -> {79};
79 -> {80};
80 -> {81};
79 -> {85};
80 -> {86 81};
81 -> {82};
82 -> {83};
83 -> {84};
84 -> {85};
85 -> {86};
}
......@@ -5,155 +5,179 @@ digraph returnValuesFromLambda_kt {
subgraph cluster_0 {
color=red
0 [label="Enter function <init>" style="filled" fillcolor=red];
1 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
2 [label="Exit function <init>" style="filled" fillcolor=red];
0 [label="Enter class A" style="filled" fillcolor=red];
1 [label="Exit class A" style="filled" fillcolor=red];
}
0 -> {1};
1 -> {2};
0 -> {1} [color=green];
subgraph cluster_1 {
color=red
3 [label="Enter function <init>" style="filled" fillcolor=red];
4 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
5 [label="Exit function <init>" style="filled" fillcolor=red];
2 [label="Enter function <init>" style="filled" fillcolor=red];
3 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
4 [label="Exit function <init>" style="filled" fillcolor=red];
}
2 -> {3};
3 -> {4};
4 -> {5};
subgraph cluster_2 {
color=red
6 [label="Enter function test_1" style="filled" fillcolor=red];
7 [label="Postponed enter to lambda"];
subgraph cluster_3 {
5 [label="Enter class B" style="filled" fillcolor=red];
6 [label="Exit class B" style="filled" fillcolor=red];
}
5 -> {6} [color=green];
subgraph cluster_3 {
color=red
7 [label="Enter function <init>" style="filled" fillcolor=red];
8 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
9 [label="Exit function <init>" style="filled" fillcolor=red];
}
7 -> {8};
8 -> {9};
subgraph cluster_4 {
color=red
10 [label="Enter class C" style="filled" fillcolor=red];
11 [label="Exit class C" style="filled" fillcolor=red];
}
10 -> {11} [color=green];
subgraph cluster_5 {
color=red
12 [label="Enter function test_1" style="filled" fillcolor=red];
13 [label="Postponed enter to lambda"];
subgraph cluster_6 {
color=blue
8 [label="Enter function anonymousFunction"];
subgraph cluster_4 {
14 [label="Enter function anonymousFunction"];
subgraph cluster_7 {
color=blue
9 [label="Enter when"];
subgraph cluster_5 {
15 [label="Enter when"];
subgraph cluster_8 {
color=blue
10 [label="Enter when branch condition "];
11 [label="Access variable R|<local>/b|"];
12 [label="Exit when branch condition"];
16 [label="Enter when branch condition "];
17 [label="Access variable R|<local>/b|"];
18 [label="Exit when branch condition"];
}
13 [label="Synthetic else branch"];
14 [label="Enter when branch result"];
subgraph cluster_6 {
19 [label="Synthetic else branch"];
20 [label="Enter when branch result"];
subgraph cluster_9 {
color=blue
15 [label="Enter block"];
16 [label="Function call: R|/B.B|()"];
17 [label="Jump: ^@run R|/B.B|()"];
18 [label="Stub" style="filled" fillcolor=gray];
19 [label="Exit block" style="filled" fillcolor=gray];
21 [label="Enter block"];
22 [label="Function call: R|/B.B|()"];
23 [label="Jump: ^@run R|/B.B|()"];
24 [label="Stub" style="filled" fillcolor=gray];
25 [label="Exit block" style="filled" fillcolor=gray];
}
20 [label="Exit when branch result" style="filled" fillcolor=gray];
21 [label="Exit when"];
26 [label="Exit when branch result" style="filled" fillcolor=gray];
27 [label="Exit when"];
}
22 [label="Function call: R|/C.C|()"];
23 [label="Exit function anonymousFunction"];
28 [label="Function call: R|/C.C|()"];
29 [label="Exit function anonymousFunction"];
}
24 [label="Call arguments union" style="filled" fillcolor=yellow];
25 [label="Postponed exit from lambda"];
26 [label="Function call: R|kotlin/run|<R|A|>(...)"];
27 [label="Variable declaration: lval x: R|A|"];
28 [label="Exit function test_1" style="filled" fillcolor=red];
30 [label="Call arguments union" style="filled" fillcolor=yellow];
31 [label="Postponed exit from lambda"];
32 [label="Function call: R|kotlin/run|<R|A|>(...)"];
33 [label="Variable declaration: lval x: R|A|"];
34 [label="Exit function test_1" style="filled" fillcolor=red];
}
6 -> {7};
7 -> {8};
7 -> {25} [color=red];
8 -> {9};
9 -> {10};
10 -> {11};
11 -> {12};
12 -> {14 13};
13 -> {21};
12 -> {13};
13 -> {14};
13 -> {31} [color=red];
14 -> {15};
15 -> {16};
16 -> {17};
17 -> {23};
17 -> {18} [style=dotted];
18 -> {19} [style=dotted];
19 -> {20} [style=dotted];
20 -> {21} [style=dotted];
17 -> {18};
18 -> {20 19};
19 -> {27};
20 -> {21};
21 -> {22};
22 -> {23};
23 -> {25} [color=green];
23 -> {24} [color=red];
24 -> {26} [color=red];
25 -> {26} [color=green];
26 -> {27};
23 -> {29};
23 -> {24} [style=dotted];
24 -> {25} [style=dotted];
25 -> {26} [style=dotted];
26 -> {27} [style=dotted];
27 -> {28};
28 -> {29};
29 -> {31} [color=green];
29 -> {30} [color=red];
30 -> {32} [color=red];
31 -> {32} [color=green];
32 -> {33};
33 -> {34};
subgraph cluster_7 {
subgraph cluster_10 {
color=red
29 [label="Enter function test_2" style="filled" fillcolor=red];
30 [label="Postponed enter to lambda"];
subgraph cluster_8 {
35 [label="Enter function test_2" style="filled" fillcolor=red];
36 [label="Postponed enter to lambda"];
subgraph cluster_11 {
color=blue
31 [label="Enter function anonymousFunction"];
32 [label="Function call: R|/C.C|()"];
33 [label="Jump: ^@run R|/C.C|()"];
34 [label="Stub" style="filled" fillcolor=gray];
35 [label="Exit function anonymousFunction"];
37 [label="Enter function anonymousFunction"];
38 [label="Function call: R|/C.C|()"];
39 [label="Jump: ^@run R|/C.C|()"];
40 [label="Stub" style="filled" fillcolor=gray];
41 [label="Exit function anonymousFunction"];
}
36 [label="Call arguments union" style="filled" fillcolor=yellow];
37 [label="Postponed exit from lambda"];
38 [label="Function call: R|kotlin/run|<R|C|>(...)"];
39 [label="Variable declaration: lval x: R|C|"];
40 [label="Exit function test_2" style="filled" fillcolor=red];
42 [label="Call arguments union" style="filled" fillcolor=yellow];
43 [label="Postponed exit from lambda"];
44 [label="Function call: R|kotlin/run|<R|C|>(...)"];
45 [label="Variable declaration: lval x: R|C|"];
46 [label="Exit function test_2" style="filled" fillcolor=red];
}
29 -> {30};
30 -> {31};
30 -> {37} [color=red];
31 -> {32};
32 -> {33};
33 -> {35};
33 -> {34} [style=dotted];
34 -> {35} [style=dotted];
35 -> {37} [color=green];
35 -> {36} [color=red];
36 -> {38} [color=red];
37 -> {38} [color=green];
35 -> {36};
36 -> {37};
36 -> {43} [color=red];
37 -> {38};
38 -> {39};
39 -> {40};
39 -> {41};
39 -> {40} [style=dotted];
40 -> {41} [style=dotted];
41 -> {43} [color=green];
41 -> {42} [color=red];
42 -> {44} [color=red];
43 -> {44} [color=green];
44 -> {45};
45 -> {46};
subgraph cluster_9 {
subgraph cluster_12 {
color=red
41 [label="Enter function test_3" style="filled" fillcolor=red];
42 [label="Postponed enter to lambda"];
subgraph cluster_10 {
47 [label="Enter function test_3" style="filled" fillcolor=red];
48 [label="Postponed enter to lambda"];
subgraph cluster_13 {
color=blue
43 [label="Enter function anonymousFunction"];
44 [label="Jump: ^test_3 Unit"];
45 [label="Stub" style="filled" fillcolor=gray];
46 [label="Exit function anonymousFunction" style="filled" fillcolor=gray];
49 [label="Enter function anonymousFunction"];
50 [label="Jump: ^test_3 Unit"];
51 [label="Stub" style="filled" fillcolor=gray];
52 [label="Exit function anonymousFunction" style="filled" fillcolor=gray];
}
47 [label="Call arguments union" style="filled" fillcolor=gray];
48 [label="Postponed exit from lambda"];
49 [label="Function call: R|kotlin/run|<R|kotlin/Nothing|>(...)" style="filled" fillcolor=gray];
50 [label="Stub" style="filled" fillcolor=gray];
51 [label="Variable declaration: lval x: R|kotlin/Nothing|" style="filled" fillcolor=gray];
52 [label="Exit function test_3" style="filled" fillcolor=red];
53 [label="Call arguments union" style="filled" fillcolor=gray];
54 [label="Postponed exit from lambda"];
55 [label="Function call: R|kotlin/run|<R|kotlin/Nothing|>(...)" style="filled" fillcolor=gray];
56 [label="Stub" style="filled" fillcolor=gray];
57 [label="Variable declaration: lval x: R|kotlin/Nothing|" style="filled" fillcolor=gray];
58 [label="Exit function test_3" style="filled" fillcolor=red];
}
41 -> {42};
42 -> {43};
42 -> {48} [color=red];
43 -> {44};
44 -> {52};
44 -> {45} [style=dotted];
45 -> {46} [style=dotted];
46 -> {47} [style=dotted];
46 -> {48} [color=green];
47 -> {49} [style=dotted];
48 -> {49} [color=green];
49 -> {52 50} [style=dotted];
47 -> {48};
48 -> {49};
48 -> {54} [color=red];
49 -> {50};
50 -> {58};
50 -> {51} [style=dotted];
51 -> {52} [style=dotted];
52 -> {53} [style=dotted];
52 -> {54} [color=green];
53 -> {55} [style=dotted];
54 -> {55} [color=green];
55 -> {58 56} [style=dotted];
56 -> {57} [style=dotted];
57 -> {58} [style=dotted];
}
......@@ -21,78 +21,93 @@ digraph safeCalls_kt {
subgraph cluster_2 {
color=red
4 [label="Enter function getter" style="filled" fillcolor=red];
5 [label="Exit function getter" style="filled" fillcolor=red];
4 [label="Enter class A" style="filled" fillcolor=red];
5 [label="Exit class A" style="filled" fillcolor=red];
}
4 -> {5};
4 -> {5} [color=green];
subgraph cluster_3 {
color=red
6 [label="Enter property" style="filled" fillcolor=red];
7 [label="Exit property" style="filled" fillcolor=red];
6 [label="Enter function getter" style="filled" fillcolor=red];
7 [label="Exit function getter" style="filled" fillcolor=red];
}
6 -> {7};
subgraph cluster_4 {
color=red
8 [label="Enter function getter" style="filled" fillcolor=red];
9 [label="Exit function getter" style="filled" fillcolor=red];
8 [label="Enter property" style="filled" fillcolor=red];
9 [label="Exit property" style="filled" fillcolor=red];
}
8 -> {9};
subgraph cluster_5 {
color=red
10 [label="Enter property" style="filled" fillcolor=red];
11 [label="Exit property" style="filled" fillcolor=red];
10 [label="Enter function getter" style="filled" fillcolor=red];
11 [label="Exit function getter" style="filled" fillcolor=red];
}
10 -> {11};
subgraph cluster_6 {
color=red
12 [label="Enter function test_1" style="filled" fillcolor=red];
13 [label="Access variable R|<local>/x|"];
14 [label="Enter safe call"];
15 [label="Function call: R|<local>/x|?.R|/A.foo|()"];
16 [label="Exit safe call"];
17 [label="Enter safe call"];
18 [label="Function call: R|<local>/x|?.R|/A.foo|()?.R|/A.bar|()"];
19 [label="Exit safe call"];
20 [label="Exit function test_1" style="filled" fillcolor=red];
12 [label="Enter property" style="filled" fillcolor=red];
13 [label="Exit property" style="filled" fillcolor=red];
}
12 -> {13};
13 -> {14 16};
14 -> {15};
15 -> {16};
16 -> {17 19};
17 -> {18};
18 -> {19};
19 -> {20};
subgraph cluster_7 {
color=red
21 [label="Enter function test_2" style="filled" fillcolor=red];
22 [label="Access variable R|<local>/x|"];
23 [label="Enter safe call"];
24 [label="Access variable R|/B.foo|"];
25 [label="Exit safe call"];
26 [label="Enter safe call"];
27 [label="Access variable R|/B.bar|"];
28 [label="Exit safe call"];
29 [label="Exit function test_2" style="filled" fillcolor=red];
14 [label="Enter class B" style="filled" fillcolor=red];
15 [label="Exit class B" style="filled" fillcolor=red];
}
subgraph cluster_8 {
color=red
16 [label="Enter function test_1" style="filled" fillcolor=red];
17 [label="Access variable R|<local>/x|"];
18 [label="Enter safe call"];
19 [label="Function call: R|<local>/x|?.R|/A.foo|()"];
20 [label="Exit safe call"];
21 [label="Enter safe call"];
22 [label="Function call: R|<local>/x|?.R|/A.foo|()?.R|/A.bar|()"];
23 [label="Exit safe call"];
24 [label="Exit function test_1" style="filled" fillcolor=red];
}
16 -> {17};
17 -> {18 20};
18 -> {19};
19 -> {20};
20 -> {21 23};
21 -> {22};
22 -> {23 25};
22 -> {23};
23 -> {24};
24 -> {25};
25 -> {26 28};
26 -> {27};
subgraph cluster_9 {
color=red
25 [label="Enter function test_2" style="filled" fillcolor=red];
26 [label="Access variable R|<local>/x|"];
27 [label="Enter safe call"];
28 [label="Access variable R|/B.foo|"];
29 [label="Exit safe call"];
30 [label="Enter safe call"];
31 [label="Access variable R|/B.bar|"];
32 [label="Exit safe call"];
33 [label="Exit function test_2" style="filled" fillcolor=red];
}
25 -> {26};
26 -> {27 29};
27 -> {28};
28 -> {29};
29 -> {30 32};
30 -> {31};
31 -> {32};
32 -> {33};
}
......@@ -131,60 +131,76 @@ digraph when_kt {
subgraph cluster_10 {
color=red
47 [label="Enter function test_2" style="filled" fillcolor=red];
subgraph cluster_11 {
47 [label="Enter class A" style="filled" fillcolor=red];
48 [label="Exit class A" style="filled" fillcolor=red];
}
47 -> {48} [color=green];
subgraph cluster_11 {
color=red
49 [label="Enter class B" style="filled" fillcolor=red];
50 [label="Exit class B" style="filled" fillcolor=red];
}
49 -> {50} [color=green];
subgraph cluster_12 {
color=red
51 [label="Enter function test_2" style="filled" fillcolor=red];
subgraph cluster_13 {
color=blue
48 [label="Enter when"];
subgraph cluster_12 {
52 [label="Enter when"];
subgraph cluster_14 {
color=blue
49 [label="Enter when branch condition "];
subgraph cluster_13 {
53 [label="Enter when branch condition "];
subgraph cluster_15 {
color=blue
50 [label="Enter &&"];
51 [label="Access variable R|<local>/x|"];
52 [label="Type operator: (R|<local>/x| is R|A|)"];
53 [label="Exit left part of &&"];
54 [label="Enter right part of &&"];
54 [label="Enter &&"];
55 [label="Access variable R|<local>/x|"];
56 [label="Type operator: (R|<local>/x| is R|B|)"];
57 [label="Exit &&"];
56 [label="Type operator: (R|<local>/x| is R|A|)"];
57 [label="Exit left part of &&"];
58 [label="Enter right part of &&"];
59 [label="Access variable R|<local>/x|"];
60 [label="Type operator: (R|<local>/x| is R|B|)"];
61 [label="Exit &&"];
}
58 [label="Exit when branch condition"];
62 [label="Exit when branch condition"];
}
59 [label="Synthetic else branch"];
60 [label="Enter when branch result"];
subgraph cluster_14 {
63 [label="Synthetic else branch"];
64 [label="Enter when branch result"];
subgraph cluster_16 {
color=blue
61 [label="Enter block"];
62 [label="Access variable R|<local>/x|"];
63 [label="Type operator: (R|<local>/x| is R|A|)"];
64 [label="Exit block"];
65 [label="Enter block"];
66 [label="Access variable R|<local>/x|"];
67 [label="Type operator: (R|<local>/x| is R|A|)"];
68 [label="Exit block"];
}
65 [label="Exit when branch result"];
66 [label="Exit when"];
69 [label="Exit when branch result"];
70 [label="Exit when"];
}
67 [label="Exit function test_2" style="filled" fillcolor=red];
71 [label="Exit function test_2" style="filled" fillcolor=red];
}
47 -> {48};
48 -> {49};
49 -> {50};
50 -> {51};
51 -> {52};
52 -> {53};
53 -> {57 54};
53 -> {54};
54 -> {55};
55 -> {56};
56 -> {57};
57 -> {58};
58 -> {60 59};
59 -> {66};
57 -> {61 58};
58 -> {59};
59 -> {60};
60 -> {61};
61 -> {62};
62 -> {63};
63 -> {64};
62 -> {64 63};
63 -> {70};
64 -> {65};
65 -> {66};
66 -> {67};
67 -> {68};
68 -> {69};
69 -> {70};
70 -> {71};
}
......@@ -31,77 +31,89 @@ digraph exhaustiveWhenAndDNNType_kt {
subgraph cluster_3 {
color=red
7 [label="Enter function <init>" style="filled" fillcolor=red];
8 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
9 [label="Exit function <init>" style="filled" fillcolor=red];
7 [label="Enter class SomeEnum" style="filled" fillcolor=red];
8 [label="Exit class SomeEnum" style="filled" fillcolor=red];
}
7 -> {8};
8 -> {9};
7 -> {8} [color=green];
subgraph cluster_4 {
color=red
10 [label="Enter function takeB" style="filled" fillcolor=red];
11 [label="Exit function takeB" style="filled" fillcolor=red];
9 [label="Enter function <init>" style="filled" fillcolor=red];
10 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
11 [label="Exit function <init>" style="filled" fillcolor=red];
}
9 -> {10};
10 -> {11};
subgraph cluster_5 {
color=red
12 [label="Enter function test_1" style="filled" fillcolor=red];
13 [label="Access qualifier /SomeEnum"];
14 [label="Access variable R|/SomeEnum.A1|"];
15 [label="Variable declaration: lval flag: R|SomeEnum|"];
subgraph cluster_6 {
12 [label="Enter class B" style="filled" fillcolor=red];
13 [label="Exit class B" style="filled" fillcolor=red];
}
12 -> {13} [color=green];
subgraph cluster_6 {
color=red
14 [label="Enter function takeB" style="filled" fillcolor=red];
15 [label="Exit function takeB" style="filled" fillcolor=red];
}
14 -> {15};
subgraph cluster_7 {
color=red
16 [label="Enter function test_1" style="filled" fillcolor=red];
17 [label="Access qualifier /SomeEnum"];
18 [label="Access variable R|/SomeEnum.A1|"];
19 [label="Variable declaration: lval flag: R|SomeEnum|"];
subgraph cluster_8 {
color=blue
16 [label="Enter when"];
17 [label="Access variable R|<local>/flag|"];
18 [label="Check not null: R|<local>/flag|!!"];
subgraph cluster_7 {
20 [label="Enter when"];
21 [label="Access variable R|<local>/flag|"];
22 [label="Check not null: R|<local>/flag|!!"];
subgraph cluster_9 {
color=blue
19 [label="Enter when branch condition "];
20 [label="Access qualifier /SomeEnum"];
21 [label="Access variable R|/SomeEnum.A1|"];
22 [label="Operator =="];
23 [label="Exit when branch condition"];
23 [label="Enter when branch condition "];
24 [label="Access qualifier /SomeEnum"];
25 [label="Access variable R|/SomeEnum.A1|"];
26 [label="Operator =="];
27 [label="Exit when branch condition"];
}
subgraph cluster_8 {
subgraph cluster_10 {
color=blue
24 [label="Enter when branch condition "];
25 [label="Access qualifier /SomeEnum"];
26 [label="Access variable R|/SomeEnum.A2|"];
27 [label="Operator =="];
28 [label="Exit when branch condition"];
28 [label="Enter when branch condition "];
29 [label="Access qualifier /SomeEnum"];
30 [label="Access variable R|/SomeEnum.A2|"];
31 [label="Operator =="];
32 [label="Exit when branch condition"];
}
29 [label="Enter when branch result"];
subgraph cluster_9 {
33 [label="Enter when branch result"];
subgraph cluster_11 {
color=blue
30 [label="Enter block"];
31 [label="Function call: R|/B.B|()"];
32 [label="Exit block"];
34 [label="Enter block"];
35 [label="Function call: R|/B.B|()"];
36 [label="Exit block"];
}
33 [label="Exit when branch result"];
34 [label="Enter when branch result"];
subgraph cluster_10 {
37 [label="Exit when branch result"];
38 [label="Enter when branch result"];
subgraph cluster_12 {
color=blue
35 [label="Enter block"];
36 [label="Function call: R|/B.B|()"];
37 [label="Exit block"];
39 [label="Enter block"];
40 [label="Function call: R|/B.B|()"];
41 [label="Exit block"];
}
38 [label="Exit when branch result"];
39 [label="Exit when"];
42 [label="Exit when branch result"];
43 [label="Exit when"];
}
40 [label="Variable declaration: lval b: R|B|"];
41 [label="Access variable R|<local>/b|"];
42 [label="Function call: R|/takeB|(...)"];
43 [label="Exit function test_1" style="filled" fillcolor=red];
44 [label="Variable declaration: lval b: R|B|"];
45 [label="Access variable R|<local>/b|"];
46 [label="Function call: R|/takeB|(...)"];
47 [label="Exit function test_1" style="filled" fillcolor=red];
}
12 -> {13};
13 -> {14};
14 -> {15};
15 -> {16};
16 -> {17};
17 -> {18};
18 -> {19};
......@@ -109,82 +121,82 @@ digraph exhaustiveWhenAndDNNType_kt {
20 -> {21};
21 -> {22};
22 -> {23};
23 -> {34 24};
23 -> {24};
24 -> {25};
25 -> {26};
26 -> {27};
27 -> {28};
27 -> {38 28};
28 -> {29};
29 -> {30};
30 -> {31};
31 -> {32};
32 -> {33};
33 -> {39};
33 -> {34};
34 -> {35};
35 -> {36};
36 -> {37};
37 -> {38};
37 -> {43};
38 -> {39};
39 -> {40};
40 -> {41};
41 -> {42};
42 -> {43};
43 -> {44};
44 -> {45};
45 -> {46};
46 -> {47};
subgraph cluster_11 {
subgraph cluster_13 {
color=red
44 [label="Enter function test_2" style="filled" fillcolor=red];
45 [label="Access qualifier /SomeEnum"];
46 [label="Access variable R|/SomeEnum.A1|"];
47 [label="Variable declaration: lval flag: R|SomeEnum|"];
subgraph cluster_12 {
48 [label="Enter function test_2" style="filled" fillcolor=red];
49 [label="Access qualifier /SomeEnum"];
50 [label="Access variable R|/SomeEnum.A1|"];
51 [label="Variable declaration: lval flag: R|SomeEnum|"];
subgraph cluster_14 {
color=blue
48 [label="Enter when"];
49 [label="Access variable R|<local>/flag|"];
50 [label="Check not null: R|<local>/flag|!!"];
subgraph cluster_13 {
52 [label="Enter when"];
53 [label="Access variable R|<local>/flag|"];
54 [label="Check not null: R|<local>/flag|!!"];
subgraph cluster_15 {
color=blue
51 [label="Enter when branch condition "];
52 [label="Access qualifier /SomeEnum"];
53 [label="Access variable R|/SomeEnum.A1|"];
54 [label="Operator =="];
55 [label="Exit when branch condition"];
55 [label="Enter when branch condition "];
56 [label="Access qualifier /SomeEnum"];
57 [label="Access variable R|/SomeEnum.A1|"];
58 [label="Operator =="];
59 [label="Exit when branch condition"];
}
subgraph cluster_14 {
subgraph cluster_16 {
color=blue
56 [label="Enter when branch condition "];
57 [label="Access qualifier /SomeEnum"];
58 [label="Access variable R|/SomeEnum.A2|"];
59 [label="Operator =="];
60 [label="Exit when branch condition"];
60 [label="Enter when branch condition "];
61 [label="Access qualifier /SomeEnum"];
62 [label="Access variable R|/SomeEnum.A2|"];
63 [label="Operator =="];
64 [label="Exit when branch condition"];
}
61 [label="Enter when branch result"];
subgraph cluster_15 {
65 [label="Enter when branch result"];
subgraph cluster_17 {
color=blue
62 [label="Enter block"];
63 [label="Function call: R|/B.B|()"];
64 [label="Exit block"];
66 [label="Enter block"];
67 [label="Function call: R|/B.B|()"];
68 [label="Exit block"];
}
65 [label="Exit when branch result"];
66 [label="Enter when branch result"];
subgraph cluster_16 {
69 [label="Exit when branch result"];
70 [label="Enter when branch result"];
subgraph cluster_18 {
color=blue
67 [label="Enter block"];
68 [label="Function call: R|/B.B|()"];
69 [label="Exit block"];
71 [label="Enter block"];
72 [label="Function call: R|/B.B|()"];
73 [label="Exit block"];
}
70 [label="Exit when branch result"];
71 [label="Exit when"];
74 [label="Exit when branch result"];
75 [label="Exit when"];
}
72 [label="Variable declaration: lval b: R|B|"];
73 [label="Access variable R|<local>/b|"];
74 [label="Function call: R|/takeB|(...)"];
75 [label="Exit function test_2" style="filled" fillcolor=red];
76 [label="Variable declaration: lval b: R|B|"];
77 [label="Access variable R|<local>/b|"];
78 [label="Function call: R|/takeB|(...)"];
79 [label="Exit function test_2" style="filled" fillcolor=red];
}
44 -> {45};
45 -> {46};
46 -> {47};
47 -> {48};
48 -> {49};
49 -> {50};
50 -> {51};
......@@ -192,106 +204,110 @@ digraph exhaustiveWhenAndDNNType_kt {
52 -> {53};
53 -> {54};
54 -> {55};
55 -> {66 56};
55 -> {56};
56 -> {57};
57 -> {58};
58 -> {59};
59 -> {60};
59 -> {70 60};
60 -> {61};
61 -> {62};
62 -> {63};
63 -> {64};
64 -> {65};
65 -> {71};
65 -> {66};
66 -> {67};
67 -> {68};
68 -> {69};
69 -> {70};
69 -> {75};
70 -> {71};
71 -> {72};
72 -> {73};
73 -> {74};
74 -> {75};
75 -> {76};
76 -> {77};
77 -> {78};
78 -> {79};
subgraph cluster_17 {
subgraph cluster_19 {
color=red
76 [label="Enter function test_3" style="filled" fillcolor=red];
77 [label="Access qualifier /SomeEnum"];
78 [label="Access variable R|/SomeEnum.A1|"];
79 [label="Variable declaration: lval flag: R|SomeEnum|"];
subgraph cluster_18 {
80 [label="Enter function test_3" style="filled" fillcolor=red];
81 [label="Access qualifier /SomeEnum"];
82 [label="Access variable R|/SomeEnum.A1|"];
83 [label="Variable declaration: lval flag: R|SomeEnum|"];
subgraph cluster_20 {
color=blue
80 [label="Enter when"];
81 [label="Access variable R|<local>/flag|"];
subgraph cluster_19 {
84 [label="Enter when"];
85 [label="Access variable R|<local>/flag|"];
subgraph cluster_21 {
color=blue
82 [label="Enter when branch condition "];
83 [label="Access qualifier /SomeEnum"];
84 [label="Access variable R|/SomeEnum.A1|"];
85 [label="Operator =="];
86 [label="Exit when branch condition"];
86 [label="Enter when branch condition "];
87 [label="Access qualifier /SomeEnum"];
88 [label="Access variable R|/SomeEnum.A1|"];
89 [label="Operator =="];
90 [label="Exit when branch condition"];
}
subgraph cluster_20 {
subgraph cluster_22 {
color=blue
87 [label="Enter when branch condition "];
88 [label="Access qualifier /SomeEnum"];
89 [label="Access variable R|/SomeEnum.A2|"];
90 [label="Operator =="];
91 [label="Exit when branch condition"];
91 [label="Enter when branch condition "];
92 [label="Access qualifier /SomeEnum"];
93 [label="Access variable R|/SomeEnum.A2|"];
94 [label="Operator =="];
95 [label="Exit when branch condition"];
}
92 [label="Enter when branch result"];
subgraph cluster_21 {
96 [label="Enter when branch result"];
subgraph cluster_23 {
color=blue
93 [label="Enter block"];
94 [label="Function call: R|/B.B|()"];
95 [label="Exit block"];
97 [label="Enter block"];
98 [label="Function call: R|/B.B|()"];
99 [label="Exit block"];
}
96 [label="Exit when branch result"];
97 [label="Enter when branch result"];
subgraph cluster_22 {
100 [label="Exit when branch result"];
101 [label="Enter when branch result"];
subgraph cluster_24 {
color=blue
98 [label="Enter block"];
99 [label="Function call: R|/B.B|()"];
100 [label="Exit block"];
102 [label="Enter block"];
103 [label="Function call: R|/B.B|()"];
104 [label="Exit block"];
}
101 [label="Exit when branch result"];
102 [label="Exit when"];
105 [label="Exit when branch result"];
106 [label="Exit when"];
}
103 [label="Variable declaration: lval b: R|B|"];
104 [label="Access variable R|<local>/b|"];
105 [label="Function call: R|/takeB|(...)"];
106 [label="Exit function test_3" style="filled" fillcolor=red];
107 [label="Variable declaration: lval b: R|B|"];
108 [label="Access variable R|<local>/b|"];
109 [label="Function call: R|/takeB|(...)"];
110 [label="Exit function test_3" style="filled" fillcolor=red];
}
76 -> {77};
77 -> {78};
78 -> {79};
79 -> {80};
80 -> {81};
81 -> {82};
82 -> {83};
83 -> {84};
84 -> {85};
85 -> {86};
86 -> {97 87};
86 -> {87};
87 -> {88};
88 -> {89};
89 -> {90};
90 -> {91};
90 -> {101 91};
91 -> {92};
92 -> {93};
93 -> {94};
94 -> {95};
95 -> {96};
96 -> {102};
96 -> {97};
97 -> {98};
98 -> {99};
99 -> {100};
100 -> {101};
100 -> {106};
101 -> {102};
102 -> {103};
103 -> {104};
104 -> {105};
105 -> {106};
106 -> {107};
107 -> {108};
108 -> {109};
109 -> {110};
}
......@@ -15,90 +15,105 @@ digraph functionCallBound_kt {
subgraph cluster_1 {
color=red
3 [label="Enter function <init>" style="filled" fillcolor=red];
4 [label="Delegated constructor call: super<R|Base|>()"];
5 [label="Exit function <init>" style="filled" fillcolor=red];
3 [label="Enter class Base" style="filled" fillcolor=red];
4 [label="Exit class Base" style="filled" fillcolor=red];
}
3 -> {4};
4 -> {5};
3 -> {4} [color=green];
subgraph cluster_2 {
color=red
6 [label="Enter function getter" style="filled" fillcolor=red];
7 [label="Exit function getter" style="filled" fillcolor=red];
5 [label="Enter function <init>" style="filled" fillcolor=red];
6 [label="Delegated constructor call: super<R|Base|>()"];
7 [label="Exit function <init>" style="filled" fillcolor=red];
}
5 -> {6};
6 -> {7};
subgraph cluster_3 {
color=red
8 [label="Enter property" style="filled" fillcolor=red];
9 [label="Access variable R|<local>/data|"];
10 [label="Exit property" style="filled" fillcolor=red];
8 [label="Enter function getter" style="filled" fillcolor=red];
9 [label="Exit function getter" style="filled" fillcolor=red];
}
8 -> {9};
9 -> {10};
subgraph cluster_4 {
color=red
11 [label="Enter function isOk" style="filled" fillcolor=red];
12 [label="Const: Boolean(true)"];
13 [label="Jump: ^isOk Boolean(true)"];
14 [label="Stub" style="filled" fillcolor=gray];
15 [label="Exit function isOk" style="filled" fillcolor=red];
10 [label="Enter property" style="filled" fillcolor=red];
11 [label="Access variable R|<local>/data|"];
12 [label="Exit property" style="filled" fillcolor=red];
}
10 -> {11};
11 -> {12};
12 -> {13};
13 -> {15};
13 -> {14} [style=dotted];
14 -> {15} [style=dotted];
subgraph cluster_5 {
color=red
16 [label="Enter function check" style="filled" fillcolor=red];
subgraph cluster_6 {
13 [label="Enter class Sub" style="filled" fillcolor=red];
14 [label="Exit class Sub" style="filled" fillcolor=red];
}
subgraph cluster_6 {
color=red
15 [label="Enter function isOk" style="filled" fillcolor=red];
16 [label="Const: Boolean(true)"];
17 [label="Jump: ^isOk Boolean(true)"];
18 [label="Stub" style="filled" fillcolor=gray];
19 [label="Exit function isOk" style="filled" fillcolor=red];
}
15 -> {16};
16 -> {17};
17 -> {19};
17 -> {18} [style=dotted];
18 -> {19} [style=dotted];
subgraph cluster_7 {
color=red
20 [label="Enter function check" style="filled" fillcolor=red];
subgraph cluster_8 {
color=blue
17 [label="Enter when"];
subgraph cluster_7 {
21 [label="Enter when"];
subgraph cluster_9 {
color=blue
18 [label="Enter when branch condition "];
19 [label="Access variable R|<local>/base|"];
20 [label="Type operator: (R|<local>/base| as? R|Sub|)"];
21 [label="Enter safe call"];
22 [label="Function call: (R|<local>/base| as? R|Sub|)?.R|/isOk|()"];
23 [label="Exit safe call"];
24 [label="Const: Boolean(true)"];
25 [label="Operator =="];
26 [label="Exit when branch condition"];
22 [label="Enter when branch condition "];
23 [label="Access variable R|<local>/base|"];
24 [label="Type operator: (R|<local>/base| as? R|Sub|)"];
25 [label="Enter safe call"];
26 [label="Function call: (R|<local>/base| as? R|Sub|)?.R|/isOk|()"];
27 [label="Exit safe call"];
28 [label="Const: Boolean(true)"];
29 [label="Operator =="];
30 [label="Exit when branch condition"];
}
subgraph cluster_8 {
subgraph cluster_10 {
color=blue
27 [label="Enter when branch condition else"];
28 [label="Exit when branch condition"];
31 [label="Enter when branch condition else"];
32 [label="Exit when branch condition"];
}
29 [label="Enter when branch result"];
subgraph cluster_9 {
33 [label="Enter when branch result"];
subgraph cluster_11 {
color=blue
30 [label="Enter block"];
31 [label="Access variable R|<local>/base|"];
32 [label="Exit block"];
34 [label="Enter block"];
35 [label="Access variable R|<local>/base|"];
36 [label="Exit block"];
}
33 [label="Exit when branch result"];
34 [label="Enter when branch result"];
subgraph cluster_10 {
37 [label="Exit when branch result"];
38 [label="Enter when branch result"];
subgraph cluster_12 {
color=blue
35 [label="Enter block"];
36 [label="Access variable R|<local>/base|"];
37 [label="Access variable R|/Sub.data|"];
38 [label="Exit block"];
39 [label="Enter block"];
40 [label="Access variable R|<local>/base|"];
41 [label="Access variable R|/Sub.data|"];
42 [label="Exit block"];
}
39 [label="Exit when branch result"];
40 [label="Exit when"];
43 [label="Exit when branch result"];
44 [label="Exit when"];
}
41 [label="Jump: ^check when () {
45 [label="Jump: ^check when () {
==((R|<local>/base| as? R|Sub|)?.R|/isOk|(), Boolean(true)) -> {
R|<local>/base|.R|/Sub.data|
}
......@@ -107,37 +122,37 @@ digraph functionCallBound_kt {
}
}
"];
42 [label="Stub" style="filled" fillcolor=gray];
43 [label="Exit function check" style="filled" fillcolor=red];
46 [label="Stub" style="filled" fillcolor=gray];
47 [label="Exit function check" style="filled" fillcolor=red];
}
16 -> {17};
17 -> {18};
18 -> {19};
19 -> {20};
20 -> {21 23};
20 -> {21};
21 -> {22};
22 -> {23};
23 -> {24};
24 -> {25};
24 -> {25 27};
25 -> {26};
26 -> {34 27};
26 -> {27};
27 -> {28};
28 -> {29};
29 -> {30};
30 -> {31};
30 -> {38 31};
31 -> {32};
32 -> {33};
33 -> {40};
33 -> {34};
34 -> {35};
35 -> {36};
36 -> {37};
37 -> {38};
37 -> {44};
38 -> {39};
39 -> {40};
40 -> {41};
41 -> {43};
41 -> {42} [style=dotted];
42 -> {43} [style=dotted];
41 -> {42};
42 -> {43};
43 -> {44};
44 -> {45};
45 -> {47};
45 -> {46} [style=dotted];
46 -> {47} [style=dotted];
}
......@@ -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 {
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
8 [label="Enter when"];
subgraph cluster_4 {
10 [label="Enter when"];
subgraph cluster_5 {
color=blue
9 [label="Enter when branch condition "];
subgraph cluster_5 {
11 [label="Enter when branch condition "];
subgraph cluster_6 {
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"];
}
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
18 [label="Enter when branch condition else"];
16 [label="Enter when branch condition "];
17 [label="Const: Null(null)"];
18 [label="Operator =="];
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"];
20 [label="Enter when branch condition else"];
21 [label="Exit when branch condition"];
}
24 [label="Exit when branch result"];
25 [label="Enter when branch result"];
22 [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];
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];
}
30 [label="Exit when branch result" style="filled" fillcolor=gray];
31 [label="Exit when"];
32 [label="Exit when branch result" style="filled" fillcolor=gray];
33 [label="Exit when"];
}
32 [label="Function call: R|/takeA|(...)"];
33 [label="Exit when branch condition"];
34 [label="Function call: R|/takeA|(...)"];
35 [label="Exit when branch condition"];
}
34 [label="Synthetic else branch"];
35 [label="Enter when branch result"];
subgraph cluster_10 {
36 [label="Synthetic else branch"];
37 [label="Enter when branch result"];
subgraph cluster_11 {
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"];
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"];
}
40 [label="Exit when branch result"];
41 [label="Exit when"];
42 [label="Exit when branch result"];
43 [label="Exit when"];
}
42 [label="Exit function test" style="filled" fillcolor=red];
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};
}
......@@ -160,10 +160,31 @@ abstract class FirDataFlowAnalyzer<FLOW : Flow>(
enterNode.flow = enterNode.flow.fork()
}
// ----------------------------------- Anonymous object -----------------------------------
// ----------------------------------- Classes -----------------------------------
fun exitAnonymousObject(anonymousObject: FirAnonymousObject) {
graphBuilder.exitAnonymousObject(anonymousObject).mergeIncomingFlow()
fun enterClass() {
graphBuilder.enterClass()
}
fun exitClass() {
graphBuilder.exitClass()
}
fun exitRegularClass(klass: FirRegularClass): ControlFlowGraph {
if (klass.isLocal) return exitLocalClass(klass)
return graphBuilder.exitClass(klass)
}
private fun exitLocalClass(klass: FirRegularClass): ControlFlowGraph {
val (node, controlFlowGraph) = graphBuilder.exitLocalClass(klass)
node.mergeIncomingFlow()
return controlFlowGraph
}
fun exitAnonymousObject(anonymousObject: FirAnonymousObject): ControlFlowGraph {
val (node, controlFlowGraph) = graphBuilder.exitAnonymousObject(anonymousObject)
node.mergeIncomingFlow()
return controlFlowGraph
}
// ----------------------------------- Property -----------------------------------
......
......@@ -135,13 +135,13 @@ class UnionFunctionCallArgumentsNode(owner: ControlFlowGraph, override val fir:
// ----------------------------------- Classes -----------------------------------
class ClassEnterNode(owner: ControlFlowGraph, override val fir: FirClass<*>, level: Int, id: Int) : CFGNode<FirClass<*>>(owner, level, id) {
class ClassEnterNode(owner: ControlFlowGraph, override val fir: FirClass<*>, level: Int, id: Int) : CFGNode<FirClass<*>>(owner, level, id), EnterNodeMarker {
override fun <R, D> accept(visitor: ControlFlowGraphVisitor<R, D>, data: D): R {
return visitor.visitClassEnterNode(this, data)
}
}
class ClassExitNode(owner: ControlFlowGraph, override val fir: FirClass<*>, level: Int, id: Int) : CFGNode<FirClass<*>>(owner, level, id) {
class ClassExitNode(owner: ControlFlowGraph, override val fir: FirClass<*>, level: Int, id: Int) : CFGNode<FirClass<*>>(owner, level, id), ExitNodeMarker {
override fun <R, D> accept(visitor: ControlFlowGraphVisitor<R, D>, data: D): R {
return visitor.visitClassExitNode(this, data)
}
......
......@@ -61,6 +61,8 @@ inline val FirPropertyAccessor.visibility get() = status.visibility
inline val FirPropertyAccessor.allowsToHaveFakeOverride: Boolean
get() = !Visibilities.isPrivate(visibility) && this != Visibilities.INVISIBLE_FAKE
inline val FirRegularClass.isLocal get() = symbol.classId.isLocal
fun AbstractFirRegularClassBuilder.addDeclaration(declaration: FirDeclaration) {
declarations += declaration
if (companionObject == null && declaration is FirRegularClass && declaration.isCompanion) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册