Eliminated 'has backing field' metadata protobuf extension field.
We have IR for this information.
This commit is contained in:
committed by
alexander-gorshenev
parent
fbee94bfb6
commit
c1a84aa8a6
-7
@@ -7,15 +7,8 @@ package org.jetbrains.kotlin.backend.konan.descriptors
|
||||
|
||||
import org.jetbrains.kotlin.descriptors.*
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.metadata.konan.KonanProtoBuf
|
||||
import org.jetbrains.kotlin.serialization.deserialization.descriptors.*
|
||||
|
||||
val DeserializedPropertyDescriptor.konanBackingField: PropertyDescriptor?
|
||||
get() =
|
||||
if (this.proto.getExtension(KonanProtoBuf.hasBackingField))
|
||||
this
|
||||
else null
|
||||
|
||||
fun DeclarationDescriptor.deepPrint() {
|
||||
this.accept(DeepPrintVisitor(PrintVisitor()), 0)
|
||||
}
|
||||
|
||||
-4
@@ -37,11 +37,7 @@ import kotlin.properties.Delegates
|
||||
|
||||
// This is what Context collects about IR.
|
||||
internal class KonanIr(context: Context, irModule: IrModuleFragment): Ir<Context>(context, irModule) {
|
||||
|
||||
val propertiesWithBackingFields = mutableSetOf<PropertyDescriptor>()
|
||||
|
||||
override var symbols: KonanSymbols by Delegates.notNull()
|
||||
|
||||
}
|
||||
|
||||
internal class KonanSymbols(context: Context, private val symbolTable: SymbolTable, lazySymbolTable: ReferenceSymbolTable): Symbols<Context>(context, lazySymbolTable) {
|
||||
|
||||
-3
@@ -76,9 +76,6 @@ internal class KonanSerializerExtension(val context: Context, override val metad
|
||||
childSerializer: DescriptorSerializer) {
|
||||
proto.setExtension(KonanProtoBuf.propertyFile, sourceFileMap.assign(descriptor.source.containingFile))
|
||||
uniqId(descriptor) ?.let { proto.setExtension(KonanProtoBuf.propertyUniqId, it) }
|
||||
proto.setExtension(KonanProtoBuf.hasBackingField,
|
||||
context.ir.propertiesWithBackingFields.contains(descriptor))
|
||||
|
||||
super.serializeProperty(descriptor, proto, versionRequirementTable, childSerializer)
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,6 @@ extend Property {
|
||||
repeated Annotation property_annotation = 170;
|
||||
repeated Annotation property_getter_annotation = 177;
|
||||
repeated Annotation property_setter_annotation = 178;
|
||||
optional bool has_backing_field = 171;
|
||||
optional Annotation.Argument.Value compile_time_value = 173;
|
||||
optional int32 property_file = 176;
|
||||
optional DescriptorUniqId property_uniq_id = 179;
|
||||
|
||||
Reference in New Issue
Block a user