FIR: thread control flow through anonymous object init blocks
^KT-39646 Fixed
This commit is contained in:
+53
-48
@@ -9,95 +9,100 @@ digraph inAnonymousObject_kt {
|
||||
subgraph cluster_1 {
|
||||
color=blue
|
||||
1 [label="Enter block"];
|
||||
2 [label="Exit anonymous object"];
|
||||
3 [label="Exit anonymous object expression"];
|
||||
4 [label="Variable declaration: lval obj: R|<anonymous>|"];
|
||||
5 [label="Access variable R|<local>/obj|"];
|
||||
6 [label="Function call: R|<local>/obj|.R|/<anonymous>.run|()"];
|
||||
7 [label="Function call: R|<local>/d|.R|SubstitutionOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()"];
|
||||
8 [label="Exit block"];
|
||||
2 [label="Enter anonymous object"];
|
||||
subgraph cluster_2 {
|
||||
color=blue
|
||||
11 [label="Enter class <anonymous object>" style="filled" fillcolor=red];
|
||||
12 [label="Part of class initialization"];
|
||||
13 [label="Part of class initialization"];
|
||||
14 [label="Exit class <anonymous object>" style="filled" fillcolor=red];
|
||||
}
|
||||
3 [label="Exit anonymous object"];
|
||||
4 [label="Exit anonymous object expression"];
|
||||
5 [label="Variable declaration: lval obj: R|<anonymous>|"];
|
||||
6 [label="Access variable R|<local>/obj|"];
|
||||
7 [label="Function call: R|<local>/obj|.R|/<anonymous>.run|()"];
|
||||
8 [label="Function call: R|<local>/d|.R|SubstitutionOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()"];
|
||||
9 [label="Exit block"];
|
||||
}
|
||||
9 [label="Exit function foo" style="filled" fillcolor=red];
|
||||
}
|
||||
subgraph cluster_2 {
|
||||
color=blue
|
||||
10 [label="Enter class <anonymous object>" style="filled" fillcolor=red];
|
||||
11 [label="Part of class initialization"];
|
||||
12 [label="Part of class initialization"];
|
||||
13 [label="Exit class <anonymous object>" style="filled" fillcolor=red];
|
||||
10 [label="Exit function foo" style="filled" fillcolor=red];
|
||||
}
|
||||
0 -> {1};
|
||||
1 -> {2};
|
||||
1 -> {14 17 20 26} [color=red];
|
||||
2 -> {3};
|
||||
2 -> {14 26 10} [color=green];
|
||||
2 -> {14 26 10} [style=dashed];
|
||||
1 -> {15 18 21 27} [color=red];
|
||||
2 -> {3} [color=red];
|
||||
2 -> {11} [color=green];
|
||||
2 -> {11} [style=dashed];
|
||||
3 -> {4};
|
||||
3 -> {15 27} [color=green];
|
||||
3 -> {15 27} [style=dashed];
|
||||
4 -> {5};
|
||||
5 -> {6};
|
||||
6 -> {7};
|
||||
7 -> {8};
|
||||
8 -> {9};
|
||||
10 -> {11} [color=green];
|
||||
11 -> {12} [style=dotted];
|
||||
11 -> {17} [color=green];
|
||||
11 -> {17} [style=dashed];
|
||||
9 -> {10};
|
||||
11 -> {12} [color=green];
|
||||
12 -> {13} [style=dotted];
|
||||
12 -> {20} [color=green];
|
||||
12 -> {20} [style=dashed];
|
||||
12 -> {18} [color=green];
|
||||
12 -> {18} [style=dashed];
|
||||
13 -> {14} [style=dotted];
|
||||
13 -> {21} [color=green];
|
||||
13 -> {21} [style=dashed];
|
||||
14 -> {3} [color=green];
|
||||
|
||||
subgraph cluster_3 {
|
||||
color=red
|
||||
14 [label="Enter function <init>" style="filled" fillcolor=red];
|
||||
15 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
|
||||
16 [label="Exit function <init>" style="filled" fillcolor=red];
|
||||
15 [label="Enter function <init>" style="filled" fillcolor=red];
|
||||
16 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
|
||||
17 [label="Exit function <init>" style="filled" fillcolor=red];
|
||||
}
|
||||
14 -> {15};
|
||||
15 -> {16};
|
||||
16 -> {17};
|
||||
|
||||
subgraph cluster_4 {
|
||||
color=red
|
||||
17 [label="Enter property" style="filled" fillcolor=red];
|
||||
18 [label="Access variable R|<local>/a|"];
|
||||
19 [label="Exit property" style="filled" fillcolor=red];
|
||||
18 [label="Enter property" style="filled" fillcolor=red];
|
||||
19 [label="Access variable R|<local>/a|"];
|
||||
20 [label="Exit property" style="filled" fillcolor=red];
|
||||
}
|
||||
17 -> {18};
|
||||
18 -> {19};
|
||||
19 -> {12} [color=green];
|
||||
19 -> {20};
|
||||
20 -> {13} [color=green];
|
||||
|
||||
subgraph cluster_5 {
|
||||
color=red
|
||||
20 [label="Enter init block" style="filled" fillcolor=red];
|
||||
21 [label="Enter init block" style="filled" fillcolor=red];
|
||||
subgraph cluster_6 {
|
||||
color=blue
|
||||
21 [label="Enter block"];
|
||||
22 [label="Access variable R|<local>/b|"];
|
||||
23 [label="Assignment: R|/<anonymous>.leaked|"];
|
||||
24 [label="Exit block"];
|
||||
22 [label="Enter block"];
|
||||
23 [label="Access variable R|<local>/b|"];
|
||||
24 [label="Assignment: R|/<anonymous>.leaked|"];
|
||||
25 [label="Exit block"];
|
||||
}
|
||||
25 [label="Exit init block" style="filled" fillcolor=red];
|
||||
26 [label="Exit init block" style="filled" fillcolor=red];
|
||||
}
|
||||
20 -> {21};
|
||||
21 -> {22};
|
||||
22 -> {23};
|
||||
23 -> {24};
|
||||
24 -> {25};
|
||||
25 -> {13} [color=green];
|
||||
25 -> {26};
|
||||
26 -> {14} [color=green];
|
||||
|
||||
subgraph cluster_7 {
|
||||
color=red
|
||||
26 [label="Enter function run" style="filled" fillcolor=red];
|
||||
27 [label="Enter function run" style="filled" fillcolor=red];
|
||||
subgraph cluster_8 {
|
||||
color=blue
|
||||
27 [label="Enter block"];
|
||||
28 [label="Function call: R|<local>/c|.R|SubstitutionOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()"];
|
||||
29 [label="Exit block"];
|
||||
28 [label="Enter block"];
|
||||
29 [label="Function call: R|<local>/c|.R|SubstitutionOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()"];
|
||||
30 [label="Exit block"];
|
||||
}
|
||||
30 [label="Exit function run" style="filled" fillcolor=red];
|
||||
31 [label="Exit function run" style="filled" fillcolor=red];
|
||||
}
|
||||
26 -> {27};
|
||||
27 -> {28};
|
||||
28 -> {29};
|
||||
29 -> {30};
|
||||
30 -> {31};
|
||||
|
||||
}
|
||||
|
||||
Vendored
+89
-84
@@ -85,167 +85,172 @@ digraph delegateWithAnonymousObject_kt {
|
||||
|
||||
subgraph cluster_9 {
|
||||
color=red
|
||||
34 [label="Enter function <init>" style="filled" fillcolor=red];
|
||||
35 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
|
||||
36 [label="Exit function <init>" style="filled" fillcolor=red];
|
||||
35 [label="Enter function <init>" style="filled" fillcolor=red];
|
||||
36 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
|
||||
37 [label="Exit function <init>" style="filled" fillcolor=red];
|
||||
}
|
||||
34 -> {35};
|
||||
35 -> {36};
|
||||
36 -> {37};
|
||||
|
||||
subgraph cluster_10 {
|
||||
color=red
|
||||
37 [label="Enter function getValue" style="filled" fillcolor=red];
|
||||
38 [label="Enter function getValue" style="filled" fillcolor=red];
|
||||
subgraph cluster_11 {
|
||||
color=blue
|
||||
38 [label="Enter block"];
|
||||
39 [label="Function call: R|/IssueListView.IssueListView|()"];
|
||||
40 [label="Jump: ^getValue R|/IssueListView.IssueListView|()"];
|
||||
41 [label="Stub" style="filled" fillcolor=gray];
|
||||
42 [label="Exit block" style="filled" fillcolor=gray];
|
||||
39 [label="Enter block"];
|
||||
40 [label="Function call: R|/IssueListView.IssueListView|()"];
|
||||
41 [label="Jump: ^getValue R|/IssueListView.IssueListView|()"];
|
||||
42 [label="Stub" style="filled" fillcolor=gray];
|
||||
43 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
43 [label="Exit function getValue" style="filled" fillcolor=red];
|
||||
44 [label="Exit function getValue" style="filled" fillcolor=red];
|
||||
}
|
||||
37 -> {38};
|
||||
38 -> {39};
|
||||
39 -> {40};
|
||||
40 -> {43};
|
||||
40 -> {41} [style=dotted];
|
||||
40 -> {41};
|
||||
41 -> {44};
|
||||
41 -> {42} [style=dotted];
|
||||
42 -> {43} [style=dotted];
|
||||
43 -> {44} [style=dotted];
|
||||
|
||||
subgraph cluster_12 {
|
||||
color=red
|
||||
44 [label="Enter function setValue" style="filled" fillcolor=red];
|
||||
45 [label="Enter function setValue" style="filled" fillcolor=red];
|
||||
subgraph cluster_13 {
|
||||
color=blue
|
||||
45 [label="Enter block"];
|
||||
46 [label="Function call: R|/IssueListView.IssueListView|()"];
|
||||
47 [label="Access variable R|<local>/value|"];
|
||||
48 [label="Function call: R|/IssueListView.IssueListView|().R|/IssueListView.updateFrom|(...)"];
|
||||
49 [label="Jump: ^setValue R|/IssueListView.IssueListView|().R|/IssueListView.updateFrom|(R|<local>/value|)"];
|
||||
50 [label="Stub" style="filled" fillcolor=gray];
|
||||
51 [label="Exit block" style="filled" fillcolor=gray];
|
||||
46 [label="Enter block"];
|
||||
47 [label="Function call: R|/IssueListView.IssueListView|()"];
|
||||
48 [label="Access variable R|<local>/value|"];
|
||||
49 [label="Function call: R|/IssueListView.IssueListView|().R|/IssueListView.updateFrom|(...)"];
|
||||
50 [label="Jump: ^setValue R|/IssueListView.IssueListView|().R|/IssueListView.updateFrom|(R|<local>/value|)"];
|
||||
51 [label="Stub" style="filled" fillcolor=gray];
|
||||
52 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
52 [label="Exit function setValue" style="filled" fillcolor=red];
|
||||
53 [label="Exit function setValue" style="filled" fillcolor=red];
|
||||
}
|
||||
44 -> {45};
|
||||
45 -> {46};
|
||||
46 -> {47};
|
||||
47 -> {48};
|
||||
48 -> {49};
|
||||
49 -> {52};
|
||||
49 -> {50} [style=dotted];
|
||||
49 -> {50};
|
||||
50 -> {53};
|
||||
50 -> {51} [style=dotted];
|
||||
51 -> {52} [style=dotted];
|
||||
52 -> {53} [style=dotted];
|
||||
|
||||
subgraph cluster_14 {
|
||||
color=red
|
||||
53 [label="Enter function getter" style="filled" fillcolor=red];
|
||||
54 [label="Enter function getter" style="filled" fillcolor=red];
|
||||
subgraph cluster_15 {
|
||||
color=blue
|
||||
54 [label="Enter block"];
|
||||
55 [label="Access variable D|/IssuesListUserProfile.issueListView|"];
|
||||
56 [label="Access variable this@R|/IssuesListUserProfile|"];
|
||||
57 [label="Function call: this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride<kotlin/properties/ReadWriteProperty.getValue: R|IssueListView|>|(...)"];
|
||||
58 [label="Jump: ^ this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride<kotlin/properties/ReadWriteProperty.getValue: R|IssueListView|>|(this@R|/IssuesListUserProfile|, ::R|/IssuesListUserProfile.issueListView|)"];
|
||||
59 [label="Stub" style="filled" fillcolor=gray];
|
||||
60 [label="Exit block" style="filled" fillcolor=gray];
|
||||
55 [label="Enter block"];
|
||||
56 [label="Access variable D|/IssuesListUserProfile.issueListView|"];
|
||||
57 [label="Access variable this@R|/IssuesListUserProfile|"];
|
||||
58 [label="Function call: this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride<kotlin/properties/ReadWriteProperty.getValue: R|IssueListView|>|(...)"];
|
||||
59 [label="Jump: ^ this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride<kotlin/properties/ReadWriteProperty.getValue: R|IssueListView|>|(this@R|/IssuesListUserProfile|, ::R|/IssuesListUserProfile.issueListView|)"];
|
||||
60 [label="Stub" style="filled" fillcolor=gray];
|
||||
61 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
61 [label="Exit function getter" style="filled" fillcolor=red];
|
||||
62 [label="Exit function getter" style="filled" fillcolor=red];
|
||||
}
|
||||
53 -> {54};
|
||||
54 -> {55};
|
||||
55 -> {56};
|
||||
56 -> {57};
|
||||
57 -> {58};
|
||||
58 -> {61};
|
||||
58 -> {59} [style=dotted];
|
||||
58 -> {59};
|
||||
59 -> {62};
|
||||
59 -> {60} [style=dotted];
|
||||
60 -> {61} [style=dotted];
|
||||
61 -> {62} [style=dotted];
|
||||
|
||||
subgraph cluster_16 {
|
||||
color=red
|
||||
62 [label="Enter function setter" style="filled" fillcolor=red];
|
||||
63 [label="Enter function setter" style="filled" fillcolor=red];
|
||||
subgraph cluster_17 {
|
||||
color=blue
|
||||
63 [label="Enter block"];
|
||||
64 [label="Access variable D|/IssuesListUserProfile.issueListView|"];
|
||||
65 [label="Access variable this@R|/IssuesListUserProfile|"];
|
||||
66 [label="Access variable R|<local>/issueListView|"];
|
||||
67 [label="Function call: this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride<kotlin/properties/ReadWriteProperty.setValue: R|kotlin/Unit|>|(...)"];
|
||||
68 [label="Exit block"];
|
||||
64 [label="Enter block"];
|
||||
65 [label="Access variable D|/IssuesListUserProfile.issueListView|"];
|
||||
66 [label="Access variable this@R|/IssuesListUserProfile|"];
|
||||
67 [label="Access variable R|<local>/issueListView|"];
|
||||
68 [label="Function call: this@R|/IssuesListUserProfile|.D|/IssuesListUserProfile.issueListView|.R|SubstitutionOverride<kotlin/properties/ReadWriteProperty.setValue: R|kotlin/Unit|>|(...)"];
|
||||
69 [label="Exit block"];
|
||||
}
|
||||
69 [label="Exit function setter" style="filled" fillcolor=red];
|
||||
70 [label="Exit function setter" style="filled" fillcolor=red];
|
||||
}
|
||||
62 -> {63};
|
||||
63 -> {64};
|
||||
64 -> {65};
|
||||
65 -> {66};
|
||||
66 -> {67};
|
||||
67 -> {68};
|
||||
68 -> {69};
|
||||
69 -> {70};
|
||||
|
||||
subgraph cluster_18 {
|
||||
color=red
|
||||
70 [label="Enter property" style="filled" fillcolor=red];
|
||||
71 [label="Postponed enter to lambda"];
|
||||
72 [label="Postponed exit from lambda"];
|
||||
73 [label="Function call: this@R|/IssuesListUserProfile|.R|/delegate|<R|IssuesListUserProfile|, R|IssuesListUserProfile|, R|IssueListView|>(...)"];
|
||||
74 [label="Access variable this@R|/IssuesListUserProfile|"];
|
||||
75 [label="Function call: this@R|/IssuesListUserProfile|.R|/delegate|<R|IssuesListUserProfile|, R|IssuesListUserProfile|, R|IssueListView|>(...).<Unresolved name: provideDelegate>#(...)"];
|
||||
76 [label="Postponed enter to lambda"];
|
||||
71 [label="Enter property" style="filled" fillcolor=red];
|
||||
72 [label="Postponed enter to lambda"];
|
||||
73 [label="Postponed exit from lambda"];
|
||||
74 [label="Function call: this@R|/IssuesListUserProfile|.R|/delegate|<R|IssuesListUserProfile|, R|IssuesListUserProfile|, R|IssueListView|>(...)"];
|
||||
75 [label="Access variable this@R|/IssuesListUserProfile|"];
|
||||
76 [label="Function call: this@R|/IssuesListUserProfile|.R|/delegate|<R|IssuesListUserProfile|, R|IssuesListUserProfile|, R|IssueListView|>(...).<Unresolved name: provideDelegate>#(...)"];
|
||||
77 [label="Postponed enter to lambda"];
|
||||
subgraph cluster_19 {
|
||||
color=blue
|
||||
26 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
|
||||
subgraph cluster_20 {
|
||||
color=blue
|
||||
27 [label="Enter block"];
|
||||
28 [label="Exit anonymous object"];
|
||||
29 [label="Exit anonymous object expression"];
|
||||
30 [label="Exit block"];
|
||||
28 [label="Enter anonymous object"];
|
||||
subgraph cluster_21 {
|
||||
color=blue
|
||||
33 [label="Enter class <anonymous object>" style="filled" fillcolor=red];
|
||||
34 [label="Exit class <anonymous object>" style="filled" fillcolor=red];
|
||||
}
|
||||
29 [label="Exit anonymous object"];
|
||||
30 [label="Exit anonymous object expression"];
|
||||
31 [label="Exit block"];
|
||||
}
|
||||
31 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
|
||||
32 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
|
||||
}
|
||||
subgraph cluster_21 {
|
||||
color=blue
|
||||
32 [label="Enter class <anonymous object>" style="filled" fillcolor=red];
|
||||
33 [label="Exit class <anonymous object>" style="filled" fillcolor=red];
|
||||
}
|
||||
77 [label="Postponed exit from lambda"];
|
||||
78 [label="Function call: this@R|/IssuesListUserProfile|.R|/delegate|<R|IssuesListUserProfile|, R|IssuesListUserProfile|, R|IssueListView|>(...)"];
|
||||
79 [label="Exit property" style="filled" fillcolor=red];
|
||||
78 [label="Postponed exit from lambda"];
|
||||
79 [label="Function call: this@R|/IssuesListUserProfile|.R|/delegate|<R|IssuesListUserProfile|, R|IssuesListUserProfile|, R|IssueListView|>(...)"];
|
||||
80 [label="Exit property" style="filled" fillcolor=red];
|
||||
}
|
||||
70 -> {71};
|
||||
71 -> {72};
|
||||
71 -> {} [style=dashed];
|
||||
72 -> {73};
|
||||
72 -> {} [style=dashed];
|
||||
73 -> {74};
|
||||
74 -> {75};
|
||||
75 -> {76};
|
||||
76 -> {77 26};
|
||||
76 -> {26} [style=dashed];
|
||||
77 -> {78};
|
||||
76 -> {77};
|
||||
77 -> {78 26};
|
||||
77 -> {26} [style=dashed];
|
||||
78 -> {79};
|
||||
79 -> {82} [color=green];
|
||||
79 -> {80};
|
||||
80 -> {83} [color=green];
|
||||
26 -> {27};
|
||||
27 -> {28};
|
||||
27 -> {34 37 44} [color=red];
|
||||
28 -> {29};
|
||||
28 -> {34 37 44 32} [color=green];
|
||||
28 -> {34 37 44 32} [style=dashed];
|
||||
27 -> {35 38 45} [color=red];
|
||||
28 -> {29} [color=red];
|
||||
28 -> {33} [color=green];
|
||||
28 -> {33} [style=dashed];
|
||||
29 -> {30};
|
||||
29 -> {35 38 45} [color=green];
|
||||
29 -> {35 38 45} [style=dashed];
|
||||
30 -> {31};
|
||||
32 -> {33} [color=green];
|
||||
31 -> {32};
|
||||
33 -> {34} [color=green];
|
||||
34 -> {29} [color=green];
|
||||
|
||||
subgraph cluster_22 {
|
||||
color=red
|
||||
80 [label="Enter class IssuesListUserProfile" style="filled" fillcolor=red];
|
||||
81 [label="Part of class initialization"];
|
||||
82 [label="Exit class IssuesListUserProfile" style="filled" fillcolor=red];
|
||||
81 [label="Enter class IssuesListUserProfile" style="filled" fillcolor=red];
|
||||
82 [label="Part of class initialization"];
|
||||
83 [label="Exit class IssuesListUserProfile" style="filled" fillcolor=red];
|
||||
}
|
||||
80 -> {81} [color=green];
|
||||
81 -> {82} [style=dotted];
|
||||
81 -> {70} [color=green];
|
||||
81 -> {70} [style=dashed];
|
||||
81 -> {82} [color=green];
|
||||
82 -> {83} [style=dotted];
|
||||
82 -> {71} [color=green];
|
||||
82 -> {71} [style=dashed];
|
||||
|
||||
}
|
||||
|
||||
+2
-2
@@ -23,8 +23,8 @@ fun test2() {
|
||||
}
|
||||
}
|
||||
|
||||
println(<!UNINITIALIZED_VARIABLE!>x<!>)
|
||||
println(<!UNINITIALIZED_VARIABLE!>x<!>)
|
||||
println(x)
|
||||
println(x)
|
||||
}
|
||||
|
||||
fun test3() {
|
||||
|
||||
Reference in New Issue
Block a user