[FE 1.0] Provide an API to clean compile time initializer cache for variable descriptor

This commit is contained in:
Victor Petukhov
2021-12-08 15:50:09 +03:00
parent f197fc93db
commit 0e6762acc3
13 changed files with 56 additions and 17 deletions
@@ -185,6 +185,7 @@ open class IrBasedValueParameterDescriptor(owner: IrValueParameter) : ValueParam
override fun getName() = owner.name
override fun declaresDefaultValue() = owner.defaultValue != null
override fun getCompileTimeInitializer(): ConstantValue<*>? = null
override fun cleanCompileTimeInitializerCache() {}
override fun copy(newOwner: CallableDescriptor, newName: Name, newIndex: Int) = TODO("not implemented")
@@ -325,6 +326,8 @@ open class IrBasedVariableDescriptor(owner: IrVariable) : VariableDescriptor, Ir
TODO("")
}
override fun cleanCompileTimeInitializerCache() {}
override fun getOverriddenDescriptors(): Collection<VariableDescriptor> {
TODO("Not Implemented")
}
@@ -359,6 +362,8 @@ open class IrBasedVariableDescriptorWithAccessor(owner: IrLocalDelegatedProperty
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
override fun cleanCompileTimeInitializerCache() {}
override fun getType(): KotlinType = owner.type.toIrBasedKotlinType()
override fun isConst(): Boolean = false
@@ -828,6 +833,8 @@ open class IrBasedPropertyDescriptor(owner: IrProperty) :
return null
}
override fun cleanCompileTimeInitializerCache() {}
override fun isSetterProjectedOut(): Boolean {
TODO("not implemented")
}
@@ -1016,6 +1023,8 @@ open class IrBasedFieldDescriptor(owner: IrField) : PropertyDescriptor, IrBasedD
TODO("not implemented")
}
override fun cleanCompileTimeInitializerCache() {}
override fun isSetterProjectedOut(): Boolean {
TODO("not implemented")
}
@@ -119,6 +119,7 @@ class IrBuiltinValueParameterDescriptorImpl(
override val isNoinline: Boolean get() = false
override val varargElementType: KotlinType? get() = null
override fun getCompileTimeInitializer(): ConstantValue<*>? = null
override fun cleanCompileTimeInitializerCache() {}
override fun isVar(): Boolean = false
override fun getVisibility(): DescriptorVisibility = DescriptorVisibilities.LOCAL
@@ -76,6 +76,8 @@ abstract class IrDelegateDescriptorBase(
override fun getCompileTimeInitializer(): ConstantValue<*>? = null
override fun cleanCompileTimeInitializerCache() {}
override fun getVisibility(): DescriptorVisibility = DescriptorVisibilities.PRIVATE
override fun substitute(substitutor: TypeSubstitutor): PropertyDescriptor {
@@ -131,6 +133,7 @@ class IrLocalDelegatedPropertyDelegateDescriptorImpl(
) {
override fun getCompileTimeInitializer(): ConstantValue<*>? = null
override fun cleanCompileTimeInitializerCache() {}
override fun isVar(): Boolean = false
override fun isLateInit(): Boolean = false
override fun substitute(substitutor: TypeSubstitutor): VariableDescriptor? = throw UnsupportedOperationException()