[FIR] Check for isFun flag in SAM resolution

This commit is contained in:
Dmitriy Novozhilov
2020-07-06 16:48:15 +03:00
parent d1cb776e29
commit 58af8d68a1
11 changed files with 203 additions and 141 deletions
@@ -5,103 +5,156 @@ digraph plusAssignWithLambdaInRhs_kt {
subgraph cluster_0 {
color=red
0 [label="Enter function plusAssign" style="filled" fillcolor=red];
0 [label="Enter function test" style="filled" fillcolor=red];
subgraph cluster_1 {
color=blue
1 [label="Enter block"];
2 [label="Exit block"];
2 [label="Const: Null(null)"];
3 [label="Check not null: Null(null)!!"];
4 [label="Variable declaration: lval list: R|kotlin/collections/MutableList<kotlin/Function1<kotlin/String, kotlin/String>>|"];
5 [label="Access variable R|<local>/list|"];
6 [label="Postponed enter to lambda"];
subgraph cluster_2 {
color=blue
11 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_3 {
color=blue
12 [label="Enter block"];
13 [label="Access variable R|<local>/it|"];
14 [label="Exit block"];
}
15 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
7 [label="Postponed exit from lambda"];
8 [label="Function call: R|<local>/list|.R|kotlin/collections/plusAssign|<R|(kotlin/String) -> kotlin/String|>(...)"];
9 [label="Exit block"];
}
3 [label="Exit function plusAssign" style="filled" fillcolor=red];
10 [label="Exit function test" style="filled" fillcolor=red];
}
0 -> {1};
1 -> {2};
2 -> {3};
subgraph cluster_2 {
color=red
4 [label="Enter function plus" style="filled" fillcolor=red];
subgraph cluster_3 {
color=blue
5 [label="Enter block"];
6 [label="Access variable this@R|/plus|"];
7 [label="Jump: ^plus this@R|/plus|"];
8 [label="Stub" style="filled" fillcolor=gray];
9 [label="Exit block" style="filled" fillcolor=gray];
}
10 [label="Exit function plus" style="filled" fillcolor=red];
}
3 -> {4};
4 -> {5};
5 -> {6};
6 -> {7};
7 -> {10};
7 -> {8} [style=dotted];
8 -> {9} [style=dotted];
9 -> {10} [style=dotted];
subgraph cluster_4 {
color=red
11 [label="Enter function test" style="filled" fillcolor=red];
subgraph cluster_5 {
color=blue
12 [label="Enter block"];
13 [label="Const: Null(null)"];
14 [label="Check not null: Null(null)!!"];
15 [label="Variable declaration: lval list: R|kotlin/collections/MutableList<kotlin/Function1<kotlin/String, kotlin/String>>|"];
16 [label="Access variable R|<local>/list|"];
17 [label="Postponed enter to lambda"];
subgraph cluster_6 {
color=blue
22 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_7 {
color=blue
23 [label="Enter block"];
24 [label="Access variable R|<local>/it|"];
25 [label="Exit block"];
}
26 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
18 [label="Postponed exit from lambda"];
19 [label="Function call: R|<local>/list|.R|/plusAssign|<R|(kotlin/String) -> kotlin/String|>(...)"];
20 [label="Exit block"];
}
21 [label="Exit function test" style="filled" fillcolor=red];
}
11 -> {12};
6 -> {11};
6 -> {7} [color=red];
7 -> {8};
8 -> {9};
9 -> {10};
11 -> {15 12};
12 -> {13};
13 -> {14};
14 -> {15};
15 -> {16};
16 -> {17};
17 -> {18 22};
15 -> {7} [color=green];
15 -> {11} [color=green style=dashed];
subgraph cluster_4 {
color=red
16 [label="Enter class A" style="filled" fillcolor=red];
subgraph cluster_5 {
color=blue
18 [label="Enter property" style="filled" fillcolor=red];
19 [label="Access variable R|<local>/executor|"];
20 [label="Exit property" style="filled" fillcolor=red];
}
17 [label="Exit class A" style="filled" fillcolor=red];
}
16 -> {18} [color=green];
18 -> {19};
19 -> {20};
20 -> {21};
20 -> {17} [color=green];
subgraph cluster_6 {
color=red
21 [label="Enter function <init>" style="filled" fillcolor=red];
22 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
23 [label="Exit function <init>" style="filled" fillcolor=red];
}
21 -> {22};
22 -> {23};
23 -> {24};
subgraph cluster_7 {
color=red
24 [label="Enter function getter" style="filled" fillcolor=red];
25 [label="Exit function getter" style="filled" fillcolor=red];
}
24 -> {25};
25 -> {26};
subgraph cluster_8 {
color=red
27 [label="Enter function listOf" style="filled" fillcolor=red];
26 [label="Enter function postpone" style="filled" fillcolor=red];
subgraph cluster_9 {
color=blue
28 [label="Enter block"];
29 [label="Const: Null(null)"];
30 [label="Check not null: Null(null)!!"];
31 [label="Jump: ^listOf Null(null)!!"];
32 [label="Stub" style="filled" fillcolor=gray];
33 [label="Exit block" style="filled" fillcolor=gray];
}
34 [label="Exit function listOf" style="filled" fillcolor=red];
27 [label="Enter block"];
28 [label="Function call: R|kotlin/collections/mutableListOf|<R|() -> kotlin/Unit|>()"];
29 [label="Variable declaration: lval queue: R|kotlin/collections/MutableList<kotlin/Function0<kotlin/Unit>>|"];
30 [label="Postponed enter to lambda"];
subgraph cluster_10 {
color=blue
37 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_11 {
color=blue
38 [label="Enter block"];
39 [label="Access variable R|<local>/queue|"];
40 [label="Postponed enter to lambda"];
subgraph cluster_12 {
color=blue
45 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
subgraph cluster_13 {
color=blue
46 [label="Enter block"];
47 [label="Function call: R|<local>/computation|.R|FakeOverride<kotlin/Function0.invoke: R|T|>|()"];
48 [label="Function call: R|<local>/resolve|.R|FakeOverride<kotlin/Function1.invoke: R|kotlin/Unit|>|(...)"];
49 [label="Exit block"];
}
50 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
41 [label="Postponed exit from lambda"];
42 [label="Function call: R|<local>/queue|.R|kotlin/collections/plusAssign|<R|() -> kotlin/Unit|>(...)"];
43 [label="Exit block"];
}
44 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
31 [label="Postponed exit from lambda"];
32 [label="Function call: R|/A.A|<R|T|>(...)"];
33 [label="Jump: ^postpone R|/A.A|<R|T|>(<L> = A@fun <anonymous>(resolve: R|(T) -> kotlin/Unit|): R|kotlin/Unit| {
R|<local>/queue|.R|kotlin/collections/plusAssign|<R|() -> kotlin/Unit|>(A@fun <anonymous>(): R|kotlin/Unit| <kind=UNKNOWN> {
R|<local>/resolve|.R|FakeOverride<kotlin/Function1.invoke: R|kotlin/Unit|>|(R|<local>/computation|.R|FakeOverride<kotlin/Function0.invoke: R|T|>|())
}
)
}
)"];
34 [label="Stub" style="filled" fillcolor=gray];
35 [label="Exit block" style="filled" fillcolor=gray];
}
36 [label="Exit function postpone" style="filled" fillcolor=red];
}
26 -> {27};
27 -> {28};
28 -> {29};
29 -> {30};
30 -> {31};
31 -> {34};
31 -> {32} [style=dotted];
32 -> {33} [style=dotted];
30 -> {31 37};
31 -> {32};
32 -> {33};
33 -> {36};
33 -> {34} [style=dotted];
34 -> {35} [style=dotted];
35 -> {36} [style=dotted];
37 -> {38};
38 -> {39};
39 -> {40};
40 -> {45};
40 -> {41} [color=red];
41 -> {42};
42 -> {43};
43 -> {44};
45 -> {50 46};
46 -> {47};
47 -> {48};
48 -> {49};
49 -> {50};
50 -> {41} [color=green];
50 -> {45} [color=green style=dashed];
}