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
@@ -75,7 +75,7 @@ fun test5(x: Any?, q: String?) {
fun test6() {
val x: String
// not necessarily initialized in second lambda (may call in any order)
run2({ x = ""; x.length }, { x.length })
run2({ x = ""; x.length }, { <!UNINITIALIZED_VARIABLE!>x<!>.length })
x.length // initialized here
}