diff --git a/compiler/backend-common/src/org/jetbrains/kotlin/backend/common/commonCoroutineCodegenUtil.kt b/compiler/backend-common/src/org/jetbrains/kotlin/backend/common/commonCoroutineCodegenUtil.kt index 119cbc73594..2cce6692c02 100644 --- a/compiler/backend-common/src/org/jetbrains/kotlin/backend/common/commonCoroutineCodegenUtil.kt +++ b/compiler/backend-common/src/org/jetbrains/kotlin/backend/common/commonCoroutineCodegenUtil.kt @@ -24,7 +24,7 @@ import org.jetbrains.kotlin.resolve.DescriptorUtils import org.jetbrains.kotlin.resolve.descriptorUtil.module val SUSPEND_COROUTINE_OR_RETURN_NAME = Name.identifier("suspendCoroutineOrReturn") -val SUSPENDED_MARKER_NAME = Name.identifier("SUSPENDED_MARKER") +val COROUTINE_SUSPENDED_NAME = Name.identifier("COROUTINE_SUSPENDED") val COROUTINES_INTRINSICS_PACKAGE_FQ_NAME = DescriptorUtils.COROUTINES_PACKAGE_FQ_NAME.child(Name.identifier("intrinsics")) diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/coroutines/CoroutineTransformationClassBuilder.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/coroutines/CoroutineTransformationClassBuilder.kt index e99ec1b0873..377c3d5bcf6 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/coroutines/CoroutineTransformationClassBuilder.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/coroutines/CoroutineTransformationClassBuilder.kt @@ -102,7 +102,7 @@ class CoroutineTransformerMethodVisitor( // tableswitch(this.label) insertBefore(firstToInsertBefore, insnListOf( - *withInstructionAdapter { loadSuspendMarker() }.toArray(), + *withInstructionAdapter { loadCoroutineSuspendedMarker() }.toArray(), VarInsnNode(Opcodes.ASTORE, suspendMarkerVarIndex), VarInsnNode(Opcodes.ALOAD, 0), FieldInsnNode( diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/coroutines/coroutineCodegenUtil.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/coroutines/coroutineCodegenUtil.kt index 4eada0697b3..49cd8307f05 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/coroutines/coroutineCodegenUtil.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/coroutines/coroutineCodegenUtil.kt @@ -18,7 +18,7 @@ package org.jetbrains.kotlin.codegen.coroutines import com.intellij.openapi.project.Project import org.jetbrains.kotlin.backend.common.COROUTINES_INTRINSICS_PACKAGE_FQ_NAME -import org.jetbrains.kotlin.backend.common.SUSPENDED_MARKER_NAME +import org.jetbrains.kotlin.backend.common.COROUTINE_SUSPENDED_NAME import org.jetbrains.kotlin.backend.common.isBuiltInSuspendCoroutineOrReturn import org.jetbrains.kotlin.builtins.isBuiltinFunctionalType import org.jetbrains.kotlin.codegen.StackValue @@ -285,10 +285,10 @@ fun createMethodNodeForSuspendCoroutineOrReturn( fun D.unwrapInitialDescriptorForSuspendFunction(): D = this.safeAs()?.getUserData(INITIAL_DESCRIPTOR_FOR_SUSPEND_FUNCTION) as D ?: this -fun InstructionAdapter.loadSuspendMarker() { +fun InstructionAdapter.loadCoroutineSuspendedMarker() { invokestatic( COROUTINES_INTRINSICS_FILE_FACADE_INTERNAL_NAME.internalName, - "get$SUSPENDED_MARKER_NAME", + "get$COROUTINE_SUSPENDED_NAME", Type.getMethodDescriptor(AsmTypes.OBJECT_TYPE), false ) diff --git a/compiler/testData/codegen/box/coroutines/accessorForSuspend.kt b/compiler/testData/codegen/box/coroutines/accessorForSuspend.kt index a107ef05993..80d7e79a640 100644 --- a/compiler/testData/codegen/box/coroutines/accessorForSuspend.kt +++ b/compiler/testData/codegen/box/coroutines/accessorForSuspend.kt @@ -10,7 +10,7 @@ fun builder(c: suspend () -> Unit) { class A { suspend private fun a(): String = suspendCoroutineOrReturn { x -> x.resume("OK") - SUSPENDED_MARKER + COROUTINE_SUSPENDED } suspend fun myfun(): String { diff --git a/compiler/testData/codegen/box/coroutines/asyncIterator.kt b/compiler/testData/codegen/box/coroutines/asyncIterator.kt index 9ca14d43c98..295062e2142 100644 --- a/compiler/testData/codegen/box/coroutines/asyncIterator.kt +++ b/compiler/testData/codegen/box/coroutines/asyncIterator.kt @@ -40,14 +40,14 @@ class AsyncGeneratorIterator: AsyncIterator, AsyncGenerator, Continuati computesNext = false computeContinuation = c nextStep!!.resume(Unit) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } suspend fun computeNext(): T = suspendCoroutineOrReturn { c -> computesNext = true computeContinuation = c nextStep!!.resume(Unit) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } @Suppress("UNCHECKED_CAST") @@ -98,7 +98,7 @@ class AsyncGeneratorIterator: AsyncIterator, AsyncGenerator, Continuati nextValue = value nextStep = c resumeIterator(null) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/asyncIteratorToList.kt b/compiler/testData/codegen/box/coroutines/asyncIteratorToList.kt index e4d6a3a6d8b..5b08a0d107b 100644 --- a/compiler/testData/codegen/box/coroutines/asyncIteratorToList.kt +++ b/compiler/testData/codegen/box/coroutines/asyncIteratorToList.kt @@ -40,14 +40,14 @@ class AsyncGeneratorIterator: AsyncIterator, AsyncGenerator, Continuati computesNext = false computeContinuation = c nextStep!!.resume(Unit) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } suspend fun computeNext(): T = suspendCoroutineOrReturn { c -> computesNext = true computeContinuation = c nextStep!!.resume(Unit) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } @Suppress("UNCHECKED_CAST") @@ -98,7 +98,7 @@ class AsyncGeneratorIterator: AsyncIterator, AsyncGenerator, Continuati nextValue = value nextStep = c resumeIterator(null) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/coercionToUnit.kt b/compiler/testData/codegen/box/coroutines/coercionToUnit.kt index dd29dbddd9c..b748de8601d 100644 --- a/compiler/testData/codegen/box/coroutines/coercionToUnit.kt +++ b/compiler/testData/codegen/box/coroutines/coercionToUnit.kt @@ -6,7 +6,7 @@ import kotlin.coroutines.experimental.intrinsics.* suspend fun await(t: T): T = suspendCoroutineOrReturn { c -> c.resume(t) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } fun builder(c: suspend () -> Unit): String { diff --git a/compiler/testData/codegen/box/coroutines/controlFlow/breakFinally.kt b/compiler/testData/codegen/box/coroutines/controlFlow/breakFinally.kt index baaedfb4495..c9d6469c61a 100644 --- a/compiler/testData/codegen/box/coroutines/controlFlow/breakFinally.kt +++ b/compiler/testData/codegen/box/coroutines/controlFlow/breakFinally.kt @@ -9,7 +9,7 @@ class Controller { suspend fun suspendWithResult(value: T): T = suspendCoroutineOrReturn { c -> c.resume(value) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/controlFlow/breakStatement.kt b/compiler/testData/codegen/box/coroutines/controlFlow/breakStatement.kt index 30fc75b1f84..d05c3b50e4b 100644 --- a/compiler/testData/codegen/box/coroutines/controlFlow/breakStatement.kt +++ b/compiler/testData/codegen/box/coroutines/controlFlow/breakStatement.kt @@ -9,7 +9,7 @@ class Controller { suspend fun suspendWithResult(value: T): T = suspendCoroutineOrReturn { c -> c.resume(value) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/controlFlow/doWhileStatement.kt b/compiler/testData/codegen/box/coroutines/controlFlow/doWhileStatement.kt index 27241802b66..c6daeb7a1a0 100644 --- a/compiler/testData/codegen/box/coroutines/controlFlow/doWhileStatement.kt +++ b/compiler/testData/codegen/box/coroutines/controlFlow/doWhileStatement.kt @@ -9,7 +9,7 @@ class Controller { suspend fun suspendWithResult(value: T): T = suspendCoroutineOrReturn { c -> c.resume(value) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/controlFlow/forContinue.kt b/compiler/testData/codegen/box/coroutines/controlFlow/forContinue.kt index f591e57adad..e07ea2612eb 100644 --- a/compiler/testData/codegen/box/coroutines/controlFlow/forContinue.kt +++ b/compiler/testData/codegen/box/coroutines/controlFlow/forContinue.kt @@ -9,7 +9,7 @@ class Controller { suspend fun suspendWithResult(value: T): T = suspendCoroutineOrReturn { c -> c.resume(value) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/controlFlow/forStatement.kt b/compiler/testData/codegen/box/coroutines/controlFlow/forStatement.kt index c9a17303b68..1361c86f414 100644 --- a/compiler/testData/codegen/box/coroutines/controlFlow/forStatement.kt +++ b/compiler/testData/codegen/box/coroutines/controlFlow/forStatement.kt @@ -9,7 +9,7 @@ class Controller { suspend fun suspendWithResult(value: T): T = suspendCoroutineOrReturn { c -> c.resume(value) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/controlFlow/ifStatement.kt b/compiler/testData/codegen/box/coroutines/controlFlow/ifStatement.kt index 71f81cf688b..d3e0891127b 100644 --- a/compiler/testData/codegen/box/coroutines/controlFlow/ifStatement.kt +++ b/compiler/testData/codegen/box/coroutines/controlFlow/ifStatement.kt @@ -9,7 +9,7 @@ class Controller { suspend fun suspendWithResult(value: T): T = suspendCoroutineOrReturn { c -> c.resume(value) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/controlFlow/returnFromFinally.kt b/compiler/testData/codegen/box/coroutines/controlFlow/returnFromFinally.kt index 0c0405de98b..01f19d05911 100644 --- a/compiler/testData/codegen/box/coroutines/controlFlow/returnFromFinally.kt +++ b/compiler/testData/codegen/box/coroutines/controlFlow/returnFromFinally.kt @@ -9,7 +9,7 @@ class Controller { suspend fun suspendAndLog(value: T): T = suspendCoroutineOrReturn { c -> result += "suspend($value);" c.resume(value) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/controlFlow/switchLikeWhen.kt b/compiler/testData/codegen/box/coroutines/controlFlow/switchLikeWhen.kt index 2f93c497082..47cb022c353 100644 --- a/compiler/testData/codegen/box/coroutines/controlFlow/switchLikeWhen.kt +++ b/compiler/testData/codegen/box/coroutines/controlFlow/switchLikeWhen.kt @@ -10,7 +10,7 @@ class Controller { suspend fun suspendWithResult(value: T): T = suspendCoroutineOrReturn { c -> result += "[" c.resume(value) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/controlFlow/throwFromCatch.kt b/compiler/testData/codegen/box/coroutines/controlFlow/throwFromCatch.kt index 9420d1b91d5..52d91402cb6 100644 --- a/compiler/testData/codegen/box/coroutines/controlFlow/throwFromCatch.kt +++ b/compiler/testData/codegen/box/coroutines/controlFlow/throwFromCatch.kt @@ -10,14 +10,14 @@ class Controller { suspend fun suspendAndLog(value: T): T = suspendCoroutineOrReturn { c -> result += "suspend($value);" c.resume(value) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } // Tail calls are not allowed to be Nothing typed. See KT-15051 suspend fun suspendLogAndThrow(exception: Throwable): Any? = suspendCoroutineOrReturn { c -> result += "throw(${exception.message});" c.resumeWithException(exception) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/controlFlow/throwInTryWithHandleResult.kt b/compiler/testData/codegen/box/coroutines/controlFlow/throwInTryWithHandleResult.kt index 59a42166e02..a1e9267f5fb 100644 --- a/compiler/testData/codegen/box/coroutines/controlFlow/throwInTryWithHandleResult.kt +++ b/compiler/testData/codegen/box/coroutines/controlFlow/throwInTryWithHandleResult.kt @@ -10,7 +10,7 @@ class Controller { suspend fun suspendAndLog(value: T): T = suspendCoroutineOrReturn { c -> result += "suspend($value);" c.resume(value) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/controlFlow/whileStatement.kt b/compiler/testData/codegen/box/coroutines/controlFlow/whileStatement.kt index f0c268d0af4..2f3c622e3d0 100644 --- a/compiler/testData/codegen/box/coroutines/controlFlow/whileStatement.kt +++ b/compiler/testData/codegen/box/coroutines/controlFlow/whileStatement.kt @@ -9,7 +9,7 @@ class Controller { suspend fun suspendWithResult(value: T): T = suspendCoroutineOrReturn { c -> c.resume(value) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/controllerAccessFromInnerLambda.kt b/compiler/testData/codegen/box/coroutines/controllerAccessFromInnerLambda.kt index ece0ff26921..e1f965aac16 100644 --- a/compiler/testData/codegen/box/coroutines/controllerAccessFromInnerLambda.kt +++ b/compiler/testData/codegen/box/coroutines/controllerAccessFromInnerLambda.kt @@ -7,7 +7,7 @@ class Controller { var result = false suspend fun suspendHere(): String = suspendCoroutineOrReturn { x -> x.resume("OK") - SUSPENDED_MARKER + COROUTINE_SUSPENDED } fun foo() { diff --git a/compiler/testData/codegen/box/coroutines/createCoroutinesOnManualInstances.kt b/compiler/testData/codegen/box/coroutines/createCoroutinesOnManualInstances.kt index e2fbbfd75b1..1834496d4ad 100644 --- a/compiler/testData/codegen/box/coroutines/createCoroutinesOnManualInstances.kt +++ b/compiler/testData/codegen/box/coroutines/createCoroutinesOnManualInstances.kt @@ -1,7 +1,7 @@ // WITH_RUNTIME // IGNORE_BACKEND: JS import kotlin.coroutines.experimental.* -import kotlin.coroutines.experimental.intrinsics.SUSPENDED_MARKER +import kotlin.coroutines.experimental.intrinsics.COROUTINE_SUSPENDED fun runCustomLambdaAsCoroutine(e: Throwable? = null, x: (Continuation) -> Any?): String { var result = "fail" @@ -69,7 +69,7 @@ fun runCustomLambdaAsCoroutine(e: Throwable? = null, x: (Continuation) - fun box(): String { val x = runCustomLambdaAsCoroutine { it.resume("OK") - SUSPENDED_MARKER + COROUTINE_SUSPENDED } if (x != "OK") return "fail 1: $x" diff --git a/compiler/testData/codegen/box/coroutines/defaultParametersInSuspend.kt b/compiler/testData/codegen/box/coroutines/defaultParametersInSuspend.kt index fc56d18ca21..9bf39a8e1e3 100644 --- a/compiler/testData/codegen/box/coroutines/defaultParametersInSuspend.kt +++ b/compiler/testData/codegen/box/coroutines/defaultParametersInSuspend.kt @@ -6,7 +6,7 @@ import kotlin.coroutines.experimental.intrinsics.* class Controller { suspend fun suspendHere(a: String = "abc", i: Int = 2): String = suspendCoroutineOrReturn { x -> x.resume(a + "#" + (i + 1)) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/dispatchResume.kt b/compiler/testData/codegen/box/coroutines/dispatchResume.kt index b3488d3f28f..eba202028aa 100644 --- a/compiler/testData/codegen/box/coroutines/dispatchResume.kt +++ b/compiler/testData/codegen/box/coroutines/dispatchResume.kt @@ -10,13 +10,13 @@ class Controller { suspend fun suspendWithValue(value: T): T = suspendCoroutineOrReturn { continuation -> log += "suspend($value);" continuation.resume(value) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } suspend fun suspendWithException(value: String): Unit = suspendCoroutineOrReturn { continuation -> log += "error($value);" continuation.resumeWithException(RuntimeException(value)) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/emptyClosure.kt b/compiler/testData/codegen/box/coroutines/emptyClosure.kt index 540a0a25217..984f5d9887e 100644 --- a/compiler/testData/codegen/box/coroutines/emptyClosure.kt +++ b/compiler/testData/codegen/box/coroutines/emptyClosure.kt @@ -9,7 +9,7 @@ class Controller { suspend fun suspendHere(): String = suspendCoroutineOrReturn { x -> result++ x.resume("OK") - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/falseUnitCoercion.kt b/compiler/testData/codegen/box/coroutines/falseUnitCoercion.kt index 022e74b80fd..5a0a32f9663 100644 --- a/compiler/testData/codegen/box/coroutines/falseUnitCoercion.kt +++ b/compiler/testData/codegen/box/coroutines/falseUnitCoercion.kt @@ -6,7 +6,7 @@ import kotlin.coroutines.experimental.intrinsics.* class Controller { suspend fun suspendHere(v: T): T = suspendCoroutineOrReturn { x -> x.resume(v) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/generate.kt b/compiler/testData/codegen/box/coroutines/generate.kt index b326b232ace..3a5526d17cc 100644 --- a/compiler/testData/codegen/box/coroutines/generate.kt +++ b/compiler/testData/codegen/box/coroutines/generate.kt @@ -57,6 +57,6 @@ class GeneratedIterator(block: suspend Generator.() -> Unit) : AbstractIte setNext(value) nextStep = c - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/handleException.kt b/compiler/testData/codegen/box/coroutines/handleException.kt index 7ef67a04bfd..83f07670ff5 100644 --- a/compiler/testData/codegen/box/coroutines/handleException.kt +++ b/compiler/testData/codegen/box/coroutines/handleException.kt @@ -12,7 +12,7 @@ class Controller { x.resume(v) } - SUSPENDED_MARKER + COROUTINE_SUSPENDED } suspend fun suspendWithException(e: Exception): String = suspendCoroutineOrReturn { x -> @@ -20,7 +20,7 @@ class Controller { x.resumeWithException(e) } - SUSPENDED_MARKER + COROUTINE_SUSPENDED } fun run(c: suspend Controller.() -> Unit) { diff --git a/compiler/testData/codegen/box/coroutines/handleResultNonUnitExpression.kt b/compiler/testData/codegen/box/coroutines/handleResultNonUnitExpression.kt index bae4da5fab2..e39f079a618 100644 --- a/compiler/testData/codegen/box/coroutines/handleResultNonUnitExpression.kt +++ b/compiler/testData/codegen/box/coroutines/handleResultNonUnitExpression.kt @@ -6,7 +6,7 @@ import kotlin.coroutines.experimental.intrinsics.* suspend fun suspendHere(): String = suspendCoroutineOrReturn { x -> x.resume("OK") - SUSPENDED_MARKER + COROUTINE_SUSPENDED } fun builder(c: suspend () -> Unit) { diff --git a/compiler/testData/codegen/box/coroutines/handleResultSuspended.kt b/compiler/testData/codegen/box/coroutines/handleResultSuspended.kt index 4a011ed2261..d7ffca75fcb 100644 --- a/compiler/testData/codegen/box/coroutines/handleResultSuspended.kt +++ b/compiler/testData/codegen/box/coroutines/handleResultSuspended.kt @@ -9,7 +9,7 @@ class Controller { suspend fun suspendAndLog(value: T): T = suspendCoroutineOrReturn { x -> log += "suspend($value);" x.resume(value) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/illegalState.kt b/compiler/testData/codegen/box/coroutines/illegalState.kt index 11d1cf7170c..6e550df64df 100644 --- a/compiler/testData/codegen/box/coroutines/illegalState.kt +++ b/compiler/testData/codegen/box/coroutines/illegalState.kt @@ -6,7 +6,7 @@ import kotlin.coroutines.experimental.intrinsics.* suspend fun suspendHere(): Unit = suspendCoroutineOrReturn { x -> x.resume(Unit) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } fun builder1(c: suspend () -> Unit) { diff --git a/compiler/testData/codegen/box/coroutines/inlineSuspendFunction.kt b/compiler/testData/codegen/box/coroutines/inlineSuspendFunction.kt index 2ad35e90f0c..5c984c4b9f0 100644 --- a/compiler/testData/codegen/box/coroutines/inlineSuspendFunction.kt +++ b/compiler/testData/codegen/box/coroutines/inlineSuspendFunction.kt @@ -14,7 +14,7 @@ class Controller { suspend inline fun suspendInline(v: String): String = suspendCoroutineOrReturn { x -> withValue(v, x) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } suspend inline fun suspendInline(crossinline b: () -> String): String = suspendInline(b()) diff --git a/compiler/testData/codegen/box/coroutines/inlinedTryCatchFinally.kt b/compiler/testData/codegen/box/coroutines/inlinedTryCatchFinally.kt index 71a4ff6a5da..5aa0d35642f 100644 --- a/compiler/testData/codegen/box/coroutines/inlinedTryCatchFinally.kt +++ b/compiler/testData/codegen/box/coroutines/inlinedTryCatchFinally.kt @@ -13,7 +13,7 @@ class Controller { x.resume(v) } - SUSPENDED_MARKER + COROUTINE_SUSPENDED } suspend fun suspendWithException(e: Exception): String = suspendCoroutineOrReturn { x -> @@ -21,7 +21,7 @@ class Controller { x.resumeWithException(e) } - SUSPENDED_MARKER + COROUTINE_SUSPENDED } fun run(c: suspend Controller.() -> String) { diff --git a/compiler/testData/codegen/box/coroutines/innerSuspensionCalls.kt b/compiler/testData/codegen/box/coroutines/innerSuspensionCalls.kt index b5eadb4c952..893313e1ebd 100644 --- a/compiler/testData/codegen/box/coroutines/innerSuspensionCalls.kt +++ b/compiler/testData/codegen/box/coroutines/innerSuspensionCalls.kt @@ -7,7 +7,7 @@ class Controller { var i = 0 suspend fun suspendHere(): String = suspendCoroutineOrReturn { x -> x.resume((i++).toString()) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/instanceOfContinuation.kt b/compiler/testData/codegen/box/coroutines/instanceOfContinuation.kt index b7468dc713f..e9bd8981087 100644 --- a/compiler/testData/codegen/box/coroutines/instanceOfContinuation.kt +++ b/compiler/testData/codegen/box/coroutines/instanceOfContinuation.kt @@ -8,13 +8,13 @@ class Controller { suspend fun runInstanceOf(): Boolean = suspendCoroutineOrReturn { x -> val y: Any = x x.resume(x is Continuation<*>) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } suspend fun runCast(): Boolean = suspendCoroutineOrReturn { x -> val y: Any = x x.resume(Continuation::class.isInstance(y as Continuation<*>)) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/complicatedMerge.kt b/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/complicatedMerge.kt index 5142e7804ed..b76a6afee15 100644 --- a/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/complicatedMerge.kt +++ b/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/complicatedMerge.kt @@ -6,7 +6,7 @@ import kotlin.coroutines.experimental.intrinsics.* class Controller { suspend fun suspendHere(): Unit = suspendCoroutineOrReturn { x -> x.resume(Unit) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/i2bResult.kt b/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/i2bResult.kt index c6aa585c8d5..b07c0563b2f 100644 --- a/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/i2bResult.kt +++ b/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/i2bResult.kt @@ -6,7 +6,7 @@ import kotlin.coroutines.experimental.intrinsics.* class Controller { suspend fun suspendHere(): Unit = suspendCoroutineOrReturn { x -> x.resume(Unit) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/loadFromBooleanArray.kt b/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/loadFromBooleanArray.kt index e264f22f2dc..8e4184b4f4f 100644 --- a/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/loadFromBooleanArray.kt +++ b/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/loadFromBooleanArray.kt @@ -6,7 +6,7 @@ import kotlin.coroutines.experimental.intrinsics.* class Controller { suspend fun suspendHere(): Unit = suspendCoroutineOrReturn { x -> x.resume(Unit) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/loadFromByteArray.kt b/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/loadFromByteArray.kt index 1efc473ea59..d80336da7a9 100644 --- a/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/loadFromByteArray.kt +++ b/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/loadFromByteArray.kt @@ -6,7 +6,7 @@ import kotlin.coroutines.experimental.intrinsics.* class Controller { suspend fun suspendHere(): Unit = suspendCoroutineOrReturn { x -> x.resume(Unit) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/noVariableInTable.kt b/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/noVariableInTable.kt index 361ca74875d..64cf6f7ba66 100644 --- a/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/noVariableInTable.kt +++ b/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/noVariableInTable.kt @@ -6,7 +6,7 @@ import kotlin.coroutines.experimental.intrinsics.* class Controller { suspend fun suspendHere(): Unit = suspendCoroutineOrReturn { x -> x.resume(Unit) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/sameIconst1ManyVars.kt b/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/sameIconst1ManyVars.kt index 62d7f065422..66c41f7f17d 100644 --- a/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/sameIconst1ManyVars.kt +++ b/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/sameIconst1ManyVars.kt @@ -6,7 +6,7 @@ import kotlin.coroutines.experimental.intrinsics.* class Controller { suspend fun suspendHere(): Unit = suspendCoroutineOrReturn { x -> x.resume(Unit) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInArrayStore.kt b/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInArrayStore.kt index 2e16ba91215..607e62bf21d 100644 --- a/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInArrayStore.kt +++ b/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInArrayStore.kt @@ -7,7 +7,7 @@ import kotlin.coroutines.experimental.intrinsics.* class Controller { suspend fun suspendHere(): Unit = suspendCoroutineOrReturn { x -> x.resume(Unit) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInMethodCall.kt b/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInMethodCall.kt index 03f3714ed62..754f98a689e 100644 --- a/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInMethodCall.kt +++ b/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInMethodCall.kt @@ -6,7 +6,7 @@ import kotlin.coroutines.experimental.intrinsics.* class Controller { suspend fun suspendHere(): Unit = suspendCoroutineOrReturn { x -> x.resume(Unit) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInPutfield.kt b/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInPutfield.kt index 76e22fe2ef0..07f12615884 100644 --- a/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInPutfield.kt +++ b/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInPutfield.kt @@ -7,7 +7,7 @@ import kotlin.coroutines.experimental.intrinsics.* class Controller { suspend fun suspendHere(): Unit = suspendCoroutineOrReturn { x -> x.resume(Unit) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInVarStore.kt b/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInVarStore.kt index 7b95bd6370f..4a86e948b31 100644 --- a/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInVarStore.kt +++ b/compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInVarStore.kt @@ -6,7 +6,7 @@ import kotlin.coroutines.experimental.intrinsics.* class Controller { suspend fun suspendHere(): Unit = suspendCoroutineOrReturn { x -> x.resume(Unit) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/iterateOverArray.kt b/compiler/testData/codegen/box/coroutines/iterateOverArray.kt index 87e12b602f7..a04c9b6cdf7 100644 --- a/compiler/testData/codegen/box/coroutines/iterateOverArray.kt +++ b/compiler/testData/codegen/box/coroutines/iterateOverArray.kt @@ -6,7 +6,7 @@ import kotlin.coroutines.experimental.intrinsics.* class Controller { suspend fun suspendHere(): String = suspendCoroutineOrReturn { x -> x.resume("OK") - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/kt12958.kt b/compiler/testData/codegen/box/coroutines/kt12958.kt index c39baa283a1..f8d4ecddc51 100644 --- a/compiler/testData/codegen/box/coroutines/kt12958.kt +++ b/compiler/testData/codegen/box/coroutines/kt12958.kt @@ -6,7 +6,7 @@ import kotlin.coroutines.experimental.intrinsics.* suspend fun suspendHere(v: V): V = suspendCoroutineOrReturn { x -> x.resume(v) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } fun builder(c: suspend () -> String): String { diff --git a/compiler/testData/codegen/box/coroutines/kt15016.kt b/compiler/testData/codegen/box/coroutines/kt15016.kt index f439dfa8379..d64875ab1e8 100644 --- a/compiler/testData/codegen/box/coroutines/kt15016.kt +++ b/compiler/testData/codegen/box/coroutines/kt15016.kt @@ -1,7 +1,7 @@ // WITH_RUNTIME // WITH_COROUTINES -import kotlin.coroutines.experimental.intrinsics.SUSPENDED_MARKER +import kotlin.coroutines.experimental.intrinsics.COROUTINE_SUSPENDED import kotlin.coroutines.experimental.intrinsics.suspendCoroutineOrReturn import kotlin.coroutines.experimental.startCoroutine @@ -24,7 +24,7 @@ class Foo(val value: Any) { suspend fun suspendHere(): String = suspendCoroutineOrReturn { x -> x.resume("OK") - SUSPENDED_MARKER + COROUTINE_SUSPENDED } fun builder(c: suspend () -> Unit) { diff --git a/compiler/testData/codegen/box/coroutines/lastExpressionIsLoop.kt b/compiler/testData/codegen/box/coroutines/lastExpressionIsLoop.kt index 7ee684372e9..c66a58230a1 100644 --- a/compiler/testData/codegen/box/coroutines/lastExpressionIsLoop.kt +++ b/compiler/testData/codegen/box/coroutines/lastExpressionIsLoop.kt @@ -9,7 +9,7 @@ class Controller { suspend fun suspendHere(v: String): Unit = suspendCoroutineOrReturn { x -> result += v x.resume(Unit) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/lastStatementInc.kt b/compiler/testData/codegen/box/coroutines/lastStatementInc.kt index a276f517bd3..61e2c26e3e1 100644 --- a/compiler/testData/codegen/box/coroutines/lastStatementInc.kt +++ b/compiler/testData/codegen/box/coroutines/lastStatementInc.kt @@ -5,7 +5,7 @@ import kotlin.coroutines.experimental.intrinsics.* suspend fun suspendHere(): String = suspendCoroutineOrReturn { x -> x.resume("OK") - SUSPENDED_MARKER + COROUTINE_SUSPENDED } fun builder(c: suspend () -> Unit) { diff --git a/compiler/testData/codegen/box/coroutines/lastStementAssignment.kt b/compiler/testData/codegen/box/coroutines/lastStementAssignment.kt index b2d8397cdbe..6e718c6c5bf 100644 --- a/compiler/testData/codegen/box/coroutines/lastStementAssignment.kt +++ b/compiler/testData/codegen/box/coroutines/lastStementAssignment.kt @@ -5,7 +5,7 @@ import kotlin.coroutines.experimental.intrinsics.* suspend fun suspendHere(): String = suspendCoroutineOrReturn { x -> x.resume("OK") - SUSPENDED_MARKER + COROUTINE_SUSPENDED } fun builder(c: suspend () -> Unit) { diff --git a/compiler/testData/codegen/box/coroutines/lastUnitExpression.kt b/compiler/testData/codegen/box/coroutines/lastUnitExpression.kt index 36e9c750b2a..b0cd8f5e999 100644 --- a/compiler/testData/codegen/box/coroutines/lastUnitExpression.kt +++ b/compiler/testData/codegen/box/coroutines/lastUnitExpression.kt @@ -9,7 +9,7 @@ class Controller { suspend fun suspendHere(v: String): Unit = suspendCoroutineOrReturn { x -> this.v = v x.resume(Unit) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/localDelegate.kt b/compiler/testData/codegen/box/coroutines/localDelegate.kt index 5dcd1c6853b..1958e47b65b 100644 --- a/compiler/testData/codegen/box/coroutines/localDelegate.kt +++ b/compiler/testData/codegen/box/coroutines/localDelegate.kt @@ -1,7 +1,7 @@ // WITH_RUNTIME // WITH_COROUTINES import kotlin.coroutines.experimental.* -import kotlin.coroutines.experimental.intrinsics.SUSPENDED_MARKER +import kotlin.coroutines.experimental.intrinsics.COROUTINE_SUSPENDED import kotlin.coroutines.experimental.intrinsics.suspendCoroutineOrReturn class OkDelegate { @@ -10,7 +10,7 @@ class OkDelegate { suspend fun suspendWithValue(value: T): T = suspendCoroutineOrReturn { c -> c.resume(value) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } fun launch(c: suspend () -> String): String { diff --git a/compiler/testData/codegen/box/coroutines/multiModule/simple.kt b/compiler/testData/codegen/box/coroutines/multiModule/simple.kt index f5df43d1557..905ef1eca6b 100644 --- a/compiler/testData/codegen/box/coroutines/multiModule/simple.kt +++ b/compiler/testData/codegen/box/coroutines/multiModule/simple.kt @@ -10,7 +10,7 @@ import kotlin.coroutines.experimental.intrinsics.* class Controller { suspend fun suspendHere(): String = suspendCoroutineOrReturn { x -> x.resume("OK") - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/multipleInvokeCalls.kt b/compiler/testData/codegen/box/coroutines/multipleInvokeCalls.kt index f38b8ef799a..0d2c85f9269 100644 --- a/compiler/testData/codegen/box/coroutines/multipleInvokeCalls.kt +++ b/compiler/testData/codegen/box/coroutines/multipleInvokeCalls.kt @@ -8,7 +8,7 @@ class Controller { var result = "fail" suspend fun suspendHere(): String = suspendCoroutineOrReturn { x -> lastSuspension = x - SUSPENDED_MARKER + COROUTINE_SUSPENDED } fun hasNext() = lastSuspension != null diff --git a/compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda1.kt b/compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda1.kt index 508b8dd795e..2d4fef59734 100644 --- a/compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda1.kt +++ b/compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda1.kt @@ -8,7 +8,7 @@ class Controller { var result = "fail" suspend fun suspendHere(): String = suspendCoroutineOrReturn { x -> lastSuspension = x - SUSPENDED_MARKER + COROUTINE_SUSPENDED } fun hasNext() = lastSuspension != null diff --git a/compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda2.kt b/compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda2.kt index 5609cd6a6e7..9e332c6a522 100644 --- a/compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda2.kt +++ b/compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda2.kt @@ -8,7 +8,7 @@ class Controller { var result = "fail" suspend fun suspendHere(): String = suspendCoroutineOrReturn { x -> lastSuspension = x - SUSPENDED_MARKER + COROUTINE_SUSPENDED } fun hasNext() = lastSuspension != null diff --git a/compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda3.kt b/compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda3.kt index 317472e1900..3ae8ff00b88 100644 --- a/compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda3.kt +++ b/compiler/testData/codegen/box/coroutines/multipleInvokeCallsInsideInlineLambda3.kt @@ -8,7 +8,7 @@ class Controller { var result = "fail" suspend fun suspendHere(): String = suspendCoroutineOrReturn { x -> lastSuspension = x - SUSPENDED_MARKER + COROUTINE_SUSPENDED } fun hasNext() = lastSuspension != null diff --git a/compiler/testData/codegen/box/coroutines/nestedTryCatch.kt b/compiler/testData/codegen/box/coroutines/nestedTryCatch.kt index 4d5aafca00e..42f2b2fcb9a 100644 --- a/compiler/testData/codegen/box/coroutines/nestedTryCatch.kt +++ b/compiler/testData/codegen/box/coroutines/nestedTryCatch.kt @@ -13,7 +13,7 @@ class Controller { x.resume(v) } - SUSPENDED_MARKER + COROUTINE_SUSPENDED } suspend fun suspendWithException(e: Exception): String = suspendCoroutineOrReturn { x -> @@ -21,7 +21,7 @@ class Controller { x.resumeWithException(e) } - SUSPENDED_MARKER + COROUTINE_SUSPENDED } fun run(c: suspend Controller.() -> String) { diff --git a/compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambda.kt b/compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambda.kt index 8c3a95ebefc..dcc2aa2ea4f 100644 --- a/compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambda.kt +++ b/compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambda.kt @@ -7,7 +7,7 @@ class Controller { var cResult = 0 suspend fun suspendHere(v: Int): Int = suspendCoroutineOrReturn { x -> x.resume(v * 2) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambdaDeep.kt b/compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambdaDeep.kt index 1bcd41e8b98..0b96c70729e 100644 --- a/compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambdaDeep.kt +++ b/compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambdaDeep.kt @@ -8,7 +8,7 @@ class Controller { var cResult = 0 suspend fun suspendHere(v: Int): Int = suspendCoroutineOrReturn { x -> x.resume(v * 2) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/returnByLabel.kt b/compiler/testData/codegen/box/coroutines/returnByLabel.kt index 20cd1317d84..5e95df2c18a 100644 --- a/compiler/testData/codegen/box/coroutines/returnByLabel.kt +++ b/compiler/testData/codegen/box/coroutines/returnByLabel.kt @@ -5,7 +5,7 @@ import kotlin.coroutines.experimental.intrinsics.* suspend fun suspendHere(): String = suspendCoroutineOrReturn { x -> x.resume("OK") - SUSPENDED_MARKER + COROUTINE_SUSPENDED } fun builder(c: suspend () -> Int): Int { diff --git a/compiler/testData/codegen/box/coroutines/simple.kt b/compiler/testData/codegen/box/coroutines/simple.kt index a17cf75dd47..3949a59fc55 100644 --- a/compiler/testData/codegen/box/coroutines/simple.kt +++ b/compiler/testData/codegen/box/coroutines/simple.kt @@ -5,7 +5,7 @@ import kotlin.coroutines.experimental.intrinsics.* suspend fun suspendHere(): String = suspendCoroutineOrReturn { x -> x.resume("OK") - SUSPENDED_MARKER + COROUTINE_SUSPENDED } fun builder(c: suspend () -> Unit) { diff --git a/compiler/testData/codegen/box/coroutines/simpleException.kt b/compiler/testData/codegen/box/coroutines/simpleException.kt index 07e48d7fd1b..161997d1900 100644 --- a/compiler/testData/codegen/box/coroutines/simpleException.kt +++ b/compiler/testData/codegen/box/coroutines/simpleException.kt @@ -6,7 +6,7 @@ import kotlin.coroutines.experimental.intrinsics.* class Controller { suspend fun suspendHere(): String = suspendCoroutineOrReturn { x -> x.resumeWithException(RuntimeException("OK")) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/simpleWithHandleResult.kt b/compiler/testData/codegen/box/coroutines/simpleWithHandleResult.kt index dc69ccc7802..c1ff5344a56 100644 --- a/compiler/testData/codegen/box/coroutines/simpleWithHandleResult.kt +++ b/compiler/testData/codegen/box/coroutines/simpleWithHandleResult.kt @@ -5,7 +5,7 @@ import kotlin.coroutines.experimental.intrinsics.* suspend fun suspendHere(): String = suspendCoroutineOrReturn { x -> x.resume("OK") - SUSPENDED_MARKER + COROUTINE_SUSPENDED } fun builder(c: suspend () -> Int): Int { diff --git a/compiler/testData/codegen/box/coroutines/statementLikeLastExpression.kt b/compiler/testData/codegen/box/coroutines/statementLikeLastExpression.kt index 2620ac69ecc..e0c534dcd9f 100644 --- a/compiler/testData/codegen/box/coroutines/statementLikeLastExpression.kt +++ b/compiler/testData/codegen/box/coroutines/statementLikeLastExpression.kt @@ -6,7 +6,7 @@ import kotlin.coroutines.experimental.intrinsics.* var globalResult = "" suspend fun suspendWithValue(v: String): String = suspendCoroutineOrReturn { x -> x.resume(v) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } fun builder(c: suspend () -> String) { diff --git a/compiler/testData/codegen/box/coroutines/suspendDefaultImpl.kt b/compiler/testData/codegen/box/coroutines/suspendDefaultImpl.kt index c366c340ee8..535f646fe2d 100644 --- a/compiler/testData/codegen/box/coroutines/suspendDefaultImpl.kt +++ b/compiler/testData/codegen/box/coroutines/suspendDefaultImpl.kt @@ -6,7 +6,7 @@ import kotlin.coroutines.experimental.intrinsics.* interface TestInterface { suspend fun toInt(): Int = suspendCoroutineOrReturn { x -> x.resume(56) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/suspendDelegation.kt b/compiler/testData/codegen/box/coroutines/suspendDelegation.kt index 236ecbb2d1d..423bdabc38d 100644 --- a/compiler/testData/codegen/box/coroutines/suspendDelegation.kt +++ b/compiler/testData/codegen/box/coroutines/suspendDelegation.kt @@ -8,7 +8,7 @@ class Controller { suspend fun suspendThere(): String = suspendCoroutineOrReturn { x -> x.resume("OK") - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/suspendFromInlineLambda.kt b/compiler/testData/codegen/box/coroutines/suspendFromInlineLambda.kt index e55d80e1258..c018dba5681 100644 --- a/compiler/testData/codegen/box/coroutines/suspendFromInlineLambda.kt +++ b/compiler/testData/codegen/box/coroutines/suspendFromInlineLambda.kt @@ -6,7 +6,7 @@ import kotlin.coroutines.experimental.intrinsics.* class Controller { suspend fun suspendHere(v: Int): Int = suspendCoroutineOrReturn { x -> x.resume(v * 2) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/suspendFunImportedFromObject.kt b/compiler/testData/codegen/box/coroutines/suspendFunImportedFromObject.kt index 73612613011..cc8ed7b6667 100644 --- a/compiler/testData/codegen/box/coroutines/suspendFunImportedFromObject.kt +++ b/compiler/testData/codegen/box/coroutines/suspendFunImportedFromObject.kt @@ -9,7 +9,7 @@ import kotlin.coroutines.experimental.intrinsics.* object Host { suspend fun suspendHere(): String = suspendCoroutineOrReturn { x -> x.resume("OK") - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/dispatchResume.kt b/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/dispatchResume.kt index 9e6f4019b88..01f592ea974 100644 --- a/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/dispatchResume.kt +++ b/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/dispatchResume.kt @@ -11,13 +11,13 @@ class Controller { suspend fun suspendWithValue(value: T): T = suspendCoroutineOrReturn { continuation -> log += "suspend($value);" continuation.resume(value) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } suspend fun suspendWithException(value: String): Unit = suspendCoroutineOrReturn { continuation -> log += "error($value);" continuation.resumeWithException(RuntimeException(value)) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/handleException.kt b/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/handleException.kt index 3bb1200a4f8..ccc3838bcd7 100644 --- a/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/handleException.kt +++ b/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/handleException.kt @@ -12,7 +12,7 @@ class Controller { x.resume(v) } - SUSPENDED_MARKER + COROUTINE_SUSPENDED } suspend fun suspendWithException(e: Exception): String = suspendCoroutineOrReturn { x -> @@ -20,7 +20,7 @@ class Controller { x.resumeWithException(e) } - SUSPENDED_MARKER + COROUTINE_SUSPENDED } fun run(c: suspend Controller.() -> Unit) { @@ -50,7 +50,7 @@ fun commonThrow(t: Throwable) { suspend fun justContinue(): Unit = suspendCoroutineOrReturn { x -> x.resume(Unit) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } suspend fun Controller.test1() { diff --git a/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/inline.kt b/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/inline.kt index 75295e6481d..484da635199 100644 --- a/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/inline.kt +++ b/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/inline.kt @@ -5,7 +5,7 @@ import kotlin.coroutines.experimental.intrinsics.* suspend fun suspendThere(v: String): String = suspendCoroutineOrReturn { x -> x.resume(v) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } suspend inline fun suspendHere(crossinline block: () -> String): String { diff --git a/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/inlineTwoReceivers.kt b/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/inlineTwoReceivers.kt index 8839f7e1202..a321b8a798c 100644 --- a/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/inlineTwoReceivers.kt +++ b/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/inlineTwoReceivers.kt @@ -2,13 +2,13 @@ // WITH_COROUTINES // TARGET_BACKEND: JVM import kotlin.coroutines.experimental.* -import kotlin.coroutines.experimental.intrinsics.SUSPENDED_MARKER +import kotlin.coroutines.experimental.intrinsics.COROUTINE_SUSPENDED import kotlin.coroutines.experimental.intrinsics.suspendCoroutineOrReturn class MyTest { suspend fun act(value: String): String = suspendCoroutineOrReturn { it.resume(value) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/member.kt b/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/member.kt index c170d3c2184..14f5c6d089b 100644 --- a/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/member.kt +++ b/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/member.kt @@ -6,7 +6,7 @@ import kotlin.coroutines.experimental.intrinsics.* class A(val v: String) { suspend fun suspendThere(v: String): String = suspendCoroutineOrReturn { x -> x.resume(v) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } suspend fun suspendHere(): String = suspendThere("O") + suspendThere(v) diff --git a/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/noinlineTwoReceivers.kt b/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/noinlineTwoReceivers.kt index f94bff2c116..a67c2b935f0 100644 --- a/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/noinlineTwoReceivers.kt +++ b/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/noinlineTwoReceivers.kt @@ -1,13 +1,13 @@ // WITH_RUNTIME // WITH_COROUTINES import kotlin.coroutines.experimental.* -import kotlin.coroutines.experimental.intrinsics.SUSPENDED_MARKER +import kotlin.coroutines.experimental.intrinsics.COROUTINE_SUSPENDED import kotlin.coroutines.experimental.intrinsics.suspendCoroutineOrReturn class MyTest { suspend fun act(value: String): String = suspendCoroutineOrReturn { it.resume(value) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/operators.kt b/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/operators.kt index f633a8ff8cf..3b1ef94c20f 100644 --- a/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/operators.kt +++ b/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/operators.kt @@ -7,7 +7,7 @@ import kotlin.reflect.KProperty suspend fun suspendThere(v: String): String = suspendCoroutineOrReturn { x -> x.resume(v) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } class A(val x: String) { @@ -21,13 +21,13 @@ class A(val x: String) { if (value != "56") return@suspendCoroutineOrReturn Unit isSetValueCalled = true x.resume(Unit) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } operator suspend fun provideDelegate(host: Any?, p: Any): A = suspendCoroutineOrReturn { x -> isProvideDelegateCalled = true x.resume(this) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } operator suspend fun plus(y: String) = suspendThere(x + y) @@ -36,14 +36,14 @@ class A(val x: String) { operator suspend fun inc(): A = suspendCoroutineOrReturn { x -> isProvideDelegateCalled = true x.resume(this) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } operator suspend fun minusAssign(y: String): Unit = suspendCoroutineOrReturn { x -> if (y != "56") return@suspendCoroutineOrReturn Unit isMinusAssignCalled = true x.resume(Unit) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/privateFunctions.kt b/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/privateFunctions.kt index af80f48833d..cf95e3b1d0f 100644 --- a/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/privateFunctions.kt +++ b/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/privateFunctions.kt @@ -23,7 +23,7 @@ class X { suspend fun suspendThere(v: String): String = suspendCoroutineOrReturn { x -> x.resume(v) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } fun builder(c: suspend X.() -> Unit) { diff --git a/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/privateInFile.kt b/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/privateInFile.kt index 60af0b62aee..26954d16631 100644 --- a/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/privateInFile.kt +++ b/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/privateInFile.kt @@ -9,7 +9,7 @@ private suspend fun foo(): String { if (x) { return suspendCoroutineOrReturn { it.resume("OK") - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/returnNoSuspend.kt b/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/returnNoSuspend.kt index c88d0ac1444..6751108c537 100644 --- a/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/returnNoSuspend.kt +++ b/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/returnNoSuspend.kt @@ -5,7 +5,7 @@ import kotlin.coroutines.experimental.intrinsics.* suspend fun suspendThere(v: String): String = suspendCoroutineOrReturn { x -> x.resume(v) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } suspend fun suspendHere(suspend: Boolean): String { diff --git a/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/simple.kt b/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/simple.kt index 787596f94e9..0fd4107a54a 100644 --- a/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/simple.kt +++ b/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/simple.kt @@ -5,7 +5,7 @@ import kotlin.coroutines.experimental.intrinsics.* suspend fun suspendThere(v: String): String = suspendCoroutineOrReturn { x -> x.resume(v) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } suspend fun suspendHere(): String = suspendThere("O") + suspendThere("K") diff --git a/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/withVariables.kt b/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/withVariables.kt index c0c9862b7aa..68617ba7227 100644 --- a/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/withVariables.kt +++ b/compiler/testData/codegen/box/coroutines/suspendFunctionAsCoroutine/withVariables.kt @@ -5,7 +5,7 @@ import kotlin.coroutines.experimental.intrinsics.* suspend fun suspendThere(v: String): String = suspendCoroutineOrReturn { x -> x.resume(v) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } suspend fun suspendHere(): String { diff --git a/compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall/localVal.kt b/compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall/localVal.kt index 478e540ad6f..0d95e70c76d 100644 --- a/compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall/localVal.kt +++ b/compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall/localVal.kt @@ -5,7 +5,7 @@ import kotlin.coroutines.experimental.intrinsics.* suspend fun suspendHere(v: String): String = suspendCoroutineOrReturn { x -> x.resume(v) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } fun builder(c: suspend () -> Unit) { diff --git a/compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall/manyParameters.kt b/compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall/manyParameters.kt index b37b4d6bb4a..fe815ef93f1 100644 --- a/compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall/manyParameters.kt +++ b/compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall/manyParameters.kt @@ -5,7 +5,7 @@ import kotlin.coroutines.experimental.intrinsics.* suspend fun suspendHere(v: String): String = suspendCoroutineOrReturn { x -> x.resume(v) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } fun builder(c: suspend () -> Unit) { diff --git a/compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall/simple.kt b/compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall/simple.kt index 2fecc72eba6..e797beca64a 100644 --- a/compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall/simple.kt +++ b/compiler/testData/codegen/box/coroutines/suspendFunctionTypeCall/simple.kt @@ -5,7 +5,7 @@ import kotlin.coroutines.experimental.intrinsics.* suspend fun suspendHere(v: String): String = suspendCoroutineOrReturn { x -> x.resume(v) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } fun builder(c: suspend () -> Unit) { diff --git a/compiler/testData/codegen/box/coroutines/suspendInCycle.kt b/compiler/testData/codegen/box/coroutines/suspendInCycle.kt index ce6c2f38dd3..40bef11b10a 100644 --- a/compiler/testData/codegen/box/coroutines/suspendInCycle.kt +++ b/compiler/testData/codegen/box/coroutines/suspendInCycle.kt @@ -7,11 +7,11 @@ class Controller { var i = 0 suspend fun suspendHere(): Int = suspendCoroutineOrReturn { x -> x.resume(i++) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } suspend fun suspendThere(): String = suspendCoroutineOrReturn { x -> x.resume("?") - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/suspendInTheMiddleOfObjectConstruction.kt b/compiler/testData/codegen/box/coroutines/suspendInTheMiddleOfObjectConstruction.kt index 5f8cf5cc9b4..f4f32779de0 100644 --- a/compiler/testData/codegen/box/coroutines/suspendInTheMiddleOfObjectConstruction.kt +++ b/compiler/testData/codegen/box/coroutines/suspendInTheMiddleOfObjectConstruction.kt @@ -6,17 +6,17 @@ import kotlin.coroutines.experimental.intrinsics.* class Controller { suspend fun suspendHere(): String = suspendCoroutineOrReturn { x -> x.resume("K") - SUSPENDED_MARKER + COROUTINE_SUSPENDED } suspend fun suspendWithArgument(v: String): String = suspendCoroutineOrReturn { x -> x.resume(v) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } suspend fun suspendWithDouble(v: Double): Double = suspendCoroutineOrReturn { x -> x.resume(v) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/suspensionInsideSafeCall.kt b/compiler/testData/codegen/box/coroutines/suspensionInsideSafeCall.kt index 576d7e6c3bc..9252012ee0c 100644 --- a/compiler/testData/codegen/box/coroutines/suspensionInsideSafeCall.kt +++ b/compiler/testData/codegen/box/coroutines/suspensionInsideSafeCall.kt @@ -6,7 +6,7 @@ import kotlin.coroutines.experimental.intrinsics.* class TestClass { suspend fun suspendHere(): String = suspendCoroutineOrReturn { x -> x.resume("K") - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/suspensionInsideSafeCallWithElvis.kt b/compiler/testData/codegen/box/coroutines/suspensionInsideSafeCallWithElvis.kt index 31bebf9f401..a34c114d65f 100644 --- a/compiler/testData/codegen/box/coroutines/suspensionInsideSafeCallWithElvis.kt +++ b/compiler/testData/codegen/box/coroutines/suspensionInsideSafeCallWithElvis.kt @@ -6,7 +6,7 @@ import kotlin.coroutines.experimental.intrinsics.* class TestClass { suspend fun toInt(): Int = suspendCoroutineOrReturn { x -> x.resume(14) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/tailOperations/suspendWithIf.kt b/compiler/testData/codegen/box/coroutines/tailOperations/suspendWithIf.kt index d088e7f7835..9ff9c6fe814 100644 --- a/compiler/testData/codegen/box/coroutines/tailOperations/suspendWithIf.kt +++ b/compiler/testData/codegen/box/coroutines/tailOperations/suspendWithIf.kt @@ -9,7 +9,7 @@ suspend fun foo(x: Any): Int { suspend fun suspendHere(): Int = suspendCoroutineOrReturn { x -> x.resume(56) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } fun builder(c: suspend () -> Unit) { diff --git a/compiler/testData/codegen/box/coroutines/tailOperations/suspendWithTryCatch.kt b/compiler/testData/codegen/box/coroutines/tailOperations/suspendWithTryCatch.kt index 7fb8d84e1bc..666bdf4fb82 100644 --- a/compiler/testData/codegen/box/coroutines/tailOperations/suspendWithTryCatch.kt +++ b/compiler/testData/codegen/box/coroutines/tailOperations/suspendWithTryCatch.kt @@ -13,7 +13,7 @@ suspend fun foo(x: Any): Int { suspend fun suspendHere(): Int = suspendCoroutineOrReturn { x -> x.resume(56) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } fun builder(c: suspend () -> Unit) { diff --git a/compiler/testData/codegen/box/coroutines/tailOperations/suspendWithWhen.kt b/compiler/testData/codegen/box/coroutines/tailOperations/suspendWithWhen.kt index 3494aa023d9..0829512e05e 100644 --- a/compiler/testData/codegen/box/coroutines/tailOperations/suspendWithWhen.kt +++ b/compiler/testData/codegen/box/coroutines/tailOperations/suspendWithWhen.kt @@ -12,7 +12,7 @@ suspend fun foo(x: Any): Int { suspend fun suspendHere(): Int = suspendCoroutineOrReturn { x -> x.resume(56) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } fun builder(c: suspend () -> Unit) { diff --git a/compiler/testData/codegen/box/coroutines/tryCatchFinallyWithHandleResult.kt b/compiler/testData/codegen/box/coroutines/tryCatchFinallyWithHandleResult.kt index 0f2f61f81c8..556f281e9f7 100644 --- a/compiler/testData/codegen/box/coroutines/tryCatchFinallyWithHandleResult.kt +++ b/compiler/testData/codegen/box/coroutines/tryCatchFinallyWithHandleResult.kt @@ -13,7 +13,7 @@ class Controller { x.resume(v) } - SUSPENDED_MARKER + COROUTINE_SUSPENDED } suspend fun suspendWithException(e: Exception): String = suspendCoroutineOrReturn { x -> @@ -21,7 +21,7 @@ class Controller { x.resumeWithException(e) } - SUSPENDED_MARKER + COROUTINE_SUSPENDED } fun run(c: suspend Controller.() -> String) { diff --git a/compiler/testData/codegen/box/coroutines/tryCatchWithHandleResult.kt b/compiler/testData/codegen/box/coroutines/tryCatchWithHandleResult.kt index dcc5ca8b40d..b8a1a2ae95e 100644 --- a/compiler/testData/codegen/box/coroutines/tryCatchWithHandleResult.kt +++ b/compiler/testData/codegen/box/coroutines/tryCatchWithHandleResult.kt @@ -13,7 +13,7 @@ class Controller { x.resume(v) } - SUSPENDED_MARKER + COROUTINE_SUSPENDED } suspend fun suspendWithException(e: Exception): String = suspendCoroutineOrReturn { x -> @@ -21,7 +21,7 @@ class Controller { x.resumeWithException(e) } - SUSPENDED_MARKER + COROUTINE_SUSPENDED } fun run(c: suspend Controller.() -> String) { diff --git a/compiler/testData/codegen/box/coroutines/tryFinallyInsideInlineLambda.kt b/compiler/testData/codegen/box/coroutines/tryFinallyInsideInlineLambda.kt index eb350d0db57..bca482fa815 100644 --- a/compiler/testData/codegen/box/coroutines/tryFinallyInsideInlineLambda.kt +++ b/compiler/testData/codegen/box/coroutines/tryFinallyInsideInlineLambda.kt @@ -7,7 +7,7 @@ class Controller { suspend fun suspendHere(v: String): String = suspendCoroutineOrReturn { x -> x.resume(v) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/tryFinallyWithHandleResult.kt b/compiler/testData/codegen/box/coroutines/tryFinallyWithHandleResult.kt index aabbcd060f0..568a20b0f0c 100644 --- a/compiler/testData/codegen/box/coroutines/tryFinallyWithHandleResult.kt +++ b/compiler/testData/codegen/box/coroutines/tryFinallyWithHandleResult.kt @@ -13,7 +13,7 @@ class Controller { x.resume(v) } - SUSPENDED_MARKER + COROUTINE_SUSPENDED } suspend fun suspendWithException(e: Exception): String = suspendCoroutineOrReturn { x -> @@ -21,7 +21,7 @@ class Controller { x.resumeWithException(e) } - SUSPENDED_MARKER + COROUTINE_SUSPENDED } fun run(c: suspend Controller.() -> String) { diff --git a/compiler/testData/codegen/box/coroutines/unitTypeReturn/coroutineNonLocalReturn.kt b/compiler/testData/codegen/box/coroutines/unitTypeReturn/coroutineNonLocalReturn.kt index 2dc96e88731..c4e4d577a41 100644 --- a/compiler/testData/codegen/box/coroutines/unitTypeReturn/coroutineNonLocalReturn.kt +++ b/compiler/testData/codegen/box/coroutines/unitTypeReturn/coroutineNonLocalReturn.kt @@ -5,7 +5,7 @@ import kotlin.coroutines.experimental.intrinsics.* suspend fun suspendHere(): String = suspendCoroutineOrReturn { x -> x.resume("OK") - SUSPENDED_MARKER + COROUTINE_SUSPENDED } fun builder(c: suspend () -> Unit) { diff --git a/compiler/testData/codegen/box/coroutines/unitTypeReturn/coroutineReturn.kt b/compiler/testData/codegen/box/coroutines/unitTypeReturn/coroutineReturn.kt index 70335e550d1..a9ea599524b 100644 --- a/compiler/testData/codegen/box/coroutines/unitTypeReturn/coroutineReturn.kt +++ b/compiler/testData/codegen/box/coroutines/unitTypeReturn/coroutineReturn.kt @@ -5,7 +5,7 @@ import kotlin.coroutines.experimental.intrinsics.* suspend fun suspendHere(): String = suspendCoroutineOrReturn { x -> x.resume("OK") - SUSPENDED_MARKER + COROUTINE_SUSPENDED } fun builder(c: suspend () -> Unit) { diff --git a/compiler/testData/codegen/box/coroutines/unitTypeReturn/suspendNonLocalReturn.kt b/compiler/testData/codegen/box/coroutines/unitTypeReturn/suspendNonLocalReturn.kt index b03590d8c83..ce54742b4b1 100644 --- a/compiler/testData/codegen/box/coroutines/unitTypeReturn/suspendNonLocalReturn.kt +++ b/compiler/testData/codegen/box/coroutines/unitTypeReturn/suspendNonLocalReturn.kt @@ -16,7 +16,7 @@ suspend fun suspendHere(x: Int): Unit { result = "OK" return suspendCoroutineOrReturn { x -> x.resume(Unit) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/unitTypeReturn/suspendReturn.kt b/compiler/testData/codegen/box/coroutines/unitTypeReturn/suspendReturn.kt index 989c7c6c716..171f24a3422 100644 --- a/compiler/testData/codegen/box/coroutines/unitTypeReturn/suspendReturn.kt +++ b/compiler/testData/codegen/box/coroutines/unitTypeReturn/suspendReturn.kt @@ -10,7 +10,7 @@ suspend fun suspendHere(x: Int): Unit { result = "OK" return suspendCoroutineOrReturn { x -> x.resume(Unit) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/varValueConflictsWithTable.kt b/compiler/testData/codegen/box/coroutines/varValueConflictsWithTable.kt index 4c4b84431a0..cb7d794eb9b 100644 --- a/compiler/testData/codegen/box/coroutines/varValueConflictsWithTable.kt +++ b/compiler/testData/codegen/box/coroutines/varValueConflictsWithTable.kt @@ -6,7 +6,7 @@ import kotlin.coroutines.experimental.intrinsics.* class Controller { suspend fun suspendHere(): String = suspendCoroutineOrReturn { x -> x.resume("OK") - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/box/coroutines/varValueConflictsWithTableSameSort.kt b/compiler/testData/codegen/box/coroutines/varValueConflictsWithTableSameSort.kt index e64ba2f7249..8c4a25b2131 100644 --- a/compiler/testData/codegen/box/coroutines/varValueConflictsWithTableSameSort.kt +++ b/compiler/testData/codegen/box/coroutines/varValueConflictsWithTableSameSort.kt @@ -6,7 +6,7 @@ import kotlin.coroutines.experimental.intrinsics.* class Controller { suspend fun suspendHere(): String = suspendCoroutineOrReturn { x -> x.resume("OK") - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/complicatedMerge.kt b/compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/complicatedMerge.kt index 825a765e7c8..58d907569fb 100644 --- a/compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/complicatedMerge.kt +++ b/compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/complicatedMerge.kt @@ -7,7 +7,7 @@ import kotlin.coroutines.experimental.intrinsics.* class Controller { suspend fun suspendHere(): Unit = suspendCoroutineOrReturn { x -> x.resume(Unit) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/i2bResult.kt b/compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/i2bResult.kt index b86debe4cbd..3554ee3cf97 100644 --- a/compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/i2bResult.kt +++ b/compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/i2bResult.kt @@ -7,7 +7,7 @@ import kotlin.coroutines.experimental.intrinsics.* class Controller { suspend fun suspendHere(): Unit = suspendCoroutineOrReturn { x -> x.resume(Unit) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/loadFromBooleanArray.kt b/compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/loadFromBooleanArray.kt index 4aa640a584a..3532109fa16 100644 --- a/compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/loadFromBooleanArray.kt +++ b/compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/loadFromBooleanArray.kt @@ -7,7 +7,7 @@ import kotlin.coroutines.experimental.intrinsics.* class Controller { suspend fun suspendHere(): Unit = suspendCoroutineOrReturn { x -> x.resume(Unit) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/loadFromByteArray.kt b/compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/loadFromByteArray.kt index 814ef18de47..0ca74ac2610 100644 --- a/compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/loadFromByteArray.kt +++ b/compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/loadFromByteArray.kt @@ -7,7 +7,7 @@ import kotlin.coroutines.experimental.intrinsics.* class Controller { suspend fun suspendHere(): Unit = suspendCoroutineOrReturn { x -> x.resume(Unit) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/noVariableInTable.kt b/compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/noVariableInTable.kt index e262f85d5d7..3e61704de7e 100644 --- a/compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/noVariableInTable.kt +++ b/compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/noVariableInTable.kt @@ -7,7 +7,7 @@ import kotlin.coroutines.experimental.intrinsics.* class Controller { suspend fun suspendHere(): Unit = suspendCoroutineOrReturn { x -> x.resume(Unit) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/sameIconst1ManyVars.kt b/compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/sameIconst1ManyVars.kt index 321bf65566d..facb49aa9ff 100644 --- a/compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/sameIconst1ManyVars.kt +++ b/compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/sameIconst1ManyVars.kt @@ -7,7 +7,7 @@ import kotlin.coroutines.experimental.intrinsics.* class Controller { suspend fun suspendHere(): Unit = suspendCoroutineOrReturn { x -> x.resume(Unit) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInArrayStore.kt b/compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInArrayStore.kt index 4e82039a5cd..577bc871ad0 100644 --- a/compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInArrayStore.kt +++ b/compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInArrayStore.kt @@ -8,7 +8,7 @@ import kotlin.coroutines.experimental.intrinsics.* class Controller { suspend fun suspendHere(): Unit = suspendCoroutineOrReturn { x -> x.resume(Unit) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInMethodCall.kt b/compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInMethodCall.kt index 5fcf1731ee2..4698f7c7956 100644 --- a/compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInMethodCall.kt +++ b/compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInMethodCall.kt @@ -7,7 +7,7 @@ import kotlin.coroutines.experimental.intrinsics.* class Controller { suspend fun suspendHere(): Unit = suspendCoroutineOrReturn { x -> x.resume(Unit) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInPutfield.kt b/compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInPutfield.kt index e909b947c0d..e59dc3a527e 100644 --- a/compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInPutfield.kt +++ b/compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInPutfield.kt @@ -8,7 +8,7 @@ import kotlin.coroutines.experimental.intrinsics.* class Controller { suspend fun suspendHere(): Unit = suspendCoroutineOrReturn { x -> x.resume(Unit) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInVarStore.kt b/compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInVarStore.kt index dbfecb15a01..3f07e1870b0 100644 --- a/compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInVarStore.kt +++ b/compiler/testData/codegen/bytecodeText/coroutines/intLikeVarSpilling/usedInVarStore.kt @@ -7,7 +7,7 @@ import kotlin.coroutines.experimental.intrinsics.* class Controller { suspend fun suspendHere(): Unit = suspendCoroutineOrReturn { x -> x.resume(Unit) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/codegen/java8/box/async.kt b/compiler/testData/codegen/java8/box/async.kt index a3914f640ba..5b6296c13a4 100644 --- a/compiler/testData/codegen/java8/box/async.kt +++ b/compiler/testData/codegen/java8/box/async.kt @@ -68,5 +68,5 @@ suspend fun await(f: CompletableFuture) = suspendCoroutineOrReturn { m else machine.resumeWithException(throwable) } - SUSPENDED_MARKER + COROUTINE_SUSPENDED } diff --git a/compiler/testData/codegen/java8/box/asyncException.kt b/compiler/testData/codegen/java8/box/asyncException.kt index 7610a0f63f3..636ea99c98b 100644 --- a/compiler/testData/codegen/java8/box/asyncException.kt +++ b/compiler/testData/codegen/java8/box/asyncException.kt @@ -65,5 +65,5 @@ suspend fun await(f: CompletableFuture) = suspendCoroutineOrReturn { m else machine.resumeWithException(throwable) } - SUSPENDED_MARKER + COROUTINE_SUSPENDED } diff --git a/compiler/testData/compileKotlinAgainstKotlin/coroutinesBinary.kt b/compiler/testData/compileKotlinAgainstKotlin/coroutinesBinary.kt index e4ffa5ad953..a6b75c53561 100644 --- a/compiler/testData/compileKotlinAgainstKotlin/coroutinesBinary.kt +++ b/compiler/testData/compileKotlinAgainstKotlin/coroutinesBinary.kt @@ -8,7 +8,7 @@ import kotlin.coroutines.experimental.intrinsics.* class Controller { suspend fun suspendHere() = suspendCoroutineOrReturn { x -> x.resume("OK") - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCoroutineOrReturn.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCoroutineOrReturn.kt index 0ceaa9a66d7..75ab7d94f68 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCoroutineOrReturn.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendCoroutineOrReturn.kt @@ -7,7 +7,7 @@ class Controller { suspend fun noParams(): Unit = suspendCoroutineOrReturn { if (hashCode() % 2 == 0) { it.resume(Unit) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } else { Unit diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/nothingTypedSuspendFunction.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/nothingTypedSuspendFunction.kt index e79d3fe6c03..4f5b7e41fc8 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/nothingTypedSuspendFunction.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/tailCalls/nothingTypedSuspendFunction.kt @@ -4,5 +4,5 @@ import kotlin.coroutines.experimental.intrinsics.* suspend fun suspendLogAndThrow(exception: Throwable): Nothing = suspendCoroutineOrReturn { c -> c.resumeWithException(exception) - SUSPENDED_MARKER + COROUTINE_SUSPENDED } diff --git a/js/js.libraries/src/core/coroutines.kt b/js/js.libraries/src/core/coroutines.kt index 4e8fe81b2b7..ab36e8e3c45 100644 --- a/js/js.libraries/src/core/coroutines.kt +++ b/js/js.libraries/src/core/coroutines.kt @@ -111,9 +111,9 @@ internal abstract class CoroutineImpl(private val resultContinuation: Continuati protected fun doResumeWrapper() { try { result = doResume() - if (result != SUSPENDED_MARKER) { + if (result != COROUTINE_SUSPENDED) { val data = result - result = SUSPENDED_MARKER + result = COROUTINE_SUSPENDED resultContinuation.resume(data) } } @@ -140,7 +140,7 @@ internal class SafeContinuation internal constructor(private val delegate: UNDECIDED -> { result = value } - SUSPENDED_MARKER -> { + COROUTINE_SUSPENDED -> { result = RESUMED delegate.resume(value) } @@ -155,7 +155,7 @@ internal class SafeContinuation internal constructor(private val delegate: UNDECIDED -> { result = Fail(exception) } - SUSPENDED_MARKER -> { + COROUTINE_SUSPENDED -> { result = RESUMED delegate.resumeWithException(exception) } @@ -167,12 +167,12 @@ internal class SafeContinuation internal constructor(private val delegate: internal fun getResult(): Any? { if (result == UNDECIDED) { - result = SUSPENDED_MARKER + result = COROUTINE_SUSPENDED } val result = this.result return when (result) { RESUMED -> { - SUSPENDED_MARKER // already called continuation, indicate SUSPENDED upstream + COROUTINE_SUSPENDED // already called continuation, indicate SUSPENDED upstream } is Fail -> { throw result.exception diff --git a/js/js.translator/src/org/jetbrains/kotlin/js/translate/utils/utils.kt b/js/js.translator/src/org/jetbrains/kotlin/js/translate/utils/utils.kt index 526c60dc9cd..d27c66e7bf7 100644 --- a/js/js.translator/src/org/jetbrains/kotlin/js/translate/utils/utils.kt +++ b/js/js.translator/src/org/jetbrains/kotlin/js/translate/utils/utils.kt @@ -18,7 +18,7 @@ package org.jetbrains.kotlin.js.translate.utils import com.intellij.util.SmartList import org.jetbrains.kotlin.backend.common.COROUTINES_INTRINSICS_PACKAGE_FQ_NAME -import org.jetbrains.kotlin.backend.common.SUSPENDED_MARKER_NAME +import org.jetbrains.kotlin.backend.common.COROUTINE_SUSPENDED_NAME import org.jetbrains.kotlin.descriptors.ClassDescriptor import org.jetbrains.kotlin.descriptors.FunctionDescriptor import org.jetbrains.kotlin.descriptors.PropertyDescriptor @@ -150,7 +150,7 @@ fun JsFunction.fillCoroutineMetadata( val suspendPropertyDescriptor = context.currentModule.getPackage(COROUTINES_INTRINSICS_PACKAGE_FQ_NAME) .memberScope - .getContributedVariables(SUSPENDED_MARKER_NAME, NoLookupLocation.FROM_BACKEND).first() + .getContributedVariables(COROUTINE_SUSPENDED_NAME, NoLookupLocation.FROM_BACKEND).first() val coroutineBaseClassRef = ReferenceTranslator.translateAsTypeReference(TranslationUtils.getCoroutineBaseClass(context), context) diff --git a/libraries/stdlib/src/kotlin/coroutines/experimental/CoroutinesLibrary.kt b/libraries/stdlib/src/kotlin/coroutines/experimental/CoroutinesLibrary.kt index 74110aee82e..ef44e0c6897 100644 --- a/libraries/stdlib/src/kotlin/coroutines/experimental/CoroutinesLibrary.kt +++ b/libraries/stdlib/src/kotlin/coroutines/experimental/CoroutinesLibrary.kt @@ -20,7 +20,7 @@ package kotlin.coroutines.experimental import java.lang.IllegalStateException import java.util.concurrent.atomic.AtomicReferenceFieldUpdater -import kotlin.coroutines.experimental.intrinsics.SUSPENDED_MARKER +import kotlin.coroutines.experimental.intrinsics.COROUTINE_SUSPENDED import kotlin.coroutines.experimental.intrinsics.suspendCoroutineOrReturn import kotlin.coroutines.experimental.jvm.internal.CoroutineImpl import kotlin.coroutines.experimental.jvm.internal.interceptContinuationIfNeeded @@ -133,7 +133,7 @@ private inline fun buildContinuationByInvokeCall( private inline fun processInvokeCallOnCoroutine(completion: Continuation<*>, block: () -> Any?) { try { val result = block() - if (result !== SUSPENDED_MARKER) { + if (result !== COROUTINE_SUSPENDED) { @Suppress("UNCHECKED_CAST") (completion as Continuation).resume(result) } @@ -169,7 +169,7 @@ internal class SafeContinuation @PublishedApi internal constructor(private val result = this.result // atomic read when (result) { UNDECIDED -> if (cas(UNDECIDED, value)) return - SUSPENDED_MARKER -> if (cas(SUSPENDED_MARKER, RESUMED)) { + COROUTINE_SUSPENDED -> if (cas(COROUTINE_SUSPENDED, RESUMED)) { delegate.resume(value) return } @@ -183,7 +183,7 @@ internal class SafeContinuation @PublishedApi internal constructor(private val result = this.result // atomic read when (result) { UNDECIDED -> if (cas(UNDECIDED, Fail(exception))) return - SUSPENDED_MARKER -> if (cas(SUSPENDED_MARKER, RESUMED)) { + COROUTINE_SUSPENDED -> if (cas(COROUTINE_SUSPENDED, RESUMED)) { delegate.resumeWithException(exception) return } @@ -196,13 +196,13 @@ internal class SafeContinuation @PublishedApi internal constructor(private internal fun getResult(): Any? { var result = this.result // atomic read if (result == UNDECIDED) { - if (cas(UNDECIDED, SUSPENDED_MARKER)) return SUSPENDED_MARKER + if (cas(UNDECIDED, COROUTINE_SUSPENDED)) return COROUTINE_SUSPENDED result = this.result // reread volatile var } when (result) { - RESUMED -> return SUSPENDED_MARKER // already called continuation, indicate SUSPENDED_MARKER upstream + RESUMED -> return COROUTINE_SUSPENDED // already called continuation, indicate COROUTINE_SUSPENDED upstream is Fail -> throw result.exception - else -> return result // either SUSPENDED_MARKER or data + else -> return result // either COROUTINE_SUSPENDED or data } } } diff --git a/libraries/stdlib/src/kotlin/coroutines/experimental/SequenceBuilder.kt b/libraries/stdlib/src/kotlin/coroutines/experimental/SequenceBuilder.kt index 858c92a67f8..12b92078973 100644 --- a/libraries/stdlib/src/kotlin/coroutines/experimental/SequenceBuilder.kt +++ b/libraries/stdlib/src/kotlin/coroutines/experimental/SequenceBuilder.kt @@ -131,7 +131,7 @@ private class SequenceBuilderIterator : SequenceBuilder(), Iterator, Co state = State_Ready return suspendCoroutineOrReturn { c -> nextStep = c - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } @@ -141,7 +141,7 @@ private class SequenceBuilderIterator : SequenceBuilder(), Iterator, Co state = State_ManyReady return suspendCoroutineOrReturn { c -> nextStep = c - SUSPENDED_MARKER + COROUTINE_SUSPENDED } } diff --git a/libraries/stdlib/src/kotlin/coroutines/experimental/intrinsics/Intrinsics.kt b/libraries/stdlib/src/kotlin/coroutines/experimental/intrinsics/Intrinsics.kt index ec8f54cbd8e..d500c4883cc 100644 --- a/libraries/stdlib/src/kotlin/coroutines/experimental/intrinsics/Intrinsics.kt +++ b/libraries/stdlib/src/kotlin/coroutines/experimental/intrinsics/Intrinsics.kt @@ -24,7 +24,7 @@ import kotlin.coroutines.experimental.Continuation * Obtains the current continuation instance inside suspend functions and either suspend * currently running coroutine or return result immediately without suspension. * - * If the [block] returns the special [SUSPENDED_MARKER] value, it means that suspend function did suspend the execution and will + * If the [block] returns the special [COROUTINE_SUSPENDED] value, it means that suspend function did suspend the execution and will * not return any result immediately. In this case, the [Continuation] provided to the [block] shall be invoked at some moment in the * future when the result becomes available to resume the computation. * @@ -46,5 +46,5 @@ public inline suspend fun suspendCoroutineOrReturn(crossinline block: (Conti * the execution was suspended and will not return any result immediately. */ @SinceKotlin("1.1") -public val SUSPENDED_MARKER: Any = Any() +public val COROUTINE_SUSPENDED: Any = Any() diff --git a/libraries/stdlib/src/kotlin/coroutines/experimental/jvm/internal/CoroutineImpl.kt b/libraries/stdlib/src/kotlin/coroutines/experimental/jvm/internal/CoroutineImpl.kt index 3876121d9cf..c0cccc27d58 100644 --- a/libraries/stdlib/src/kotlin/coroutines/experimental/jvm/internal/CoroutineImpl.kt +++ b/libraries/stdlib/src/kotlin/coroutines/experimental/jvm/internal/CoroutineImpl.kt @@ -21,7 +21,7 @@ import java.lang.IllegalStateException import kotlin.coroutines.experimental.Continuation import kotlin.coroutines.experimental.ContinuationInterceptor import kotlin.coroutines.experimental.CoroutineContext -import kotlin.coroutines.experimental.intrinsics.SUSPENDED_MARKER +import kotlin.coroutines.experimental.intrinsics.COROUTINE_SUSPENDED import kotlin.coroutines.experimental.jvm.internal.interceptContinuationIfNeeded import kotlin.jvm.internal.Lambda @@ -51,7 +51,7 @@ abstract class CoroutineImpl( override fun resume(value: Any?) { try { val result = doResume(value, null) - if (result != SUSPENDED_MARKER) + if (result != COROUTINE_SUSPENDED) completion!!.resume(result) } catch (e: Throwable) { completion!!.resumeWithException(e) @@ -61,7 +61,7 @@ abstract class CoroutineImpl( override fun resumeWithException(exception: Throwable) { try { val result = doResume(null, exception) - if (result != SUSPENDED_MARKER) + if (result != COROUTINE_SUSPENDED) completion!!.resume(result) } catch (e: Throwable) { completion!!.resumeWithException(e) diff --git a/libraries/tools/binary-compatibility-validator/reference-public-api/kotlin-stdlib-runtime-merged.txt b/libraries/tools/binary-compatibility-validator/reference-public-api/kotlin-stdlib-runtime-merged.txt index 421364ba611..475c5d9a69c 100644 --- a/libraries/tools/binary-compatibility-validator/reference-public-api/kotlin-stdlib-runtime-merged.txt +++ b/libraries/tools/binary-compatibility-validator/reference-public-api/kotlin-stdlib-runtime-merged.txt @@ -2022,7 +2022,7 @@ public final class kotlin/coroutines/experimental/SequenceBuilderKt { } public final class kotlin/coroutines/experimental/intrinsics/IntrinsicsKt { - public static final fun getSUSPENDED_MARKER ()Ljava/lang/Object; + public static final fun getCOROUTINE_SUSPENDED ()Ljava/lang/Object; } public abstract class kotlin/coroutines/experimental/jvm/internal/CoroutineImpl : kotlin/jvm/internal/Lambda, kotlin/coroutines/experimental/Continuation { diff --git a/libraries/tools/binary-compatibility-validator/reference-public-api/kotlin-stdlib.txt b/libraries/tools/binary-compatibility-validator/reference-public-api/kotlin-stdlib.txt index 54166e958f7..108f8567909 100644 --- a/libraries/tools/binary-compatibility-validator/reference-public-api/kotlin-stdlib.txt +++ b/libraries/tools/binary-compatibility-validator/reference-public-api/kotlin-stdlib.txt @@ -1841,7 +1841,7 @@ public final class kotlin/coroutines/experimental/SequenceBuilderKt { } public final class kotlin/coroutines/experimental/intrinsics/IntrinsicsKt { - public static final fun getSUSPENDED_MARKER ()Ljava/lang/Object; + public static final fun getCOROUTINE_SUSPENDED ()Ljava/lang/Object; } public abstract class kotlin/coroutines/experimental/jvm/internal/CoroutineImpl : kotlin/jvm/internal/Lambda, kotlin/coroutines/experimental/Continuation {