Files
kotlin/compiler/testData/codegen/bytecodeText/coroutines/doNotReassignContinuation.kt
Denis Zharkov ad9fe53ee2 Avoid local var entry for continuation parameter in suspend function
The primary reason is getting rid of redundant stack spilling, but also
it's not very sensible to have such entry since the parameter
is synthetic
2017-08-22 18:43:31 +03:00

18 lines
417 B
Kotlin
Vendored

// WITH_RUNTIME
// WITH_COROUTINES
import helpers.*
// TREAT_AS_ONE_FILE
import kotlin.coroutines.experimental.*
import kotlin.coroutines.experimental.intrinsics.*
suspend fun suspendHere(): String = suspendCoroutineOrReturn { x ->
x.resume("OK")
}
suspend fun suspendThere(param: Int, param2: String, param3: Long): String {
val a = suspendHere()
val b = suspendHere()
return a + b
}
// 0 ASTORE 4