Fix projection compilation against bootstrap compiler

This is needed after 5d95a1ac
This commit is contained in:
Mikhail Zarechenskiy
2019-04-25 15:08:27 +03:00
parent ac0a1d984f
commit f00c946ff7
11 changed files with 24 additions and 16 deletions
@@ -44,7 +44,7 @@ private val expectDeclarationsRemovingPhase = makeIrFilePhase(
description = "Remove expect declaration from module fragment"
)
private val propertiesPhase = makeIrFilePhase(
private val propertiesPhase = makeIrFilePhase<CommonBackendContext>(
{ context ->
PropertiesLowering(context, JvmLoweredDeclarationOrigin.SYNTHETIC_METHOD_FOR_PROPERTY_ANNOTATIONS) { propertyName ->
JvmAbi.getSyntheticMethodNameForAnnotatedProperty(propertyName)
@@ -55,7 +55,7 @@ private val propertiesPhase = makeIrFilePhase(
stickyPostconditions = setOf((PropertiesLowering)::checkNoProperties)
)
val jvmPhases = namedIrFilePhase(
val jvmPhases = namedIrFilePhase<JvmBackendContext>(
name = "IrLowering",
description = "IR lowering",
lower = expectDeclarationsRemovingPhase then
@@ -58,7 +58,7 @@ import org.jetbrains.org.objectweb.asm.Type
//Hack implementation to support CR java types in lower
class CrIrType(val type: Type) : IrType {
override val annotations = emptyList()
override val annotations: List<IrCall> = emptyList()
override fun equals(other: Any?): Boolean =
other is CrIrType && type == other.type
@@ -12,6 +12,7 @@ import org.jetbrains.kotlin.backend.common.push
import org.jetbrains.kotlin.backend.jvm.JvmBackendContext
import org.jetbrains.kotlin.ir.declarations.IrClass
import org.jetbrains.kotlin.ir.declarations.IrDeclaration
import org.jetbrains.kotlin.ir.declarations.IrDeclarationParent
import org.jetbrains.kotlin.ir.declarations.IrSymbolOwner
import org.jetbrains.kotlin.ir.expressions.*
import org.jetbrains.kotlin.ir.expressions.impl.IrGetFieldImpl
@@ -27,7 +28,7 @@ internal val singletonReferencesPhase = makeIrFilePhase(
private class SingletonReferencesLowering(val context: JvmBackendContext) : ClassLoweringPass, IrElementTransformerVoid() {
private lateinit var containingClass: IrClass
private val constructingEnums = arrayListOf()
private val constructingEnums = arrayListOf<IrDeclarationParent>()
override fun lower(irClass: IrClass) {
containingClass = irClass