[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,93 +5,98 @@ digraph inPlaceLambdas_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 inPlaceLambdas.kt" style="filled" fillcolor=red];
1 [label="Exit file inPlaceLambdas.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 class B" style="filled" fillcolor=red];
5 [label="Exit class B" style="filled" fillcolor=red];
4 [label="Enter function foo" style="filled" fillcolor=red];
5 [label="Exit function foo" style="filled" fillcolor=red];
}
4 -> {5} [color=green];
4 -> {5};
subgraph cluster_3 {
color=red
6 [label="Enter function bar" style="filled" fillcolor=red];
7 [label="Exit function bar" style="filled" fillcolor=red];
6 [label="Enter class B" style="filled" fillcolor=red];
7 [label="Exit class B" style="filled" fillcolor=red];
}
6 -> {7};
6 -> {7} [color=green];
subgraph cluster_4 {
color=red
8 [label="Enter function test_1" style="filled" fillcolor=red];
subgraph cluster_5 {
color=blue
9 [label="Enter block"];
subgraph cluster_6 {
color=blue
10 [label="Enter when"];
subgraph cluster_7 {
color=blue
11 [label="Enter when branch condition "];
12 [label="Access variable R|<local>/x|"];
13 [label="Type operator: (R|<local>/x| is R|A|)"];
14 [label="Exit when branch condition"];
}
15 [label="Synthetic else branch"];
16 [label="Enter when branch result"];
subgraph cluster_8 {
color=blue
17 [label="Enter block"];
18 [label="Postponed enter to lambda"];
subgraph cluster_9 {
color=blue
19 [label="Enter function <anonymous>" style="filled" fillcolor=red];
subgraph cluster_10 {
color=blue
20 [label="Enter block"];
21 [label="Access variable R|<local>/x|"];
22 [label="Smart cast: R|<local>/x|"];
23 [label="Function call: R|<local>/x|.R|/A.foo|()" style="filled" fillcolor=yellow];
24 [label="Exit block"];
}
25 [label="Exit function <anonymous>" style="filled" fillcolor=red];
}
26 [label="Postponed exit from lambda"];
27 [label="Function call: R|kotlin/run|<R|kotlin/Unit|>(...)" style="filled" fillcolor=yellow];
28 [label="Exit block"];
}
29 [label="Exit when branch result"];
30 [label="Exit when"];
}
31 [label="Exit block"];
}
32 [label="Exit function test_1" style="filled" fillcolor=red];
8 [label="Enter function bar" style="filled" fillcolor=red];
9 [label="Exit function bar" style="filled" fillcolor=red];
}
8 -> {9};
9 -> {10};
subgraph cluster_5 {
color=red
10 [label="Enter function test_1" style="filled" fillcolor=red];
subgraph cluster_6 {
color=blue
11 [label="Enter block"];
subgraph cluster_7 {
color=blue
12 [label="Enter when"];
subgraph cluster_8 {
color=blue
13 [label="Enter when branch condition "];
14 [label="Access variable R|<local>/x|"];
15 [label="Type operator: (R|<local>/x| is R|A|)"];
16 [label="Exit when branch condition"];
}
17 [label="Synthetic else branch"];
18 [label="Enter when branch result"];
subgraph cluster_9 {
color=blue
19 [label="Enter block"];
20 [label="Postponed enter to lambda"];
subgraph cluster_10 {
color=blue
21 [label="Enter function <anonymous>" style="filled" fillcolor=red];
subgraph cluster_11 {
color=blue
22 [label="Enter block"];
23 [label="Access variable R|<local>/x|"];
24 [label="Smart cast: R|<local>/x|"];
25 [label="Function call: R|<local>/x|.R|/A.foo|()" style="filled" fillcolor=yellow];
26 [label="Exit block"];
}
27 [label="Exit function <anonymous>" style="filled" fillcolor=red];
}
28 [label="Postponed exit from lambda"];
29 [label="Function call: R|kotlin/run|<R|kotlin/Unit|>(...)" style="filled" fillcolor=yellow];
30 [label="Exit block"];
}
31 [label="Exit when branch result"];
32 [label="Exit when"];
}
33 [label="Exit block"];
}
34 [label="Exit function test_1" style="filled" fillcolor=red];
}
10 -> {11};
11 -> {12};
12 -> {13};
13 -> {14};
14 -> {15 16};
15 -> {30};
16 -> {17};
17 -> {18};
18 -> {19 27};
18 -> {26} [style=dotted];
18 -> {19} [style=dashed];
14 -> {15};
15 -> {16};
16 -> {17 18};
17 -> {32};
18 -> {19};
19 -> {20};
20 -> {21};
20 -> {21 29};
20 -> {28} [style=dotted];
20 -> {21} [style=dashed];
21 -> {22};
22 -> {23};
23 -> {24};
@@ -103,42 +108,42 @@ digraph inPlaceLambdas_kt {
29 -> {30};
30 -> {31};
31 -> {32};
subgraph cluster_11 {
color=red
33 [label="Enter function test_2" style="filled" fillcolor=red];
subgraph cluster_12 {
color=blue
34 [label="Enter block"];
35 [label="Postponed enter to lambda"];
subgraph cluster_13 {
color=blue
36 [label="Enter function <anonymous>" style="filled" fillcolor=red];
subgraph cluster_14 {
color=blue
37 [label="Enter block"];
38 [label="Access variable R|<local>/x|"];
39 [label="Type operator: (R|<local>/x| as R|B|)"];
40 [label="Exit block"];
}
41 [label="Exit function <anonymous>" style="filled" fillcolor=red];
}
42 [label="Postponed exit from lambda"];
43 [label="Function call: R|kotlin/run|<R|B|>(...)" style="filled" fillcolor=yellow];
44 [label="Access variable R|<local>/x|"];
45 [label="Smart cast: R|<local>/x|"];
46 [label="Function call: R|<local>/x|.R|/B.bar|()" style="filled" fillcolor=yellow];
47 [label="Exit block"];
}
48 [label="Exit function test_2" style="filled" fillcolor=red];
}
32 -> {33};
33 -> {34};
34 -> {35};
35 -> {36 43};
35 -> {42} [style=dotted];
35 -> {36} [style=dashed];
subgraph cluster_12 {
color=red
35 [label="Enter function test_2" style="filled" fillcolor=red];
subgraph cluster_13 {
color=blue
36 [label="Enter block"];
37 [label="Postponed enter to lambda"];
subgraph cluster_14 {
color=blue
38 [label="Enter function <anonymous>" style="filled" fillcolor=red];
subgraph cluster_15 {
color=blue
39 [label="Enter block"];
40 [label="Access variable R|<local>/x|"];
41 [label="Type operator: (R|<local>/x| as R|B|)"];
42 [label="Exit block"];
}
43 [label="Exit function <anonymous>" style="filled" fillcolor=red];
}
44 [label="Postponed exit from lambda"];
45 [label="Function call: R|kotlin/run|<R|B|>(...)" style="filled" fillcolor=yellow];
46 [label="Access variable R|<local>/x|"];
47 [label="Smart cast: R|<local>/x|"];
48 [label="Function call: R|<local>/x|.R|/B.bar|()" style="filled" fillcolor=yellow];
49 [label="Exit block"];
}
50 [label="Exit function test_2" style="filled" fillcolor=red];
}
35 -> {36};
36 -> {37};
37 -> {38};
37 -> {38 45};
37 -> {44} [style=dotted];
37 -> {38} [style=dashed];
38 -> {39};
39 -> {40};
40 -> {41};
@@ -149,74 +154,74 @@ digraph inPlaceLambdas_kt {
45 -> {46};
46 -> {47};
47 -> {48};
48 -> {49};
49 -> {50};
subgraph cluster_15 {
subgraph cluster_16 {
color=red
49 [label="Enter function test_3" style="filled" fillcolor=red];
subgraph cluster_16 {
51 [label="Enter function test_3" style="filled" fillcolor=red];
subgraph cluster_17 {
color=blue
50 [label="Enter block"];
subgraph cluster_17 {
52 [label="Enter block"];
subgraph cluster_18 {
color=blue
51 [label="Enter when"];
subgraph cluster_18 {
color=blue
52 [label="Enter when branch condition "];
53 [label="Access variable R|<local>/x|"];
54 [label="Type operator: (R|<local>/x| is R|A|)"];
55 [label="Exit when branch condition"];
}
56 [label="Synthetic else branch"];
57 [label="Enter when branch result"];
53 [label="Enter when"];
subgraph cluster_19 {
color=blue
58 [label="Enter block"];
59 [label="Postponed enter to lambda"];
subgraph cluster_20 {
color=blue
60 [label="Enter function <anonymous>" style="filled" fillcolor=red];
subgraph cluster_21 {
color=blue
61 [label="Enter block"];
62 [label="Access variable R|<local>/x|"];
63 [label="Smart cast: R|<local>/x|"];
64 [label="Function call: R|<local>/x|.R|/A.foo|()" style="filled" fillcolor=yellow];
65 [label="Access variable R|<local>/x|"];
66 [label="Smart cast: R|<local>/x|"];
67 [label="Type operator: (R|<local>/x| as R|B|)"];
68 [label="Exit block"];
}
69 [label="Exit function <anonymous>" style="filled" fillcolor=red];
}
70 [label="Postponed exit from lambda"];
71 [label="Function call: R|kotlin/run|<R|B|>(...)" style="filled" fillcolor=yellow];
72 [label="Access variable R|<local>/x|"];
73 [label="Smart cast: R|<local>/x|"];
74 [label="Function call: R|<local>/x|.R|/B.bar|()" style="filled" fillcolor=yellow];
75 [label="Exit block"];
54 [label="Enter when branch condition "];
55 [label="Access variable R|<local>/x|"];
56 [label="Type operator: (R|<local>/x| is R|A|)"];
57 [label="Exit when branch condition"];
}
76 [label="Exit when branch result"];
77 [label="Exit when"];
58 [label="Synthetic else branch"];
59 [label="Enter when branch result"];
subgraph cluster_20 {
color=blue
60 [label="Enter block"];
61 [label="Postponed enter to lambda"];
subgraph cluster_21 {
color=blue
62 [label="Enter function <anonymous>" style="filled" fillcolor=red];
subgraph cluster_22 {
color=blue
63 [label="Enter block"];
64 [label="Access variable R|<local>/x|"];
65 [label="Smart cast: R|<local>/x|"];
66 [label="Function call: R|<local>/x|.R|/A.foo|()" style="filled" fillcolor=yellow];
67 [label="Access variable R|<local>/x|"];
68 [label="Smart cast: R|<local>/x|"];
69 [label="Type operator: (R|<local>/x| as R|B|)"];
70 [label="Exit block"];
}
71 [label="Exit function <anonymous>" style="filled" fillcolor=red];
}
72 [label="Postponed exit from lambda"];
73 [label="Function call: R|kotlin/run|<R|B|>(...)" style="filled" fillcolor=yellow];
74 [label="Access variable R|<local>/x|"];
75 [label="Smart cast: R|<local>/x|"];
76 [label="Function call: R|<local>/x|.R|/B.bar|()" style="filled" fillcolor=yellow];
77 [label="Exit block"];
}
78 [label="Exit when branch result"];
79 [label="Exit when"];
}
78 [label="Exit block"];
80 [label="Exit block"];
}
79 [label="Exit function test_3" style="filled" fillcolor=red];
81 [label="Exit function test_3" style="filled" fillcolor=red];
}
49 -> {50};
50 -> {51};
51 -> {52};
52 -> {53};
53 -> {54};
54 -> {55};
55 -> {56 57};
56 -> {77};
57 -> {58};
58 -> {59};
59 -> {60 71};
59 -> {70} [style=dotted];
59 -> {60} [style=dashed];
55 -> {56};
56 -> {57};
57 -> {58 59};
58 -> {79};
59 -> {60};
60 -> {61};
61 -> {62};
61 -> {62 73};
61 -> {72} [style=dotted];
61 -> {62} [style=dashed];
62 -> {63};
63 -> {64};
64 -> {65};
@@ -234,5 +239,7 @@ digraph inPlaceLambdas_kt {
76 -> {77};
77 -> {78};
78 -> {79};
79 -> {80};
80 -> {81};
}
@@ -5,235 +5,240 @@ digraph lambdaInWhenBranch_kt {
subgraph cluster_0 {
color=red
0 [label="Enter class Sealed" style="filled" fillcolor=red];
subgraph cluster_1 {
color=blue
1 [label="Enter function <init>" style="filled" fillcolor=red];
2 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
3 [label="Exit function <init>" style="filled" fillcolor=red];
}
4 [label="Exit class Sealed" style="filled" fillcolor=red];
0 [label="Enter file lambdaInWhenBranch.kt" style="filled" fillcolor=red];
1 [label="Exit file lambdaInWhenBranch.kt" style="filled" fillcolor=red];
}
0 -> {1} [color=green];
0 -> {4} [style=dotted];
0 -> {1} [style=dashed];
1 -> {2};
2 -> {3};
3 -> {4} [color=green];
subgraph cluster_2 {
subgraph cluster_1 {
color=red
5 [label="Enter class SubClass1" style="filled" fillcolor=red];
subgraph cluster_3 {
2 [label="Enter class Sealed" style="filled" fillcolor=red];
subgraph cluster_2 {
color=blue
6 [label="Enter property" style="filled" fillcolor=red];
7 [label="Access variable R|<local>/t|"];
8 [label="Exit property" style="filled" fillcolor=red];
3 [label="Enter function <init>" style="filled" fillcolor=red];
4 [label="Delegated constructor call: super<R|kotlin/Any|>()" style="filled" fillcolor=yellow];
5 [label="Exit function <init>" style="filled" fillcolor=red];
}
6 [label="Exit class Sealed" style="filled" fillcolor=red];
}
2 -> {3} [color=green];
2 -> {6} [style=dotted];
2 -> {3} [style=dashed];
3 -> {4};
4 -> {5};
5 -> {6} [color=green];
subgraph cluster_3 {
color=red
7 [label="Enter class SubClass1" style="filled" fillcolor=red];
subgraph cluster_4 {
color=blue
9 [label="Enter function <init>" style="filled" fillcolor=red];
10 [label="Delegated constructor call: super<R|Sealed|>()" style="filled" fillcolor=yellow];
11 [label="Exit function <init>" style="filled" fillcolor=red];
8 [label="Enter property" style="filled" fillcolor=red];
9 [label="Access variable R|<local>/t|"];
10 [label="Exit property" style="filled" fillcolor=red];
}
12 [label="Exit class SubClass1" style="filled" fillcolor=red];
subgraph cluster_5 {
color=blue
11 [label="Enter function <init>" style="filled" fillcolor=red];
12 [label="Delegated constructor call: super<R|Sealed|>()" style="filled" fillcolor=yellow];
13 [label="Exit function <init>" style="filled" fillcolor=red];
}
14 [label="Exit class SubClass1" style="filled" fillcolor=red];
}
5 -> {6} [color=green];
5 -> {12} [style=dotted];
5 -> {6 9} [style=dashed];
6 -> {7};
7 -> {8};
8 -> {9} [color=green];
7 -> {8} [color=green];
7 -> {14} [style=dotted];
7 -> {8 11} [style=dashed];
8 -> {9};
9 -> {10};
10 -> {11};
11 -> {12} [color=green];
subgraph cluster_5 {
color=red
13 [label="Enter function component1" style="filled" fillcolor=red];
14 [label="Exit function component1" style="filled" fillcolor=red];
}
13 -> {14};
10 -> {11} [color=green];
11 -> {12};
12 -> {13};
13 -> {14} [color=green];
subgraph cluster_6 {
color=red
15 [label="Enter function copy" style="filled" fillcolor=red];
16 [label="Enter default value of t"];
subgraph cluster_7 {
color=blue
17 [label="Enter default value of t" style="filled" fillcolor=red];
18 [label="Access variable R|/SubClass1.t|"];
19 [label="Exit default value of t" style="filled" fillcolor=red];
}
20 [label="Exit default value of t"];
21 [label="Exit function copy" style="filled" fillcolor=red];
15 [label="Enter function component1" style="filled" fillcolor=red];
16 [label="Exit function component1" style="filled" fillcolor=red];
}
15 -> {16};
16 -> {17 20};
16 -> {17} [style=dashed];
subgraph cluster_7 {
color=red
17 [label="Enter function copy" style="filled" fillcolor=red];
18 [label="Enter default value of t"];
subgraph cluster_8 {
color=blue
19 [label="Enter default value of t" style="filled" fillcolor=red];
20 [label="Access variable R|/SubClass1.t|"];
21 [label="Exit default value of t" style="filled" fillcolor=red];
}
22 [label="Exit default value of t"];
23 [label="Exit function copy" style="filled" fillcolor=red];
}
17 -> {18};
18 -> {19};
18 -> {19 22};
18 -> {19} [style=dashed];
19 -> {20};
20 -> {21};
21 -> {22};
22 -> {23};
subgraph cluster_8 {
subgraph cluster_9 {
color=red
22 [label="Enter class SubClass2" style="filled" fillcolor=red];
subgraph cluster_9 {
24 [label="Enter class SubClass2" style="filled" fillcolor=red];
subgraph cluster_10 {
color=blue
23 [label="Enter function <init>" style="filled" fillcolor=red];
24 [label="Delegated constructor call: super<R|Sealed|>()" style="filled" fillcolor=yellow];
25 [label="Exit function <init>" style="filled" fillcolor=red];
25 [label="Enter function <init>" style="filled" fillcolor=red];
26 [label="Delegated constructor call: super<R|Sealed|>()" style="filled" fillcolor=yellow];
27 [label="Exit function <init>" style="filled" fillcolor=red];
}
26 [label="Exit class SubClass2" style="filled" fillcolor=red];
28 [label="Exit class SubClass2" style="filled" fillcolor=red];
}
22 -> {23} [color=green];
22 -> {26} [style=dotted];
22 -> {23} [style=dashed];
23 -> {24};
24 -> {25};
25 -> {26} [color=green];
subgraph cluster_10 {
color=red
27 [label="Enter function copy" style="filled" fillcolor=red];
28 [label="Exit function copy" style="filled" fillcolor=red];
}
27 -> {28};
24 -> {25} [color=green];
24 -> {28} [style=dotted];
24 -> {25} [style=dashed];
25 -> {26};
26 -> {27};
27 -> {28} [color=green];
subgraph cluster_11 {
color=red
29 [label="Enter function foo" style="filled" fillcolor=red];
subgraph cluster_12 {
color=blue
30 [label="Enter block"];
subgraph cluster_13 {
color=blue
31 [label="Enter when"];
32 [label="Access variable R|<local>/p|"];
subgraph cluster_14 {
color=blue
33 [label="Enter when branch condition "];
34 [label="Exit $subj"];
35 [label="Type operator: ($subj$ is R|SubClass1|)"];
36 [label="Exit when branch condition"];
}
subgraph cluster_15 {
color=blue
37 [label="Enter when branch condition "];
38 [label="Exit $subj"];
39 [label="Type operator: ($subj$ is R|SubClass2|)"];
40 [label="Exit when branch condition"];
}
41 [label="Enter when branch result"];
subgraph cluster_16 {
color=blue
42 [label="Enter block"];
43 [label="Const: String()"];
44 [label="Exit block"];
}
45 [label="Exit when branch result"];
46 [label="Enter when branch result"];
subgraph cluster_17 {
color=blue
47 [label="Enter block"];
48 [label="Const: String()"];
49 [label="Postponed enter to lambda"];
subgraph cluster_18 {
color=blue
50 [label="Enter function <anonymous>" style="filled" fillcolor=red];
subgraph cluster_19 {
color=blue
51 [label="Enter block"];
52 [label="Access variable R|<local>/it|"];
53 [label="Exit block"];
}
54 [label="Exit function <anonymous>" style="filled" fillcolor=red];
}
55 [label="Postponed exit from lambda"];
56 [label="Function call: String().R|kotlin/let|<R|kotlin/String|, R|kotlin/String|>(...)" style="filled" fillcolor=yellow];
57 [label="Exit block"];
}
58 [label="Exit when branch result"];
59 [label="Exit when"];
}
60 [label="Access variable R|<local>/p|"];
61 [label="Access variable <Unresolved name: t>#"];
subgraph cluster_20 {
color=blue
62 [label="Enter when"];
63 [label="Access variable R|<local>/p|"];
subgraph cluster_21 {
color=blue
64 [label="Enter when branch condition "];
65 [label="Exit $subj"];
66 [label="Type operator: ($subj$ is R|SubClass1|)"];
67 [label="Exit when branch condition"];
}
subgraph cluster_22 {
color=blue
68 [label="Enter when branch condition "];
69 [label="Exit $subj"];
70 [label="Type operator: ($subj$ is R|SubClass2|)"];
71 [label="Exit when branch condition"];
}
72 [label="Enter when branch result"];
subgraph cluster_23 {
color=blue
73 [label="Enter block"];
74 [label="Const: String(2)"];
75 [label="Exit block"];
}
76 [label="Exit when branch result"];
77 [label="Enter when branch result"];
subgraph cluster_24 {
color=blue
78 [label="Enter block"];
79 [label="Access variable R|<local>/p|"];
80 [label="Smart cast: R|<local>/p|"];
81 [label="Access variable R|/SubClass1.t|"];
82 [label="Exit block"];
}
83 [label="Exit when branch result"];
84 [label="Exit when"];
}
85 [label="Access variable R|kotlin/String.length|"];
86 [label="Exit block"];
}
87 [label="Exit function foo" style="filled" fillcolor=red];
29 [label="Enter function copy" style="filled" fillcolor=red];
30 [label="Exit function copy" style="filled" fillcolor=red];
}
29 -> {30};
30 -> {31};
subgraph cluster_12 {
color=red
31 [label="Enter function foo" style="filled" fillcolor=red];
subgraph cluster_13 {
color=blue
32 [label="Enter block"];
subgraph cluster_14 {
color=blue
33 [label="Enter when"];
34 [label="Access variable R|<local>/p|"];
subgraph cluster_15 {
color=blue
35 [label="Enter when branch condition "];
36 [label="Exit $subj"];
37 [label="Type operator: ($subj$ is R|SubClass1|)"];
38 [label="Exit when branch condition"];
}
subgraph cluster_16 {
color=blue
39 [label="Enter when branch condition "];
40 [label="Exit $subj"];
41 [label="Type operator: ($subj$ is R|SubClass2|)"];
42 [label="Exit when branch condition"];
}
43 [label="Enter when branch result"];
subgraph cluster_17 {
color=blue
44 [label="Enter block"];
45 [label="Const: String()"];
46 [label="Exit block"];
}
47 [label="Exit when branch result"];
48 [label="Enter when branch result"];
subgraph cluster_18 {
color=blue
49 [label="Enter block"];
50 [label="Const: String()"];
51 [label="Postponed enter to lambda"];
subgraph cluster_19 {
color=blue
52 [label="Enter function <anonymous>" style="filled" fillcolor=red];
subgraph cluster_20 {
color=blue
53 [label="Enter block"];
54 [label="Access variable R|<local>/it|"];
55 [label="Exit block"];
}
56 [label="Exit function <anonymous>" style="filled" fillcolor=red];
}
57 [label="Postponed exit from lambda"];
58 [label="Function call: String().R|kotlin/let|<R|kotlin/String|, R|kotlin/String|>(...)" style="filled" fillcolor=yellow];
59 [label="Exit block"];
}
60 [label="Exit when branch result"];
61 [label="Exit when"];
}
62 [label="Access variable R|<local>/p|"];
63 [label="Access variable <Unresolved name: t>#"];
subgraph cluster_21 {
color=blue
64 [label="Enter when"];
65 [label="Access variable R|<local>/p|"];
subgraph cluster_22 {
color=blue
66 [label="Enter when branch condition "];
67 [label="Exit $subj"];
68 [label="Type operator: ($subj$ is R|SubClass1|)"];
69 [label="Exit when branch condition"];
}
subgraph cluster_23 {
color=blue
70 [label="Enter when branch condition "];
71 [label="Exit $subj"];
72 [label="Type operator: ($subj$ is R|SubClass2|)"];
73 [label="Exit when branch condition"];
}
74 [label="Enter when branch result"];
subgraph cluster_24 {
color=blue
75 [label="Enter block"];
76 [label="Const: String(2)"];
77 [label="Exit block"];
}
78 [label="Exit when branch result"];
79 [label="Enter when branch result"];
subgraph cluster_25 {
color=blue
80 [label="Enter block"];
81 [label="Access variable R|<local>/p|"];
82 [label="Smart cast: R|<local>/p|"];
83 [label="Access variable R|/SubClass1.t|"];
84 [label="Exit block"];
}
85 [label="Exit when branch result"];
86 [label="Exit when"];
}
87 [label="Access variable R|kotlin/String.length|"];
88 [label="Exit block"];
}
89 [label="Exit function foo" style="filled" fillcolor=red];
}
31 -> {32};
32 -> {33};
33 -> {34};
34 -> {35};
35 -> {36};
36 -> {37 46};
36 -> {37};
37 -> {38};
38 -> {39};
38 -> {39 48};
39 -> {40};
40 -> {41};
41 -> {42};
42 -> {43};
43 -> {44};
44 -> {45};
45 -> {59};
45 -> {46};
46 -> {47};
47 -> {48};
47 -> {61};
48 -> {49};
49 -> {50 56};
49 -> {55} [style=dotted];
49 -> {50} [style=dashed];
49 -> {50};
50 -> {51};
51 -> {52};
51 -> {52 58};
51 -> {57} [style=dotted];
51 -> {52} [style=dashed];
52 -> {53};
53 -> {54};
54 -> {55};
55 -> {56} [color=green];
55 -> {59} [color=red];
55 -> {56};
56 -> {57};
57 -> {58};
57 -> {58} [color=green];
57 -> {61} [color=red];
58 -> {59};
59 -> {60};
60 -> {61};
@@ -243,18 +248,18 @@ digraph lambdaInWhenBranch_kt {
64 -> {65};
65 -> {66};
66 -> {67};
67 -> {68 77};
67 -> {68};
68 -> {69};
69 -> {70};
69 -> {70 79};
70 -> {71};
71 -> {72};
72 -> {73};
73 -> {74};
74 -> {75};
75 -> {76};
76 -> {84};
76 -> {77};
77 -> {78};
78 -> {79};
78 -> {86};
79 -> {80};
80 -> {81};
81 -> {82};
@@ -263,5 +268,7 @@ digraph lambdaInWhenBranch_kt {
84 -> {85};
85 -> {86};
86 -> {87};
87 -> {88};
88 -> {89};
}
@@ -5,51 +5,58 @@ digraph smartcastOnLambda_kt {
subgraph cluster_0 {
color=red
0 [label="Enter function test" style="filled" fillcolor=red];
subgraph cluster_1 {
0 [label="Enter file smartcastOnLambda.kt" style="filled" fillcolor=red];
1 [label="Exit file smartcastOnLambda.kt" style="filled" fillcolor=red];
}
0 -> {1} [color=green];
subgraph cluster_1 {
color=red
2 [label="Enter function test" 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>/func|"];
5 [label="Const: Null(null)"];
6 [label="Equality operator !="];
7 [label="Exit when branch condition"];
}
8 [label="Synthetic else branch"];
9 [label="Enter when branch result"];
4 [label="Enter when"];
subgraph cluster_4 {
color=blue
10 [label="Enter block"];
11 [label="Function call: R|<local>/func|.R|SubstitutionOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()" style="filled" fillcolor=yellow];
12 [label="Exit block"];
5 [label="Enter when branch condition "];
6 [label="Access variable R|<local>/func|"];
7 [label="Const: Null(null)"];
8 [label="Equality operator !="];
9 [label="Exit when branch condition"];
}
13 [label="Exit when branch result"];
14 [label="Exit when"];
10 [label="Synthetic else branch"];
11 [label="Enter when branch result"];
subgraph cluster_5 {
color=blue
12 [label="Enter block"];
13 [label="Function call: R|<local>/func|.R|SubstitutionOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()" style="filled" fillcolor=yellow];
14 [label="Exit block"];
}
15 [label="Exit when branch result"];
16 [label="Exit when"];
}
15 [label="Exit block"];
17 [label="Exit block"];
}
16 [label="Exit function test" style="filled" fillcolor=red];
18 [label="Exit function test" style="filled" fillcolor=red];
}
0 -> {1};
1 -> {2};
2 -> {3};
3 -> {4};
4 -> {5};
5 -> {6};
6 -> {7};
7 -> {8 9};
8 -> {14};
9 -> {10};
10 -> {11};
7 -> {8};
8 -> {9};
9 -> {10 11};
10 -> {16};
11 -> {12};
12 -> {13};
13 -> {14};
14 -> {15};
15 -> {16};
16 -> {17};
17 -> {18};
}