Files
kotlin-fork/compiler/testData/codegen/bytecodeText/storeStackBeforeInline/primitiveMerge.kt
T
Mark Punzalan 8bc7370b92 ForLoopsLowering: Add PLUSEQ origin to increment to use IINC
instructions if possible.
2020-10-09 21:34:56 +02:00

23 lines
389 B
Kotlin
Vendored

inline fun <T> runAfterLoop(fn: () -> T): T {
for (i in 1..2);
return fn()
}
fun bar() : Boolean = true
fun foobar(x: Boolean, y: String, z: String) {}
inline fun foo() = runAfterLoop { "-" }
fun test() {
val result = foobar(if (1 == 1) true else bar(), foo(), "OK")
}
// 2 ASTORE
// 5 ALOAD
// 1 MAXLOCALS = 3
// 1 MAXLOCALS = 4
// 0 InlineMarker
// 14 ISTORE
// 7 ILOAD