Support full pipeline for basic kotlinx.serialization case:

FIR frontend and IR backend plugins.

Note: IR plugin is now broken for old FE, fixed in subsequent commits
This commit is contained in:
Leonid Startsev
2022-07-22 19:09:01 +02:00
committed by Space
parent cefc372632
commit 467ff30aac
18 changed files with 324 additions and 27 deletions
@@ -148,6 +148,7 @@ class Fir2IrPluginContext(private val components: Fir2IrComponents) : IrPluginCo
error(ERROR_MESSAGE)
}
@Deprecated("Use classId overload instead")
override fun referenceConstructors(classFqn: FqName): Collection<IrConstructorSymbol> {
error(ERROR_MESSAGE)
}
@@ -54,6 +54,7 @@ interface IrPluginContext : IrGeneratorContext {
@Deprecated("Use classId overload instead")
fun referenceClass(fqName: FqName): IrClassSymbol?
fun referenceTypeAlias(fqName: FqName): IrTypeAliasSymbol?
@Deprecated("Use classId overload instead")
fun referenceConstructors(classFqn: FqName): Collection<IrConstructorSymbol>
@Deprecated("Use callableId overload instead")
fun referenceFunctions(fqName: FqName): Collection<IrSimpleFunctionSymbol>
@@ -121,6 +121,7 @@ open class IrPluginContextImpl constructor(
}
}
@Deprecated("Use classId overload instead")
override fun referenceConstructors(classFqn: FqName): Collection<IrConstructorSymbol> {
@Suppress("DEPRECATION")
val classSymbol = referenceClass(classFqn) ?: error("Cannot find class $classFqn")
@@ -157,6 +158,7 @@ open class IrPluginContextImpl constructor(
}
override fun referenceConstructors(classId: ClassId): Collection<IrConstructorSymbol> {
@Suppress("DEPRECATION")
return referenceConstructors(classId.asSingleFqName())
}