[FIR] Create CFG for files to track top-level property initialization

In order to properly analyze top-level property initialization, a
control-flow graph must be created for FirFiles. This change adds the
foundation for the file CFG and updates body resolve to create the CFG.
Checking the CFG for proper initialization is separated into a following
change to ease code review.

KT-56683
This commit is contained in:
Brian Norman
2023-07-25 10:23:22 -05:00
committed by Space Team
parent 0b7eb32064
commit b55fda0c55
127 changed files with 19565 additions and 18746 deletions
@@ -5,78 +5,83 @@ digraph elvis_kt {
subgraph cluster_0 {
color=red
0 [label="Enter class A" style="filled" fillcolor=red];
1 [label="Exit class A" style="filled" fillcolor=red];
0 [label="Enter file elvis.kt" style="filled" fillcolor=red];
1 [label="Exit file elvis.kt" style="filled" fillcolor=red];
}
0 -> {1} [color=green];
subgraph cluster_1 {
color=red
2 [label="Enter function foo" style="filled" fillcolor=red];
3 [label="Exit function foo" style="filled" fillcolor=red];
2 [label="Enter class A" style="filled" fillcolor=red];
3 [label="Exit class A" style="filled" fillcolor=red];
}
2 -> {3};
2 -> {3} [color=green];
subgraph cluster_2 {
color=red
4 [label="Enter function test_1" style="filled" fillcolor=red];
subgraph cluster_3 {
color=blue
5 [label="Enter block"];
subgraph cluster_4 {
color=blue
6 [label="Enter when"];
subgraph cluster_5 {
color=blue
7 [label="Enter when branch condition "];
8 [label="Access variable R|<local>/x|"];
9 [label="Enter safe call"];
10 [label="Access variable R|/A.b|"];
11 [label="Exit safe call"];
12 [label="Exit lhs of ?:"];
13 [label="Enter rhs of ?:"];
14 [label="Jump: ^test_1 Unit"];
15 [label="Stub" style="filled" fillcolor=gray];
16 [label="Lhs of ?: is not null"];
17 [label="Exit ?:"];
18 [label="Exit when branch condition"];
}
19 [label="Synthetic else branch"];
20 [label="Enter when branch result"];
subgraph cluster_6 {
color=blue
21 [label="Enter block"];
22 [label="Access variable R|<local>/x|"];
23 [label="Smart cast: R|<local>/x|"];
24 [label="Function call: R|<local>/x|.R|/A.foo|()" style="filled" fillcolor=yellow];
25 [label="Exit block"];
}
26 [label="Exit when branch result"];
27 [label="Exit when"];
}
28 [label="Exit block"];
}
29 [label="Exit function test_1" style="filled" fillcolor=red];
4 [label="Enter function foo" style="filled" fillcolor=red];
5 [label="Exit function foo" style="filled" fillcolor=red];
}
4 -> {5};
5 -> {6};
subgraph cluster_3 {
color=red
6 [label="Enter function test_1" style="filled" fillcolor=red];
subgraph cluster_4 {
color=blue
7 [label="Enter block"];
subgraph cluster_5 {
color=blue
8 [label="Enter when"];
subgraph cluster_6 {
color=blue
9 [label="Enter when branch condition "];
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="Exit lhs of ?:"];
15 [label="Enter rhs of ?:"];
16 [label="Jump: ^test_1 Unit"];
17 [label="Stub" style="filled" fillcolor=gray];
18 [label="Lhs of ?: is not null"];
19 [label="Exit ?:"];
20 [label="Exit when branch condition"];
}
21 [label="Synthetic else branch"];
22 [label="Enter when branch result"];
subgraph cluster_7 {
color=blue
23 [label="Enter block"];
24 [label="Access variable R|<local>/x|"];
25 [label="Smart cast: R|<local>/x|"];
26 [label="Function call: R|<local>/x|.R|/A.foo|()" style="filled" fillcolor=yellow];
27 [label="Exit block"];
}
28 [label="Exit when branch result"];
29 [label="Exit when"];
}
30 [label="Exit block"];
}
31 [label="Exit function test_1" style="filled" fillcolor=red];
}
6 -> {7};
7 -> {8};
8 -> {9 13};
8 -> {9};
9 -> {10};
10 -> {11};
10 -> {11 15};
11 -> {12};
12 -> {13 16};
12 -> {13};
13 -> {14};
14 -> {29};
14 -> {15} [style=dotted];
15 -> {17} [style=dotted];
16 -> {17};
17 -> {18};
18 -> {19 20};
19 -> {27};
20 -> {21};
21 -> {22};
14 -> {15 18};
15 -> {16};
16 -> {31};
16 -> {17} [style=dotted];
17 -> {19} [style=dotted];
18 -> {19};
19 -> {20};
20 -> {21 22};
21 -> {29};
22 -> {23};
23 -> {24};
24 -> {25};
@@ -84,116 +89,118 @@ digraph elvis_kt {
26 -> {27};
27 -> {28};
28 -> {29};
29 -> {30};
30 -> {31};
subgraph cluster_7 {
subgraph cluster_8 {
color=red
30 [label="Enter function test2" style="filled" fillcolor=red];
subgraph cluster_8 {
32 [label="Enter function test2" style="filled" fillcolor=red];
subgraph cluster_9 {
color=blue
31 [label="Enter block"];
subgraph cluster_9 {
33 [label="Enter block"];
subgraph cluster_10 {
color=blue
32 [label="Enter when"];
subgraph cluster_10 {
color=blue
33 [label="Enter when branch condition "];
34 [label="Access variable R|<local>/b|"];
35 [label="Type operator: (R|<local>/b| !is R|kotlin/String|)"];
36 [label="Exit when branch condition"];
}
37 [label="Synthetic else branch"];
38 [label="Enter when branch result"];
34 [label="Enter when"];
subgraph cluster_11 {
color=blue
39 [label="Enter block"];
40 [label="Const: String()"];
41 [label="Jump: ^test2 String()"];
42 [label="Stub" style="filled" fillcolor=gray];
43 [label="Exit block" style="filled" fillcolor=gray];
35 [label="Enter when branch condition "];
36 [label="Access variable R|<local>/b|"];
37 [label="Type operator: (R|<local>/b| !is R|kotlin/String|)"];
38 [label="Exit when branch condition"];
}
44 [label="Exit when branch result" style="filled" fillcolor=gray];
45 [label="Exit when"];
}
subgraph cluster_12 {
color=blue
46 [label="Enter when"];
subgraph cluster_13 {
39 [label="Synthetic else branch"];
40 [label="Enter when branch result"];
subgraph cluster_12 {
color=blue
47 [label="Enter when branch condition "];
48 [label="Access variable R|<local>/a|"];
49 [label="Type operator: (R|<local>/a| !is R|kotlin/String?|)"];
50 [label="Exit when branch condition"];
41 [label="Enter block"];
42 [label="Const: String()"];
43 [label="Jump: ^test2 String()"];
44 [label="Stub" style="filled" fillcolor=gray];
45 [label="Exit block" style="filled" fillcolor=gray];
}
51 [label="Synthetic else branch"];
52 [label="Enter when branch result"];
46 [label="Exit when branch result" style="filled" fillcolor=gray];
47 [label="Exit when"];
}
subgraph cluster_13 {
color=blue
48 [label="Enter when"];
subgraph cluster_14 {
color=blue
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];
49 [label="Enter when branch condition "];
50 [label="Access variable R|<local>/a|"];
51 [label="Type operator: (R|<local>/a| !is R|kotlin/String?|)"];
52 [label="Exit when branch condition"];
}
58 [label="Exit when branch result" style="filled" fillcolor=gray];
59 [label="Exit when"];
53 [label="Synthetic else branch"];
54 [label="Enter when branch result"];
subgraph cluster_15 {
color=blue
55 [label="Enter block"];
56 [label="Const: String()"];
57 [label="Jump: ^test2 String()"];
58 [label="Stub" style="filled" fillcolor=gray];
59 [label="Exit block" style="filled" fillcolor=gray];
}
60 [label="Exit when branch result" style="filled" fillcolor=gray];
61 [label="Exit when"];
}
60 [label="Access variable R|<local>/a|"];
61 [label="Smart cast: R|<local>/a|"];
62 [label="Exit lhs of ?:"];
63 [label="Enter rhs of ?:"];
64 [label="Access variable R|<local>/b|"];
65 [label="Smart cast: R|<local>/b|"];
66 [label="Lhs of ?: is not null"];
67 [label="Exit ?:"];
68 [label="Jump: ^test2 R|<local>/a| ?: R|<local>/b|"];
69 [label="Stub" style="filled" fillcolor=gray];
70 [label="Exit block" style="filled" fillcolor=gray];
62 [label="Access variable R|<local>/a|"];
63 [label="Smart cast: R|<local>/a|"];
64 [label="Exit lhs of ?:"];
65 [label="Enter rhs of ?:"];
66 [label="Access variable R|<local>/b|"];
67 [label="Smart cast: R|<local>/b|"];
68 [label="Lhs of ?: is not null"];
69 [label="Exit ?:"];
70 [label="Jump: ^test2 R|<local>/a| ?: R|<local>/b|"];
71 [label="Stub" style="filled" fillcolor=gray];
72 [label="Exit block" style="filled" fillcolor=gray];
}
71 [label="Exit function test2" style="filled" fillcolor=red];
73 [label="Exit function test2" style="filled" fillcolor=red];
}
30 -> {31};
31 -> {32};
32 -> {33};
33 -> {34};
34 -> {35};
35 -> {36};
36 -> {37 38};
37 -> {45};
38 -> {39};
39 -> {40};
36 -> {37};
37 -> {38};
38 -> {39 40};
39 -> {47};
40 -> {41};
41 -> {71};
41 -> {42} [style=dotted];
42 -> {43} [style=dotted];
41 -> {42};
42 -> {43};
43 -> {73};
43 -> {44} [style=dotted];
44 -> {45} [style=dotted];
45 -> {46};
46 -> {47};
45 -> {46} [style=dotted];
46 -> {47} [style=dotted];
47 -> {48};
48 -> {49};
49 -> {50};
50 -> {51 52};
51 -> {59};
52 -> {53};
53 -> {54};
50 -> {51};
51 -> {52};
52 -> {53 54};
53 -> {61};
54 -> {55};
55 -> {71};
55 -> {56} [style=dotted];
56 -> {57} [style=dotted];
55 -> {56};
56 -> {57};
57 -> {73};
57 -> {58} [style=dotted];
58 -> {59} [style=dotted];
59 -> {60};
60 -> {61};
59 -> {60} [style=dotted];
60 -> {61} [style=dotted];
61 -> {62};
62 -> {63 66};
62 -> {63};
63 -> {64};
64 -> {65};
65 -> {67};
64 -> {65 68};
65 -> {66};
66 -> {67};
67 -> {68};
68 -> {71};
68 -> {69} [style=dotted];
69 -> {70} [style=dotted];
67 -> {69};
68 -> {69};
69 -> {70};
70 -> {73};
70 -> {71} [style=dotted];
71 -> {72} [style=dotted];
72 -> {73} [style=dotted];
}
@@ -5,65 +5,70 @@ digraph returns_kt {
subgraph cluster_0 {
color=red
0 [label="Enter function test_0" style="filled" fillcolor=red];
subgraph cluster_1 {
0 [label="Enter file returns.kt" style="filled" fillcolor=red];
1 [label="Exit file returns.kt" style="filled" fillcolor=red];
}
0 -> {1} [color=green];
subgraph cluster_1 {
color=red
2 [label="Enter function test_0" style="filled" fillcolor=red];
subgraph cluster_2 {
color=blue
1 [label="Enter block"];
subgraph cluster_2 {
3 [label="Enter block"];
subgraph cluster_3 {
color=blue
2 [label="Enter when"];
subgraph cluster_3 {
color=blue
3 [label="Enter when branch condition "];
4 [label="Access variable R|<local>/x|"];
5 [label="Type operator: (R|<local>/x| is R|kotlin/String|)"];
6 [label="Exit when branch condition"];
}
4 [label="Enter when"];
subgraph cluster_4 {
color=blue
7 [label="Enter when branch condition else"];
5 [label="Enter when branch condition "];
6 [label="Access variable R|<local>/x|"];
7 [label="Type operator: (R|<local>/x| is R|kotlin/String|)"];
8 [label="Exit when branch condition"];
}
9 [label="Enter when branch result"];
subgraph cluster_5 {
color=blue
10 [label="Enter block"];
11 [label="Exit block"];
9 [label="Enter when branch condition else"];
10 [label="Exit when branch condition"];
}
12 [label="Exit when branch result"];
13 [label="Enter when branch result"];
11 [label="Enter when branch result"];
subgraph cluster_6 {
color=blue
14 [label="Enter block"];
15 [label="Access variable R|<local>/x|"];
16 [label="Smart cast: R|<local>/x|"];
17 [label="Access variable R|kotlin/String.length|"];
18 [label="Exit block"];
12 [label="Enter block"];
13 [label="Exit block"];
}
19 [label="Exit when branch result"];
20 [label="Exit when"];
14 [label="Exit when branch result"];
15 [label="Enter when branch result"];
subgraph cluster_7 {
color=blue
16 [label="Enter block"];
17 [label="Access variable R|<local>/x|"];
18 [label="Smart cast: R|<local>/x|"];
19 [label="Access variable R|kotlin/String.length|"];
20 [label="Exit block"];
}
21 [label="Exit when branch result"];
22 [label="Exit when"];
}
21 [label="Access variable R|<local>/x|"];
22 [label="Access variable <Unresolved name: length>#"];
23 [label="Exit block"];
23 [label="Access variable R|<local>/x|"];
24 [label="Access variable <Unresolved name: length>#"];
25 [label="Exit block"];
}
24 [label="Exit function test_0" style="filled" fillcolor=red];
26 [label="Exit function test_0" style="filled" fillcolor=red];
}
0 -> {1};
1 -> {2};
2 -> {3};
3 -> {4};
4 -> {5};
5 -> {6};
6 -> {7 13};
6 -> {7};
7 -> {8};
8 -> {9};
8 -> {9 15};
9 -> {10};
10 -> {11};
11 -> {12};
12 -> {20};
12 -> {13};
13 -> {14};
14 -> {15};
14 -> {22};
15 -> {16};
16 -> {17};
17 -> {18};
@@ -73,74 +78,74 @@ digraph returns_kt {
21 -> {22};
22 -> {23};
23 -> {24};
24 -> {25};
25 -> {26};
subgraph cluster_7 {
subgraph cluster_8 {
color=red
25 [label="Enter function test_1" style="filled" fillcolor=red];
subgraph cluster_8 {
27 [label="Enter function test_1" style="filled" fillcolor=red];
subgraph cluster_9 {
color=blue
26 [label="Enter block"];
subgraph cluster_9 {
28 [label="Enter block"];
subgraph cluster_10 {
color=blue
27 [label="Enter when"];
subgraph cluster_10 {
color=blue
28 [label="Enter when branch condition "];
29 [label="Access variable R|<local>/x|"];
30 [label="Type operator: (R|<local>/x| is R|kotlin/String|)"];
31 [label="Exit when branch condition"];
}
29 [label="Enter when"];
subgraph cluster_11 {
color=blue
32 [label="Enter when branch condition else"];
30 [label="Enter when branch condition "];
31 [label="Access variable R|<local>/x|"];
32 [label="Type operator: (R|<local>/x| is R|kotlin/String|)"];
33 [label="Exit when branch condition"];
}
34 [label="Enter when branch result"];
subgraph cluster_12 {
color=blue
35 [label="Enter block"];
36 [label="Jump: ^test_1 Unit"];
37 [label="Stub" style="filled" fillcolor=gray];
38 [label="Exit block" style="filled" fillcolor=gray];
34 [label="Enter when branch condition else"];
35 [label="Exit when branch condition"];
}
39 [label="Exit when branch result" style="filled" fillcolor=gray];
40 [label="Enter when branch result"];
36 [label="Enter when branch result"];
subgraph cluster_13 {
color=blue
41 [label="Enter block"];
42 [label="Access variable R|<local>/x|"];
43 [label="Smart cast: R|<local>/x|"];
44 [label="Access variable R|kotlin/String.length|"];
45 [label="Exit block"];
37 [label="Enter block"];
38 [label="Jump: ^test_1 Unit"];
39 [label="Stub" style="filled" fillcolor=gray];
40 [label="Exit block" style="filled" fillcolor=gray];
}
46 [label="Exit when branch result"];
47 [label="Exit when"];
41 [label="Exit when branch result" style="filled" fillcolor=gray];
42 [label="Enter when branch result"];
subgraph cluster_14 {
color=blue
43 [label="Enter block"];
44 [label="Access variable R|<local>/x|"];
45 [label="Smart cast: R|<local>/x|"];
46 [label="Access variable R|kotlin/String.length|"];
47 [label="Exit block"];
}
48 [label="Exit when branch result"];
49 [label="Exit when"];
}
48 [label="Access variable R|<local>/x|"];
49 [label="Smart cast: R|<local>/x|"];
50 [label="Access variable R|kotlin/String.length|"];
51 [label="Exit block"];
50 [label="Access variable R|<local>/x|"];
51 [label="Smart cast: R|<local>/x|"];
52 [label="Access variable R|kotlin/String.length|"];
53 [label="Exit block"];
}
52 [label="Exit function test_1" style="filled" fillcolor=red];
54 [label="Exit function test_1" style="filled" fillcolor=red];
}
25 -> {26};
26 -> {27};
27 -> {28};
28 -> {29};
29 -> {30};
30 -> {31};
31 -> {32 40};
31 -> {32};
32 -> {33};
33 -> {34};
33 -> {34 42};
34 -> {35};
35 -> {36};
36 -> {52};
36 -> {37} [style=dotted];
37 -> {38} [style=dotted];
36 -> {37};
37 -> {38};
38 -> {54};
38 -> {39} [style=dotted];
39 -> {47} [style=dotted];
40 -> {41};
41 -> {42};
39 -> {40} [style=dotted];
40 -> {41} [style=dotted];
41 -> {49} [style=dotted];
42 -> {43};
43 -> {44};
44 -> {45};
@@ -151,150 +156,150 @@ digraph returns_kt {
49 -> {50};
50 -> {51};
51 -> {52};
subgraph cluster_14 {
color=red
53 [label="Enter class A" style="filled" fillcolor=red];
54 [label="Exit class A" style="filled" fillcolor=red];
}
53 -> {54} [color=green];
52 -> {53};
53 -> {54};
subgraph cluster_15 {
color=red
55 [label="Enter function foo" style="filled" fillcolor=red];
56 [label="Exit function foo" style="filled" fillcolor=red];
55 [label="Enter class A" style="filled" fillcolor=red];
56 [label="Exit class A" style="filled" fillcolor=red];
}
55 -> {56};
55 -> {56} [color=green];
subgraph cluster_16 {
color=red
57 [label="Enter class B" style="filled" fillcolor=red];
58 [label="Exit class B" style="filled" fillcolor=red];
57 [label="Enter function foo" style="filled" fillcolor=red];
58 [label="Exit function foo" style="filled" fillcolor=red];
}
57 -> {58} [color=green];
57 -> {58};
subgraph cluster_17 {
color=red
59 [label="Enter function bar" style="filled" fillcolor=red];
60 [label="Exit function bar" style="filled" fillcolor=red];
59 [label="Enter class B" style="filled" fillcolor=red];
60 [label="Exit class B" style="filled" fillcolor=red];
}
59 -> {60};
59 -> {60} [color=green];
subgraph cluster_18 {
color=red
61 [label="Enter class C" style="filled" fillcolor=red];
62 [label="Exit class C" style="filled" fillcolor=red];
61 [label="Enter function bar" style="filled" fillcolor=red];
62 [label="Exit function bar" style="filled" fillcolor=red];
}
61 -> {62} [color=green];
61 -> {62};
subgraph cluster_19 {
color=red
63 [label="Enter function baz" style="filled" fillcolor=red];
64 [label="Exit function baz" style="filled" fillcolor=red];
63 [label="Enter class C" style="filled" fillcolor=red];
64 [label="Exit class C" style="filled" fillcolor=red];
}
63 -> {64};
63 -> {64} [color=green];
subgraph cluster_20 {
color=red
65 [label="Enter function test_2" style="filled" fillcolor=red];
subgraph cluster_21 {
65 [label="Enter function baz" style="filled" fillcolor=red];
66 [label="Exit function baz" style="filled" fillcolor=red];
}
65 -> {66};
subgraph cluster_21 {
color=red
67 [label="Enter function test_2" style="filled" fillcolor=red];
subgraph cluster_22 {
color=blue
66 [label="Enter block"];
subgraph cluster_22 {
68 [label="Enter block"];
subgraph cluster_23 {
color=blue
67 [label="Enter when"];
subgraph cluster_23 {
color=blue
68 [label="Enter when branch condition "];
69 [label="Access variable R|<local>/x|"];
70 [label="Type operator: (R|<local>/x| is R|B|)"];
71 [label="Exit when branch condition"];
}
69 [label="Enter when"];
subgraph cluster_24 {
color=blue
72 [label="Enter when branch condition "];
73 [label="Access variable R|<local>/x|"];
74 [label="Type operator: (R|<local>/x| is R|C|)"];
75 [label="Exit when branch condition"];
70 [label="Enter when branch condition "];
71 [label="Access variable R|<local>/x|"];
72 [label="Type operator: (R|<local>/x| is R|B|)"];
73 [label="Exit when branch condition"];
}
subgraph cluster_25 {
color=blue
76 [label="Enter when branch condition else"];
74 [label="Enter when branch condition "];
75 [label="Access variable R|<local>/x|"];
76 [label="Type operator: (R|<local>/x| is R|C|)"];
77 [label="Exit when branch condition"];
}
78 [label="Enter when branch result"];
subgraph cluster_26 {
color=blue
79 [label="Enter block"];
80 [label="Jump: ^test_2 Unit"];
81 [label="Stub" style="filled" fillcolor=gray];
82 [label="Exit block" style="filled" fillcolor=gray];
78 [label="Enter when branch condition else"];
79 [label="Exit when branch condition"];
}
83 [label="Exit when branch result" style="filled" fillcolor=gray];
84 [label="Enter when branch result"];
80 [label="Enter when branch result"];
subgraph cluster_27 {
color=blue
85 [label="Enter block"];
86 [label="Access variable R|<local>/x|"];
87 [label="Smart cast: R|<local>/x|"];
88 [label="Function call: R|<local>/x|.R|/C.baz|()" style="filled" fillcolor=yellow];
89 [label="Exit block"];
81 [label="Enter block"];
82 [label="Jump: ^test_2 Unit"];
83 [label="Stub" style="filled" fillcolor=gray];
84 [label="Exit block" style="filled" fillcolor=gray];
}
90 [label="Exit when branch result"];
91 [label="Enter when branch result"];
85 [label="Exit when branch result" style="filled" fillcolor=gray];
86 [label="Enter when branch result"];
subgraph cluster_28 {
color=blue
92 [label="Enter block"];
93 [label="Access variable R|<local>/x|"];
94 [label="Smart cast: R|<local>/x|"];
95 [label="Function call: R|<local>/x|.R|/B.bar|()" style="filled" fillcolor=yellow];
96 [label="Exit block"];
87 [label="Enter block"];
88 [label="Access variable R|<local>/x|"];
89 [label="Smart cast: R|<local>/x|"];
90 [label="Function call: R|<local>/x|.R|/C.baz|()" style="filled" fillcolor=yellow];
91 [label="Exit block"];
}
97 [label="Exit when branch result"];
98 [label="Exit when"];
92 [label="Exit when branch result"];
93 [label="Enter when branch result"];
subgraph cluster_29 {
color=blue
94 [label="Enter block"];
95 [label="Access variable R|<local>/x|"];
96 [label="Smart cast: R|<local>/x|"];
97 [label="Function call: R|<local>/x|.R|/B.bar|()" style="filled" fillcolor=yellow];
98 [label="Exit block"];
}
99 [label="Exit when branch result"];
100 [label="Exit when"];
}
99 [label="Access variable R|<local>/x|"];
100 [label="Smart cast: R|<local>/x|"];
101 [label="Function call: R|<local>/x|.R|/A.foo|()" style="filled" fillcolor=yellow];
102 [label="Access variable R|<local>/x|"];
103 [label="Smart cast: R|<local>/x|"];
104 [label="Function call: R|<local>/x|.<Unresolved name: bar>#()" style="filled" fillcolor=yellow];
105 [label="Access variable R|<local>/x|"];
106 [label="Smart cast: R|<local>/x|"];
107 [label="Function call: R|<local>/x|.<Unresolved name: baz>#()" style="filled" fillcolor=yellow];
108 [label="Exit block"];
101 [label="Access variable R|<local>/x|"];
102 [label="Smart cast: R|<local>/x|"];
103 [label="Function call: R|<local>/x|.R|/A.foo|()" style="filled" fillcolor=yellow];
104 [label="Access variable R|<local>/x|"];
105 [label="Smart cast: R|<local>/x|"];
106 [label="Function call: R|<local>/x|.<Unresolved name: bar>#()" style="filled" fillcolor=yellow];
107 [label="Access variable R|<local>/x|"];
108 [label="Smart cast: R|<local>/x|"];
109 [label="Function call: R|<local>/x|.<Unresolved name: baz>#()" style="filled" fillcolor=yellow];
110 [label="Exit block"];
}
109 [label="Exit function test_2" style="filled" fillcolor=red];
111 [label="Exit function test_2" style="filled" fillcolor=red];
}
65 -> {66};
66 -> {67};
67 -> {68};
68 -> {69};
69 -> {70};
70 -> {71};
71 -> {72 91};
71 -> {72};
72 -> {73};
73 -> {74};
73 -> {74 93};
74 -> {75};
75 -> {76 84};
75 -> {76};
76 -> {77};
77 -> {78};
77 -> {78 86};
78 -> {79};
79 -> {80};
80 -> {109};
80 -> {81} [style=dotted];
81 -> {82} [style=dotted];
80 -> {81};
81 -> {82};
82 -> {111};
82 -> {83} [style=dotted];
83 -> {98} [style=dotted];
84 -> {85};
85 -> {86};
83 -> {84} [style=dotted];
84 -> {85} [style=dotted];
85 -> {100} [style=dotted];
86 -> {87};
87 -> {88};
88 -> {89};
89 -> {90};
90 -> {98};
90 -> {91};
91 -> {92};
92 -> {93};
92 -> {100};
93 -> {94};
94 -> {95};
95 -> {96};
@@ -311,84 +316,84 @@ digraph returns_kt {
106 -> {107};
107 -> {108};
108 -> {109};
109 -> {110};
110 -> {111};
subgraph cluster_29 {
subgraph cluster_30 {
color=red
110 [label="Enter function test_3" style="filled" fillcolor=red];
subgraph cluster_30 {
112 [label="Enter function test_3" style="filled" fillcolor=red];
subgraph cluster_31 {
color=blue
111 [label="Enter block"];
subgraph cluster_31 {
113 [label="Enter block"];
subgraph cluster_32 {
color=blue
112 [label="Enter when"];
subgraph cluster_32 {
color=blue
113 [label="Enter when branch condition "];
114 [label="Access variable R|<local>/x|"];
115 [label="Type operator: (R|<local>/x| is R|B|)"];
116 [label="Exit when branch condition"];
}
114 [label="Enter when"];
subgraph cluster_33 {
color=blue
117 [label="Enter when branch condition "];
118 [label="Access variable R|<local>/x|"];
119 [label="Type operator: (R|<local>/x| is R|C|)"];
120 [label="Exit when branch condition"];
115 [label="Enter when branch condition "];
116 [label="Access variable R|<local>/x|"];
117 [label="Type operator: (R|<local>/x| is R|B|)"];
118 [label="Exit when branch condition"];
}
121 [label="Synthetic else branch"];
122 [label="Enter when branch result"];
subgraph cluster_34 {
color=blue
123 [label="Enter block"];
124 [label="Access variable R|<local>/x|"];
125 [label="Smart cast: R|<local>/x|"];
126 [label="Function call: R|<local>/x|.R|/C.baz|()" style="filled" fillcolor=yellow];
127 [label="Exit block"];
119 [label="Enter when branch condition "];
120 [label="Access variable R|<local>/x|"];
121 [label="Type operator: (R|<local>/x| is R|C|)"];
122 [label="Exit when branch condition"];
}
128 [label="Exit when branch result"];
129 [label="Enter when branch result"];
123 [label="Synthetic else branch"];
124 [label="Enter when branch result"];
subgraph cluster_35 {
color=blue
130 [label="Enter block"];
131 [label="Access variable R|<local>/x|"];
132 [label="Smart cast: R|<local>/x|"];
133 [label="Function call: R|<local>/x|.R|/B.bar|()" style="filled" fillcolor=yellow];
134 [label="Exit block"];
125 [label="Enter block"];
126 [label="Access variable R|<local>/x|"];
127 [label="Smart cast: R|<local>/x|"];
128 [label="Function call: R|<local>/x|.R|/C.baz|()" style="filled" fillcolor=yellow];
129 [label="Exit block"];
}
135 [label="Exit when branch result"];
136 [label="Exit when"];
130 [label="Exit when branch result"];
131 [label="Enter when branch result"];
subgraph cluster_36 {
color=blue
132 [label="Enter block"];
133 [label="Access variable R|<local>/x|"];
134 [label="Smart cast: R|<local>/x|"];
135 [label="Function call: R|<local>/x|.R|/B.bar|()" style="filled" fillcolor=yellow];
136 [label="Exit block"];
}
137 [label="Exit when branch result"];
138 [label="Exit when"];
}
137 [label="Access variable R|<local>/x|"];
138 [label="Function call: R|<local>/x|.<Unresolved name: foo>#()" style="filled" fillcolor=yellow];
139 [label="Access variable R|<local>/x|"];
140 [label="Function call: R|<local>/x|.<Unresolved name: bar>#()" style="filled" fillcolor=yellow];
140 [label="Function call: R|<local>/x|.<Unresolved name: foo>#()" style="filled" fillcolor=yellow];
141 [label="Access variable R|<local>/x|"];
142 [label="Function call: R|<local>/x|.<Unresolved name: baz>#()" style="filled" fillcolor=yellow];
143 [label="Exit block"];
142 [label="Function call: R|<local>/x|.<Unresolved name: bar>#()" style="filled" fillcolor=yellow];
143 [label="Access variable R|<local>/x|"];
144 [label="Function call: R|<local>/x|.<Unresolved name: baz>#()" style="filled" fillcolor=yellow];
145 [label="Exit block"];
}
144 [label="Exit function test_3" style="filled" fillcolor=red];
146 [label="Exit function test_3" style="filled" fillcolor=red];
}
110 -> {111};
111 -> {112};
112 -> {113};
113 -> {114};
114 -> {115};
115 -> {116};
116 -> {117 129};
116 -> {117};
117 -> {118};
118 -> {119};
118 -> {119 131};
119 -> {120};
120 -> {121 122};
121 -> {136};
122 -> {123};
123 -> {124};
120 -> {121};
121 -> {122};
122 -> {123 124};
123 -> {138};
124 -> {125};
125 -> {126};
126 -> {127};
127 -> {128};
128 -> {136};
128 -> {129};
129 -> {130};
130 -> {131};
130 -> {138};
131 -> {132};
132 -> {133};
133 -> {134};
@@ -402,116 +407,118 @@ digraph returns_kt {
141 -> {142};
142 -> {143};
143 -> {144};
subgraph cluster_36 {
color=red
145 [label="Enter function runHigherOrder" style="filled" fillcolor=red];
subgraph cluster_37 {
color=blue
146 [label="Enter block"];
147 [label="Function call: R|<local>/f|.R|SubstitutionOverride<kotlin/Function0.invoke: R|T|>|()" style="filled" fillcolor=yellow];
148 [label="Jump: ^runHigherOrder R|<local>/f|.R|SubstitutionOverride<kotlin/Function0.invoke: R|T|>|()"];
149 [label="Stub" style="filled" fillcolor=gray];
150 [label="Exit block" style="filled" fillcolor=gray];
}
151 [label="Exit function runHigherOrder" style="filled" fillcolor=red];
}
144 -> {145};
145 -> {146};
146 -> {147};
subgraph cluster_37 {
color=red
147 [label="Enter function runHigherOrder" style="filled" fillcolor=red];
subgraph cluster_38 {
color=blue
148 [label="Enter block"];
149 [label="Function call: R|<local>/f|.R|SubstitutionOverride<kotlin/Function0.invoke: R|T|>|()" style="filled" fillcolor=yellow];
150 [label="Jump: ^runHigherOrder R|<local>/f|.R|SubstitutionOverride<kotlin/Function0.invoke: R|T|>|()"];
151 [label="Stub" style="filled" fillcolor=gray];
152 [label="Exit block" style="filled" fillcolor=gray];
}
153 [label="Exit function runHigherOrder" style="filled" fillcolor=red];
}
147 -> {148};
148 -> {151};
148 -> {149} [style=dotted];
149 -> {150} [style=dotted];
148 -> {149};
149 -> {150};
150 -> {153};
150 -> {151} [style=dotted];
151 -> {152} [style=dotted];
152 -> {153} [style=dotted];
subgraph cluster_38 {
subgraph cluster_39 {
color=red
152 [label="Enter function <getter>" style="filled" fillcolor=red];
subgraph cluster_39 {
154 [label="Enter function <getter>" style="filled" fillcolor=red];
subgraph cluster_40 {
color=blue
153 [label="Enter block"];
154 [label="Access variable R|kotlin/String.length|"];
155 [label="Jump: ^ this@R|/ext|.R|kotlin/String.length|"];
156 [label="Stub" style="filled" fillcolor=gray];
157 [label="Exit block" style="filled" fillcolor=gray];
155 [label="Enter block"];
156 [label="Access variable R|kotlin/String.length|"];
157 [label="Jump: ^ this@R|/ext|.R|kotlin/String.length|"];
158 [label="Stub" style="filled" fillcolor=gray];
159 [label="Exit block" style="filled" fillcolor=gray];
}
158 [label="Exit function <getter>" style="filled" fillcolor=red];
160 [label="Exit function <getter>" style="filled" fillcolor=red];
}
152 -> {153};
153 -> {154};
154 -> {155};
155 -> {158};
155 -> {156} [style=dotted];
156 -> {157} [style=dotted];
155 -> {156};
156 -> {157};
157 -> {160};
157 -> {158} [style=dotted];
158 -> {159} [style=dotted];
159 -> {160} [style=dotted];
subgraph cluster_40 {
subgraph cluster_41 {
color=red
159 [label="Enter function test_4" style="filled" fillcolor=red];
subgraph cluster_41 {
161 [label="Enter function test_4" style="filled" fillcolor=red];
subgraph cluster_42 {
color=blue
160 [label="Enter block"];
161 [label="Access variable R|<local>/a|"];
162 [label="Type operator: (R|<local>/a| as? R|kotlin/String|)"];
163 [label="Variable declaration: lval s: R|kotlin/String?|"];
164 [label="Access variable R|<local>/s|"];
165 [label="Enter safe call"];
166 [label="Access variable R|/ext|"];
167 [label="Exit safe call"];
168 [label="Exit lhs of ?:"];
169 [label="Enter rhs of ?:"];
170 [label="Jump: ^test_4 Unit"];
171 [label="Stub" style="filled" fillcolor=gray];
172 [label="Lhs of ?: is not null"];
173 [label="Exit ?:"];
174 [label="Variable declaration: lval length: R|kotlin/Int|"];
175 [label="Postponed enter to lambda"];
subgraph cluster_42 {
162 [label="Enter block"];
163 [label="Access variable R|<local>/a|"];
164 [label="Type operator: (R|<local>/a| as? R|kotlin/String|)"];
165 [label="Variable declaration: lval s: R|kotlin/String?|"];
166 [label="Access variable R|<local>/s|"];
167 [label="Enter safe call"];
168 [label="Access variable R|/ext|"];
169 [label="Exit safe call"];
170 [label="Exit lhs of ?:"];
171 [label="Enter rhs of ?:"];
172 [label="Jump: ^test_4 Unit"];
173 [label="Stub" style="filled" fillcolor=gray];
174 [label="Lhs of ?: is not null"];
175 [label="Exit ?:"];
176 [label="Variable declaration: lval length: R|kotlin/Int|"];
177 [label="Postponed enter to lambda"];
subgraph cluster_43 {
color=blue
176 [label="Enter function <anonymous>" style="filled" fillcolor=red];
subgraph cluster_43 {
178 [label="Enter function <anonymous>" style="filled" fillcolor=red];
subgraph cluster_44 {
color=blue
177 [label="Enter block"];
178 [label="Access variable R|<local>/s|"];
179 [label="Smart cast: R|<local>/s|"];
180 [label="Access variable R|kotlin/String.length|"];
181 [label="Exit block"];
179 [label="Enter block"];
180 [label="Access variable R|<local>/s|"];
181 [label="Smart cast: R|<local>/s|"];
182 [label="Access variable R|kotlin/String.length|"];
183 [label="Exit block"];
}
182 [label="Exit function <anonymous>" style="filled" fillcolor=red];
184 [label="Exit function <anonymous>" style="filled" fillcolor=red];
}
183 [label="Postponed exit from lambda"];
184 [label="Function call: R|/runHigherOrder|<R|kotlin/Int|>(...)" style="filled" fillcolor=yellow];
185 [label="Exit block"];
185 [label="Postponed exit from lambda"];
186 [label="Function call: R|/runHigherOrder|<R|kotlin/Int|>(...)" style="filled" fillcolor=yellow];
187 [label="Exit block"];
}
186 [label="Exit function test_4" style="filled" fillcolor=red];
188 [label="Exit function test_4" style="filled" fillcolor=red];
}
159 -> {160};
160 -> {161};
161 -> {162};
162 -> {163};
163 -> {164};
164 -> {165 169};
164 -> {165};
165 -> {166};
166 -> {167};
166 -> {167 171};
167 -> {168};
168 -> {169 172};
168 -> {169};
169 -> {170};
170 -> {186};
170 -> {171} [style=dotted];
171 -> {173} [style=dotted];
172 -> {173};
173 -> {174};
170 -> {171 174};
171 -> {172};
172 -> {188};
172 -> {173} [style=dotted];
173 -> {175} [style=dotted];
174 -> {175};
175 -> {176 183 184};
175 -> {176} [style=dashed];
175 -> {176};
176 -> {177};
177 -> {178};
177 -> {178 185 186};
177 -> {178} [style=dashed];
178 -> {179};
179 -> {180};
180 -> {181};
181 -> {182};
182 -> {183};
183 -> {184};
184 -> {185};
185 -> {186};
186 -> {187};
187 -> {188};
}
@@ -5,49 +5,54 @@ digraph simpleIf_kt {
subgraph cluster_0 {
color=red
0 [label="Enter function test_1" style="filled" fillcolor=red];
subgraph cluster_1 {
0 [label="Enter file simpleIf.kt" style="filled" fillcolor=red];
1 [label="Exit file simpleIf.kt" style="filled" fillcolor=red];
}
0 -> {1} [color=green];
subgraph cluster_1 {
color=red
2 [label="Enter function test_1" style="filled" fillcolor=red];
subgraph cluster_2 {
color=blue
1 [label="Enter block"];
subgraph cluster_2 {
3 [label="Enter block"];
subgraph cluster_3 {
color=blue
2 [label="Enter when"];
subgraph cluster_3 {
color=blue
3 [label="Enter when branch condition "];
4 [label="Access variable R|<local>/x|"];
5 [label="Type operator: (R|<local>/x| is R|kotlin/String|)"];
6 [label="Exit when branch condition"];
}
7 [label="Synthetic else branch"];
8 [label="Enter when branch result"];
4 [label="Enter when"];
subgraph cluster_4 {
color=blue
9 [label="Enter block"];
10 [label="Access variable R|<local>/x|"];
11 [label="Smart cast: R|<local>/x|"];
12 [label="Access variable R|kotlin/String.length|"];
13 [label="Exit block"];
5 [label="Enter when branch condition "];
6 [label="Access variable R|<local>/x|"];
7 [label="Type operator: (R|<local>/x| is R|kotlin/String|)"];
8 [label="Exit when branch condition"];
}
14 [label="Exit when branch result"];
15 [label="Exit when"];
9 [label="Synthetic else branch"];
10 [label="Enter when branch result"];
subgraph cluster_5 {
color=blue
11 [label="Enter block"];
12 [label="Access variable R|<local>/x|"];
13 [label="Smart cast: R|<local>/x|"];
14 [label="Access variable R|kotlin/String.length|"];
15 [label="Exit block"];
}
16 [label="Exit when branch result"];
17 [label="Exit when"];
}
16 [label="Access variable R|<local>/x|"];
17 [label="Access variable <Unresolved name: length>#"];
18 [label="Exit block"];
18 [label="Access variable R|<local>/x|"];
19 [label="Access variable <Unresolved name: length>#"];
20 [label="Exit block"];
}
19 [label="Exit function test_1" style="filled" fillcolor=red];
21 [label="Exit function test_1" style="filled" fillcolor=red];
}
0 -> {1};
1 -> {2};
2 -> {3};
3 -> {4};
4 -> {5};
5 -> {6};
6 -> {7 8};
7 -> {15};
8 -> {9};
9 -> {10};
6 -> {7};
7 -> {8};
8 -> {9 10};
9 -> {17};
10 -> {11};
11 -> {12};
12 -> {13};
@@ -57,56 +62,56 @@ digraph simpleIf_kt {
16 -> {17};
17 -> {18};
18 -> {19};
19 -> {20};
20 -> {21};
subgraph cluster_5 {
subgraph cluster_6 {
color=red
20 [label="Enter function test_2" style="filled" fillcolor=red];
subgraph cluster_6 {
22 [label="Enter function test_2" style="filled" fillcolor=red];
subgraph cluster_7 {
color=blue
21 [label="Enter block"];
22 [label="Access variable R|<local>/x|"];
23 [label="Type operator: (R|<local>/x| is R|kotlin/String|)"];
24 [label="Variable declaration: lval b: R|kotlin/Boolean|"];
subgraph cluster_7 {
23 [label="Enter block"];
24 [label="Access variable R|<local>/x|"];
25 [label="Type operator: (R|<local>/x| is R|kotlin/String|)"];
26 [label="Variable declaration: lval b: R|kotlin/Boolean|"];
subgraph cluster_8 {
color=blue
25 [label="Enter when"];
subgraph cluster_8 {
color=blue
26 [label="Enter when branch condition "];
27 [label="Access variable R|<local>/b|"];
28 [label="Exit when branch condition"];
}
29 [label="Synthetic else branch"];
30 [label="Enter when branch result"];
27 [label="Enter when"];
subgraph cluster_9 {
color=blue
31 [label="Enter block"];
32 [label="Access variable R|<local>/x|"];
33 [label="Smart cast: R|<local>/x|"];
34 [label="Access variable R|kotlin/String.length|"];
35 [label="Exit block"];
28 [label="Enter when branch condition "];
29 [label="Access variable R|<local>/b|"];
30 [label="Exit when branch condition"];
}
36 [label="Exit when branch result"];
37 [label="Exit when"];
31 [label="Synthetic else branch"];
32 [label="Enter when branch result"];
subgraph cluster_10 {
color=blue
33 [label="Enter block"];
34 [label="Access variable R|<local>/x|"];
35 [label="Smart cast: R|<local>/x|"];
36 [label="Access variable R|kotlin/String.length|"];
37 [label="Exit block"];
}
38 [label="Exit when branch result"];
39 [label="Exit when"];
}
38 [label="Access variable R|<local>/x|"];
39 [label="Access variable <Unresolved name: length>#"];
40 [label="Exit block"];
40 [label="Access variable R|<local>/x|"];
41 [label="Access variable <Unresolved name: length>#"];
42 [label="Exit block"];
}
41 [label="Exit function test_2" style="filled" fillcolor=red];
43 [label="Exit function test_2" style="filled" fillcolor=red];
}
20 -> {21};
21 -> {22};
22 -> {23};
23 -> {24};
24 -> {25};
25 -> {26};
26 -> {27};
27 -> {28};
28 -> {29 30};
29 -> {37};
30 -> {31};
31 -> {32};
28 -> {29};
29 -> {30};
30 -> {31 32};
31 -> {39};
32 -> {33};
33 -> {34};
34 -> {35};
@@ -116,83 +121,83 @@ digraph simpleIf_kt {
38 -> {39};
39 -> {40};
40 -> {41};
41 -> {42};
42 -> {43};
subgraph cluster_10 {
subgraph cluster_11 {
color=red
42 [label="Enter function test_3" style="filled" fillcolor=red];
subgraph cluster_11 {
44 [label="Enter function test_3" style="filled" fillcolor=red];
subgraph cluster_12 {
color=blue
43 [label="Enter block"];
subgraph cluster_12 {
45 [label="Enter block"];
subgraph cluster_13 {
color=blue
44 [label="Enter when"];
subgraph cluster_13 {
color=blue
45 [label="Enter when branch condition "];
46 [label="Access variable R|<local>/x|"];
47 [label="Type operator: (R|<local>/x| !is R|kotlin/String|)"];
48 [label="Exit when branch condition"];
}
46 [label="Enter when"];
subgraph cluster_14 {
color=blue
49 [label="Enter when branch condition "];
50 [label="Access variable R|<local>/x|"];
51 [label="Smart cast: R|<local>/x|"];
52 [label="Type operator: (R|<local>/x| !is R|kotlin/Int|)"];
53 [label="Exit when branch condition"];
47 [label="Enter when branch condition "];
48 [label="Access variable R|<local>/x|"];
49 [label="Type operator: (R|<local>/x| !is R|kotlin/String|)"];
50 [label="Exit when branch condition"];
}
subgraph cluster_15 {
color=blue
54 [label="Enter when branch condition else"];
51 [label="Enter when branch condition "];
52 [label="Access variable R|<local>/x|"];
53 [label="Smart cast: R|<local>/x|"];
54 [label="Type operator: (R|<local>/x| !is R|kotlin/Int|)"];
55 [label="Exit when branch condition"];
}
56 [label="Enter when branch result"];
subgraph cluster_16 {
color=blue
57 [label="Enter block"];
58 [label="Access variable R|<local>/x|"];
59 [label="Smart cast: R|<local>/x|"];
60 [label="Access variable R|kotlin/String.length|"];
61 [label="Access variable R|<local>/x|"];
62 [label="Smart cast: R|<local>/x|"];
63 [label="Function call: R|<local>/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow];
64 [label="Exit block"];
56 [label="Enter when branch condition else"];
57 [label="Exit when branch condition"];
}
65 [label="Exit when branch result"];
66 [label="Enter when branch result"];
58 [label="Enter when branch result"];
subgraph cluster_17 {
color=blue
67 [label="Enter block"];
68 [label="Exit block"];
59 [label="Enter block"];
60 [label="Access variable R|<local>/x|"];
61 [label="Smart cast: R|<local>/x|"];
62 [label="Access variable R|kotlin/String.length|"];
63 [label="Access variable R|<local>/x|"];
64 [label="Smart cast: R|<local>/x|"];
65 [label="Function call: R|<local>/x|.R|kotlin/Int.inc|()" style="filled" fillcolor=yellow];
66 [label="Exit block"];
}
69 [label="Exit when branch result"];
70 [label="Enter when branch result"];
67 [label="Exit when branch result"];
68 [label="Enter when branch result"];
subgraph cluster_18 {
color=blue
71 [label="Enter block"];
72 [label="Exit block"];
69 [label="Enter block"];
70 [label="Exit block"];
}
73 [label="Exit when branch result"];
74 [label="Exit when"];
71 [label="Exit when branch result"];
72 [label="Enter when branch result"];
subgraph cluster_19 {
color=blue
73 [label="Enter block"];
74 [label="Exit block"];
}
75 [label="Exit when branch result"];
76 [label="Exit when"];
}
75 [label="Exit block"];
77 [label="Exit block"];
}
76 [label="Exit function test_3" style="filled" fillcolor=red];
78 [label="Exit function test_3" style="filled" fillcolor=red];
}
42 -> {43};
43 -> {44};
44 -> {45};
45 -> {46};
46 -> {47};
47 -> {48};
48 -> {49 70};
48 -> {49};
49 -> {50};
50 -> {51};
50 -> {51 72};
51 -> {52};
52 -> {53};
53 -> {54 66};
53 -> {54};
54 -> {55};
55 -> {56};
55 -> {56 68};
56 -> {57};
57 -> {58};
58 -> {59};
@@ -202,16 +207,18 @@ digraph simpleIf_kt {
62 -> {63};
63 -> {64};
64 -> {65};
65 -> {74};
65 -> {66};
66 -> {67};
67 -> {68};
67 -> {76};
68 -> {69};
69 -> {74};
69 -> {70};
70 -> {71};
71 -> {72};
71 -> {76};
72 -> {73};
73 -> {74};
74 -> {75};
75 -> {76};
76 -> {77};
77 -> {78};
}
@@ -5,97 +5,102 @@ digraph smartcastFromArgument_kt {
subgraph cluster_0 {
color=red
0 [label="Enter class A" style="filled" fillcolor=red];
1 [label="Exit class A" style="filled" fillcolor=red];
0 [label="Enter file smartcastFromArgument.kt" style="filled" fillcolor=red];
1 [label="Exit file smartcastFromArgument.kt" style="filled" fillcolor=red];
}
0 -> {1} [color=green];
subgraph cluster_1 {
color=red
2 [label="Enter function foo" style="filled" fillcolor=red];
3 [label="Exit function foo" style="filled" fillcolor=red];
2 [label="Enter class A" style="filled" fillcolor=red];
3 [label="Exit class A" style="filled" fillcolor=red];
}
2 -> {3};
2 -> {3} [color=green];
subgraph cluster_2 {
color=red
4 [label="Enter function takeA" style="filled" fillcolor=red];
subgraph cluster_3 {
color=blue
5 [label="Enter block"];
6 [label="Const: Boolean(true)"];
7 [label="Jump: ^takeA Boolean(true)"];
8 [label="Stub" style="filled" fillcolor=gray];
9 [label="Exit block" style="filled" fillcolor=gray];
}
10 [label="Exit function takeA" style="filled" fillcolor=red];
4 [label="Enter function foo" style="filled" fillcolor=red];
5 [label="Exit function foo" style="filled" fillcolor=red];
}
4 -> {5};
5 -> {6};
6 -> {7};
7 -> {10};
7 -> {8} [style=dotted];
8 -> {9} [style=dotted];
9 -> {10} [style=dotted];
subgraph cluster_4 {
subgraph cluster_3 {
color=red
11 [label="Enter function test" style="filled" fillcolor=red];
subgraph cluster_5 {
6 [label="Enter function takeA" style="filled" fillcolor=red];
subgraph cluster_4 {
color=blue
12 [label="Enter block"];
subgraph cluster_6 {
7 [label="Enter block"];
8 [label="Const: Boolean(true)"];
9 [label="Jump: ^takeA Boolean(true)"];
10 [label="Stub" style="filled" fillcolor=gray];
11 [label="Exit block" style="filled" fillcolor=gray];
}
12 [label="Exit function takeA" style="filled" fillcolor=red];
}
6 -> {7};
7 -> {8};
8 -> {9};
9 -> {12};
9 -> {10} [style=dotted];
10 -> {11} [style=dotted];
11 -> {12} [style=dotted];
subgraph cluster_5 {
color=red
13 [label="Enter function test" style="filled" fillcolor=red];
subgraph cluster_6 {
color=blue
14 [label="Enter block"];
subgraph cluster_7 {
color=blue
13 [label="Enter when"];
subgraph cluster_7 {
color=blue
14 [label="Enter when branch condition "];
15 [label="Access variable R|<local>/a|"];
16 [label="Type operator: (R|<local>/a| as? R|A|)"];
17 [label="Exit lhs of ?:"];
18 [label="Enter rhs of ?:"];
19 [label="Jump: ^test Unit"];
20 [label="Stub" style="filled" fillcolor=gray];
21 [label="Lhs of ?: is not null"];
22 [label="Exit ?:"];
23 [label="Function call: R|/takeA|(...)" style="filled" fillcolor=yellow];
24 [label="Exit when branch condition"];
}
25 [label="Synthetic else branch"];
26 [label="Enter when branch result"];
15 [label="Enter when"];
subgraph cluster_8 {
color=blue
27 [label="Enter block"];
28 [label="Access variable R|<local>/a|"];
29 [label="Smart cast: R|<local>/a|"];
30 [label="Function call: R|<local>/a|.R|/A.foo|()" style="filled" fillcolor=yellow];
31 [label="Exit block"];
16 [label="Enter when branch condition "];
17 [label="Access variable R|<local>/a|"];
18 [label="Type operator: (R|<local>/a| as? R|A|)"];
19 [label="Exit lhs of ?:"];
20 [label="Enter rhs of ?:"];
21 [label="Jump: ^test Unit"];
22 [label="Stub" style="filled" fillcolor=gray];
23 [label="Lhs of ?: is not null"];
24 [label="Exit ?:"];
25 [label="Function call: R|/takeA|(...)" style="filled" fillcolor=yellow];
26 [label="Exit when branch condition"];
}
32 [label="Exit when branch result"];
33 [label="Exit when"];
27 [label="Synthetic else branch"];
28 [label="Enter when branch result"];
subgraph cluster_9 {
color=blue
29 [label="Enter block"];
30 [label="Access variable R|<local>/a|"];
31 [label="Smart cast: R|<local>/a|"];
32 [label="Function call: R|<local>/a|.R|/A.foo|()" style="filled" fillcolor=yellow];
33 [label="Exit block"];
}
34 [label="Exit when branch result"];
35 [label="Exit when"];
}
34 [label="Exit block"];
36 [label="Exit block"];
}
35 [label="Exit function test" style="filled" fillcolor=red];
37 [label="Exit function test" style="filled" fillcolor=red];
}
11 -> {12};
12 -> {13};
13 -> {14};
14 -> {15};
15 -> {16};
16 -> {17};
17 -> {18 21};
17 -> {18};
18 -> {19};
19 -> {35};
19 -> {20} [style=dotted];
20 -> {22} [style=dotted];
21 -> {22};
22 -> {23};
19 -> {20 23};
20 -> {21};
21 -> {37};
21 -> {22} [style=dotted];
22 -> {24} [style=dotted];
23 -> {24};
24 -> {25 26};
25 -> {33};
26 -> {27};
27 -> {28};
24 -> {25};
25 -> {26};
26 -> {27 28};
27 -> {35};
28 -> {29};
29 -> {30};
30 -> {31};
@@ -103,5 +108,7 @@ digraph smartcastFromArgument_kt {
32 -> {33};
33 -> {34};
34 -> {35};
35 -> {36};
36 -> {37};
}
File diff suppressed because it is too large Load Diff
@@ -5,198 +5,205 @@ digraph whenSubjectExpression_kt {
subgraph cluster_0 {
color=red
0 [label="Enter function whenWithSubjectExpression" style="filled" fillcolor=red];
subgraph cluster_1 {
0 [label="Enter file whenSubjectExpression.kt" style="filled" fillcolor=red];
1 [label="Exit file whenSubjectExpression.kt" style="filled" fillcolor=red];
}
0 -> {1} [color=green];
subgraph cluster_1 {
color=red
2 [label="Enter function whenWithSubjectExpression" style="filled" fillcolor=red];
subgraph cluster_2 {
color=blue
1 [label="Enter block"];
subgraph cluster_2 {
3 [label="Enter block"];
subgraph cluster_3 {
color=blue
2 [label="Enter when"];
3 [label="Access variable R|<local>/x|"];
subgraph cluster_3 {
color=blue
4 [label="Enter when branch condition "];
5 [label="Exit $subj"];
6 [label="Type operator: ($subj$ !is R|kotlin/Double|)"];
7 [label="Exit when branch condition"];
}
4 [label="Enter when"];
5 [label="Access variable R|<local>/x|"];
subgraph cluster_4 {
color=blue
8 [label="Enter when branch condition "];
9 [label="Exit $subj"];
10 [label="Const: Double(0.0)"];
11 [label="Equality operator =="];
12 [label="Exit when branch condition"];
6 [label="Enter when branch condition "];
7 [label="Exit $subj"];
8 [label="Type operator: ($subj$ !is R|kotlin/Double|)"];
9 [label="Exit when branch condition"];
}
subgraph cluster_5 {
color=blue
13 [label="Enter when branch condition else"];
10 [label="Enter when branch condition "];
11 [label="Exit $subj"];
12 [label="Const: Double(0.0)"];
13 [label="Equality operator =="];
14 [label="Exit when branch condition"];
}
15 [label="Enter when branch result"];
subgraph cluster_6 {
color=blue
16 [label="Enter block"];
17 [label="Access variable R|<local>/x|"];
18 [label="Smart cast: R|<local>/x|"];
19 [label="Function call: R|<local>/x|.R|kotlin/Double.toInt|()" style="filled" fillcolor=yellow];
20 [label="Exit block"];
15 [label="Enter when branch condition else"];
16 [label="Exit when branch condition"];
}
21 [label="Exit when branch result"];
22 [label="Enter when branch result"];
17 [label="Enter when branch result"];
subgraph cluster_7 {
color=blue
23 [label="Enter block"];
24 [label="Const: Int(0)"];
25 [label="Exit block"];
18 [label="Enter block"];
19 [label="Access variable R|<local>/x|"];
20 [label="Smart cast: R|<local>/x|"];
21 [label="Function call: R|<local>/x|.R|kotlin/Double.toInt|()" style="filled" fillcolor=yellow];
22 [label="Exit block"];
}
26 [label="Exit when branch result"];
27 [label="Enter when branch result"];
23 [label="Exit when branch result"];
24 [label="Enter when branch result"];
subgraph cluster_8 {
color=blue
28 [label="Enter block"];
29 [label="Const: Int(-1)"];
30 [label="Exit block"];
25 [label="Enter block"];
26 [label="Const: Int(0)"];
27 [label="Exit block"];
}
31 [label="Exit when branch result"];
32 [label="Exit when"];
28 [label="Exit when branch result"];
29 [label="Enter when branch result"];
subgraph cluster_9 {
color=blue
30 [label="Enter block"];
31 [label="Const: Int(-1)"];
32 [label="Exit block"];
}
33 [label="Exit when branch result"];
34 [label="Exit when"];
}
33 [label="Exit block"];
35 [label="Exit block"];
}
34 [label="Exit function whenWithSubjectExpression" style="filled" fillcolor=red];
36 [label="Exit function whenWithSubjectExpression" style="filled" fillcolor=red];
}
0 -> {1};
1 -> {2};
2 -> {3};
3 -> {4};
4 -> {5};
5 -> {6};
6 -> {7};
7 -> {8 27};
7 -> {8};
8 -> {9};
9 -> {10};
9 -> {10 29};
10 -> {11};
11 -> {12};
12 -> {13 22};
12 -> {13};
13 -> {14};
14 -> {15};
14 -> {15 24};
15 -> {16};
16 -> {17};
17 -> {18};
18 -> {19};
19 -> {20};
20 -> {21};
21 -> {32};
21 -> {22};
22 -> {23};
23 -> {24};
23 -> {34};
24 -> {25};
25 -> {26};
26 -> {32};
26 -> {27};
27 -> {28};
28 -> {29};
28 -> {34};
29 -> {30};
30 -> {31};
31 -> {32};
32 -> {33};
33 -> {34};
34 -> {35};
35 -> {36};
subgraph cluster_9 {
subgraph cluster_10 {
color=red
35 [label="Enter function whenWithSubjectVariable" style="filled" fillcolor=red];
subgraph cluster_10 {
37 [label="Enter function whenWithSubjectVariable" style="filled" fillcolor=red];
subgraph cluster_11 {
color=blue
36 [label="Enter block"];
subgraph cluster_11 {
38 [label="Enter block"];
subgraph cluster_12 {
color=blue
37 [label="Enter when"];
38 [label="Access variable R|<local>/x|"];
39 [label="Variable declaration: lval y: R|kotlin/Any|"];
subgraph cluster_12 {
color=blue
40 [label="Enter when branch condition "];
41 [label="Exit $subj"];
42 [label="Type operator: ($subj$ !is R|kotlin/Double|)"];
43 [label="Exit when branch condition"];
}
39 [label="Enter when"];
40 [label="Access variable R|<local>/x|"];
41 [label="Variable declaration: lval y: R|kotlin/Any|"];
subgraph cluster_13 {
color=blue
44 [label="Enter when branch condition "];
45 [label="Exit $subj"];
46 [label="Const: Double(0.0)"];
47 [label="Equality operator =="];
48 [label="Exit when branch condition"];
42 [label="Enter when branch condition "];
43 [label="Exit $subj"];
44 [label="Type operator: ($subj$ !is R|kotlin/Double|)"];
45 [label="Exit when branch condition"];
}
subgraph cluster_14 {
color=blue
49 [label="Enter when branch condition else"];
46 [label="Enter when branch condition "];
47 [label="Exit $subj"];
48 [label="Const: Double(0.0)"];
49 [label="Equality operator =="];
50 [label="Exit when branch condition"];
}
51 [label="Enter when branch result"];
subgraph cluster_15 {
color=blue
52 [label="Enter block"];
53 [label="Access variable R|<local>/y|"];
54 [label="Smart cast: R|<local>/y|"];
55 [label="Function call: R|<local>/y|.R|kotlin/Double.toInt|()" style="filled" fillcolor=yellow];
56 [label="Exit block"];
51 [label="Enter when branch condition else"];
52 [label="Exit when branch condition"];
}
57 [label="Exit when branch result"];
58 [label="Enter when branch result"];
53 [label="Enter when branch result"];
subgraph cluster_16 {
color=blue
59 [label="Enter block"];
60 [label="Const: Int(0)"];
61 [label="Exit block"];
54 [label="Enter block"];
55 [label="Access variable R|<local>/y|"];
56 [label="Smart cast: R|<local>/y|"];
57 [label="Function call: R|<local>/y|.R|kotlin/Double.toInt|()" style="filled" fillcolor=yellow];
58 [label="Exit block"];
}
62 [label="Exit when branch result"];
63 [label="Enter when branch result"];
59 [label="Exit when branch result"];
60 [label="Enter when branch result"];
subgraph cluster_17 {
color=blue
64 [label="Enter block"];
65 [label="Const: Int(-1)"];
66 [label="Exit block"];
61 [label="Enter block"];
62 [label="Const: Int(0)"];
63 [label="Exit block"];
}
67 [label="Exit when branch result"];
68 [label="Exit when"];
64 [label="Exit when branch result"];
65 [label="Enter when branch result"];
subgraph cluster_18 {
color=blue
66 [label="Enter block"];
67 [label="Const: Int(-1)"];
68 [label="Exit block"];
}
69 [label="Exit when branch result"];
70 [label="Exit when"];
}
69 [label="Exit block"];
71 [label="Exit block"];
}
70 [label="Exit function whenWithSubjectVariable" style="filled" fillcolor=red];
72 [label="Exit function whenWithSubjectVariable" style="filled" fillcolor=red];
}
35 -> {36};
36 -> {37};
37 -> {38};
38 -> {39};
39 -> {40};
40 -> {41};
41 -> {42};
42 -> {43};
43 -> {44 63};
43 -> {44};
44 -> {45};
45 -> {46};
45 -> {46 65};
46 -> {47};
47 -> {48};
48 -> {49 58};
48 -> {49};
49 -> {50};
50 -> {51};
50 -> {51 60};
51 -> {52};
52 -> {53};
53 -> {54};
54 -> {55};
55 -> {56};
56 -> {57};
57 -> {68};
57 -> {58};
58 -> {59};
59 -> {60};
59 -> {70};
60 -> {61};
61 -> {62};
62 -> {68};
62 -> {63};
63 -> {64};
64 -> {65};
64 -> {70};
65 -> {66};
66 -> {67};
67 -> {68};
68 -> {69};
69 -> {70};
70 -> {71};
71 -> {72};
}