[FIR] Split FirAnonymousObject to expression and declaration

This commit is contained in:
Dmitriy Novozhilov
2021-06-09 14:31:16 +03:00
parent ad89d43186
commit 85b844c748
41 changed files with 769 additions and 546 deletions
@@ -10,92 +10,94 @@ digraph inAnonymousObject_kt {
color=blue
1 [label="Enter block"];
2 [label="Exit anonymous object"];
3 [label="Variable declaration: lval obj: R|<anonymous>|"];
4 [label="Access variable R|<local>/obj|"];
5 [label="Function call: R|<local>/obj|.R|/<anonymous>.run|()"];
6 [label="Function call: R|<local>/d|.R|SubstitutionOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()"];
7 [label="Exit block"];
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"];
}
8 [label="Exit function foo" style="filled" fillcolor=red];
9 [label="Exit function foo" style="filled" fillcolor=red];
}
subgraph cluster_2 {
color=blue
9 [label="Enter class <anonymous object>" style="filled" fillcolor=red];
10 [label="Part of class initialization"];
10 [label="Enter class <anonymous object>" style="filled" fillcolor=red];
11 [label="Part of class initialization"];
12 [label="Exit class <anonymous object>" style="filled" fillcolor=red];
12 [label="Part of class initialization"];
13 [label="Exit class <anonymous object>" style="filled" fillcolor=red];
}
0 -> {1};
1 -> {2};
1 -> {13 16 19 25} [color=red];
1 -> {14 17 20 26} [color=red];
2 -> {3};
2 -> {13 25 9} [color=green];
2 -> {13 25 9} [style=dashed];
2 -> {14 26 10} [color=green];
2 -> {14 26 10} [style=dashed];
3 -> {4};
4 -> {5};
5 -> {6};
6 -> {7};
7 -> {8};
9 -> {10} [color=green];
10 -> {11} [style=dotted];
10 -> {16} [color=green];
10 -> {16} [style=dashed];
8 -> {9};
10 -> {11} [color=green];
11 -> {12} [style=dotted];
11 -> {19} [color=green];
11 -> {19} [style=dashed];
11 -> {17} [color=green];
11 -> {17} [style=dashed];
12 -> {13} [style=dotted];
12 -> {20} [color=green];
12 -> {20} [style=dashed];
subgraph cluster_3 {
color=red
13 [label="Enter function <init>" style="filled" fillcolor=red];
14 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
15 [label="Exit function <init>" style="filled" fillcolor=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];
}
13 -> {14};
14 -> {15};
15 -> {16};
subgraph cluster_4 {
color=red
16 [label="Enter property" style="filled" fillcolor=red];
17 [label="Access variable R|<local>/a|"];
18 [label="Exit property" style="filled" fillcolor=red];
17 [label="Enter property" style="filled" fillcolor=red];
18 [label="Access variable R|<local>/a|"];
19 [label="Exit property" style="filled" fillcolor=red];
}
16 -> {17};
17 -> {18};
18 -> {11} [color=green];
18 -> {19};
19 -> {12} [color=green];
subgraph cluster_5 {
color=red
19 [label="Enter init block" style="filled" fillcolor=red];
20 [label="Enter init block" style="filled" fillcolor=red];
subgraph cluster_6 {
color=blue
20 [label="Enter block"];
21 [label="Access variable R|<local>/b|"];
22 [label="Assignment: R|/<anonymous>.leaked|"];
23 [label="Exit block"];
21 [label="Enter block"];
22 [label="Access variable R|<local>/b|"];
23 [label="Assignment: R|/<anonymous>.leaked|"];
24 [label="Exit block"];
}
24 [label="Exit init block" style="filled" fillcolor=red];
25 [label="Exit init block" style="filled" fillcolor=red];
}
19 -> {20};
20 -> {21};
21 -> {22};
22 -> {23};
23 -> {24};
24 -> {12} [color=green];
24 -> {25};
25 -> {13} [color=green];
subgraph cluster_7 {
color=red
25 [label="Enter function run" style="filled" fillcolor=red];
26 [label="Enter function run" style="filled" fillcolor=red];
subgraph cluster_8 {
color=blue
26 [label="Enter block"];
27 [label="Function call: R|<local>/c|.R|SubstitutionOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()"];
28 [label="Exit block"];
27 [label="Enter block"];
28 [label="Function call: R|<local>/c|.R|SubstitutionOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()"];
29 [label="Exit block"];
}
29 [label="Exit function run" style="filled" fillcolor=red];
30 [label="Exit function run" style="filled" fillcolor=red];
}
25 -> {26};
26 -> {27};
27 -> {28};
28 -> {29};
29 -> {30};
}