FIR CFG: remove ordering from control flow through in-place lambdas

Old graph:

  arg -> lambda enter -> ... -> lambda exit -> lambda enter -> ... ->
   -> lambda exit -> call

New graph:

  arg -+-> lambda enter -> ... -> lambda exit -+-> call
       \-> lambda enter -> ... -> lambda exit -/
This commit is contained in:
pyos
2022-11-23 10:10:16 +01:00
committed by teamcity
parent 5dce772f0b
commit c4c05f5248
41 changed files with 515 additions and 555 deletions
@@ -42,11 +42,11 @@ digraph postponedLambdaInConstructor_kt {
}
22 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
15 [label="Postponed exit from lambda"];
16 [label="Exit block"];
15 [label="Exit block"];
}
17 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
16 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
}
17 [label="Postponed exit from lambda"];
8 [label="Postponed exit from lambda"];
9 [label="Function call: R|<local>/s|.R|kotlin/let|<R|kotlin/String|, R|() -> kotlin/String|>(...)" style="filled" fillcolor=yellow];
10 [label="Delegated constructor call: super<R|A|>(...)" style="filled" fillcolor=yellow];
@@ -54,20 +54,21 @@ digraph postponedLambdaInConstructor_kt {
}
5 -> {6};
6 -> {7};
7 -> {12};
7 -> {8} [color=red];
7 -> {12 9};
7 -> {8} [style=dotted];
7 -> {12} [style=dashed];
8 -> {9};
8 -> {10} [color=red];
8 -> {9} [color=green];
9 -> {10};
10 -> {11};
12 -> {13};
13 -> {14};
14 -> {15 18};
14 -> {17 15 18};
14 -> {18} [style=dashed];
15 -> {16};
16 -> {17};
16 -> {8};
17 -> {10} [color=red];
17 -> {8} [color=green];
17 -> {9} [color=green];
18 -> {19};
19 -> {20};
20 -> {21};