[IR][K/N] Extracted explicit var spilling phase from coroutines lowering
Not only does it give some flexibility but also it could be turned off in the future (by providing trivial replacement) as a workaround #KT-65153
This commit is contained in:
@@ -25,3 +25,12 @@ internal inline suspend fun getCoroutineContext(): CoroutineContext =
|
||||
@TypedIntrinsic(IntrinsicType.RETURN_IF_SUSPENDED)
|
||||
@PublishedApi
|
||||
internal external suspend fun <T> returnIfSuspended(@Suppress("UNUSED_PARAMETER") argument: Any?): T
|
||||
|
||||
@TypedIntrinsic(IntrinsicType.SAVE_COROUTINE_STATE)
|
||||
@PublishedApi
|
||||
internal external fun saveCoroutineState()
|
||||
|
||||
@TypedIntrinsic(IntrinsicType.RESTORE_COROUTINE_STATE)
|
||||
@PublishedApi
|
||||
internal external fun restoreCoroutineState()
|
||||
|
||||
|
||||
@@ -64,6 +64,8 @@ internal class IntrinsicType {
|
||||
// Coroutines
|
||||
const val GET_CONTINUATION = "GET_CONTINUATION"
|
||||
const val RETURN_IF_SUSPENDED = "RETURN_IF_SUSPENDED"
|
||||
const val SAVE_COROUTINE_STATE = "SAVE_COROUTINE_STATE"
|
||||
const val RESTORE_COROUTINE_STATE = "RESTORE_COROUTINE_STATE"
|
||||
|
||||
// Interop
|
||||
const val INTEROP_READ_PRIMITIVE = "INTEROP_READ_PRIMITIVE"
|
||||
|
||||
Reference in New Issue
Block a user