diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/IrSourceCompilerForInline.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/IrSourceCompilerForInline.kt index 4e8472b5a79..b549af5397b 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/IrSourceCompilerForInline.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/IrSourceCompilerForInline.kt @@ -12,6 +12,7 @@ import org.jetbrains.kotlin.backend.jvm.lower.MultifileFacadeFileEntry import org.jetbrains.kotlin.codegen.BaseExpressionCodegen import org.jetbrains.kotlin.codegen.ClassBuilder import org.jetbrains.kotlin.codegen.OwnerKind +import org.jetbrains.kotlin.codegen.coroutines.INVOKE_SUSPEND_METHOD_NAME import org.jetbrains.kotlin.codegen.inline.* import org.jetbrains.kotlin.codegen.serialization.JvmSerializationBindings import org.jetbrains.kotlin.codegen.state.GenerationState @@ -154,7 +155,13 @@ class IrSourceCompilerForInline( get() = callElement.descriptor as FunctionDescriptor override fun getContextLabels(): Set { - return setOf(codegen.irFunction.name.asString()) + val name = codegen.irFunction.name.asString() + if (name == INVOKE_SUSPEND_METHOD_NAME) { + codegen.context.suspendLambdaToOriginalFunctionMap[codegen.irFunction.parent]?.let { + return setOf(it.name.asString()) + } + } + return setOf(name) } private class FakeClassCodegen(irFunction: IrFunction, codegen: ClassCodegen) : diff --git a/compiler/testData/codegen/box/coroutines/inlineSuspendLambdaNonLocalReturn.kt b/compiler/testData/codegen/box/coroutines/inlineSuspendLambdaNonLocalReturn.kt index ce73162181a..ab6dde1150a 100644 --- a/compiler/testData/codegen/box/coroutines/inlineSuspendLambdaNonLocalReturn.kt +++ b/compiler/testData/codegen/box/coroutines/inlineSuspendLambdaNonLocalReturn.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JVM_IR // WITH_RUNTIME // WITH_COROUTINES // COMMON_COROUTINES_TEST diff --git a/compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambda.kt b/compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambda.kt index 52d3d384ed1..d393f5ceea5 100644 --- a/compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambda.kt +++ b/compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambda.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JVM_IR // WITH_RUNTIME // COMMON_COROUTINES_TEST // WITH_COROUTINES diff --git a/compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambdaDeep.kt b/compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambdaDeep.kt index 2a2dc55fd2e..af5fc73a96a 100644 --- a/compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambdaDeep.kt +++ b/compiler/testData/codegen/box/coroutines/nonLocalReturnFromInlineLambdaDeep.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JVM_IR // WITH_RUNTIME // COMMON_COROUTINES_TEST // WITH_COROUTINES diff --git a/compiler/testData/codegen/box/coroutines/unitTypeReturn/coroutineNonLocalReturn.kt b/compiler/testData/codegen/box/coroutines/unitTypeReturn/coroutineNonLocalReturn.kt index 8c0bc7056ce..f73be96daf0 100644 --- a/compiler/testData/codegen/box/coroutines/unitTypeReturn/coroutineNonLocalReturn.kt +++ b/compiler/testData/codegen/box/coroutines/unitTypeReturn/coroutineNonLocalReturn.kt @@ -1,4 +1,3 @@ -// IGNORE_BACKEND: JVM_IR // WITH_RUNTIME // WITH_COROUTINES // COMMON_COROUTINES_TEST