From e749bc262d55d55a827275776a0ccf427bb07d2b Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Wed, 16 Sep 2015 16:21:43 +0300 Subject: [PATCH] Delete deprecated Type.Constructor message, advance ABI version --- .../serialization/DescriptorSerializer.java | 65 +- .../kotlin/checkers/LazyOperationsLog.kt | 51 +- .../kotlin/serialization/DebugProtoBuf.java | 1271 +++-------------- .../jetbrains/kotlin/load/java/JvmAbi.java | 2 +- core/deserialization/src/descriptors.proto | 19 +- .../kotlin/serialization/ProtoBuf.java | 1006 +++---------- .../deserialization/DeserializedType.kt | 11 +- .../deserialization/TypeDeserializer.kt | 56 +- .../stubBuilder/ClassClsStubBuilder.kt | 12 +- .../stubBuilder/TypeClsStubBuilder.kt | 25 +- .../jps/incremental/ProtoCompareGenerated.kt | 20 +- 11 files changed, 483 insertions(+), 2055 deletions(-) diff --git a/compiler/serialization/src/org/jetbrains/kotlin/serialization/DescriptorSerializer.java b/compiler/serialization/src/org/jetbrains/kotlin/serialization/DescriptorSerializer.java index 447293bd06c..3741cc995df 100644 --- a/compiler/serialization/src/org/jetbrains/kotlin/serialization/DescriptorSerializer.java +++ b/compiler/serialization/src/org/jetbrains/kotlin/serialization/DescriptorSerializer.java @@ -349,12 +349,23 @@ public class DescriptorSerializer { public ProtoBuf.Type.Builder type(@NotNull JetType type) { assert !type.isError() : "Can't serialize error types: " + type; // TODO - if (TypesPackage.isFlexible(type)) return flexibleType(type); + if (TypesPackage.isFlexible(type)) { + Flexibility flexibility = TypesPackage.flexibility(type); + + return type(flexibility.getLowerBound()) + .setFlexibleTypeCapabilitiesId(stringTable.getStringIndex(flexibility.getExtraCapabilities().getId())) + .setFlexibleUpperBound(type(flexibility.getUpperBound())); + } ProtoBuf.Type.Builder builder = ProtoBuf.Type.newBuilder(); - builder.setConstructor(typeConstructor(type.getConstructor())); - setTypeConstructorFields(builder, type.getConstructor()); + ClassifierDescriptor descriptor = type.getConstructor().getDeclarationDescriptor(); + if (descriptor instanceof ClassDescriptor) { + builder.setClassName(getClassId((ClassDescriptor) descriptor)); + } + if (descriptor instanceof TypeParameterDescriptor) { + builder.setTypeParameter(getTypeParameterId((TypeParameterDescriptor) descriptor)); + } for (TypeProjection projection : type.getArguments()) { builder.addArgument(typeArgument(projection)); @@ -370,33 +381,6 @@ public class DescriptorSerializer { return builder; } - private void setTypeConstructorFields(@NotNull ProtoBuf.Type.Builder builder, @NotNull TypeConstructor typeConstructor) { - ClassifierDescriptor declarationDescriptor = typeConstructor.getDeclarationDescriptor(); - - assert declarationDescriptor instanceof TypeParameterDescriptor || declarationDescriptor instanceof ClassDescriptor - : "Unknown declaration descriptor: " + typeConstructor; - if (declarationDescriptor instanceof TypeParameterDescriptor) { - TypeParameterDescriptor typeParameterDescriptor = (TypeParameterDescriptor) declarationDescriptor; - builder.setConstructorTypeParameter(getTypeParameterId(typeParameterDescriptor)); - } - else { - ClassDescriptor classDescriptor = (ClassDescriptor) declarationDescriptor; - builder.setConstructorClassName(getClassId(classDescriptor)); - } - } - - private ProtoBuf.Type.Builder flexibleType(@NotNull JetType type) { - Flexibility flexibility = TypesPackage.flexibility(type); - - ProtoBuf.Type.Builder builder = type(flexibility.getLowerBound()); - - builder.setFlexibleTypeCapabilitiesId(stringTable.getStringIndex(flexibility.getExtraCapabilities().getId())); - - builder.setFlexibleUpperBound(type(flexibility.getUpperBound())); - - return builder; - } - @NotNull private ProtoBuf.Type.Argument.Builder typeArgument(@NotNull TypeProjection typeProjection) { ProtoBuf.Type.Argument.Builder builder = ProtoBuf.Type.Argument.newBuilder(); @@ -417,27 +401,6 @@ public class DescriptorSerializer { return builder; } - @NotNull - private ProtoBuf.Type.Constructor.Builder typeConstructor(@NotNull TypeConstructor typeConstructor) { - ProtoBuf.Type.Constructor.Builder builder = ProtoBuf.Type.Constructor.newBuilder(); - - ClassifierDescriptor declarationDescriptor = typeConstructor.getDeclarationDescriptor(); - - assert declarationDescriptor instanceof TypeParameterDescriptor || declarationDescriptor instanceof ClassDescriptor - : "Unknown declaration descriptor: " + typeConstructor; - if (declarationDescriptor instanceof TypeParameterDescriptor) { - TypeParameterDescriptor typeParameterDescriptor = (TypeParameterDescriptor) declarationDescriptor; - builder.setKind(ProtoBuf.Type.Constructor.Kind.TYPE_PARAMETER); - builder.setId(getTypeParameterId(typeParameterDescriptor)); - } - else { - ClassDescriptor classDescriptor = (ClassDescriptor) declarationDescriptor; - //default: builder.setKind(Type.Constructor.Kind.CLASS); - builder.setId(getClassId(classDescriptor)); - } - return builder; - } - @NotNull public ProtoBuf.Package.Builder packageProto(@NotNull Collection fragments) { return packageProto(fragments, null); diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/LazyOperationsLog.kt b/compiler/tests/org/jetbrains/kotlin/checkers/LazyOperationsLog.kt index 6fb9a1e3f82..99dc5973016 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/LazyOperationsLog.kt +++ b/compiler/tests/org/jetbrains/kotlin/checkers/LazyOperationsLog.kt @@ -16,34 +16,30 @@ package org.jetbrains.kotlin.checkers +import org.jetbrains.kotlin.descriptors.Named +import org.jetbrains.kotlin.load.java.structure.JavaNamedElement +import org.jetbrains.kotlin.load.java.structure.impl.JavaClassImpl +import org.jetbrains.kotlin.load.java.structure.impl.JavaTypeImpl import org.jetbrains.kotlin.name.FqName import org.jetbrains.kotlin.name.Name -import org.jetbrains.kotlin.descriptors.Named -import java.util.IdentityHashMap -import org.jetbrains.kotlin.resolve.scopes.JetScope -import org.jetbrains.kotlin.load.java.structure.impl.JavaTypeImpl -import org.jetbrains.kotlin.load.java.structure.impl.JavaClassImpl -import java.util.ArrayList -import org.jetbrains.kotlin.utils.Printer -import org.jetbrains.kotlin.load.java.structure.JavaNamedElement -import org.jetbrains.kotlin.serialization.ProtoBuf -import org.jetbrains.kotlin.serialization.deserialization.TypeDeserializer -import org.jetbrains.kotlin.serialization.deserialization.DeserializationContext -import org.jetbrains.kotlin.types.JetType -import org.jetbrains.kotlin.resolve.DescriptorUtils -import java.util.HashMap -import org.jetbrains.kotlin.types.JetTypeImpl -import java.util.regex.Pattern -import org.jetbrains.kotlin.resolve.calls.tasks.ResolutionTaskHolder -import org.jetbrains.kotlin.renderer.DescriptorRenderer -import org.jetbrains.kotlin.resolve.calls.context.BasicCallResolutionContext import org.jetbrains.kotlin.psi.debugText.getDebugText +import org.jetbrains.kotlin.renderer.DescriptorRenderer +import org.jetbrains.kotlin.resolve.DescriptorUtils +import org.jetbrains.kotlin.resolve.calls.context.BasicCallResolutionContext import org.jetbrains.kotlin.resolve.calls.tasks.ResolutionCandidate -import org.jetbrains.kotlin.serialization.deserialization.TypeConstructorKind -import org.jetbrains.kotlin.serialization.deserialization.getTypeConstructorData +import org.jetbrains.kotlin.resolve.calls.tasks.ResolutionTaskHolder +import org.jetbrains.kotlin.resolve.scopes.JetScope +import org.jetbrains.kotlin.serialization.ProtoBuf +import org.jetbrains.kotlin.serialization.deserialization.DeserializationContext +import org.jetbrains.kotlin.serialization.deserialization.TypeDeserializer +import org.jetbrains.kotlin.types.JetType +import org.jetbrains.kotlin.types.JetTypeImpl +import org.jetbrains.kotlin.utils.Printer +import java.lang.reflect.Constructor import java.lang.reflect.GenericDeclaration import java.lang.reflect.Method -import java.lang.reflect.Constructor +import java.util.* +import java.util.regex.Pattern class LazyOperationsLog( val stringSanitizer: (String) -> String @@ -160,12 +156,11 @@ class LazyOperationsLog( val typeDeserializer = o.field("typeDeserializer") val context = typeDeserializer.field("c") val typeProto = o.field("typeProto") - val typeConstructorData = typeProto.getTypeConstructorData() - val text = when (typeConstructorData.kind) { - TypeConstructorKind.CLASS -> context.nameResolver.getFqName(typeConstructorData.id).asString() - TypeConstructorKind.TYPE_PARAMETER -> { - val classifier = (o as JetType).getConstructor().getDeclarationDescriptor()!! - "" + classifier.getName() + " in " + DescriptorUtils.getFqName(classifier.getContainingDeclaration()) + val text = when { + typeProto.hasClassName() -> context.nameResolver.getFqName(typeProto.className).asString() + typeProto.hasTypeParameter() -> { + val classifier = (o as JetType).constructor.declarationDescriptor!! + "" + classifier.name + " in " + DescriptorUtils.getFqName(classifier.containingDeclaration) } else -> "???" } diff --git a/compiler/tests/org/jetbrains/kotlin/serialization/DebugProtoBuf.java b/compiler/tests/org/jetbrains/kotlin/serialization/DebugProtoBuf.java index 316feefe7a7..896ee68679d 100644 --- a/compiler/tests/org/jetbrains/kotlin/serialization/DebugProtoBuf.java +++ b/compiler/tests/org/jetbrains/kotlin/serialization/DebugProtoBuf.java @@ -5375,20 +5375,6 @@ public final class DebugProtoBuf { com.google.protobuf.GeneratedMessage. ExtendableMessageOrBuilder { - // required .org.jetbrains.kotlin.serialization.Type.Constructor constructor = 1; - /** - * required .org.jetbrains.kotlin.serialization.Type.Constructor constructor = 1; - */ - boolean hasConstructor(); - /** - * required .org.jetbrains.kotlin.serialization.Type.Constructor constructor = 1; - */ - org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor getConstructor(); - /** - * required .org.jetbrains.kotlin.serialization.Type.Constructor constructor = 1; - */ - org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.ConstructorOrBuilder getConstructorOrBuilder(); - // repeated .org.jetbrains.kotlin.serialization.Type.Argument argument = 2; /** * repeated .org.jetbrains.kotlin.serialization.Type.Argument argument = 2; @@ -5478,41 +5464,41 @@ public final class DebugProtoBuf { */ org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeOrBuilder getFlexibleUpperBoundOrBuilder(); - // optional int32 constructor_class_name = 6; + // optional int32 class_name = 6; /** - * optional int32 constructor_class_name = 6; + * optional int32 class_name = 6; * *
      * fqName id
      * 
*/ - boolean hasConstructorClassName(); + boolean hasClassName(); /** - * optional int32 constructor_class_name = 6; + * optional int32 class_name = 6; * *
      * fqName id
      * 
*/ - int getConstructorClassName(); + int getClassName(); - // optional int32 constructor_type_parameter = 7; + // optional int32 type_parameter = 7; /** - * optional int32 constructor_type_parameter = 7; + * optional int32 type_parameter = 7; * *
      * type parameter id
      * 
*/ - boolean hasConstructorTypeParameter(); + boolean hasTypeParameter(); /** - * optional int32 constructor_type_parameter = 7; + * optional int32 type_parameter = 7; * *
      * type parameter id
      * 
*/ - int getConstructorTypeParameter(); + int getTypeParameter(); } /** * Protobuf type {@code org.jetbrains.kotlin.serialization.Type} @@ -5565,40 +5551,27 @@ public final class DebugProtoBuf { } break; } - case 10: { - org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - subBuilder = constructor_.toBuilder(); - } - constructor_ = input.readMessage(org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(constructor_); - constructor_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { argument_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; + mutable_bitField0_ |= 0x00000001; } argument_.add(input.readMessage(org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Argument.PARSER, extensionRegistry)); break; } case 24: { - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000001; nullable_ = input.readBool(); break; } case 32: { - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; flexibleTypeCapabilitiesId_ = input.readInt32(); break; } case 42: { org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Builder subBuilder = null; - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000004) == 0x00000004)) { subBuilder = flexibleUpperBound_.toBuilder(); } flexibleUpperBound_ = input.readMessage(org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.PARSER, extensionRegistry); @@ -5606,17 +5579,17 @@ public final class DebugProtoBuf { subBuilder.mergeFrom(flexibleUpperBound_); flexibleUpperBound_ = subBuilder.buildPartial(); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000004; break; } case 48: { - bitField0_ |= 0x00000010; - constructorClassName_ = input.readInt32(); + bitField0_ |= 0x00000008; + className_ = input.readInt32(); break; } case 56: { - bitField0_ |= 0x00000020; - constructorTypeParameter_ = input.readInt32(); + bitField0_ |= 0x00000010; + typeParameter_ = input.readInt32(); break; } } @@ -5627,7 +5600,7 @@ public final class DebugProtoBuf { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { argument_ = java.util.Collections.unmodifiableList(argument_); } this.unknownFields = unknownFields.build(); @@ -5661,614 +5634,6 @@ public final class DebugProtoBuf { return PARSER; } - public interface ConstructorOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional .org.jetbrains.kotlin.serialization.Type.Constructor.Kind kind = 1 [default = CLASS]; - /** - * optional .org.jetbrains.kotlin.serialization.Type.Constructor.Kind kind = 1 [default = CLASS]; - */ - boolean hasKind(); - /** - * optional .org.jetbrains.kotlin.serialization.Type.Constructor.Kind kind = 1 [default = CLASS]; - */ - org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor.Kind getKind(); - - // required int32 id = 2; - /** - * required int32 id = 2; - * - *
-       * CLASS - fqName id, TYPE_PARAMETER - type parameter id
-       * 
- */ - boolean hasId(); - /** - * required int32 id = 2; - * - *
-       * CLASS - fqName id, TYPE_PARAMETER - type parameter id
-       * 
- */ - int getId(); - } - /** - * Protobuf type {@code org.jetbrains.kotlin.serialization.Type.Constructor} - */ - public static final class Constructor extends - com.google.protobuf.GeneratedMessage - implements ConstructorOrBuilder { - // Use Constructor.newBuilder() to construct. - private Constructor(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private Constructor(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final Constructor defaultInstance; - public static Constructor getDefaultInstance() { - return defaultInstance; - } - - public Constructor getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Constructor( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - int rawValue = input.readEnum(); - org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor.Kind value = org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor.Kind.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(1, rawValue); - } else { - bitField0_ |= 0x00000001; - kind_ = value; - } - break; - } - case 16: { - bitField0_ |= 0x00000002; - id_ = input.readInt32(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.jetbrains.kotlin.serialization.DebugProtoBuf.internal_static_org_jetbrains_kotlin_serialization_Type_Constructor_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.jetbrains.kotlin.serialization.DebugProtoBuf.internal_static_org_jetbrains_kotlin_serialization_Type_Constructor_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor.class, org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Constructor parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Constructor(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - /** - * Protobuf enum {@code org.jetbrains.kotlin.serialization.Type.Constructor.Kind} - */ - public enum Kind - implements com.google.protobuf.ProtocolMessageEnum { - /** - * CLASS = 0; - */ - CLASS(0, 0), - /** - * TYPE_PARAMETER = 1; - */ - TYPE_PARAMETER(1, 1), - ; - - /** - * CLASS = 0; - */ - public static final int CLASS_VALUE = 0; - /** - * TYPE_PARAMETER = 1; - */ - public static final int TYPE_PARAMETER_VALUE = 1; - - - public final int getNumber() { return value; } - - public static Kind valueOf(int value) { - switch (value) { - case 0: return CLASS; - case 1: return TYPE_PARAMETER; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static com.google.protobuf.Internal.EnumLiteMap - internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Kind findValueByNumber(int number) { - return Kind.valueOf(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - return getDescriptor().getValues().get(index); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor.getDescriptor().getEnumTypes().get(0); - } - - private static final Kind[] VALUES = values(); - - public static Kind valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - return VALUES[desc.getIndex()]; - } - - private final int index; - private final int value; - - private Kind(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:org.jetbrains.kotlin.serialization.Type.Constructor.Kind) - } - - private int bitField0_; - // optional .org.jetbrains.kotlin.serialization.Type.Constructor.Kind kind = 1 [default = CLASS]; - public static final int KIND_FIELD_NUMBER = 1; - private org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor.Kind kind_; - /** - * optional .org.jetbrains.kotlin.serialization.Type.Constructor.Kind kind = 1 [default = CLASS]; - */ - public boolean hasKind() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional .org.jetbrains.kotlin.serialization.Type.Constructor.Kind kind = 1 [default = CLASS]; - */ - public org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor.Kind getKind() { - return kind_; - } - - // required int32 id = 2; - public static final int ID_FIELD_NUMBER = 2; - private int id_; - /** - * required int32 id = 2; - * - *
-       * CLASS - fqName id, TYPE_PARAMETER - type parameter id
-       * 
- */ - public boolean hasId() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * required int32 id = 2; - * - *
-       * CLASS - fqName id, TYPE_PARAMETER - type parameter id
-       * 
- */ - public int getId() { - return id_; - } - - private void initFields() { - kind_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor.Kind.CLASS; - id_ = 0; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasId()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeEnum(1, kind_.getNumber()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeInt32(2, id_); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, kind_.getNumber()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, id_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code org.jetbrains.kotlin.serialization.Type.Constructor} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.ConstructorOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.jetbrains.kotlin.serialization.DebugProtoBuf.internal_static_org_jetbrains_kotlin_serialization_Type_Constructor_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.jetbrains.kotlin.serialization.DebugProtoBuf.internal_static_org_jetbrains_kotlin_serialization_Type_Constructor_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor.class, org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor.Builder.class); - } - - // Construct using org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - kind_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor.Kind.CLASS; - bitField0_ = (bitField0_ & ~0x00000001); - id_ = 0; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.jetbrains.kotlin.serialization.DebugProtoBuf.internal_static_org_jetbrains_kotlin_serialization_Type_Constructor_descriptor; - } - - public org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor getDefaultInstanceForType() { - return org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor.getDefaultInstance(); - } - - public org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor build() { - org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor buildPartial() { - org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor result = new org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.kind_ = kind_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.id_ = id_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor) { - return mergeFrom((org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor other) { - if (other == org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor.getDefaultInstance()) return this; - if (other.hasKind()) { - setKind(other.getKind()); - } - if (other.hasId()) { - setId(other.getId()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - if (!hasId()) { - - return false; - } - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - // optional .org.jetbrains.kotlin.serialization.Type.Constructor.Kind kind = 1 [default = CLASS]; - private org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor.Kind kind_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor.Kind.CLASS; - /** - * optional .org.jetbrains.kotlin.serialization.Type.Constructor.Kind kind = 1 [default = CLASS]; - */ - public boolean hasKind() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional .org.jetbrains.kotlin.serialization.Type.Constructor.Kind kind = 1 [default = CLASS]; - */ - public org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor.Kind getKind() { - return kind_; - } - /** - * optional .org.jetbrains.kotlin.serialization.Type.Constructor.Kind kind = 1 [default = CLASS]; - */ - public Builder setKind(org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor.Kind value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - kind_ = value; - onChanged(); - return this; - } - /** - * optional .org.jetbrains.kotlin.serialization.Type.Constructor.Kind kind = 1 [default = CLASS]; - */ - public Builder clearKind() { - bitField0_ = (bitField0_ & ~0x00000001); - kind_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor.Kind.CLASS; - onChanged(); - return this; - } - - // required int32 id = 2; - private int id_ ; - /** - * required int32 id = 2; - * - *
-         * CLASS - fqName id, TYPE_PARAMETER - type parameter id
-         * 
- */ - public boolean hasId() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * required int32 id = 2; - * - *
-         * CLASS - fqName id, TYPE_PARAMETER - type parameter id
-         * 
- */ - public int getId() { - return id_; - } - /** - * required int32 id = 2; - * - *
-         * CLASS - fqName id, TYPE_PARAMETER - type parameter id
-         * 
- */ - public Builder setId(int value) { - bitField0_ |= 0x00000002; - id_ = value; - onChanged(); - return this; - } - /** - * required int32 id = 2; - * - *
-         * CLASS - fqName id, TYPE_PARAMETER - type parameter id
-         * 
- */ - public Builder clearId() { - bitField0_ = (bitField0_ & ~0x00000002); - id_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.Type.Constructor) - } - - static { - defaultInstance = new Constructor(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.serialization.Type.Constructor) - } - public interface ArgumentOrBuilder extends com.google.protobuf.MessageOrBuilder { @@ -7039,28 +6404,6 @@ public final class DebugProtoBuf { } private int bitField0_; - // required .org.jetbrains.kotlin.serialization.Type.Constructor constructor = 1; - public static final int CONSTRUCTOR_FIELD_NUMBER = 1; - private org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor constructor_; - /** - * required .org.jetbrains.kotlin.serialization.Type.Constructor constructor = 1; - */ - public boolean hasConstructor() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required .org.jetbrains.kotlin.serialization.Type.Constructor constructor = 1; - */ - public org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor getConstructor() { - return constructor_; - } - /** - * required .org.jetbrains.kotlin.serialization.Type.Constructor constructor = 1; - */ - public org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.ConstructorOrBuilder getConstructorOrBuilder() { - return constructor_; - } - // repeated .org.jetbrains.kotlin.serialization.Type.Argument argument = 2; public static final int ARGUMENT_FIELD_NUMBER = 2; private java.util.List argument_; @@ -7104,7 +6447,7 @@ public final class DebugProtoBuf { * optional bool nullable = 3 [default = false]; */ public boolean hasNullable() { - return ((bitField0_ & 0x00000002) == 0x00000002); + return ((bitField0_ & 0x00000001) == 0x00000001); } /** * optional bool nullable = 3 [default = false]; @@ -7126,7 +6469,7 @@ public final class DebugProtoBuf { * */ public boolean hasFlexibleTypeCapabilitiesId() { - return ((bitField0_ & 0x00000004) == 0x00000004); + return ((bitField0_ & 0x00000002) == 0x00000002); } /** * optional int32 flexible_type_capabilities_id = 4; @@ -7154,7 +6497,7 @@ public final class DebugProtoBuf { * */ public boolean hasFlexibleUpperBound() { - return ((bitField0_ & 0x00000008) == 0x00000008); + return ((bitField0_ & 0x00000004) == 0x00000004); } /** * optional .org.jetbrains.kotlin.serialization.Type flexible_upper_bound = 5; @@ -7181,76 +6524,67 @@ public final class DebugProtoBuf { return flexibleUpperBound_; } - // optional int32 constructor_class_name = 6; - public static final int CONSTRUCTOR_CLASS_NAME_FIELD_NUMBER = 6; - private int constructorClassName_; + // optional int32 class_name = 6; + public static final int CLASS_NAME_FIELD_NUMBER = 6; + private int className_; /** - * optional int32 constructor_class_name = 6; + * optional int32 class_name = 6; * *
      * fqName id
      * 
*/ - public boolean hasConstructorClassName() { + public boolean hasClassName() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional int32 class_name = 6; + * + *
+     * fqName id
+     * 
+ */ + public int getClassName() { + return className_; + } + + // optional int32 type_parameter = 7; + public static final int TYPE_PARAMETER_FIELD_NUMBER = 7; + private int typeParameter_; + /** + * optional int32 type_parameter = 7; + * + *
+     * type parameter id
+     * 
+ */ + public boolean hasTypeParameter() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** - * optional int32 constructor_class_name = 6; - * - *
-     * fqName id
-     * 
- */ - public int getConstructorClassName() { - return constructorClassName_; - } - - // optional int32 constructor_type_parameter = 7; - public static final int CONSTRUCTOR_TYPE_PARAMETER_FIELD_NUMBER = 7; - private int constructorTypeParameter_; - /** - * optional int32 constructor_type_parameter = 7; + * optional int32 type_parameter = 7; * *
      * type parameter id
      * 
*/ - public boolean hasConstructorTypeParameter() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional int32 constructor_type_parameter = 7; - * - *
-     * type parameter id
-     * 
- */ - public int getConstructorTypeParameter() { - return constructorTypeParameter_; + public int getTypeParameter() { + return typeParameter_; } private void initFields() { - constructor_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor.getDefaultInstance(); argument_ = java.util.Collections.emptyList(); nullable_ = false; flexibleTypeCapabilitiesId_ = 0; flexibleUpperBound_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.getDefaultInstance(); - constructorClassName_ = 0; - constructorTypeParameter_ = 0; + className_ = 0; + typeParameter_ = 0; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - if (!hasConstructor()) { - memoizedIsInitialized = 0; - return false; - } - if (!getConstructor().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } for (int i = 0; i < getArgumentCount(); i++) { if (!getArgument(i).isInitialized()) { memoizedIsInitialized = 0; @@ -7277,26 +6611,23 @@ public final class DebugProtoBuf { com.google.protobuf.GeneratedMessage .ExtendableMessage.ExtensionWriter extensionWriter = newExtensionWriter(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeMessage(1, constructor_); - } for (int i = 0; i < argument_.size(); i++) { output.writeMessage(2, argument_.get(i)); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBool(3, nullable_); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeInt32(4, flexibleTypeCapabilitiesId_); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeMessage(5, flexibleUpperBound_); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeInt32(6, constructorClassName_); + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeInt32(6, className_); } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeInt32(7, constructorTypeParameter_); + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeInt32(7, typeParameter_); } extensionWriter.writeUntil(200, output); getUnknownFields().writeTo(output); @@ -7308,33 +6639,29 @@ public final class DebugProtoBuf { if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, constructor_); - } for (int i = 0; i < argument_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, argument_.get(i)); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(3, nullable_); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(4, flexibleTypeCapabilitiesId_); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, flexibleUpperBound_); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(6, className_); + } if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(6, constructorClassName_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(7, constructorTypeParameter_); + .computeInt32Size(7, typeParameter_); } size += extensionsSerializedSize(); size += getUnknownFields().getSerializedSize(); @@ -7445,7 +6772,6 @@ public final class DebugProtoBuf { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getConstructorFieldBuilder(); getArgumentFieldBuilder(); getFlexibleUpperBoundFieldBuilder(); } @@ -7456,32 +6782,26 @@ public final class DebugProtoBuf { public Builder clear() { super.clear(); - if (constructorBuilder_ == null) { - constructor_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor.getDefaultInstance(); - } else { - constructorBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); if (argumentBuilder_ == null) { argument_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000001); } else { argumentBuilder_.clear(); } nullable_ = false; - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000002); flexibleTypeCapabilitiesId_ = 0; - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000004); if (flexibleUpperBoundBuilder_ == null) { flexibleUpperBound_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.getDefaultInstance(); } else { flexibleUpperBoundBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000008); + className_ = 0; bitField0_ = (bitField0_ & ~0x00000010); - constructorClassName_ = 0; + typeParameter_ = 0; bitField0_ = (bitField0_ & ~0x00000020); - constructorTypeParameter_ = 0; - bitField0_ = (bitField0_ & ~0x00000040); return this; } @@ -7510,47 +6830,39 @@ public final class DebugProtoBuf { org.jetbrains.kotlin.serialization.DebugProtoBuf.Type result = new org.jetbrains.kotlin.serialization.DebugProtoBuf.Type(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - if (constructorBuilder_ == null) { - result.constructor_ = constructor_; - } else { - result.constructor_ = constructorBuilder_.build(); - } if (argumentBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { argument_ = java.util.Collections.unmodifiableList(argument_); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000001); } result.argument_ = argument_; } else { result.argument_ = argumentBuilder_.build(); } + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000001; + } + result.nullable_ = nullable_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000002; } - result.nullable_ = nullable_; + result.flexibleTypeCapabilitiesId_ = flexibleTypeCapabilitiesId_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000004; } - result.flexibleTypeCapabilitiesId_ = flexibleTypeCapabilitiesId_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000008; - } if (flexibleUpperBoundBuilder_ == null) { result.flexibleUpperBound_ = flexibleUpperBound_; } else { result.flexibleUpperBound_ = flexibleUpperBoundBuilder_.build(); } + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000008; + } + result.className_ = className_; if (((from_bitField0_ & 0x00000020) == 0x00000020)) { to_bitField0_ |= 0x00000010; } - result.constructorClassName_ = constructorClassName_; - if (((from_bitField0_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x00000020; - } - result.constructorTypeParameter_ = constructorTypeParameter_; + result.typeParameter_ = typeParameter_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -7567,14 +6879,11 @@ public final class DebugProtoBuf { public Builder mergeFrom(org.jetbrains.kotlin.serialization.DebugProtoBuf.Type other) { if (other == org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.getDefaultInstance()) return this; - if (other.hasConstructor()) { - mergeConstructor(other.getConstructor()); - } if (argumentBuilder_ == null) { if (!other.argument_.isEmpty()) { if (argument_.isEmpty()) { argument_ = other.argument_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000001); } else { ensureArgumentIsMutable(); argument_.addAll(other.argument_); @@ -7587,7 +6896,7 @@ public final class DebugProtoBuf { argumentBuilder_.dispose(); argumentBuilder_ = null; argument_ = other.argument_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000001); argumentBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getArgumentFieldBuilder() : null; @@ -7605,11 +6914,11 @@ public final class DebugProtoBuf { if (other.hasFlexibleUpperBound()) { mergeFlexibleUpperBound(other.getFlexibleUpperBound()); } - if (other.hasConstructorClassName()) { - setConstructorClassName(other.getConstructorClassName()); + if (other.hasClassName()) { + setClassName(other.getClassName()); } - if (other.hasConstructorTypeParameter()) { - setConstructorTypeParameter(other.getConstructorTypeParameter()); + if (other.hasTypeParameter()) { + setTypeParameter(other.getTypeParameter()); } this.mergeExtensionFields(other); this.mergeUnknownFields(other.getUnknownFields()); @@ -7617,14 +6926,6 @@ public final class DebugProtoBuf { } public final boolean isInitialized() { - if (!hasConstructor()) { - - return false; - } - if (!getConstructor().isInitialized()) { - - return false; - } for (int i = 0; i < getArgumentCount(); i++) { if (!getArgument(i).isInitialized()) { @@ -7663,130 +6964,13 @@ public final class DebugProtoBuf { } private int bitField0_; - // required .org.jetbrains.kotlin.serialization.Type.Constructor constructor = 1; - private org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor constructor_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor, org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.ConstructorOrBuilder> constructorBuilder_; - /** - * required .org.jetbrains.kotlin.serialization.Type.Constructor constructor = 1; - */ - public boolean hasConstructor() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required .org.jetbrains.kotlin.serialization.Type.Constructor constructor = 1; - */ - public org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor getConstructor() { - if (constructorBuilder_ == null) { - return constructor_; - } else { - return constructorBuilder_.getMessage(); - } - } - /** - * required .org.jetbrains.kotlin.serialization.Type.Constructor constructor = 1; - */ - public Builder setConstructor(org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor value) { - if (constructorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - constructor_ = value; - onChanged(); - } else { - constructorBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - return this; - } - /** - * required .org.jetbrains.kotlin.serialization.Type.Constructor constructor = 1; - */ - public Builder setConstructor( - org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor.Builder builderForValue) { - if (constructorBuilder_ == null) { - constructor_ = builderForValue.build(); - onChanged(); - } else { - constructorBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - return this; - } - /** - * required .org.jetbrains.kotlin.serialization.Type.Constructor constructor = 1; - */ - public Builder mergeConstructor(org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor value) { - if (constructorBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001) && - constructor_ != org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor.getDefaultInstance()) { - constructor_ = - org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor.newBuilder(constructor_).mergeFrom(value).buildPartial(); - } else { - constructor_ = value; - } - onChanged(); - } else { - constructorBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000001; - return this; - } - /** - * required .org.jetbrains.kotlin.serialization.Type.Constructor constructor = 1; - */ - public Builder clearConstructor() { - if (constructorBuilder_ == null) { - constructor_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor.getDefaultInstance(); - onChanged(); - } else { - constructorBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - /** - * required .org.jetbrains.kotlin.serialization.Type.Constructor constructor = 1; - */ - public org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor.Builder getConstructorBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getConstructorFieldBuilder().getBuilder(); - } - /** - * required .org.jetbrains.kotlin.serialization.Type.Constructor constructor = 1; - */ - public org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.ConstructorOrBuilder getConstructorOrBuilder() { - if (constructorBuilder_ != null) { - return constructorBuilder_.getMessageOrBuilder(); - } else { - return constructor_; - } - } - /** - * required .org.jetbrains.kotlin.serialization.Type.Constructor constructor = 1; - */ - private com.google.protobuf.SingleFieldBuilder< - org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor, org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.ConstructorOrBuilder> - getConstructorFieldBuilder() { - if (constructorBuilder_ == null) { - constructorBuilder_ = new com.google.protobuf.SingleFieldBuilder< - org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor, org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Constructor.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.ConstructorOrBuilder>( - constructor_, - getParentForChildren(), - isClean()); - constructor_ = null; - } - return constructorBuilder_; - } - // repeated .org.jetbrains.kotlin.serialization.Type.Argument argument = 2; private java.util.List argument_ = java.util.Collections.emptyList(); private void ensureArgumentIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { argument_ = new java.util.ArrayList(argument_); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000001; } } @@ -7935,7 +7119,7 @@ public final class DebugProtoBuf { public Builder clearArgument() { if (argumentBuilder_ == null) { argument_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { argumentBuilder_.clear(); @@ -8012,7 +7196,7 @@ public final class DebugProtoBuf { argumentBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Argument, org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Argument.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.ArgumentOrBuilder>( argument_, - ((bitField0_ & 0x00000002) == 0x00000002), + ((bitField0_ & 0x00000001) == 0x00000001), getParentForChildren(), isClean()); argument_ = null; @@ -8026,7 +7210,7 @@ public final class DebugProtoBuf { * optional bool nullable = 3 [default = false]; */ public boolean hasNullable() { - return ((bitField0_ & 0x00000004) == 0x00000004); + return ((bitField0_ & 0x00000002) == 0x00000002); } /** * optional bool nullable = 3 [default = false]; @@ -8038,7 +7222,7 @@ public final class DebugProtoBuf { * optional bool nullable = 3 [default = false]; */ public Builder setNullable(boolean value) { - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; nullable_ = value; onChanged(); return this; @@ -8047,7 +7231,7 @@ public final class DebugProtoBuf { * optional bool nullable = 3 [default = false]; */ public Builder clearNullable() { - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000002); nullable_ = false; onChanged(); return this; @@ -8065,7 +7249,7 @@ public final class DebugProtoBuf { * */ public boolean hasFlexibleTypeCapabilitiesId() { - return ((bitField0_ & 0x00000008) == 0x00000008); + return ((bitField0_ & 0x00000004) == 0x00000004); } /** * optional int32 flexible_type_capabilities_id = 4; @@ -8089,7 +7273,7 @@ public final class DebugProtoBuf { * */ public Builder setFlexibleTypeCapabilitiesId(int value) { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000004; flexibleTypeCapabilitiesId_ = value; onChanged(); return this; @@ -8104,7 +7288,7 @@ public final class DebugProtoBuf { * */ public Builder clearFlexibleTypeCapabilitiesId() { - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000004); flexibleTypeCapabilitiesId_ = 0; onChanged(); return this; @@ -8124,7 +7308,7 @@ public final class DebugProtoBuf { * */ public boolean hasFlexibleUpperBound() { - return ((bitField0_ & 0x00000010) == 0x00000010); + return ((bitField0_ & 0x00000008) == 0x00000008); } /** * optional .org.jetbrains.kotlin.serialization.Type flexible_upper_bound = 5; @@ -8161,7 +7345,7 @@ public final class DebugProtoBuf { } else { flexibleUpperBoundBuilder_.setMessage(value); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000008; return this; } /** @@ -8181,7 +7365,7 @@ public final class DebugProtoBuf { } else { flexibleUpperBoundBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000008; return this; } /** @@ -8195,7 +7379,7 @@ public final class DebugProtoBuf { */ public Builder mergeFlexibleUpperBound(org.jetbrains.kotlin.serialization.DebugProtoBuf.Type value) { if (flexibleUpperBoundBuilder_ == null) { - if (((bitField0_ & 0x00000010) == 0x00000010) && + if (((bitField0_ & 0x00000008) == 0x00000008) && flexibleUpperBound_ != org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.getDefaultInstance()) { flexibleUpperBound_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.newBuilder(flexibleUpperBound_).mergeFrom(value).buildPartial(); @@ -8206,7 +7390,7 @@ public final class DebugProtoBuf { } else { flexibleUpperBoundBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000008; return this; } /** @@ -8225,7 +7409,7 @@ public final class DebugProtoBuf { } else { flexibleUpperBoundBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000008); return this; } /** @@ -8238,7 +7422,7 @@ public final class DebugProtoBuf { * */ public org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Builder getFlexibleUpperBoundBuilder() { - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000008; onChanged(); return getFlexibleUpperBoundFieldBuilder().getBuilder(); } @@ -8281,100 +7465,100 @@ public final class DebugProtoBuf { return flexibleUpperBoundBuilder_; } - // optional int32 constructor_class_name = 6; - private int constructorClassName_ ; + // optional int32 class_name = 6; + private int className_ ; /** - * optional int32 constructor_class_name = 6; + * optional int32 class_name = 6; * *
        * fqName id
        * 
*/ - public boolean hasConstructorClassName() { - return ((bitField0_ & 0x00000020) == 0x00000020); + public boolean hasClassName() { + return ((bitField0_ & 0x00000010) == 0x00000010); } /** - * optional int32 constructor_class_name = 6; + * optional int32 class_name = 6; * *
        * fqName id
        * 
*/ - public int getConstructorClassName() { - return constructorClassName_; + public int getClassName() { + return className_; } /** - * optional int32 constructor_class_name = 6; + * optional int32 class_name = 6; * *
        * fqName id
        * 
*/ - public Builder setConstructorClassName(int value) { - bitField0_ |= 0x00000020; - constructorClassName_ = value; + public Builder setClassName(int value) { + bitField0_ |= 0x00000010; + className_ = value; onChanged(); return this; } /** - * optional int32 constructor_class_name = 6; + * optional int32 class_name = 6; * *
        * fqName id
        * 
*/ - public Builder clearConstructorClassName() { - bitField0_ = (bitField0_ & ~0x00000020); - constructorClassName_ = 0; + public Builder clearClassName() { + bitField0_ = (bitField0_ & ~0x00000010); + className_ = 0; onChanged(); return this; } - // optional int32 constructor_type_parameter = 7; - private int constructorTypeParameter_ ; + // optional int32 type_parameter = 7; + private int typeParameter_ ; /** - * optional int32 constructor_type_parameter = 7; + * optional int32 type_parameter = 7; * *
        * type parameter id
        * 
*/ - public boolean hasConstructorTypeParameter() { - return ((bitField0_ & 0x00000040) == 0x00000040); + public boolean hasTypeParameter() { + return ((bitField0_ & 0x00000020) == 0x00000020); } /** - * optional int32 constructor_type_parameter = 7; + * optional int32 type_parameter = 7; * *
        * type parameter id
        * 
*/ - public int getConstructorTypeParameter() { - return constructorTypeParameter_; + public int getTypeParameter() { + return typeParameter_; } /** - * optional int32 constructor_type_parameter = 7; + * optional int32 type_parameter = 7; * *
        * type parameter id
        * 
*/ - public Builder setConstructorTypeParameter(int value) { - bitField0_ |= 0x00000040; - constructorTypeParameter_ = value; + public Builder setTypeParameter(int value) { + bitField0_ |= 0x00000020; + typeParameter_ = value; onChanged(); return this; } /** - * optional int32 constructor_type_parameter = 7; + * optional int32 type_parameter = 7; * *
        * type parameter id
        * 
*/ - public Builder clearConstructorTypeParameter() { - bitField0_ = (bitField0_ & ~0x00000040); - constructorTypeParameter_ = 0; + public Builder clearTypeParameter() { + bitField0_ = (bitField0_ & ~0x00000020); + typeParameter_ = 0; onChanged(); return this; } @@ -10026,7 +9210,7 @@ public final class DebugProtoBuf { /** * COMPANION_OBJECT = 6; */ - CLASS_OBJECT(6, 6), + COMPANION_OBJECT(6, 6), ; /** @@ -10060,7 +9244,7 @@ public final class DebugProtoBuf { /** * COMPANION_OBJECT = 6; */ - public static final int CLASS_OBJECT_VALUE = 6; + public static final int COMPANION_OBJECT_VALUE = 6; public final int getNumber() { return value; } @@ -10073,7 +9257,7 @@ public final class DebugProtoBuf { case 3: return ENUM_ENTRY; case 4: return ANNOTATION_CLASS; case 5: return OBJECT; - case 6: return CLASS_OBJECT; + case 6: return COMPANION_OBJECT; default: return null; } } @@ -13858,6 +13042,7 @@ public final class DebugProtoBuf { *hasGetter *hasSetter *hasConstant + *lateinit * */ boolean hasFlags(); @@ -13874,6 +13059,7 @@ public final class DebugProtoBuf { *hasGetter *hasSetter *hasConstant + *lateinit * */ int getFlags(); @@ -15413,6 +14599,7 @@ public final class DebugProtoBuf { *hasGetter *hasSetter *hasConstant + *lateinit * */ public boolean hasFlags() { @@ -15431,6 +14618,7 @@ public final class DebugProtoBuf { *hasGetter *hasSetter *hasConstant + *lateinit * */ public int getFlags() { @@ -16164,6 +15352,7 @@ public final class DebugProtoBuf { *hasGetter *hasSetter *hasConstant + *lateinit * */ public boolean hasFlags() { @@ -16182,6 +15371,7 @@ public final class DebugProtoBuf { *hasGetter *hasSetter *hasConstant + *lateinit * */ public int getFlags() { @@ -16200,6 +15390,7 @@ public final class DebugProtoBuf { *hasGetter *hasSetter *hasConstant + *lateinit * */ public Builder setFlags(int value) { @@ -16221,6 +15412,7 @@ public final class DebugProtoBuf { *hasGetter *hasSetter *hasConstant + *lateinit * */ public Builder clearFlags() { @@ -17209,11 +16401,6 @@ public final class DebugProtoBuf { private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_jetbrains_kotlin_serialization_Type_fieldAccessorTable; - private static com.google.protobuf.Descriptors.Descriptor - internal_static_org_jetbrains_kotlin_serialization_Type_Constructor_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_org_jetbrains_kotlin_serialization_Type_Constructor_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_org_jetbrains_kotlin_serialization_Type_Argument_descriptor; private static @@ -17289,75 +16476,68 @@ public final class DebugProtoBuf { "\n\004BYTE\020\000\022\010\n\004CHAR\020\001\022\t\n\005SHORT\020\002\022\007\n\003INT\020\003\022\010" + "\n\004LONG\020\004\022\t\n\005FLOAT\020\005\022\n\n\006DOUBLE\020\006\022\013\n\007BOOLE", "AN\020\007\022\n\n\006STRING\020\010\022\t\n\005CLASS\020\t\022\010\n\004ENUM\020\n\022\016\n" + - "\nANNOTATION\020\013\022\t\n\005ARRAY\020\014\"\350\005\n\004Type\022O\n\013con" + - "structor\030\001 \002(\01324.org.jetbrains.kotlin.se" + - "rialization.Type.ConstructorB\004\200\265\030\001\022C\n\010ar" + - "gument\030\002 \003(\01321.org.jetbrains.kotlin.seri" + - "alization.Type.Argument\022\027\n\010nullable\030\003 \001(" + - "\010:\005false\022+\n\035flexible_type_capabilities_i" + - "d\030\004 \001(\005B\004\230\265\030\001\022F\n\024flexible_upper_bound\030\005 " + - "\001(\0132(.org.jetbrains.kotlin.serialization" + - ".Type\022$\n\026constructor_class_name\030\006 \001(\005B\004\220", - "\265\030\001\022\"\n\032constructor_type_parameter\030\007 \001(\005\032" + - "\234\001\n\013Constructor\022T\n\004kind\030\001 \001(\01629.org.jetb" + - "rains.kotlin.serialization.Type.Construc" + - "tor.Kind:\005CLASSB\004\200\265\030\001\022\020\n\002id\030\002 \002(\005B\004\200\265\030\001\"" + - "%\n\004Kind\022\t\n\005CLASS\020\000\022\022\n\016TYPE_PARAMETER\020\001\032\313" + - "\001\n\010Argument\022U\n\nprojection\030\001 \001(\0162<.org.je" + - "tbrains.kotlin.serialization.Type.Argume" + - "nt.Projection:\003INV\0226\n\004type\030\002 \001(\0132(.org.j" + - "etbrains.kotlin.serialization.Type\"0\n\nPr" + - "ojection\022\006\n\002IN\020\000\022\007\n\003OUT\020\001\022\007\n\003INV\020\002\022\010\n\004ST", - "AR\020\003*\005\010d\020\310\001\"\377\001\n\rTypeParameter\022\n\n\002id\030\001 \002(" + - "\005\022\022\n\004name\030\002 \002(\005B\004\210\265\030\001\022\026\n\007reified\030\003 \001(\010:\005" + - "false\022Q\n\010variance\030\004 \001(\0162:.org.jetbrains." + - "kotlin.serialization.TypeParameter.Varia" + - "nce:\003INV\022=\n\013upper_bound\030\005 \003(\0132(.org.jetb" + - "rains.kotlin.serialization.Type\"$\n\010Varia" + - "nce\022\006\n\002IN\020\000\022\007\n\003OUT\020\001\022\007\n\003INV\020\002\"\315\005\n\005Class\022" + - "\020\n\005flags\030\001 \001(\005:\0010\022\025\n\007fq_name\030\003 \002(\005B\004\220\265\030\001" + - "\022#\n\025companion_object_name\030\004 \001(\005B\004\210\265\030\001\022I\n" + - "\016type_parameter\030\005 \003(\01321.org.jetbrains.ko", - "tlin.serialization.TypeParameter\022;\n\tsupe" + - "rtype\030\006 \003(\0132(.org.jetbrains.kotlin.seria" + - "lization.Type\022!\n\021nested_class_name\030\007 \003(\005" + - "B\006\020\001\210\265\030\001\022<\n\006member\030\013 \003(\0132,.org.jetbrains" + - ".kotlin.serialization.Callable\022\032\n\nenum_e" + - "ntry\030\014 \003(\005B\006\020\001\210\265\030\001\022Y\n\023primary_constructo" + - "r\030\r \001(\0132<.org.jetbrains.kotlin.serializa" + - "tion.Class.PrimaryConstructor\022K\n\025seconda" + - "ry_constructor\030\016 \003(\0132,.org.jetbrains.kot" + - "lin.serialization.Callable\032P\n\022PrimaryCon", - "structor\022:\n\004data\030\001 \001(\0132,.org.jetbrains.k" + - "otlin.serialization.Callable\"p\n\004Kind\022\t\n\005" + - "CLASS\020\000\022\t\n\005TRAIT\020\001\022\016\n\nENUM_CLASS\020\002\022\016\n\nEN" + - "UM_ENTRY\020\003\022\024\n\020ANNOTATION_CLASS\020\004\022\n\n\006OBJE" + - "CT\020\005\022\020\n\014CLASS_OBJECT\020\006*\005\010d\020\310\001\"N\n\007Package" + - "\022<\n\006member\030\001 \003(\0132,.org.jetbrains.kotlin." + - "serialization.Callable*\005\010d\020\310\001\"\314\005\n\010Callab" + - "le\022\r\n\005flags\030\001 \001(\005\022\024\n\014getter_flags\030\t \001(\005\022" + - "\024\n\014setter_flags\030\n \001(\005\022I\n\016type_parameter\030" + - "\004 \003(\01321.org.jetbrains.kotlin.serializati", - "on.TypeParameter\022?\n\rreceiver_type\030\005 \001(\0132" + - "(.org.jetbrains.kotlin.serialization.Typ" + - "e\022\022\n\004name\030\006 \002(\005B\004\210\265\030\001\022T\n\017value_parameter" + - "\030\007 \003(\0132;.org.jetbrains.kotlin.serializat" + - "ion.Callable.ValueParameter\022=\n\013return_ty" + - "pe\030\010 \002(\0132(.org.jetbrains.kotlin.serializ" + - "ation.Type\032\271\001\n\016ValueParameter\022\r\n\005flags\030\001" + - " \001(\005\022\022\n\004name\030\002 \002(\005B\004\210\265\030\001\0226\n\004type\030\003 \002(\0132(" + - ".org.jetbrains.kotlin.serialization.Type" + - "\022E\n\023vararg_element_type\030\004 \001(\0132(.org.jetb", - "rains.kotlin.serialization.Type*\005\010d\020\310\001\"Q" + - "\n\nMemberKind\022\017\n\013DECLARATION\020\000\022\021\n\rFAKE_OV" + - "ERRIDE\020\001\022\016\n\nDELEGATION\020\002\022\017\n\013SYNTHESIZED\020" + - "\003\":\n\014CallableKind\022\007\n\003FUN\020\000\022\007\n\003VAL\020\001\022\007\n\003V" + - "AR\020\002\022\017\n\013CONSTRUCTOR\020\003*\005\010d\020\310\001*9\n\010Modality" + - "\022\t\n\005FINAL\020\000\022\010\n\004OPEN\020\001\022\014\n\010ABSTRACT\020\002\022\n\n\006S" + - "EALED\020\003*b\n\nVisibility\022\014\n\010INTERNAL\020\000\022\013\n\007P" + - "RIVATE\020\001\022\r\n\tPROTECTED\020\002\022\n\n\006PUBLIC\020\003\022\023\n\017P" + - "RIVATE_TO_THIS\020\004\022\t\n\005LOCAL\020\005B\022B\rDebugProt" + - "oBuf\210\001\000" + "\nANNOTATION\020\013\022\t\n\005ARRAY\020\014\"\340\003\n\004Type\022C\n\010arg" + + "ument\030\002 \003(\01321.org.jetbrains.kotlin.seria" + + "lization.Type.Argument\022\027\n\010nullable\030\003 \001(\010" + + ":\005false\022+\n\035flexible_type_capabilities_id" + + "\030\004 \001(\005B\004\230\265\030\001\022F\n\024flexible_upper_bound\030\005 \001" + + "(\0132(.org.jetbrains.kotlin.serialization." + + "Type\022\030\n\nclass_name\030\006 \001(\005B\004\220\265\030\001\022\026\n\016type_p" + + "arameter\030\007 \001(\005\032\313\001\n\010Argument\022U\n\nprojectio" + + "n\030\001 \001(\0162<.org.jetbrains.kotlin.serializa", + "tion.Type.Argument.Projection:\003INV\0226\n\004ty" + + "pe\030\002 \001(\0132(.org.jetbrains.kotlin.serializ" + + "ation.Type\"0\n\nProjection\022\006\n\002IN\020\000\022\007\n\003OUT\020" + + "\001\022\007\n\003INV\020\002\022\010\n\004STAR\020\003*\005\010d\020\310\001\"\377\001\n\rTypePara" + + "meter\022\n\n\002id\030\001 \002(\005\022\022\n\004name\030\002 \002(\005B\004\210\265\030\001\022\026\n" + + "\007reified\030\003 \001(\010:\005false\022Q\n\010variance\030\004 \001(\0162" + + ":.org.jetbrains.kotlin.serialization.Typ" + + "eParameter.Variance:\003INV\022=\n\013upper_bound\030" + + "\005 \003(\0132(.org.jetbrains.kotlin.serializati" + + "on.Type\"$\n\010Variance\022\006\n\002IN\020\000\022\007\n\003OUT\020\001\022\007\n\003", + "INV\020\002\"\325\005\n\005Class\022\020\n\005flags\030\001 \001(\005:\0010\022\025\n\007fq_" + + "name\030\003 \002(\005B\004\220\265\030\001\022#\n\025companion_object_nam" + + "e\030\004 \001(\005B\004\210\265\030\001\022I\n\016type_parameter\030\005 \003(\01321." + + "org.jetbrains.kotlin.serialization.TypeP" + + "arameter\022;\n\tsupertype\030\006 \003(\0132(.org.jetbra" + + "ins.kotlin.serialization.Type\022!\n\021nested_" + + "class_name\030\007 \003(\005B\006\020\001\210\265\030\001\022<\n\006member\030\013 \003(\013" + + "2,.org.jetbrains.kotlin.serialization.Ca" + + "llable\022\032\n\nenum_entry\030\014 \003(\005B\006\020\001\210\265\030\001\022Y\n\023pr" + + "imary_constructor\030\r \001(\0132<.org.jetbrains.", + "kotlin.serialization.Class.PrimaryConstr" + + "uctor\022K\n\025secondary_constructor\030\016 \003(\0132,.o" + + "rg.jetbrains.kotlin.serialization.Callab" + + "le\032P\n\022PrimaryConstructor\022:\n\004data\030\001 \001(\0132," + + ".org.jetbrains.kotlin.serialization.Call" + + "able\"x\n\004Kind\022\t\n\005CLASS\020\000\022\r\n\tINTERFACE\020\001\022\016" + + "\n\nENUM_CLASS\020\002\022\016\n\nENUM_ENTRY\020\003\022\024\n\020ANNOTA" + + "TION_CLASS\020\004\022\n\n\006OBJECT\020\005\022\024\n\020COMPANION_OB" + + "JECT\020\006*\005\010d\020\310\001\"N\n\007Package\022<\n\006member\030\001 \003(\013" + + "2,.org.jetbrains.kotlin.serialization.Ca", + "llable*\005\010d\020\310\001\"\314\005\n\010Callable\022\r\n\005flags\030\001 \001(" + + "\005\022\024\n\014getter_flags\030\t \001(\005\022\024\n\014setter_flags\030" + + "\n \001(\005\022I\n\016type_parameter\030\004 \003(\01321.org.jetb" + + "rains.kotlin.serialization.TypeParameter" + + "\022?\n\rreceiver_type\030\005 \001(\0132(.org.jetbrains." + + "kotlin.serialization.Type\022\022\n\004name\030\006 \002(\005B" + + "\004\210\265\030\001\022T\n\017value_parameter\030\007 \003(\0132;.org.jet" + + "brains.kotlin.serialization.Callable.Val" + + "ueParameter\022=\n\013return_type\030\010 \002(\0132(.org.j" + + "etbrains.kotlin.serialization.Type\032\271\001\n\016V", + "alueParameter\022\r\n\005flags\030\001 \001(\005\022\022\n\004name\030\002 \002" + + "(\005B\004\210\265\030\001\0226\n\004type\030\003 \002(\0132(.org.jetbrains.k" + + "otlin.serialization.Type\022E\n\023vararg_eleme" + + "nt_type\030\004 \001(\0132(.org.jetbrains.kotlin.ser" + + "ialization.Type*\005\010d\020\310\001\"Q\n\nMemberKind\022\017\n\013" + + "DECLARATION\020\000\022\021\n\rFAKE_OVERRIDE\020\001\022\016\n\nDELE" + + "GATION\020\002\022\017\n\013SYNTHESIZED\020\003\":\n\014CallableKin" + + "d\022\007\n\003FUN\020\000\022\007\n\003VAL\020\001\022\007\n\003VAR\020\002\022\017\n\013CONSTRUC" + + "TOR\020\003*\005\010d\020\310\001*9\n\010Modality\022\t\n\005FINAL\020\000\022\010\n\004O" + + "PEN\020\001\022\014\n\010ABSTRACT\020\002\022\n\n\006SEALED\020\003*b\n\nVisib", + "ility\022\014\n\010INTERNAL\020\000\022\013\n\007PRIVATE\020\001\022\r\n\tPROT" + + "ECTED\020\002\022\n\n\006PUBLIC\020\003\022\023\n\017PRIVATE_TO_THIS\020\004" + + "\022\t\n\005LOCAL\020\005B\022B\rDebugProtoBuf\210\001\000" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -17405,15 +16585,9 @@ public final class DebugProtoBuf { internal_static_org_jetbrains_kotlin_serialization_Type_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_org_jetbrains_kotlin_serialization_Type_descriptor, - new java.lang.String[] { "Constructor", "Argument", "Nullable", "FlexibleTypeCapabilitiesId", "FlexibleUpperBound", "ConstructorClassName", "ConstructorTypeParameter", }); - internal_static_org_jetbrains_kotlin_serialization_Type_Constructor_descriptor = - internal_static_org_jetbrains_kotlin_serialization_Type_descriptor.getNestedTypes().get(0); - internal_static_org_jetbrains_kotlin_serialization_Type_Constructor_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_jetbrains_kotlin_serialization_Type_Constructor_descriptor, - new java.lang.String[] { "Kind", "Id", }); + new java.lang.String[] { "Argument", "Nullable", "FlexibleTypeCapabilitiesId", "FlexibleUpperBound", "ClassName", "TypeParameter", }); internal_static_org_jetbrains_kotlin_serialization_Type_Argument_descriptor = - internal_static_org_jetbrains_kotlin_serialization_Type_descriptor.getNestedTypes().get(1); + internal_static_org_jetbrains_kotlin_serialization_Type_descriptor.getNestedTypes().get(0); internal_static_org_jetbrains_kotlin_serialization_Type_Argument_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_org_jetbrains_kotlin_serialization_Type_Argument_descriptor, @@ -17461,11 +16635,8 @@ public final class DebugProtoBuf { registry.add(org.jetbrains.kotlin.serialization.DebugExtOptionsProtoBuf.stringIdInTable); registry.add(org.jetbrains.kotlin.serialization.DebugExtOptionsProtoBuf.fqNameIdInTable); registry.add(org.jetbrains.kotlin.serialization.DebugExtOptionsProtoBuf.nameIdInTable); - registry.add(org.jetbrains.kotlin.serialization.DebugExtOptionsProtoBuf.skipInComparison); registry.add(org.jetbrains.kotlin.serialization.DebugExtOptionsProtoBuf.stringIdInTable); registry.add(org.jetbrains.kotlin.serialization.DebugExtOptionsProtoBuf.fqNameIdInTable); - registry.add(org.jetbrains.kotlin.serialization.DebugExtOptionsProtoBuf.skipInComparison); - registry.add(org.jetbrains.kotlin.serialization.DebugExtOptionsProtoBuf.skipInComparison); registry.add(org.jetbrains.kotlin.serialization.DebugExtOptionsProtoBuf.nameIdInTable); registry.add(org.jetbrains.kotlin.serialization.DebugExtOptionsProtoBuf.fqNameIdInTable); registry.add(org.jetbrains.kotlin.serialization.DebugExtOptionsProtoBuf.nameIdInTable); diff --git a/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/java/JvmAbi.java b/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/java/JvmAbi.java index 58dbb90446c..8f21335ac84 100644 --- a/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/java/JvmAbi.java +++ b/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/java/JvmAbi.java @@ -34,7 +34,7 @@ public final class JvmAbi { * - Patch version can be increased freely and is only supposed to be used for debugging. Increase the patch version when you * make a change to the metadata format or the bytecode which is both forward- and backward compatible. */ - public static final BinaryVersion VERSION = BinaryVersion.create(0, 25, 0); + public static final BinaryVersion VERSION = BinaryVersion.create(0, 26, 0); public static final String TRAIT_IMPL_CLASS_NAME = "$TImpl"; public static final String TRAIT_IMPL_SUFFIX = "$" + TRAIT_IMPL_CLASS_NAME; diff --git a/core/deserialization/src/descriptors.proto b/core/deserialization/src/descriptors.proto index 310dba170e4..81c1e166815 100644 --- a/core/deserialization/src/descriptors.proto +++ b/core/deserialization/src/descriptors.proto @@ -101,19 +101,6 @@ message Annotation { } message Type { - message Constructor { - enum Kind { - CLASS = 0; - TYPE_PARAMETER = 1; - } - - optional Kind kind = 1 [default = CLASS, (skip_in_comparison) = true]; - - required int32 id = 2 [(skip_in_comparison) = true]; // CLASS - fqName id, TYPE_PARAMETER - type parameter id - } - - required Constructor constructor = 1 [(skip_in_comparison) = true]; - message Argument { enum Projection { IN = 0; @@ -142,10 +129,8 @@ message Type { // Only one of the following values should be present. Consider using `oneof` instead when we upgrade to protobuf 2.6.0+ - optional int32 constructor_class_name = 6 [(fq_name_id_in_table) = true]; // fqName id - - optional int32 constructor_type_parameter = 7; // type parameter id - + optional int32 class_name = 6 [(fq_name_id_in_table) = true]; // fqName id + optional int32 type_parameter = 7; // type parameter id extensions 100 to 199; } diff --git a/core/deserialization/src/org/jetbrains/kotlin/serialization/ProtoBuf.java b/core/deserialization/src/org/jetbrains/kotlin/serialization/ProtoBuf.java index 47b6350cf62..611adab715a 100644 --- a/core/deserialization/src/org/jetbrains/kotlin/serialization/ProtoBuf.java +++ b/core/deserialization/src/org/jetbrains/kotlin/serialization/ProtoBuf.java @@ -4289,16 +4289,6 @@ public final class ProtoBuf { com.google.protobuf.GeneratedMessageLite. ExtendableMessageOrBuilder { - // required .org.jetbrains.kotlin.serialization.Type.Constructor constructor = 1; - /** - * required .org.jetbrains.kotlin.serialization.Type.Constructor constructor = 1; - */ - boolean hasConstructor(); - /** - * required .org.jetbrains.kotlin.serialization.Type.Constructor constructor = 1; - */ - org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor getConstructor(); - // repeated .org.jetbrains.kotlin.serialization.Type.Argument argument = 2; /** * repeated .org.jetbrains.kotlin.serialization.Type.Argument argument = 2; @@ -4368,41 +4358,41 @@ public final class ProtoBuf { */ org.jetbrains.kotlin.serialization.ProtoBuf.Type getFlexibleUpperBound(); - // optional int32 constructor_class_name = 6; + // optional int32 class_name = 6; /** - * optional int32 constructor_class_name = 6; + * optional int32 class_name = 6; * *
      * fqName id
      * 
*/ - boolean hasConstructorClassName(); + boolean hasClassName(); /** - * optional int32 constructor_class_name = 6; + * optional int32 class_name = 6; * *
      * fqName id
      * 
*/ - int getConstructorClassName(); + int getClassName(); - // optional int32 constructor_type_parameter = 7; + // optional int32 type_parameter = 7; /** - * optional int32 constructor_type_parameter = 7; + * optional int32 type_parameter = 7; * *
      * type parameter id
      * 
*/ - boolean hasConstructorTypeParameter(); + boolean hasTypeParameter(); /** - * optional int32 constructor_type_parameter = 7; + * optional int32 type_parameter = 7; * *
      * type parameter id
      * 
*/ - int getConstructorTypeParameter(); + int getTypeParameter(); } /** * Protobuf type {@code org.jetbrains.kotlin.serialization.Type} @@ -4447,40 +4437,27 @@ public final class ProtoBuf { } break; } - case 10: { - org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - subBuilder = constructor_.toBuilder(); - } - constructor_ = input.readMessage(org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(constructor_); - constructor_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { argument_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; + mutable_bitField0_ |= 0x00000001; } argument_.add(input.readMessage(org.jetbrains.kotlin.serialization.ProtoBuf.Type.Argument.PARSER, extensionRegistry)); break; } case 24: { - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000001; nullable_ = input.readBool(); break; } case 32: { - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; flexibleTypeCapabilitiesId_ = input.readInt32(); break; } case 42: { org.jetbrains.kotlin.serialization.ProtoBuf.Type.Builder subBuilder = null; - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000004) == 0x00000004)) { subBuilder = flexibleUpperBound_.toBuilder(); } flexibleUpperBound_ = input.readMessage(org.jetbrains.kotlin.serialization.ProtoBuf.Type.PARSER, extensionRegistry); @@ -4488,17 +4465,17 @@ public final class ProtoBuf { subBuilder.mergeFrom(flexibleUpperBound_); flexibleUpperBound_ = subBuilder.buildPartial(); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000004; break; } case 48: { - bitField0_ |= 0x00000010; - constructorClassName_ = input.readInt32(); + bitField0_ |= 0x00000008; + className_ = input.readInt32(); break; } case 56: { - bitField0_ |= 0x00000020; - constructorTypeParameter_ = input.readInt32(); + bitField0_ |= 0x00000010; + typeParameter_ = input.readInt32(); break; } } @@ -4509,7 +4486,7 @@ public final class ProtoBuf { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { argument_ = java.util.Collections.unmodifiableList(argument_); } makeExtensionsImmutable(); @@ -4530,523 +4507,6 @@ public final class ProtoBuf { return PARSER; } - public interface ConstructorOrBuilder - extends com.google.protobuf.MessageLiteOrBuilder { - - // optional .org.jetbrains.kotlin.serialization.Type.Constructor.Kind kind = 1 [default = CLASS]; - /** - * optional .org.jetbrains.kotlin.serialization.Type.Constructor.Kind kind = 1 [default = CLASS]; - */ - boolean hasKind(); - /** - * optional .org.jetbrains.kotlin.serialization.Type.Constructor.Kind kind = 1 [default = CLASS]; - */ - org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor.Kind getKind(); - - // required int32 id = 2; - /** - * required int32 id = 2; - * - *
-       * CLASS - fqName id, TYPE_PARAMETER - type parameter id
-       * 
- */ - boolean hasId(); - /** - * required int32 id = 2; - * - *
-       * CLASS - fqName id, TYPE_PARAMETER - type parameter id
-       * 
- */ - int getId(); - } - /** - * Protobuf type {@code org.jetbrains.kotlin.serialization.Type.Constructor} - */ - public static final class Constructor extends - com.google.protobuf.GeneratedMessageLite - implements ConstructorOrBuilder { - // Use Constructor.newBuilder() to construct. - private Constructor(com.google.protobuf.GeneratedMessageLite.Builder builder) { - super(builder); - - } - private Constructor(boolean noInit) {} - - private static final Constructor defaultInstance; - public static Constructor getDefaultInstance() { - return defaultInstance; - } - - public Constructor getDefaultInstanceForType() { - return defaultInstance; - } - - private Constructor( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - int rawValue = input.readEnum(); - org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor.Kind value = org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor.Kind.valueOf(rawValue); - if (value != null) { - bitField0_ |= 0x00000001; - kind_ = value; - } - break; - } - case 16: { - bitField0_ |= 0x00000002; - id_ = input.readInt32(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - makeExtensionsImmutable(); - } - } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public Constructor parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Constructor(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - /** - * Protobuf enum {@code org.jetbrains.kotlin.serialization.Type.Constructor.Kind} - */ - public enum Kind - implements com.google.protobuf.Internal.EnumLite { - /** - * CLASS = 0; - */ - CLASS(0, 0), - /** - * TYPE_PARAMETER = 1; - */ - TYPE_PARAMETER(1, 1), - ; - - /** - * CLASS = 0; - */ - public static final int CLASS_VALUE = 0; - /** - * TYPE_PARAMETER = 1; - */ - public static final int TYPE_PARAMETER_VALUE = 1; - - - public final int getNumber() { return value; } - - public static Kind valueOf(int value) { - switch (value) { - case 0: return CLASS; - case 1: return TYPE_PARAMETER; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static com.google.protobuf.Internal.EnumLiteMap - internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public Kind findValueByNumber(int number) { - return Kind.valueOf(number); - } - }; - - private final int value; - - private Kind(int index, int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:org.jetbrains.kotlin.serialization.Type.Constructor.Kind) - } - - private int bitField0_; - // optional .org.jetbrains.kotlin.serialization.Type.Constructor.Kind kind = 1 [default = CLASS]; - public static final int KIND_FIELD_NUMBER = 1; - private org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor.Kind kind_; - /** - * optional .org.jetbrains.kotlin.serialization.Type.Constructor.Kind kind = 1 [default = CLASS]; - */ - public boolean hasKind() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional .org.jetbrains.kotlin.serialization.Type.Constructor.Kind kind = 1 [default = CLASS]; - */ - public org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor.Kind getKind() { - return kind_; - } - - // required int32 id = 2; - public static final int ID_FIELD_NUMBER = 2; - private int id_; - /** - * required int32 id = 2; - * - *
-       * CLASS - fqName id, TYPE_PARAMETER - type parameter id
-       * 
- */ - public boolean hasId() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * required int32 id = 2; - * - *
-       * CLASS - fqName id, TYPE_PARAMETER - type parameter id
-       * 
- */ - public int getId() { - return id_; - } - - private void initFields() { - kind_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor.Kind.CLASS; - id_ = 0; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasId()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeEnum(1, kind_.getNumber()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeInt32(2, id_); - } - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, kind_.getNumber()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, id_); - } - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - /** - * Protobuf type {@code org.jetbrains.kotlin.serialization.Type.Constructor} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageLite.Builder< - org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor, Builder> - implements org.jetbrains.kotlin.serialization.ProtoBuf.Type.ConstructorOrBuilder { - // Construct using org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - kind_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor.Kind.CLASS; - bitField0_ = (bitField0_ & ~0x00000001); - id_ = 0; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor getDefaultInstanceForType() { - return org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor.getDefaultInstance(); - } - - public org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor build() { - org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor buildPartial() { - org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor result = new org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.kind_ = kind_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.id_ = id_; - result.bitField0_ = to_bitField0_; - return result; - } - - public Builder mergeFrom(org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor other) { - if (other == org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor.getDefaultInstance()) return this; - if (other.hasKind()) { - setKind(other.getKind()); - } - if (other.hasId()) { - setId(other.getId()); - } - return this; - } - - public final boolean isInitialized() { - if (!hasId()) { - - return false; - } - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - // optional .org.jetbrains.kotlin.serialization.Type.Constructor.Kind kind = 1 [default = CLASS]; - private org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor.Kind kind_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor.Kind.CLASS; - /** - * optional .org.jetbrains.kotlin.serialization.Type.Constructor.Kind kind = 1 [default = CLASS]; - */ - public boolean hasKind() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional .org.jetbrains.kotlin.serialization.Type.Constructor.Kind kind = 1 [default = CLASS]; - */ - public org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor.Kind getKind() { - return kind_; - } - /** - * optional .org.jetbrains.kotlin.serialization.Type.Constructor.Kind kind = 1 [default = CLASS]; - */ - public Builder setKind(org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor.Kind value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - kind_ = value; - - return this; - } - /** - * optional .org.jetbrains.kotlin.serialization.Type.Constructor.Kind kind = 1 [default = CLASS]; - */ - public Builder clearKind() { - bitField0_ = (bitField0_ & ~0x00000001); - kind_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor.Kind.CLASS; - - return this; - } - - // required int32 id = 2; - private int id_ ; - /** - * required int32 id = 2; - * - *
-         * CLASS - fqName id, TYPE_PARAMETER - type parameter id
-         * 
- */ - public boolean hasId() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * required int32 id = 2; - * - *
-         * CLASS - fqName id, TYPE_PARAMETER - type parameter id
-         * 
- */ - public int getId() { - return id_; - } - /** - * required int32 id = 2; - * - *
-         * CLASS - fqName id, TYPE_PARAMETER - type parameter id
-         * 
- */ - public Builder setId(int value) { - bitField0_ |= 0x00000002; - id_ = value; - - return this; - } - /** - * required int32 id = 2; - * - *
-         * CLASS - fqName id, TYPE_PARAMETER - type parameter id
-         * 
- */ - public Builder clearId() { - bitField0_ = (bitField0_ & ~0x00000002); - id_ = 0; - - return this; - } - - // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.Type.Constructor) - } - - static { - defaultInstance = new Constructor(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.serialization.Type.Constructor) - } - public interface ArgumentOrBuilder extends com.google.protobuf.MessageLiteOrBuilder { @@ -5631,22 +5091,6 @@ public final class ProtoBuf { } private int bitField0_; - // required .org.jetbrains.kotlin.serialization.Type.Constructor constructor = 1; - public static final int CONSTRUCTOR_FIELD_NUMBER = 1; - private org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor constructor_; - /** - * required .org.jetbrains.kotlin.serialization.Type.Constructor constructor = 1; - */ - public boolean hasConstructor() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required .org.jetbrains.kotlin.serialization.Type.Constructor constructor = 1; - */ - public org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor getConstructor() { - return constructor_; - } - // repeated .org.jetbrains.kotlin.serialization.Type.Argument argument = 2; public static final int ARGUMENT_FIELD_NUMBER = 2; private java.util.List argument_; @@ -5690,7 +5134,7 @@ public final class ProtoBuf { * optional bool nullable = 3 [default = false]; */ public boolean hasNullable() { - return ((bitField0_ & 0x00000002) == 0x00000002); + return ((bitField0_ & 0x00000001) == 0x00000001); } /** * optional bool nullable = 3 [default = false]; @@ -5712,7 +5156,7 @@ public final class ProtoBuf { * */ public boolean hasFlexibleTypeCapabilitiesId() { - return ((bitField0_ & 0x00000004) == 0x00000004); + return ((bitField0_ & 0x00000002) == 0x00000002); } /** * optional int32 flexible_type_capabilities_id = 4; @@ -5740,7 +5184,7 @@ public final class ProtoBuf { * */ public boolean hasFlexibleUpperBound() { - return ((bitField0_ & 0x00000008) == 0x00000008); + return ((bitField0_ & 0x00000004) == 0x00000004); } /** * optional .org.jetbrains.kotlin.serialization.Type flexible_upper_bound = 5; @@ -5755,76 +5199,67 @@ public final class ProtoBuf { return flexibleUpperBound_; } - // optional int32 constructor_class_name = 6; - public static final int CONSTRUCTOR_CLASS_NAME_FIELD_NUMBER = 6; - private int constructorClassName_; + // optional int32 class_name = 6; + public static final int CLASS_NAME_FIELD_NUMBER = 6; + private int className_; /** - * optional int32 constructor_class_name = 6; + * optional int32 class_name = 6; * *
      * fqName id
      * 
*/ - public boolean hasConstructorClassName() { + public boolean hasClassName() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional int32 class_name = 6; + * + *
+     * fqName id
+     * 
+ */ + public int getClassName() { + return className_; + } + + // optional int32 type_parameter = 7; + public static final int TYPE_PARAMETER_FIELD_NUMBER = 7; + private int typeParameter_; + /** + * optional int32 type_parameter = 7; + * + *
+     * type parameter id
+     * 
+ */ + public boolean hasTypeParameter() { return ((bitField0_ & 0x00000010) == 0x00000010); } /** - * optional int32 constructor_class_name = 6; - * - *
-     * fqName id
-     * 
- */ - public int getConstructorClassName() { - return constructorClassName_; - } - - // optional int32 constructor_type_parameter = 7; - public static final int CONSTRUCTOR_TYPE_PARAMETER_FIELD_NUMBER = 7; - private int constructorTypeParameter_; - /** - * optional int32 constructor_type_parameter = 7; + * optional int32 type_parameter = 7; * *
      * type parameter id
      * 
*/ - public boolean hasConstructorTypeParameter() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional int32 constructor_type_parameter = 7; - * - *
-     * type parameter id
-     * 
- */ - public int getConstructorTypeParameter() { - return constructorTypeParameter_; + public int getTypeParameter() { + return typeParameter_; } private void initFields() { - constructor_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor.getDefaultInstance(); argument_ = java.util.Collections.emptyList(); nullable_ = false; flexibleTypeCapabilitiesId_ = 0; flexibleUpperBound_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance(); - constructorClassName_ = 0; - constructorTypeParameter_ = 0; + className_ = 0; + typeParameter_ = 0; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; - if (!hasConstructor()) { - memoizedIsInitialized = 0; - return false; - } - if (!getConstructor().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } for (int i = 0; i < getArgumentCount(); i++) { if (!getArgument(i).isInitialized()) { memoizedIsInitialized = 0; @@ -5851,26 +5286,23 @@ public final class ProtoBuf { com.google.protobuf.GeneratedMessageLite .ExtendableMessage.ExtensionWriter extensionWriter = newExtensionWriter(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeMessage(1, constructor_); - } for (int i = 0; i < argument_.size(); i++) { output.writeMessage(2, argument_.get(i)); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeBool(3, nullable_); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeInt32(4, flexibleTypeCapabilitiesId_); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeMessage(5, flexibleUpperBound_); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeInt32(6, constructorClassName_); + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeInt32(6, className_); } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeInt32(7, constructorTypeParameter_); + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeInt32(7, typeParameter_); } extensionWriter.writeUntil(200, output); } @@ -5881,33 +5313,29 @@ public final class ProtoBuf { if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, constructor_); - } for (int i = 0; i < argument_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, argument_.get(i)); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(3, nullable_); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(4, flexibleTypeCapabilitiesId_); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, flexibleUpperBound_); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(6, className_); + } if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(6, constructorClassName_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(7, constructorTypeParameter_); + .computeInt32Size(7, typeParameter_); } size += extensionsSerializedSize(); memoizedSerializedSize = size; @@ -6000,20 +5428,18 @@ public final class ProtoBuf { public Builder clear() { super.clear(); - constructor_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor.getDefaultInstance(); - bitField0_ = (bitField0_ & ~0x00000001); argument_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000001); nullable_ = false; - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000002); flexibleTypeCapabilitiesId_ = 0; - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000004); flexibleUpperBound_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance(); + bitField0_ = (bitField0_ & ~0x00000008); + className_ = 0; bitField0_ = (bitField0_ & ~0x00000010); - constructorClassName_ = 0; + typeParameter_ = 0; bitField0_ = (bitField0_ & ~0x00000020); - constructorTypeParameter_ = 0; - bitField0_ = (bitField0_ & ~0x00000040); return this; } @@ -6037,48 +5463,41 @@ public final class ProtoBuf { org.jetbrains.kotlin.serialization.ProtoBuf.Type result = new org.jetbrains.kotlin.serialization.ProtoBuf.Type(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.constructor_ = constructor_; - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { argument_ = java.util.Collections.unmodifiableList(argument_); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000001); } result.argument_ = argument_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000001; + } + result.nullable_ = nullable_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000002; } - result.nullable_ = nullable_; + result.flexibleTypeCapabilitiesId_ = flexibleTypeCapabilitiesId_; if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000004; } - result.flexibleTypeCapabilitiesId_ = flexibleTypeCapabilitiesId_; + result.flexibleUpperBound_ = flexibleUpperBound_; if (((from_bitField0_ & 0x00000010) == 0x00000010)) { to_bitField0_ |= 0x00000008; } - result.flexibleUpperBound_ = flexibleUpperBound_; + result.className_ = className_; if (((from_bitField0_ & 0x00000020) == 0x00000020)) { to_bitField0_ |= 0x00000010; } - result.constructorClassName_ = constructorClassName_; - if (((from_bitField0_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x00000020; - } - result.constructorTypeParameter_ = constructorTypeParameter_; + result.typeParameter_ = typeParameter_; result.bitField0_ = to_bitField0_; return result; } public Builder mergeFrom(org.jetbrains.kotlin.serialization.ProtoBuf.Type other) { if (other == org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance()) return this; - if (other.hasConstructor()) { - mergeConstructor(other.getConstructor()); - } if (!other.argument_.isEmpty()) { if (argument_.isEmpty()) { argument_ = other.argument_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000001); } else { ensureArgumentIsMutable(); argument_.addAll(other.argument_); @@ -6094,25 +5513,17 @@ public final class ProtoBuf { if (other.hasFlexibleUpperBound()) { mergeFlexibleUpperBound(other.getFlexibleUpperBound()); } - if (other.hasConstructorClassName()) { - setConstructorClassName(other.getConstructorClassName()); + if (other.hasClassName()) { + setClassName(other.getClassName()); } - if (other.hasConstructorTypeParameter()) { - setConstructorTypeParameter(other.getConstructorTypeParameter()); + if (other.hasTypeParameter()) { + setTypeParameter(other.getTypeParameter()); } this.mergeExtensionFields(other); return this; } public final boolean isInitialized() { - if (!hasConstructor()) { - - return false; - } - if (!getConstructor().isInitialized()) { - - return false; - } for (int i = 0; i < getArgumentCount(); i++) { if (!getArgument(i).isInitialized()) { @@ -6151,74 +5562,13 @@ public final class ProtoBuf { } private int bitField0_; - // required .org.jetbrains.kotlin.serialization.Type.Constructor constructor = 1; - private org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor constructor_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor.getDefaultInstance(); - /** - * required .org.jetbrains.kotlin.serialization.Type.Constructor constructor = 1; - */ - public boolean hasConstructor() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required .org.jetbrains.kotlin.serialization.Type.Constructor constructor = 1; - */ - public org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor getConstructor() { - return constructor_; - } - /** - * required .org.jetbrains.kotlin.serialization.Type.Constructor constructor = 1; - */ - public Builder setConstructor(org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor value) { - if (value == null) { - throw new NullPointerException(); - } - constructor_ = value; - - bitField0_ |= 0x00000001; - return this; - } - /** - * required .org.jetbrains.kotlin.serialization.Type.Constructor constructor = 1; - */ - public Builder setConstructor( - org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor.Builder builderForValue) { - constructor_ = builderForValue.build(); - - bitField0_ |= 0x00000001; - return this; - } - /** - * required .org.jetbrains.kotlin.serialization.Type.Constructor constructor = 1; - */ - public Builder mergeConstructor(org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor value) { - if (((bitField0_ & 0x00000001) == 0x00000001) && - constructor_ != org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor.getDefaultInstance()) { - constructor_ = - org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor.newBuilder(constructor_).mergeFrom(value).buildPartial(); - } else { - constructor_ = value; - } - - bitField0_ |= 0x00000001; - return this; - } - /** - * required .org.jetbrains.kotlin.serialization.Type.Constructor constructor = 1; - */ - public Builder clearConstructor() { - constructor_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.Constructor.getDefaultInstance(); - - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - // repeated .org.jetbrains.kotlin.serialization.Type.Argument argument = 2; private java.util.List argument_ = java.util.Collections.emptyList(); private void ensureArgumentIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { argument_ = new java.util.ArrayList(argument_); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000001; } } @@ -6323,7 +5673,7 @@ public final class ProtoBuf { */ public Builder clearArgument() { argument_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -6343,7 +5693,7 @@ public final class ProtoBuf { * optional bool nullable = 3 [default = false]; */ public boolean hasNullable() { - return ((bitField0_ & 0x00000004) == 0x00000004); + return ((bitField0_ & 0x00000002) == 0x00000002); } /** * optional bool nullable = 3 [default = false]; @@ -6355,7 +5705,7 @@ public final class ProtoBuf { * optional bool nullable = 3 [default = false]; */ public Builder setNullable(boolean value) { - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; nullable_ = value; return this; @@ -6364,7 +5714,7 @@ public final class ProtoBuf { * optional bool nullable = 3 [default = false]; */ public Builder clearNullable() { - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000002); nullable_ = false; return this; @@ -6382,7 +5732,7 @@ public final class ProtoBuf { * */ public boolean hasFlexibleTypeCapabilitiesId() { - return ((bitField0_ & 0x00000008) == 0x00000008); + return ((bitField0_ & 0x00000004) == 0x00000004); } /** * optional int32 flexible_type_capabilities_id = 4; @@ -6406,7 +5756,7 @@ public final class ProtoBuf { * */ public Builder setFlexibleTypeCapabilitiesId(int value) { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000004; flexibleTypeCapabilitiesId_ = value; return this; @@ -6421,7 +5771,7 @@ public final class ProtoBuf { * */ public Builder clearFlexibleTypeCapabilitiesId() { - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000004); flexibleTypeCapabilitiesId_ = 0; return this; @@ -6439,7 +5789,7 @@ public final class ProtoBuf { * */ public boolean hasFlexibleUpperBound() { - return ((bitField0_ & 0x00000010) == 0x00000010); + return ((bitField0_ & 0x00000008) == 0x00000008); } /** * optional .org.jetbrains.kotlin.serialization.Type flexible_upper_bound = 5; @@ -6468,7 +5818,7 @@ public final class ProtoBuf { } flexibleUpperBound_ = value; - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000008; return this; } /** @@ -6484,7 +5834,7 @@ public final class ProtoBuf { org.jetbrains.kotlin.serialization.ProtoBuf.Type.Builder builderForValue) { flexibleUpperBound_ = builderForValue.build(); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000008; return this; } /** @@ -6497,7 +5847,7 @@ public final class ProtoBuf { * */ public Builder mergeFlexibleUpperBound(org.jetbrains.kotlin.serialization.ProtoBuf.Type value) { - if (((bitField0_ & 0x00000010) == 0x00000010) && + if (((bitField0_ & 0x00000008) == 0x00000008) && flexibleUpperBound_ != org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance()) { flexibleUpperBound_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.newBuilder(flexibleUpperBound_).mergeFrom(value).buildPartial(); @@ -6505,7 +5855,7 @@ public final class ProtoBuf { flexibleUpperBound_ = value; } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000008; return this; } /** @@ -6520,104 +5870,104 @@ public final class ProtoBuf { public Builder clearFlexibleUpperBound() { flexibleUpperBound_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance(); - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000008); return this; } - // optional int32 constructor_class_name = 6; - private int constructorClassName_ ; + // optional int32 class_name = 6; + private int className_ ; /** - * optional int32 constructor_class_name = 6; + * optional int32 class_name = 6; * *
        * fqName id
        * 
*/ - public boolean hasConstructorClassName() { + public boolean hasClassName() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional int32 class_name = 6; + * + *
+       * fqName id
+       * 
+ */ + public int getClassName() { + return className_; + } + /** + * optional int32 class_name = 6; + * + *
+       * fqName id
+       * 
+ */ + public Builder setClassName(int value) { + bitField0_ |= 0x00000010; + className_ = value; + + return this; + } + /** + * optional int32 class_name = 6; + * + *
+       * fqName id
+       * 
+ */ + public Builder clearClassName() { + bitField0_ = (bitField0_ & ~0x00000010); + className_ = 0; + + return this; + } + + // optional int32 type_parameter = 7; + private int typeParameter_ ; + /** + * optional int32 type_parameter = 7; + * + *
+       * type parameter id
+       * 
+ */ + public boolean hasTypeParameter() { return ((bitField0_ & 0x00000020) == 0x00000020); } /** - * optional int32 constructor_class_name = 6; + * optional int32 type_parameter = 7; * *
-       * fqName id
+       * type parameter id
        * 
*/ - public int getConstructorClassName() { - return constructorClassName_; + public int getTypeParameter() { + return typeParameter_; } /** - * optional int32 constructor_class_name = 6; + * optional int32 type_parameter = 7; * *
-       * fqName id
+       * type parameter id
        * 
*/ - public Builder setConstructorClassName(int value) { + public Builder setTypeParameter(int value) { bitField0_ |= 0x00000020; - constructorClassName_ = value; + typeParameter_ = value; return this; } /** - * optional int32 constructor_class_name = 6; + * optional int32 type_parameter = 7; * *
-       * fqName id
+       * type parameter id
        * 
*/ - public Builder clearConstructorClassName() { + public Builder clearTypeParameter() { bitField0_ = (bitField0_ & ~0x00000020); - constructorClassName_ = 0; - - return this; - } - - // optional int32 constructor_type_parameter = 7; - private int constructorTypeParameter_ ; - /** - * optional int32 constructor_type_parameter = 7; - * - *
-       * type parameter id
-       * 
- */ - public boolean hasConstructorTypeParameter() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - /** - * optional int32 constructor_type_parameter = 7; - * - *
-       * type parameter id
-       * 
- */ - public int getConstructorTypeParameter() { - return constructorTypeParameter_; - } - /** - * optional int32 constructor_type_parameter = 7; - * - *
-       * type parameter id
-       * 
- */ - public Builder setConstructorTypeParameter(int value) { - bitField0_ |= 0x00000040; - constructorTypeParameter_ = value; - - return this; - } - /** - * optional int32 constructor_type_parameter = 7; - * - *
-       * type parameter id
-       * 
- */ - public Builder clearConstructorTypeParameter() { - bitField0_ = (bitField0_ & ~0x00000040); - constructorTypeParameter_ = 0; + typeParameter_ = 0; return this; } @@ -10693,6 +10043,7 @@ public final class ProtoBuf { *hasGetter *hasSetter *hasConstant + *lateinit * */ boolean hasFlags(); @@ -10709,6 +10060,7 @@ public final class ProtoBuf { *hasGetter *hasSetter *hasConstant + *lateinit * */ int getFlags(); @@ -11925,6 +11277,7 @@ public final class ProtoBuf { *hasGetter *hasSetter *hasConstant + *lateinit * */ public boolean hasFlags() { @@ -11943,6 +11296,7 @@ public final class ProtoBuf { *hasGetter *hasSetter *hasConstant + *lateinit * */ public int getFlags() { @@ -12553,6 +11907,7 @@ public final class ProtoBuf { *hasGetter *hasSetter *hasConstant + *lateinit * */ public boolean hasFlags() { @@ -12571,6 +11926,7 @@ public final class ProtoBuf { *hasGetter *hasSetter *hasConstant + *lateinit * */ public int getFlags() { @@ -12589,6 +11945,7 @@ public final class ProtoBuf { *hasGetter *hasSetter *hasConstant + *lateinit * */ public Builder setFlags(int value) { @@ -12610,6 +11967,7 @@ public final class ProtoBuf { *hasGetter *hasSetter *hasConstant + *lateinit * */ public Builder clearFlags() { diff --git a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/DeserializedType.kt b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/DeserializedType.kt index 54a5d140c5a..90c47472f83 100644 --- a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/DeserializedType.kt +++ b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/DeserializedType.kt @@ -30,7 +30,7 @@ class DeserializedType( private val typeProto: ProtoBuf.Type, private val additionalAnnotations: Annotations = Annotations.EMPTY ) : AbstractLazyType(c.storageManager), LazyType { - private val typeDeserializer = c.typeDeserializer + private val typeDeserializer: TypeDeserializer get() = c.typeDeserializer override fun computeTypeConstructor() = typeDeserializer.typeConstructor(typeProto) @@ -57,12 +57,5 @@ class DeserializedType( override fun getCapabilities() = c.components.typeCapabilitiesLoader.loadCapabilities(typeProto) - fun getPresentableText(): String { - val typeConstructorData = typeProto.getTypeConstructorData() - val id = typeConstructorData.id - return if (typeConstructorData.kind == TypeConstructorKind.CLASS) - c.nameResolver.getClassId(id).asSingleFqName().asString() - else - "Unknown type parameter $id" - } + fun getPresentableText(): String = typeDeserializer.presentableTextForErrorType(typeProto) } diff --git a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/TypeDeserializer.kt b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/TypeDeserializer.kt index d44dab0971f..d3e762b6165 100644 --- a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/TypeDeserializer.kt +++ b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/TypeDeserializer.kt @@ -23,32 +23,7 @@ import org.jetbrains.kotlin.serialization.ProtoBuf import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedTypeParameterDescriptor import org.jetbrains.kotlin.types.* import org.jetbrains.kotlin.utils.toReadOnlyList -import java.util.LinkedHashMap - -public enum class TypeConstructorKind { - CLASS, - TYPE_PARAMETER -} - -public data class TypeConstructorData(val kind: TypeConstructorKind, val id: Int) - -public fun ProtoBuf.Type.getTypeConstructorData(): TypeConstructorData { - if (hasConstructorClassName()) { - assert(!hasConstructorTypeParameter(), "constructor_class_name already presents, so constructor_type_parameter should not be here") - return TypeConstructorData(TypeConstructorKind.CLASS, constructorClassName) - } - else if (hasConstructorTypeParameter()) { - assert(!hasConstructorClassName(), "constructor_type_parameter already presents, so constructor_class_name should not be here") - return TypeConstructorData(TypeConstructorKind.TYPE_PARAMETER, constructorTypeParameter) - } - else { - return when (constructor.kind) { - ProtoBuf.Type.Constructor.Kind.CLASS -> TypeConstructorData(TypeConstructorKind.CLASS, constructor.id) - ProtoBuf.Type.Constructor.Kind.TYPE_PARAMETER -> TypeConstructorData(TypeConstructorKind.TYPE_PARAMETER, constructor.id) - else -> throw IllegalStateException("Unknown kind ${constructor.kind}") - } - } -} +import java.util.* public class TypeDeserializer( private val c: DeserializationContext, @@ -95,20 +70,23 @@ public class TypeDeserializer( return DeserializedType(c, proto, additionalAnnotations) } - fun typeConstructor(proto: ProtoBuf.Type): TypeConstructor { - val typeConstructorData = proto.getTypeConstructorData() - val id = typeConstructorData.id - return typeConstructor(typeConstructorData) ?: ErrorUtils.createErrorType( - if (typeConstructorData.kind == TypeConstructorKind.CLASS) - c.nameResolver.getClassId(id).asSingleFqName().asString() - else - "Unknown type parameter $id" - ).constructor - } + fun typeConstructor(proto: ProtoBuf.Type): TypeConstructor = + when { + proto.hasClassName() -> + classDescriptors(proto.className)?.typeConstructor + proto.hasTypeParameter() -> + typeParameterTypeConstructor(proto.typeParameter) + else -> + null + } ?: ErrorUtils.createErrorType(presentableTextForErrorType(proto)).constructor - private fun typeConstructor(data: TypeConstructorData): TypeConstructor? = when (data.kind) { - TypeConstructorKind.CLASS -> classDescriptors(data.id)?.typeConstructor - TypeConstructorKind.TYPE_PARAMETER -> typeParameterTypeConstructor(data.id) + internal fun presentableTextForErrorType(proto: ProtoBuf.Type): String = when { + proto.hasClassName() -> + c.nameResolver.getClassId(proto.className).asSingleFqName().asString() + proto.hasTypeParameter() -> + "Unknown type parameter ${proto.typeParameter}" + else -> + "Unknown type" } private fun typeParameterTypeConstructor(typeParameterId: Int): TypeConstructor? = diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/stubBuilder/ClassClsStubBuilder.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/stubBuilder/ClassClsStubBuilder.kt index 596e61d43f2..5d434be573e 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/stubBuilder/ClassClsStubBuilder.kt +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/stubBuilder/ClassClsStubBuilder.kt @@ -37,9 +37,6 @@ import org.jetbrains.kotlin.psi.stubs.impl.KotlinPlaceHolderStubImpl import org.jetbrains.kotlin.serialization.Flags import org.jetbrains.kotlin.serialization.ProtoBuf import org.jetbrains.kotlin.serialization.deserialization.ProtoContainer -import org.jetbrains.kotlin.serialization.deserialization.TypeConstructorKind -import org.jetbrains.kotlin.serialization.deserialization.getTypeConstructorData - fun createClassStub(parent: StubElement, classProto: ProtoBuf.Class, classId: ClassId, context: ClsStubBuilderContext) { ClassClsStubBuilder(parent, classProto, classId, context).build() @@ -54,13 +51,8 @@ private class ClassClsStubBuilder( private val c = outerContext.child(classProto.getTypeParameterList(), classId.getShortClassName()) private val typeStubBuilder = TypeClsStubBuilder(c) private val classKind = Flags.CLASS_KIND[classProto.getFlags()] - private val supertypeIds = classProto.getSupertypeList().map { - type -> - val typeConstructorData = type.getTypeConstructorData() - assert(typeConstructorData.kind == TypeConstructorKind.CLASS) - c.nameResolver.getClassId(typeConstructorData.id) - }.let { - supertypeIds -> + private val supertypeIds = run { + val supertypeIds = classProto.supertypeList.map { c.nameResolver.getClassId(it.className) } //empty supertype list if single supertype is Any if (supertypeIds.singleOrNull()?.let { KotlinBuiltIns.isAny(it.asSingleFqName().toUnsafe()) } ?: false) { listOf() diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/stubBuilder/TypeClsStubBuilder.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/stubBuilder/TypeClsStubBuilder.kt index 11030057220..8bc965a2475 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/stubBuilder/TypeClsStubBuilder.kt +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/stubBuilder/TypeClsStubBuilder.kt @@ -36,11 +36,9 @@ import org.jetbrains.kotlin.serialization.ProtoBuf.Type import org.jetbrains.kotlin.serialization.ProtoBuf.Type.Argument.Projection import org.jetbrains.kotlin.serialization.ProtoBuf.TypeParameter.Variance import org.jetbrains.kotlin.serialization.deserialization.ProtoContainer -import org.jetbrains.kotlin.serialization.deserialization.TypeConstructorKind -import org.jetbrains.kotlin.serialization.deserialization.getTypeConstructorData import org.jetbrains.kotlin.types.DynamicTypeCapabilities import org.jetbrains.kotlin.utils.addToStdlib.singletonOrEmptyList -import java.util.ArrayList +import java.util.* class TypeClsStubBuilder(private val c: ClsStubBuilderContext) { @@ -56,14 +54,12 @@ class TypeClsStubBuilder(private val c: ClsStubBuilderContext) { if (type.getNullable()) KotlinPlaceHolderStubImpl(typeReference, JetStubElementTypes.NULLABLE_TYPE) else typeReference - val typeConstructorData = type.getTypeConstructorData() - when (typeConstructorData.kind) { - TypeConstructorKind.CLASS -> { + when { + type.hasClassName() -> createClassReferenceTypeStub(effectiveParent, type, annotations) - } - TypeConstructorKind.TYPE_PARAMETER -> { + type.hasTypeParameter() -> { createTypeAnnotationStubs(effectiveParent, annotations) - val typeParameterName = c.typeParameters[typeConstructorData.id] + val typeParameterName = c.typeParameters[type.typeParameter] createStubForTypeName(ClassId.topLevel(FqName.topLevel(typeParameterName)), effectiveParent) } } @@ -79,7 +75,7 @@ class TypeClsStubBuilder(private val c: ClsStubBuilderContext) { } } - val classId = c.nameResolver.getClassId(type.getConstructor().getId()) + val classId = c.nameResolver.getClassId(type.className) val shouldBuildAsFunctionType = KotlinBuiltIns.isNumberedFunctionClassFqName(classId.asSingleFqName().toUnsafe()) && type.getArgumentList().none { it.getProjection() == Projection.STAR } if (shouldBuildAsFunctionType) { @@ -240,11 +236,8 @@ class TypeClsStubBuilder(private val c: ClsStubBuilderContext) { } private fun Type.isDefaultUpperBound(): Boolean { - val typeConstructorData = getTypeConstructorData() - if (typeConstructorData.kind != TypeConstructorKind.CLASS) { - return false - } - val classId = c.nameResolver.getClassId(typeConstructorData.id) - return KotlinBuiltIns.isAny(classId.asSingleFqName().toUnsafe()) && this.nullable + return this.hasClassName() && + c.nameResolver.getClassId(className).let { KotlinBuiltIns.isAny(it.asSingleFqName().toUnsafe()) } && + this.nullable } } diff --git a/jps-plugin/src/org/jetbrains/kotlin/jps/incremental/ProtoCompareGenerated.kt b/jps-plugin/src/org/jetbrains/kotlin/jps/incremental/ProtoCompareGenerated.kt index 5de59380920..cfe371184a4 100644 --- a/jps-plugin/src/org/jetbrains/kotlin/jps/incremental/ProtoCompareGenerated.kt +++ b/jps-plugin/src/org/jetbrains/kotlin/jps/incremental/ProtoCompareGenerated.kt @@ -232,14 +232,14 @@ open class ProtoCompareGenerated(public val oldNameResolver: NameResolver, publi if (!checkEquals(old.flexibleUpperBound, new.flexibleUpperBound)) return false } - if (old.hasConstructorClassName() != new.hasConstructorClassName()) return false - if (old.hasConstructorClassName()) { - if (!checkClassIdEquals(old.constructorClassName, new.constructorClassName)) return false + if (old.hasClassName() != new.hasClassName()) return false + if (old.hasClassName()) { + if (!checkClassIdEquals(old.className, new.className)) return false } - if (old.hasConstructorTypeParameter() != new.hasConstructorTypeParameter()) return false - if (old.hasConstructorTypeParameter()) { - if (old.constructorTypeParameter != new.constructorTypeParameter) return false + if (old.hasTypeParameter() != new.hasTypeParameter()) return false + if (old.hasTypeParameter()) { + if (old.typeParameter != new.typeParameter) return false } if (old.getExtensionCount(JvmProtoBuf.typeAnnotation) != new.getExtensionCount(JvmProtoBuf.typeAnnotation)) return false @@ -746,12 +746,12 @@ public fun ProtoBuf.Type.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (I hashCode = 31 * hashCode + flexibleUpperBound.hashCode(stringIndexes, fqNameIndexes) } - if (hasConstructorClassName()) { - hashCode = 31 * hashCode + fqNameIndexes(constructorClassName) + if (hasClassName()) { + hashCode = 31 * hashCode + fqNameIndexes(className) } - if (hasConstructorTypeParameter()) { - hashCode = 31 * hashCode + constructorTypeParameter + if (hasTypeParameter()) { + hashCode = 31 * hashCode + typeParameter } for(i in 0..getExtensionCount(JvmProtoBuf.typeAnnotation) - 1) {