From 71018d8a6d719690ffa460a9176c0b4b9eae84b9 Mon Sep 17 00:00:00 2001 From: Dmitry Gridin Date: Mon, 11 Jul 2022 22:18:00 +0200 Subject: [PATCH] [light classes] replace light class dependency from analysis.symbol-light-classes to light-classes-base ^KT-53097 --- analysis/symbol-light-classes/build.gradle.kts | 3 ++- .../kotlin/codegen/coroutines/coroutineConstants.kt | 10 ++++++++++ .../coroutines/CoroutineTransformerMethodVisitor.kt | 6 +----- 3 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 compiler/backend.common.jvm/src/org/jetbrains/kotlin/codegen/coroutines/coroutineConstants.kt diff --git a/analysis/symbol-light-classes/build.gradle.kts b/analysis/symbol-light-classes/build.gradle.kts index f655dc27d42..4feafade209 100644 --- a/analysis/symbol-light-classes/build.gradle.kts +++ b/analysis/symbol-light-classes/build.gradle.kts @@ -7,7 +7,8 @@ dependencies { implementation(project(":compiler:psi")) implementation(project(":compiler:frontend.java")) implementation(project(":core:compiler.common")) - implementation(project(":compiler:light-classes")) + implementation(project(":compiler:light-classes-base")) + implementation(project(":compiler:backend.common.jvm")) implementation(project(":analysis:analysis-api-providers")) implementation(project(":analysis:analysis-api")) implementation(project(":analysis:analysis-internal-utils")) diff --git a/compiler/backend.common.jvm/src/org/jetbrains/kotlin/codegen/coroutines/coroutineConstants.kt b/compiler/backend.common.jvm/src/org/jetbrains/kotlin/codegen/coroutines/coroutineConstants.kt new file mode 100644 index 00000000000..ec81ce2c1b1 --- /dev/null +++ b/compiler/backend.common.jvm/src/org/jetbrains/kotlin/codegen/coroutines/coroutineConstants.kt @@ -0,0 +1,10 @@ +/* + * Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.codegen.coroutines + +const val SUSPEND_FUNCTION_COMPLETION_PARAMETER_NAME = "\$completion" +const val SUSPEND_CALL_RESULT_NAME = "\$result" +const val ILLEGAL_STATE_ERROR_MESSAGE = "call to 'resume' before 'invoke' with coroutine" \ No newline at end of file diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/coroutines/CoroutineTransformerMethodVisitor.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/coroutines/CoroutineTransformerMethodVisitor.kt index 22a3de62401..22a1a8f26e7 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/coroutines/CoroutineTransformerMethodVisitor.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/coroutines/CoroutineTransformerMethodVisitor.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ @@ -33,10 +33,6 @@ private const val COROUTINES_METADATA_METHOD_NAME_JVM_NAME = "m" private const val COROUTINES_METADATA_CLASS_NAME_JVM_NAME = "c" private const val COROUTINES_METADATA_VERSION_JVM_NAME = "v" -const val SUSPEND_FUNCTION_COMPLETION_PARAMETER_NAME = "\$completion" -const val SUSPEND_CALL_RESULT_NAME = "\$result" -const val ILLEGAL_STATE_ERROR_MESSAGE = "call to 'resume' before 'invoke' with coroutine" - class CoroutineTransformerMethodVisitor( delegate: MethodVisitor, access: Int,