From 77e093354f8774332bb41aec881b1a8fe467e46a Mon Sep 17 00:00:00 2001 From: Alexander Gorshenev Date: Wed, 17 May 2017 20:13:07 +0300 Subject: [PATCH] Squash me more. --- .../serialization/IrDescriptorSerializer.kt | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/IrDescriptorSerializer.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/IrDescriptorSerializer.kt index ef398e65bb0..dbb36267708 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/IrDescriptorSerializer.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/IrDescriptorSerializer.kt @@ -87,11 +87,10 @@ internal class IrDescriptorSerializer( val typeParameters = descriptor.propertyIfAccessor.typeParameters typeParameters.forEach { proto.addTypeParameter(serializeDescriptor(it)) - // We explicitly serialize type parameters - // as types here so that they are interned in the - // natural order of declaration. Otherwise - // they appear in the order of appearence in the - // body of the function, and get wrong indices. + // We explicitly serialize type parameters as types here so that + // they are interned in the natural order of declaration. + // Otherwise they appear in the order of appearence in the body + // of the function, and get wrong indices. localDeclarationSerializer.typeSerializer(it.defaultType) } @@ -99,9 +98,8 @@ internal class IrDescriptorSerializer( proto.addValueParameter(serializeDescriptor(it)) } - // Allocate two indicies for the receivers. - // They are not deserialized from protobuf, - // just recreated together with their function. + // Allocate two indicies for the receivers. They are not deserialized + // from protobuf, just recreated together with their function. val dispatchReceiver = descriptor.dispatchReceiverParameter if (dispatchReceiver != null) @@ -141,8 +139,7 @@ internal class IrDescriptorSerializer( } else null val index = descriptorTable.indexByValue(descriptor) - // For getters and setters we use - // the *property* original index. + // For getters and setters we use the *property* original index. val originalIndex = descriptorTable.indexByValue(descriptor.propertyIfAccessor.original) context.log{"index = $index"}