Detect inline cycles faster
E.g. in the following code
fun x() {}
inline fun f() { x(); g() }
inline fun g() { x(); f() }
the old implementation of inline cycle detection bailed out after
generating 3 calls of x() in each function, while the new one stops
after 2. In other words, code generation for a single function is no
longer reentered.
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
// !RENDER_DIAGNOSTICS_FULL_TEXT
|
||||
|
||||
inline fun inlineFun1(crossinline p: () -> Unit) {
|
||||
object {
|
||||
fun method() { <!INLINE_CALL_CYCLE, INLINE_CALL_CYCLE!>inlineFun2(p)<!> }
|
||||
}
|
||||
}
|
||||
|
||||
inline fun inlineFun2(crossinline p: () -> Unit) {
|
||||
<!INLINE_CALL_CYCLE, INLINE_CALL_CYCLE!>inlineFun1(p)<!>
|
||||
}
|
||||
Reference in New Issue
Block a user