[FIR] Extract FirPluginKey into :core:compiler.common and rename it to GeneratedDeclarationKey

This is needed to avoid dependency on :compiler:fir:fir2ir module in
  backend parts of compiler plugins. It will allow to publish those
  parts into jars for IDE, where they are needed for working of debugger
  and bytecode toolwindow
This commit is contained in:
Dmitriy Novozhilov
2022-06-01 18:02:26 +03:00
committed by teamcity
parent a84ece7233
commit 83d0a3e7a3
23 changed files with 92 additions and 75 deletions
@@ -9,11 +9,12 @@ import org.jetbrains.kotlin.descriptors.EffectiveVisibility
import org.jetbrains.kotlin.descriptors.Modality
import org.jetbrains.kotlin.descriptors.Visibilities
import org.jetbrains.kotlin.fir.FirSession
import org.jetbrains.kotlin.fir.declarations.FirPluginKey
import org.jetbrains.kotlin.GeneratedDeclarationKey
import org.jetbrains.kotlin.fir.declarations.builder.FirSimpleFunctionBuilder
import org.jetbrains.kotlin.fir.declarations.builder.buildSimpleFunction
import org.jetbrains.kotlin.fir.declarations.builder.buildValueParameter
import org.jetbrains.kotlin.fir.declarations.impl.FirResolvedDeclarationStatusImpl
import org.jetbrains.kotlin.fir.declarations.origin
import org.jetbrains.kotlin.fir.declarations.utils.modality
import org.jetbrains.kotlin.fir.extensions.FirDeclarationGenerationExtension
import org.jetbrains.kotlin.fir.extensions.FirDeclarationPredicateRegistrar
@@ -177,7 +178,7 @@ class FirParcelizeDeclarationGenerator(session: FirSession) : FirDeclarationGene
}
}
private val key: FirPluginKey
private val key: GeneratedDeclarationKey
get() = FirParcelizePluginKey
override fun FirDeclarationPredicateRegistrar.registerPredicates() {
@@ -5,9 +5,9 @@
package org.jetbrains.kotlin.parcelize.fir
import org.jetbrains.kotlin.fir.declarations.FirPluginKey
import org.jetbrains.kotlin.GeneratedDeclarationKey
object FirParcelizePluginKey : FirPluginKey() {
object FirParcelizePluginKey : GeneratedDeclarationKey() {
override fun toString(): String {
return "FirParcelize"
}