IR: rename DeclarationFactory to InnerClassesSupport, move out of context

Methods of the common interface DeclarationFactory were only used in
lowerings in InnerClassesLowering, which were used in JVM and JS, not
Native. Therefore, it makes sense to have this as a separate interface
and pass its implementation to these lowerings directly, instead of
declaring it in the common context (which is not going to be implemented
in Native).
This commit is contained in:
Alexander Udalov
2020-07-08 18:40:23 +02:00
parent cf884fb048
commit c7f9dc1c40
14 changed files with 144 additions and 130 deletions
@@ -6,7 +6,7 @@
package org.jetbrains.kotlin.backend.common.serialization
import org.jetbrains.kotlin.backend.common.LoggingContext
import org.jetbrains.kotlin.backend.common.ir.DeclarationFactory
import org.jetbrains.kotlin.backend.common.lower.InnerClassesSupport
import org.jetbrains.kotlin.backend.common.ir.ir2string
import org.jetbrains.kotlin.backend.common.overrides.PlatformFakeOverrideClassFilter
import org.jetbrains.kotlin.backend.common.peek
@@ -1363,7 +1363,7 @@ abstract class IrFileDeserializer(
}
private val allKnownDeclarationOrigins =
IrDeclarationOrigin::class.nestedClasses.toList() + DeclarationFactory.FIELD_FOR_OUTER_THIS::class
IrDeclarationOrigin::class.nestedClasses.toList() + InnerClassesSupport.FIELD_FOR_OUTER_THIS::class
private val declarationOriginIndex =
allKnownDeclarationOrigins.map { it.objectInstance as IrDeclarationOriginImpl }.associateBy { it.name }