From 82d2e623d3ecf67a940265dab1579c18334f6941 Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Wed, 7 Oct 2015 19:00:08 +0300 Subject: [PATCH] Support a more optimized way of storing types in metadata Together with almost every type now there's also an id which references a type from a separate table. Storing such ids instead of Type messages will allow to reduce the size of the metadata for files where types are used many times over and over again. Currently only deserialization of such types is supported, along with the former mechanism --- .../kotlin/serialization/DebugProtoBuf.java | 3168 +++++++++++++++-- ...tBinaryClassAnnotationAndConstantLoader.kt | 28 +- .../serialization/jvm/JvmProtoBufUtil.kt | 30 +- core/deserialization/src/descriptors.proto | 35 +- .../kotlin/serialization/ProtoBuf.java | 2477 +++++++++++-- .../deserialization/ClassDeserializer.kt | 2 +- .../deserialization/MemberDeserializer.kt | 33 +- .../deserialization/ProtoContainer.kt | 3 +- .../deserialization/TypeDeserializer.kt | 30 +- .../deserialization/TypeTable.kt | 37 + .../serialization/deserialization/context.kt | 30 +- .../DeserializedCallableMemberDescriptor.kt | 3 + .../DeserializedClassDescriptor.kt | 9 +- .../DeserializedConstructorDescriptor.kt | 7 +- .../descriptors/DeserializedMemberScope.kt | 5 +- .../DeserializedPackageMemberScope.kt | 6 +- .../DeserializedPropertyDescriptor.kt | 10 +- .../DeserializedSimpleFunctionDescriptor.java | 21 +- .../DeserializedTypeParameterDescriptor.java | 14 +- .../deserialization/protoTypeTableUtil.kt | 80 + .../jvm/internal/DescriptorBasedProperty.kt | 2 +- .../reflect/jvm/internal/RuntimeTypeMapper.kt | 12 +- .../src/kotlin/reflect/jvm/reflectLambda.kt | 7 +- .../stubBuilder/CallableClsStubBuilder.kt | 10 +- .../stubBuilder/ClassClsStubBuilder.kt | 16 +- .../stubBuilder/ClsStubBuilderContext.kt | 27 +- .../stubBuilder/KotlinClsStubBuilder.kt | 7 +- .../KotlinJavaScriptStubBuilder.kt | 7 +- .../stubBuilder/TypeClsStubBuilder.kt | 38 +- .../decompiler/stubBuilder/clsStubBuilding.kt | 9 +- .../jps/incremental/ProtoCompareGenerated.kt | 210 +- .../jps/incremental/protoDifferenceUtils.kt | 6 + 32 files changed, 5583 insertions(+), 796 deletions(-) create mode 100644 core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/TypeTable.kt create mode 100644 core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/protoTypeTableUtil.kt diff --git a/compiler/tests/org/jetbrains/kotlin/serialization/DebugProtoBuf.java b/compiler/tests/org/jetbrains/kotlin/serialization/DebugProtoBuf.java index 0b624aae007..73c9768c954 100644 --- a/compiler/tests/org/jetbrains/kotlin/serialization/DebugProtoBuf.java +++ b/compiler/tests/org/jetbrains/kotlin/serialization/DebugProtoBuf.java @@ -5424,6 +5424,16 @@ public final class DebugProtoBuf { */ org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeOrBuilder getFlexibleUpperBoundOrBuilder(); + // optional int32 flexible_upper_bound_id = 8; + /** + * optional int32 flexible_upper_bound_id = 8; + */ + boolean hasFlexibleUpperBoundId(); + /** + * optional int32 flexible_upper_bound_id = 8; + */ + int getFlexibleUpperBoundId(); + // optional int32 class_name = 6; /** * optional int32 class_name = 6; @@ -5535,15 +5545,20 @@ public final class DebugProtoBuf { break; } case 48: { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; className_ = input.readInt32(); break; } case 56: { - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; typeParameter_ = input.readInt32(); break; } + case 64: { + bitField0_ |= 0x00000008; + flexibleUpperBoundId_ = input.readInt32(); + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -5604,7 +5619,7 @@ public final class DebugProtoBuf { * optional .org.jetbrains.kotlin.serialization.Type type = 2; * *
-       * when projection is STAR, no type is written, otherwise type must be specified
+       * When projection is STAR, no type is written, otherwise type must be specified
        * 
*/ boolean hasType(); @@ -5612,7 +5627,7 @@ public final class DebugProtoBuf { * optional .org.jetbrains.kotlin.serialization.Type type = 2; * *
-       * when projection is STAR, no type is written, otherwise type must be specified
+       * When projection is STAR, no type is written, otherwise type must be specified
        * 
*/ org.jetbrains.kotlin.serialization.DebugProtoBuf.Type getType(); @@ -5620,10 +5635,20 @@ public final class DebugProtoBuf { * optional .org.jetbrains.kotlin.serialization.Type type = 2; * *
-       * when projection is STAR, no type is written, otherwise type must be specified
+       * When projection is STAR, no type is written, otherwise type must be specified
        * 
*/ org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeOrBuilder getTypeOrBuilder(); + + // optional int32 type_id = 3; + /** + * optional int32 type_id = 3; + */ + boolean hasTypeId(); + /** + * optional int32 type_id = 3; + */ + int getTypeId(); } /** * Protobuf type {@code org.jetbrains.kotlin.serialization.Type.Argument} @@ -5700,6 +5725,11 @@ public final class DebugProtoBuf { bitField0_ |= 0x00000002; break; } + case 24: { + bitField0_ |= 0x00000004; + typeId_ = input.readInt32(); + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -5863,7 +5893,7 @@ public final class DebugProtoBuf { * optional .org.jetbrains.kotlin.serialization.Type type = 2; * *
-       * when projection is STAR, no type is written, otherwise type must be specified
+       * When projection is STAR, no type is written, otherwise type must be specified
        * 
*/ public boolean hasType() { @@ -5873,7 +5903,7 @@ public final class DebugProtoBuf { * optional .org.jetbrains.kotlin.serialization.Type type = 2; * *
-       * when projection is STAR, no type is written, otherwise type must be specified
+       * When projection is STAR, no type is written, otherwise type must be specified
        * 
*/ public org.jetbrains.kotlin.serialization.DebugProtoBuf.Type getType() { @@ -5883,16 +5913,33 @@ public final class DebugProtoBuf { * optional .org.jetbrains.kotlin.serialization.Type type = 2; * *
-       * when projection is STAR, no type is written, otherwise type must be specified
+       * When projection is STAR, no type is written, otherwise type must be specified
        * 
*/ public org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeOrBuilder getTypeOrBuilder() { return type_; } + // optional int32 type_id = 3; + public static final int TYPE_ID_FIELD_NUMBER = 3; + private int typeId_; + /** + * optional int32 type_id = 3; + */ + public boolean hasTypeId() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional int32 type_id = 3; + */ + public int getTypeId() { + return typeId_; + } + private void initFields() { projection_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Argument.Projection.INV; type_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.getDefaultInstance(); + typeId_ = 0; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -5918,6 +5965,9 @@ public final class DebugProtoBuf { if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeMessage(2, type_); } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeInt32(3, typeId_); + } getUnknownFields().writeTo(output); } @@ -5935,6 +5985,10 @@ public final class DebugProtoBuf { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, type_); } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, typeId_); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -6060,6 +6114,8 @@ public final class DebugProtoBuf { typeBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); + typeId_ = 0; + bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -6100,6 +6156,10 @@ public final class DebugProtoBuf { } else { result.type_ = typeBuilder_.build(); } + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.typeId_ = typeId_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -6122,6 +6182,9 @@ public final class DebugProtoBuf { if (other.hasType()) { mergeType(other.getType()); } + if (other.hasTypeId()) { + setTypeId(other.getTypeId()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -6199,7 +6262,7 @@ public final class DebugProtoBuf { * optional .org.jetbrains.kotlin.serialization.Type type = 2; * *
-         * when projection is STAR, no type is written, otherwise type must be specified
+         * When projection is STAR, no type is written, otherwise type must be specified
          * 
*/ public boolean hasType() { @@ -6209,7 +6272,7 @@ public final class DebugProtoBuf { * optional .org.jetbrains.kotlin.serialization.Type type = 2; * *
-         * when projection is STAR, no type is written, otherwise type must be specified
+         * When projection is STAR, no type is written, otherwise type must be specified
          * 
*/ public org.jetbrains.kotlin.serialization.DebugProtoBuf.Type getType() { @@ -6223,7 +6286,7 @@ public final class DebugProtoBuf { * optional .org.jetbrains.kotlin.serialization.Type type = 2; * *
-         * when projection is STAR, no type is written, otherwise type must be specified
+         * When projection is STAR, no type is written, otherwise type must be specified
          * 
*/ public Builder setType(org.jetbrains.kotlin.serialization.DebugProtoBuf.Type value) { @@ -6243,7 +6306,7 @@ public final class DebugProtoBuf { * optional .org.jetbrains.kotlin.serialization.Type type = 2; * *
-         * when projection is STAR, no type is written, otherwise type must be specified
+         * When projection is STAR, no type is written, otherwise type must be specified
          * 
*/ public Builder setType( @@ -6261,7 +6324,7 @@ public final class DebugProtoBuf { * optional .org.jetbrains.kotlin.serialization.Type type = 2; * *
-         * when projection is STAR, no type is written, otherwise type must be specified
+         * When projection is STAR, no type is written, otherwise type must be specified
          * 
*/ public Builder mergeType(org.jetbrains.kotlin.serialization.DebugProtoBuf.Type value) { @@ -6284,7 +6347,7 @@ public final class DebugProtoBuf { * optional .org.jetbrains.kotlin.serialization.Type type = 2; * *
-         * when projection is STAR, no type is written, otherwise type must be specified
+         * When projection is STAR, no type is written, otherwise type must be specified
          * 
*/ public Builder clearType() { @@ -6301,7 +6364,7 @@ public final class DebugProtoBuf { * optional .org.jetbrains.kotlin.serialization.Type type = 2; * *
-         * when projection is STAR, no type is written, otherwise type must be specified
+         * When projection is STAR, no type is written, otherwise type must be specified
          * 
*/ public org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Builder getTypeBuilder() { @@ -6313,7 +6376,7 @@ public final class DebugProtoBuf { * optional .org.jetbrains.kotlin.serialization.Type type = 2; * *
-         * when projection is STAR, no type is written, otherwise type must be specified
+         * When projection is STAR, no type is written, otherwise type must be specified
          * 
*/ public org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeOrBuilder getTypeOrBuilder() { @@ -6327,7 +6390,7 @@ public final class DebugProtoBuf { * optional .org.jetbrains.kotlin.serialization.Type type = 2; * *
-         * when projection is STAR, no type is written, otherwise type must be specified
+         * When projection is STAR, no type is written, otherwise type must be specified
          * 
*/ private com.google.protobuf.SingleFieldBuilder< @@ -6344,6 +6407,39 @@ public final class DebugProtoBuf { return typeBuilder_; } + // optional int32 type_id = 3; + private int typeId_ ; + /** + * optional int32 type_id = 3; + */ + public boolean hasTypeId() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional int32 type_id = 3; + */ + public int getTypeId() { + return typeId_; + } + /** + * optional int32 type_id = 3; + */ + public Builder setTypeId(int value) { + bitField0_ |= 0x00000004; + typeId_ = value; + onChanged(); + return this; + } + /** + * optional int32 type_id = 3; + */ + public Builder clearTypeId() { + bitField0_ = (bitField0_ & ~0x00000004); + typeId_ = 0; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.Type.Argument) } @@ -6456,6 +6552,22 @@ public final class DebugProtoBuf { return flexibleUpperBound_; } + // optional int32 flexible_upper_bound_id = 8; + public static final int FLEXIBLE_UPPER_BOUND_ID_FIELD_NUMBER = 8; + private int flexibleUpperBoundId_; + /** + * optional int32 flexible_upper_bound_id = 8; + */ + public boolean hasFlexibleUpperBoundId() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional int32 flexible_upper_bound_id = 8; + */ + public int getFlexibleUpperBoundId() { + return flexibleUpperBoundId_; + } + // optional int32 class_name = 6; public static final int CLASS_NAME_FIELD_NUMBER = 6; private int className_; @@ -6463,7 +6575,7 @@ public final class DebugProtoBuf { * optional int32 class_name = 6; */ public boolean hasClassName() { - return ((bitField0_ & 0x00000008) == 0x00000008); + return ((bitField0_ & 0x00000010) == 0x00000010); } /** * optional int32 class_name = 6; @@ -6483,7 +6595,7 @@ public final class DebugProtoBuf { * */ public boolean hasTypeParameter() { - return ((bitField0_ & 0x00000010) == 0x00000010); + return ((bitField0_ & 0x00000020) == 0x00000020); } /** * optional int32 type_parameter = 7; @@ -6501,6 +6613,7 @@ public final class DebugProtoBuf { nullable_ = false; flexibleTypeCapabilitiesId_ = 0; flexibleUpperBound_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.getDefaultInstance(); + flexibleUpperBoundId_ = 0; className_ = 0; typeParameter_ = 0; } @@ -6547,12 +6660,15 @@ public final class DebugProtoBuf { if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeMessage(5, flexibleUpperBound_); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeInt32(6, className_); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (((bitField0_ & 0x00000020) == 0x00000020)) { output.writeInt32(7, typeParameter_); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeInt32(8, flexibleUpperBoundId_); + } extensionWriter.writeUntil(200, output); getUnknownFields().writeTo(output); } @@ -6579,14 +6695,18 @@ public final class DebugProtoBuf { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, flexibleUpperBound_); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(6, className_); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (((bitField0_ & 0x00000020) == 0x00000020)) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(7, typeParameter_); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(8, flexibleUpperBoundId_); + } size += extensionsSerializedSize(); size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -6722,10 +6842,12 @@ public final class DebugProtoBuf { flexibleUpperBoundBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000008); - className_ = 0; + flexibleUpperBoundId_ = 0; bitField0_ = (bitField0_ & ~0x00000010); - typeParameter_ = 0; + className_ = 0; bitField0_ = (bitField0_ & ~0x00000020); + typeParameter_ = 0; + bitField0_ = (bitField0_ & ~0x00000040); return this; } @@ -6782,10 +6904,14 @@ public final class DebugProtoBuf { if (((from_bitField0_ & 0x00000010) == 0x00000010)) { to_bitField0_ |= 0x00000008; } - result.className_ = className_; + result.flexibleUpperBoundId_ = flexibleUpperBoundId_; if (((from_bitField0_ & 0x00000020) == 0x00000020)) { to_bitField0_ |= 0x00000010; } + result.className_ = className_; + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000020; + } result.typeParameter_ = typeParameter_; result.bitField0_ = to_bitField0_; onBuilt(); @@ -6838,6 +6964,9 @@ public final class DebugProtoBuf { if (other.hasFlexibleUpperBound()) { mergeFlexibleUpperBound(other.getFlexibleUpperBound()); } + if (other.hasFlexibleUpperBoundId()) { + setFlexibleUpperBoundId(other.getFlexibleUpperBoundId()); + } if (other.hasClassName()) { setClassName(other.getClassName()); } @@ -7331,13 +7460,46 @@ public final class DebugProtoBuf { return flexibleUpperBoundBuilder_; } + // optional int32 flexible_upper_bound_id = 8; + private int flexibleUpperBoundId_ ; + /** + * optional int32 flexible_upper_bound_id = 8; + */ + public boolean hasFlexibleUpperBoundId() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional int32 flexible_upper_bound_id = 8; + */ + public int getFlexibleUpperBoundId() { + return flexibleUpperBoundId_; + } + /** + * optional int32 flexible_upper_bound_id = 8; + */ + public Builder setFlexibleUpperBoundId(int value) { + bitField0_ |= 0x00000010; + flexibleUpperBoundId_ = value; + onChanged(); + return this; + } + /** + * optional int32 flexible_upper_bound_id = 8; + */ + public Builder clearFlexibleUpperBoundId() { + bitField0_ = (bitField0_ & ~0x00000010); + flexibleUpperBoundId_ = 0; + onChanged(); + return this; + } + // optional int32 class_name = 6; private int className_ ; /** * optional int32 class_name = 6; */ public boolean hasClassName() { - return ((bitField0_ & 0x00000010) == 0x00000010); + return ((bitField0_ & 0x00000020) == 0x00000020); } /** * optional int32 class_name = 6; @@ -7349,7 +7511,7 @@ public final class DebugProtoBuf { * optional int32 class_name = 6; */ public Builder setClassName(int value) { - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; className_ = value; onChanged(); return this; @@ -7358,7 +7520,7 @@ public final class DebugProtoBuf { * optional int32 class_name = 6; */ public Builder clearClassName() { - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); className_ = 0; onChanged(); return this; @@ -7374,7 +7536,7 @@ public final class DebugProtoBuf { * */ public boolean hasTypeParameter() { - return ((bitField0_ & 0x00000020) == 0x00000020); + return ((bitField0_ & 0x00000040) == 0x00000040); } /** * optional int32 type_parameter = 7; @@ -7394,7 +7556,7 @@ public final class DebugProtoBuf { * */ public Builder setTypeParameter(int value) { - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; typeParameter_ = value; onChanged(); return this; @@ -7407,7 +7569,7 @@ public final class DebugProtoBuf { * */ public Builder clearTypeParameter() { - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); typeParameter_ = 0; onChanged(); return this; @@ -7491,6 +7653,20 @@ public final class DebugProtoBuf { */ org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeOrBuilder getUpperBoundOrBuilder( int index); + + // repeated int32 upper_bound_id = 6; + /** + * repeated int32 upper_bound_id = 6; + */ + java.util.List getUpperBoundIdList(); + /** + * repeated int32 upper_bound_id = 6; + */ + int getUpperBoundIdCount(); + /** + * repeated int32 upper_bound_id = 6; + */ + int getUpperBoundId(int index); } /** * Protobuf type {@code org.jetbrains.kotlin.serialization.TypeParameter} @@ -7577,6 +7753,27 @@ public final class DebugProtoBuf { upperBound_.add(input.readMessage(org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.PARSER, extensionRegistry)); break; } + case 48: { + if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + upperBoundId_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000020; + } + upperBoundId_.add(input.readInt32()); + break; + } + case 50: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000020) == 0x00000020) && input.getBytesUntilLimit() > 0) { + upperBoundId_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000020; + } + while (input.getBytesUntilLimit() > 0) { + upperBoundId_.add(input.readInt32()); + } + input.popLimit(limit); + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -7588,6 +7785,9 @@ public final class DebugProtoBuf { if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { upperBound_ = java.util.Collections.unmodifiableList(upperBound_); } + if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + upperBoundId_ = java.util.Collections.unmodifiableList(upperBoundId_); + } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } @@ -7811,12 +8011,36 @@ public final class DebugProtoBuf { return upperBound_.get(index); } + // repeated int32 upper_bound_id = 6; + public static final int UPPER_BOUND_ID_FIELD_NUMBER = 6; + private java.util.List upperBoundId_; + /** + * repeated int32 upper_bound_id = 6; + */ + public java.util.List + getUpperBoundIdList() { + return upperBoundId_; + } + /** + * repeated int32 upper_bound_id = 6; + */ + public int getUpperBoundIdCount() { + return upperBoundId_.size(); + } + /** + * repeated int32 upper_bound_id = 6; + */ + public int getUpperBoundId(int index) { + return upperBoundId_.get(index); + } + private void initFields() { id_ = 0; name_ = 0; reified_ = false; variance_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeParameter.Variance.INV; upperBound_ = java.util.Collections.emptyList(); + upperBoundId_ = java.util.Collections.emptyList(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -7859,6 +8083,9 @@ public final class DebugProtoBuf { for (int i = 0; i < upperBound_.size(); i++) { output.writeMessage(5, upperBound_.get(i)); } + for (int i = 0; i < upperBoundId_.size(); i++) { + output.writeInt32(6, upperBoundId_.get(i)); + } getUnknownFields().writeTo(output); } @@ -7888,6 +8115,15 @@ public final class DebugProtoBuf { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, upperBound_.get(i)); } + { + int dataSize = 0; + for (int i = 0; i < upperBoundId_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(upperBoundId_.get(i)); + } + size += dataSize; + size += 1 * getUpperBoundIdList().size(); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -8019,6 +8255,8 @@ public final class DebugProtoBuf { } else { upperBoundBuilder_.clear(); } + upperBoundId_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); return this; } @@ -8072,6 +8310,11 @@ public final class DebugProtoBuf { } else { result.upperBound_ = upperBoundBuilder_.build(); } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + upperBoundId_ = java.util.Collections.unmodifiableList(upperBoundId_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.upperBoundId_ = upperBoundId_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -8126,6 +8369,16 @@ public final class DebugProtoBuf { } } } + if (!other.upperBoundId_.isEmpty()) { + if (upperBoundId_.isEmpty()) { + upperBoundId_ = other.upperBoundId_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureUpperBoundIdIsMutable(); + upperBoundId_.addAll(other.upperBoundId_); + } + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -8542,6 +8795,72 @@ public final class DebugProtoBuf { return upperBoundBuilder_; } + // repeated int32 upper_bound_id = 6; + private java.util.List upperBoundId_ = java.util.Collections.emptyList(); + private void ensureUpperBoundIdIsMutable() { + if (!((bitField0_ & 0x00000020) == 0x00000020)) { + upperBoundId_ = new java.util.ArrayList(upperBoundId_); + bitField0_ |= 0x00000020; + } + } + /** + * repeated int32 upper_bound_id = 6; + */ + public java.util.List + getUpperBoundIdList() { + return java.util.Collections.unmodifiableList(upperBoundId_); + } + /** + * repeated int32 upper_bound_id = 6; + */ + public int getUpperBoundIdCount() { + return upperBoundId_.size(); + } + /** + * repeated int32 upper_bound_id = 6; + */ + public int getUpperBoundId(int index) { + return upperBoundId_.get(index); + } + /** + * repeated int32 upper_bound_id = 6; + */ + public Builder setUpperBoundId( + int index, int value) { + ensureUpperBoundIdIsMutable(); + upperBoundId_.set(index, value); + onChanged(); + return this; + } + /** + * repeated int32 upper_bound_id = 6; + */ + public Builder addUpperBoundId(int value) { + ensureUpperBoundIdIsMutable(); + upperBoundId_.add(value); + onChanged(); + return this; + } + /** + * repeated int32 upper_bound_id = 6; + */ + public Builder addAllUpperBoundId( + java.lang.Iterable values) { + ensureUpperBoundIdIsMutable(); + super.addAll(values, upperBoundId_); + onChanged(); + return this; + } + /** + * repeated int32 upper_bound_id = 6; + */ + public Builder clearUpperBoundId() { + upperBoundId_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.TypeParameter) } @@ -8655,6 +8974,20 @@ public final class DebugProtoBuf { org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeOrBuilder getSupertypeOrBuilder( int index); + // repeated int32 supertype_id = 2 [packed = true]; + /** + * repeated int32 supertype_id = 2 [packed = true]; + */ + java.util.List getSupertypeIdList(); + /** + * repeated int32 supertype_id = 2 [packed = true]; + */ + int getSupertypeIdCount(); + /** + * repeated int32 supertype_id = 2 [packed = true]; + */ + int getSupertypeId(int index); + // repeated int32 nested_class_name = 7 [packed = true]; /** * repeated int32 nested_class_name = 7 [packed = true]; @@ -8757,6 +9090,20 @@ public final class DebugProtoBuf { * repeated int32 enum_entry = 12 [packed = true]; */ int getEnumEntry(int index); + + // optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + boolean hasTypeTable(); + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable getTypeTable(); + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTableOrBuilder getTypeTableOrBuilder(); } /** * Protobuf type {@code org.jetbrains.kotlin.serialization.Class} @@ -8814,6 +9161,27 @@ public final class DebugProtoBuf { flags_ = input.readInt32(); break; } + case 16: { + if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + supertypeId_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000020; + } + supertypeId_.add(input.readInt32()); + break; + } + case 18: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000020) == 0x00000020) && input.getBytesUntilLimit() > 0) { + supertypeId_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000020; + } + while (input.getBytesUntilLimit() > 0) { + supertypeId_.add(input.readInt32()); + } + input.popLimit(limit); + break; + } case 24: { bitField0_ |= 0x00000002; fqName_ = input.readInt32(); @@ -8841,9 +9209,9 @@ public final class DebugProtoBuf { break; } case 56: { - if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) { nestedClassName_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000020; + mutable_bitField0_ |= 0x00000040; } nestedClassName_.add(input.readInt32()); break; @@ -8851,9 +9219,9 @@ public final class DebugProtoBuf { case 58: { int length = input.readRawVarint32(); int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000020) == 0x00000020) && input.getBytesUntilLimit() > 0) { + if (!((mutable_bitField0_ & 0x00000040) == 0x00000040) && input.getBytesUntilLimit() > 0) { nestedClassName_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000020; + mutable_bitField0_ |= 0x00000040; } while (input.getBytesUntilLimit() > 0) { nestedClassName_.add(input.readInt32()); @@ -8862,33 +9230,33 @@ public final class DebugProtoBuf { break; } case 66: { - if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) { + if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) { constructor_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000040; + mutable_bitField0_ |= 0x00000080; } constructor_.add(input.readMessage(org.jetbrains.kotlin.serialization.DebugProtoBuf.Constructor.PARSER, extensionRegistry)); break; } case 74: { - if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) { + if (!((mutable_bitField0_ & 0x00000100) == 0x00000100)) { function_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000080; + mutable_bitField0_ |= 0x00000100; } function_.add(input.readMessage(org.jetbrains.kotlin.serialization.DebugProtoBuf.Function.PARSER, extensionRegistry)); break; } case 82: { - if (!((mutable_bitField0_ & 0x00000100) == 0x00000100)) { + if (!((mutable_bitField0_ & 0x00000200) == 0x00000200)) { property_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000100; + mutable_bitField0_ |= 0x00000200; } property_.add(input.readMessage(org.jetbrains.kotlin.serialization.DebugProtoBuf.Property.PARSER, extensionRegistry)); break; } case 96: { - if (!((mutable_bitField0_ & 0x00000200) == 0x00000200)) { + if (!((mutable_bitField0_ & 0x00000400) == 0x00000400)) { enumEntry_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000200; + mutable_bitField0_ |= 0x00000400; } enumEntry_.add(input.readInt32()); break; @@ -8896,9 +9264,9 @@ public final class DebugProtoBuf { case 98: { int length = input.readRawVarint32(); int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000200) == 0x00000200) && input.getBytesUntilLimit() > 0) { + if (!((mutable_bitField0_ & 0x00000400) == 0x00000400) && input.getBytesUntilLimit() > 0) { enumEntry_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000200; + mutable_bitField0_ |= 0x00000400; } while (input.getBytesUntilLimit() > 0) { enumEntry_.add(input.readInt32()); @@ -8906,6 +9274,19 @@ public final class DebugProtoBuf { input.popLimit(limit); break; } + case 242: { + org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.Builder subBuilder = null; + if (((bitField0_ & 0x00000008) == 0x00000008)) { + subBuilder = typeTable_.toBuilder(); + } + typeTable_ = input.readMessage(org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(typeTable_); + typeTable_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000008; + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -8914,25 +9295,28 @@ public final class DebugProtoBuf { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { + if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + supertypeId_ = java.util.Collections.unmodifiableList(supertypeId_); + } if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { typeParameter_ = java.util.Collections.unmodifiableList(typeParameter_); } if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { supertype_ = java.util.Collections.unmodifiableList(supertype_); } - if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) { nestedClassName_ = java.util.Collections.unmodifiableList(nestedClassName_); } - if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) { + if (((mutable_bitField0_ & 0x00000080) == 0x00000080)) { constructor_ = java.util.Collections.unmodifiableList(constructor_); } - if (((mutable_bitField0_ & 0x00000080) == 0x00000080)) { + if (((mutable_bitField0_ & 0x00000100) == 0x00000100)) { function_ = java.util.Collections.unmodifiableList(function_); } - if (((mutable_bitField0_ & 0x00000100) == 0x00000100)) { + if (((mutable_bitField0_ & 0x00000200) == 0x00000200)) { property_ = java.util.Collections.unmodifiableList(property_); } - if (((mutable_bitField0_ & 0x00000200) == 0x00000200)) { + if (((mutable_bitField0_ & 0x00000400) == 0x00000400)) { enumEntry_ = java.util.Collections.unmodifiableList(enumEntry_); } this.unknownFields = unknownFields.build(); @@ -9240,6 +9624,30 @@ public final class DebugProtoBuf { return supertype_.get(index); } + // repeated int32 supertype_id = 2 [packed = true]; + public static final int SUPERTYPE_ID_FIELD_NUMBER = 2; + private java.util.List supertypeId_; + /** + * repeated int32 supertype_id = 2 [packed = true]; + */ + public java.util.List + getSupertypeIdList() { + return supertypeId_; + } + /** + * repeated int32 supertype_id = 2 [packed = true]; + */ + public int getSupertypeIdCount() { + return supertypeId_.size(); + } + /** + * repeated int32 supertype_id = 2 [packed = true]; + */ + public int getSupertypeId(int index) { + return supertypeId_.get(index); + } + private int supertypeIdMemoizedSerializedSize = -1; + // repeated int32 nested_class_name = 7 [packed = true]; public static final int NESTED_CLASS_NAME_FIELD_NUMBER = 7; private java.util.List nestedClassName_; @@ -9396,17 +9804,41 @@ public final class DebugProtoBuf { } private int enumEntryMemoizedSerializedSize = -1; + // optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + public static final int TYPE_TABLE_FIELD_NUMBER = 30; + private org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable typeTable_; + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public boolean hasTypeTable() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable getTypeTable() { + return typeTable_; + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTableOrBuilder getTypeTableOrBuilder() { + return typeTable_; + } + private void initFields() { flags_ = 6; fqName_ = 0; companionObjectName_ = 0; typeParameter_ = java.util.Collections.emptyList(); supertype_ = java.util.Collections.emptyList(); + supertypeId_ = java.util.Collections.emptyList(); nestedClassName_ = java.util.Collections.emptyList(); constructor_ = java.util.Collections.emptyList(); function_ = java.util.Collections.emptyList(); property_ = java.util.Collections.emptyList(); enumEntry_ = java.util.Collections.emptyList(); + typeTable_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -9447,6 +9879,12 @@ public final class DebugProtoBuf { return false; } } + if (hasTypeTable()) { + if (!getTypeTable().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } if (!extensionsAreInitialized()) { memoizedIsInitialized = 0; return false; @@ -9464,6 +9902,13 @@ public final class DebugProtoBuf { if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeInt32(1, flags_); } + if (getSupertypeIdList().size() > 0) { + output.writeRawVarint32(18); + output.writeRawVarint32(supertypeIdMemoizedSerializedSize); + } + for (int i = 0; i < supertypeId_.size(); i++) { + output.writeInt32NoTag(supertypeId_.get(i)); + } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeInt32(3, fqName_); } @@ -9499,6 +9944,9 @@ public final class DebugProtoBuf { for (int i = 0; i < enumEntry_.size(); i++) { output.writeInt32NoTag(enumEntry_.get(i)); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeMessage(30, typeTable_); + } extensionWriter.writeUntil(200, output); getUnknownFields().writeTo(output); } @@ -9513,6 +9961,20 @@ public final class DebugProtoBuf { size += com.google.protobuf.CodedOutputStream .computeInt32Size(1, flags_); } + { + int dataSize = 0; + for (int i = 0; i < supertypeId_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(supertypeId_.get(i)); + } + size += dataSize; + if (!getSupertypeIdList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + supertypeIdMemoizedSerializedSize = dataSize; + } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(3, fqName_); @@ -9569,6 +10031,10 @@ public final class DebugProtoBuf { } enumEntryMemoizedSerializedSize = dataSize; } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(30, typeTable_); + } size += extensionsSerializedSize(); size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -9683,6 +10149,7 @@ public final class DebugProtoBuf { getConstructorFieldBuilder(); getFunctionFieldBuilder(); getPropertyFieldBuilder(); + getTypeTableFieldBuilder(); } } private static Builder create() { @@ -9709,28 +10176,36 @@ public final class DebugProtoBuf { } else { supertypeBuilder_.clear(); } - nestedClassName_ = java.util.Collections.emptyList(); + supertypeId_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000020); + nestedClassName_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); if (constructorBuilder_ == null) { constructor_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000080); } else { constructorBuilder_.clear(); } if (functionBuilder_ == null) { function_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); } else { functionBuilder_.clear(); } if (propertyBuilder_ == null) { property_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000200); } else { propertyBuilder_.clear(); } enumEntry_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000400); + if (typeTableBuilder_ == null) { + typeTable_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.getDefaultInstance(); + } else { + typeTableBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000800); return this; } @@ -9790,42 +10265,55 @@ public final class DebugProtoBuf { result.supertype_ = supertypeBuilder_.build(); } if (((bitField0_ & 0x00000020) == 0x00000020)) { - nestedClassName_ = java.util.Collections.unmodifiableList(nestedClassName_); + supertypeId_ = java.util.Collections.unmodifiableList(supertypeId_); bitField0_ = (bitField0_ & ~0x00000020); } + result.supertypeId_ = supertypeId_; + if (((bitField0_ & 0x00000040) == 0x00000040)) { + nestedClassName_ = java.util.Collections.unmodifiableList(nestedClassName_); + bitField0_ = (bitField0_ & ~0x00000040); + } result.nestedClassName_ = nestedClassName_; if (constructorBuilder_ == null) { - if (((bitField0_ & 0x00000040) == 0x00000040)) { + if (((bitField0_ & 0x00000080) == 0x00000080)) { constructor_ = java.util.Collections.unmodifiableList(constructor_); - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000080); } result.constructor_ = constructor_; } else { result.constructor_ = constructorBuilder_.build(); } if (functionBuilder_ == null) { - if (((bitField0_ & 0x00000080) == 0x00000080)) { + if (((bitField0_ & 0x00000100) == 0x00000100)) { function_ = java.util.Collections.unmodifiableList(function_); - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); } result.function_ = function_; } else { result.function_ = functionBuilder_.build(); } if (propertyBuilder_ == null) { - if (((bitField0_ & 0x00000100) == 0x00000100)) { + if (((bitField0_ & 0x00000200) == 0x00000200)) { property_ = java.util.Collections.unmodifiableList(property_); - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000200); } result.property_ = property_; } else { result.property_ = propertyBuilder_.build(); } - if (((bitField0_ & 0x00000200) == 0x00000200)) { + if (((bitField0_ & 0x00000400) == 0x00000400)) { enumEntry_ = java.util.Collections.unmodifiableList(enumEntry_); - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000400); } result.enumEntry_ = enumEntry_; + if (((from_bitField0_ & 0x00000800) == 0x00000800)) { + to_bitField0_ |= 0x00000008; + } + if (typeTableBuilder_ == null) { + result.typeTable_ = typeTable_; + } else { + result.typeTable_ = typeTableBuilder_.build(); + } result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -9903,10 +10391,20 @@ public final class DebugProtoBuf { } } } + if (!other.supertypeId_.isEmpty()) { + if (supertypeId_.isEmpty()) { + supertypeId_ = other.supertypeId_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureSupertypeIdIsMutable(); + supertypeId_.addAll(other.supertypeId_); + } + onChanged(); + } if (!other.nestedClassName_.isEmpty()) { if (nestedClassName_.isEmpty()) { nestedClassName_ = other.nestedClassName_; - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); } else { ensureNestedClassNameIsMutable(); nestedClassName_.addAll(other.nestedClassName_); @@ -9917,7 +10415,7 @@ public final class DebugProtoBuf { if (!other.constructor_.isEmpty()) { if (constructor_.isEmpty()) { constructor_ = other.constructor_; - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000080); } else { ensureConstructorIsMutable(); constructor_.addAll(other.constructor_); @@ -9930,7 +10428,7 @@ public final class DebugProtoBuf { constructorBuilder_.dispose(); constructorBuilder_ = null; constructor_ = other.constructor_; - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000080); constructorBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getConstructorFieldBuilder() : null; @@ -9943,7 +10441,7 @@ public final class DebugProtoBuf { if (!other.function_.isEmpty()) { if (function_.isEmpty()) { function_ = other.function_; - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); } else { ensureFunctionIsMutable(); function_.addAll(other.function_); @@ -9956,7 +10454,7 @@ public final class DebugProtoBuf { functionBuilder_.dispose(); functionBuilder_ = null; function_ = other.function_; - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); functionBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getFunctionFieldBuilder() : null; @@ -9969,7 +10467,7 @@ public final class DebugProtoBuf { if (!other.property_.isEmpty()) { if (property_.isEmpty()) { property_ = other.property_; - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000200); } else { ensurePropertyIsMutable(); property_.addAll(other.property_); @@ -9982,7 +10480,7 @@ public final class DebugProtoBuf { propertyBuilder_.dispose(); propertyBuilder_ = null; property_ = other.property_; - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000200); propertyBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getPropertyFieldBuilder() : null; @@ -9994,13 +10492,16 @@ public final class DebugProtoBuf { if (!other.enumEntry_.isEmpty()) { if (enumEntry_.isEmpty()) { enumEntry_ = other.enumEntry_; - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000400); } else { ensureEnumEntryIsMutable(); enumEntry_.addAll(other.enumEntry_); } onChanged(); } + if (other.hasTypeTable()) { + mergeTypeTable(other.getTypeTable()); + } this.mergeExtensionFields(other); this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -10041,6 +10542,12 @@ public final class DebugProtoBuf { return false; } } + if (hasTypeTable()) { + if (!getTypeTable().isInitialized()) { + + return false; + } + } if (!extensionsAreInitialized()) { return false; @@ -10682,12 +11189,78 @@ public final class DebugProtoBuf { return supertypeBuilder_; } + // repeated int32 supertype_id = 2 [packed = true]; + private java.util.List supertypeId_ = java.util.Collections.emptyList(); + private void ensureSupertypeIdIsMutable() { + if (!((bitField0_ & 0x00000020) == 0x00000020)) { + supertypeId_ = new java.util.ArrayList(supertypeId_); + bitField0_ |= 0x00000020; + } + } + /** + * repeated int32 supertype_id = 2 [packed = true]; + */ + public java.util.List + getSupertypeIdList() { + return java.util.Collections.unmodifiableList(supertypeId_); + } + /** + * repeated int32 supertype_id = 2 [packed = true]; + */ + public int getSupertypeIdCount() { + return supertypeId_.size(); + } + /** + * repeated int32 supertype_id = 2 [packed = true]; + */ + public int getSupertypeId(int index) { + return supertypeId_.get(index); + } + /** + * repeated int32 supertype_id = 2 [packed = true]; + */ + public Builder setSupertypeId( + int index, int value) { + ensureSupertypeIdIsMutable(); + supertypeId_.set(index, value); + onChanged(); + return this; + } + /** + * repeated int32 supertype_id = 2 [packed = true]; + */ + public Builder addSupertypeId(int value) { + ensureSupertypeIdIsMutable(); + supertypeId_.add(value); + onChanged(); + return this; + } + /** + * repeated int32 supertype_id = 2 [packed = true]; + */ + public Builder addAllSupertypeId( + java.lang.Iterable values) { + ensureSupertypeIdIsMutable(); + super.addAll(values, supertypeId_); + onChanged(); + return this; + } + /** + * repeated int32 supertype_id = 2 [packed = true]; + */ + public Builder clearSupertypeId() { + supertypeId_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + // repeated int32 nested_class_name = 7 [packed = true]; private java.util.List nestedClassName_ = java.util.Collections.emptyList(); private void ensureNestedClassNameIsMutable() { - if (!((bitField0_ & 0x00000020) == 0x00000020)) { + if (!((bitField0_ & 0x00000040) == 0x00000040)) { nestedClassName_ = new java.util.ArrayList(nestedClassName_); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; } } /** @@ -10743,7 +11316,7 @@ public final class DebugProtoBuf { */ public Builder clearNestedClassName() { nestedClassName_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); onChanged(); return this; } @@ -10752,9 +11325,9 @@ public final class DebugProtoBuf { private java.util.List constructor_ = java.util.Collections.emptyList(); private void ensureConstructorIsMutable() { - if (!((bitField0_ & 0x00000040) == 0x00000040)) { + if (!((bitField0_ & 0x00000080) == 0x00000080)) { constructor_ = new java.util.ArrayList(constructor_); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; } } @@ -10903,7 +11476,7 @@ public final class DebugProtoBuf { public Builder clearConstructor() { if (constructorBuilder_ == null) { constructor_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000080); onChanged(); } else { constructorBuilder_.clear(); @@ -10980,7 +11553,7 @@ public final class DebugProtoBuf { constructorBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< org.jetbrains.kotlin.serialization.DebugProtoBuf.Constructor, org.jetbrains.kotlin.serialization.DebugProtoBuf.Constructor.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.ConstructorOrBuilder>( constructor_, - ((bitField0_ & 0x00000040) == 0x00000040), + ((bitField0_ & 0x00000080) == 0x00000080), getParentForChildren(), isClean()); constructor_ = null; @@ -10992,9 +11565,9 @@ public final class DebugProtoBuf { private java.util.List function_ = java.util.Collections.emptyList(); private void ensureFunctionIsMutable() { - if (!((bitField0_ & 0x00000080) == 0x00000080)) { + if (!((bitField0_ & 0x00000100) == 0x00000100)) { function_ = new java.util.ArrayList(function_); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; } } @@ -11143,7 +11716,7 @@ public final class DebugProtoBuf { public Builder clearFunction() { if (functionBuilder_ == null) { function_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); onChanged(); } else { functionBuilder_.clear(); @@ -11220,7 +11793,7 @@ public final class DebugProtoBuf { functionBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< org.jetbrains.kotlin.serialization.DebugProtoBuf.Function, org.jetbrains.kotlin.serialization.DebugProtoBuf.Function.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.FunctionOrBuilder>( function_, - ((bitField0_ & 0x00000080) == 0x00000080), + ((bitField0_ & 0x00000100) == 0x00000100), getParentForChildren(), isClean()); function_ = null; @@ -11232,9 +11805,9 @@ public final class DebugProtoBuf { private java.util.List property_ = java.util.Collections.emptyList(); private void ensurePropertyIsMutable() { - if (!((bitField0_ & 0x00000100) == 0x00000100)) { + if (!((bitField0_ & 0x00000200) == 0x00000200)) { property_ = new java.util.ArrayList(property_); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; } } @@ -11383,7 +11956,7 @@ public final class DebugProtoBuf { public Builder clearProperty() { if (propertyBuilder_ == null) { property_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000200); onChanged(); } else { propertyBuilder_.clear(); @@ -11460,7 +12033,7 @@ public final class DebugProtoBuf { propertyBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< org.jetbrains.kotlin.serialization.DebugProtoBuf.Property, org.jetbrains.kotlin.serialization.DebugProtoBuf.Property.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.PropertyOrBuilder>( property_, - ((bitField0_ & 0x00000100) == 0x00000100), + ((bitField0_ & 0x00000200) == 0x00000200), getParentForChildren(), isClean()); property_ = null; @@ -11471,9 +12044,9 @@ public final class DebugProtoBuf { // repeated int32 enum_entry = 12 [packed = true]; private java.util.List enumEntry_ = java.util.Collections.emptyList(); private void ensureEnumEntryIsMutable() { - if (!((bitField0_ & 0x00000200) == 0x00000200)) { + if (!((bitField0_ & 0x00000400) == 0x00000400)) { enumEntry_ = new java.util.ArrayList(enumEntry_); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; } } /** @@ -11529,11 +12102,128 @@ public final class DebugProtoBuf { */ public Builder clearEnumEntry() { enumEntry_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000400); onChanged(); return this; } + // optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + private org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable typeTable_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable, org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTableOrBuilder> typeTableBuilder_; + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public boolean hasTypeTable() { + return ((bitField0_ & 0x00000800) == 0x00000800); + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable getTypeTable() { + if (typeTableBuilder_ == null) { + return typeTable_; + } else { + return typeTableBuilder_.getMessage(); + } + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public Builder setTypeTable(org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable value) { + if (typeTableBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + typeTable_ = value; + onChanged(); + } else { + typeTableBuilder_.setMessage(value); + } + bitField0_ |= 0x00000800; + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public Builder setTypeTable( + org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.Builder builderForValue) { + if (typeTableBuilder_ == null) { + typeTable_ = builderForValue.build(); + onChanged(); + } else { + typeTableBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000800; + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public Builder mergeTypeTable(org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable value) { + if (typeTableBuilder_ == null) { + if (((bitField0_ & 0x00000800) == 0x00000800) && + typeTable_ != org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.getDefaultInstance()) { + typeTable_ = + org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.newBuilder(typeTable_).mergeFrom(value).buildPartial(); + } else { + typeTable_ = value; + } + onChanged(); + } else { + typeTableBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000800; + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public Builder clearTypeTable() { + if (typeTableBuilder_ == null) { + typeTable_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.getDefaultInstance(); + onChanged(); + } else { + typeTableBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000800); + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.Builder getTypeTableBuilder() { + bitField0_ |= 0x00000800; + onChanged(); + return getTypeTableFieldBuilder().getBuilder(); + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTableOrBuilder getTypeTableOrBuilder() { + if (typeTableBuilder_ != null) { + return typeTableBuilder_.getMessageOrBuilder(); + } else { + return typeTable_; + } + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + private com.google.protobuf.SingleFieldBuilder< + org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable, org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTableOrBuilder> + getTypeTableFieldBuilder() { + if (typeTableBuilder_ == null) { + typeTableBuilder_ = new com.google.protobuf.SingleFieldBuilder< + org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable, org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTableOrBuilder>( + typeTable_, + getParentForChildren(), + isClean()); + typeTable_ = null; + } + return typeTableBuilder_; + } + // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.Class) } @@ -11598,6 +12288,20 @@ public final class DebugProtoBuf { */ org.jetbrains.kotlin.serialization.DebugProtoBuf.PropertyOrBuilder getPropertyOrBuilder( int index); + + // optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + boolean hasTypeTable(); + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable getTypeTable(); + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTableOrBuilder getTypeTableOrBuilder(); } /** * Protobuf type {@code org.jetbrains.kotlin.serialization.Package} @@ -11666,6 +12370,19 @@ public final class DebugProtoBuf { property_.add(input.readMessage(org.jetbrains.kotlin.serialization.DebugProtoBuf.Property.PARSER, extensionRegistry)); break; } + case 242: { + org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.Builder subBuilder = null; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + subBuilder = typeTable_.toBuilder(); + } + typeTable_ = input.readMessage(org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(typeTable_); + typeTable_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000001; + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -11711,6 +12428,7 @@ public final class DebugProtoBuf { return PARSER; } + private int bitField0_; // repeated .org.jetbrains.kotlin.serialization.Function function = 3; public static final int FUNCTION_FIELD_NUMBER = 3; private java.util.List function_; @@ -11783,9 +12501,32 @@ public final class DebugProtoBuf { return property_.get(index); } + // optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + public static final int TYPE_TABLE_FIELD_NUMBER = 30; + private org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable typeTable_; + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public boolean hasTypeTable() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable getTypeTable() { + return typeTable_; + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTableOrBuilder getTypeTableOrBuilder() { + return typeTable_; + } + private void initFields() { function_ = java.util.Collections.emptyList(); property_ = java.util.Collections.emptyList(); + typeTable_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -11804,6 +12545,12 @@ public final class DebugProtoBuf { return false; } } + if (hasTypeTable()) { + if (!getTypeTable().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } if (!extensionsAreInitialized()) { memoizedIsInitialized = 0; return false; @@ -11824,6 +12571,9 @@ public final class DebugProtoBuf { for (int i = 0; i < property_.size(); i++) { output.writeMessage(4, property_.get(i)); } + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(30, typeTable_); + } extensionWriter.writeUntil(200, output); getUnknownFields().writeTo(output); } @@ -11842,6 +12592,10 @@ public final class DebugProtoBuf { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, property_.get(i)); } + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(30, typeTable_); + } size += extensionsSerializedSize(); size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -11953,6 +12707,7 @@ public final class DebugProtoBuf { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { getFunctionFieldBuilder(); getPropertyFieldBuilder(); + getTypeTableFieldBuilder(); } } private static Builder create() { @@ -11973,6 +12728,12 @@ public final class DebugProtoBuf { } else { propertyBuilder_.clear(); } + if (typeTableBuilder_ == null) { + typeTable_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.getDefaultInstance(); + } else { + typeTableBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -12000,6 +12761,7 @@ public final class DebugProtoBuf { public org.jetbrains.kotlin.serialization.DebugProtoBuf.Package buildPartial() { org.jetbrains.kotlin.serialization.DebugProtoBuf.Package result = new org.jetbrains.kotlin.serialization.DebugProtoBuf.Package(this); int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; if (functionBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001)) { function_ = java.util.Collections.unmodifiableList(function_); @@ -12018,6 +12780,15 @@ public final class DebugProtoBuf { } else { result.property_ = propertyBuilder_.build(); } + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000001; + } + if (typeTableBuilder_ == null) { + result.typeTable_ = typeTable_; + } else { + result.typeTable_ = typeTableBuilder_.build(); + } + result.bitField0_ = to_bitField0_; onBuilt(); return result; } @@ -12085,6 +12856,9 @@ public final class DebugProtoBuf { } } } + if (other.hasTypeTable()) { + mergeTypeTable(other.getTypeTable()); + } this.mergeExtensionFields(other); this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -12103,6 +12877,12 @@ public final class DebugProtoBuf { return false; } } + if (hasTypeTable()) { + if (!getTypeTable().isInitialized()) { + + return false; + } + } if (!extensionsAreInitialized()) { return false; @@ -12609,6 +13389,123 @@ public final class DebugProtoBuf { return propertyBuilder_; } + // optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + private org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable typeTable_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable, org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTableOrBuilder> typeTableBuilder_; + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public boolean hasTypeTable() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable getTypeTable() { + if (typeTableBuilder_ == null) { + return typeTable_; + } else { + return typeTableBuilder_.getMessage(); + } + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public Builder setTypeTable(org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable value) { + if (typeTableBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + typeTable_ = value; + onChanged(); + } else { + typeTableBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public Builder setTypeTable( + org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.Builder builderForValue) { + if (typeTableBuilder_ == null) { + typeTable_ = builderForValue.build(); + onChanged(); + } else { + typeTableBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public Builder mergeTypeTable(org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable value) { + if (typeTableBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + typeTable_ != org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.getDefaultInstance()) { + typeTable_ = + org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.newBuilder(typeTable_).mergeFrom(value).buildPartial(); + } else { + typeTable_ = value; + } + onChanged(); + } else { + typeTableBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public Builder clearTypeTable() { + if (typeTableBuilder_ == null) { + typeTable_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.getDefaultInstance(); + onChanged(); + } else { + typeTableBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.Builder getTypeTableBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getTypeTableFieldBuilder().getBuilder(); + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTableOrBuilder getTypeTableOrBuilder() { + if (typeTableBuilder_ != null) { + return typeTableBuilder_.getMessageOrBuilder(); + } else { + return typeTable_; + } + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + private com.google.protobuf.SingleFieldBuilder< + org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable, org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTableOrBuilder> + getTypeTableFieldBuilder() { + if (typeTableBuilder_ == null) { + typeTableBuilder_ = new com.google.protobuf.SingleFieldBuilder< + org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable, org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTableOrBuilder>( + typeTable_, + getParentForChildren(), + isClean()); + typeTable_ = null; + } + return typeTableBuilder_; + } + // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.Package) } @@ -12620,6 +13517,816 @@ public final class DebugProtoBuf { // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.serialization.Package) } + public interface TypeTableOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // repeated .org.jetbrains.kotlin.serialization.Type type = 1; + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + java.util.List + getTypeList(); + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + org.jetbrains.kotlin.serialization.DebugProtoBuf.Type getType(int index); + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + int getTypeCount(); + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + java.util.List + getTypeOrBuilderList(); + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeOrBuilder getTypeOrBuilder( + int index); + + // optional int32 first_nullable = 2 [default = -1]; + /** + * optional int32 first_nullable = 2 [default = -1]; + * + *
+     * Index starting from which all types are nullable, or nothing if all types in this table are non-null.
+     * Note that the 'nullable' field of Type messages is ignored and shouldn't be written because it wastes too much space
+     * 
+ */ + boolean hasFirstNullable(); + /** + * optional int32 first_nullable = 2 [default = -1]; + * + *
+     * Index starting from which all types are nullable, or nothing if all types in this table are non-null.
+     * Note that the 'nullable' field of Type messages is ignored and shouldn't be written because it wastes too much space
+     * 
+ */ + int getFirstNullable(); + } + /** + * Protobuf type {@code org.jetbrains.kotlin.serialization.TypeTable} + */ + public static final class TypeTable extends + com.google.protobuf.GeneratedMessage + implements TypeTableOrBuilder { + // Use TypeTable.newBuilder() to construct. + private TypeTable(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private TypeTable(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final TypeTable defaultInstance; + public static TypeTable getDefaultInstance() { + return defaultInstance; + } + + public TypeTable getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TypeTable( + 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 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + type_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + type_.add(input.readMessage(org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.PARSER, extensionRegistry)); + break; + } + case 16: { + bitField0_ |= 0x00000001; + firstNullable_ = 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 { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + type_ = java.util.Collections.unmodifiableList(type_); + } + 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_TypeTable_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.jetbrains.kotlin.serialization.DebugProtoBuf.internal_static_org_jetbrains_kotlin_serialization_TypeTable_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.class, org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public TypeTable parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TypeTable(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // repeated .org.jetbrains.kotlin.serialization.Type type = 1; + public static final int TYPE_FIELD_NUMBER = 1; + private java.util.List type_; + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + public java.util.List getTypeList() { + return type_; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + public java.util.List + getTypeOrBuilderList() { + return type_; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + public int getTypeCount() { + return type_.size(); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Type getType(int index) { + return type_.get(index); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeOrBuilder getTypeOrBuilder( + int index) { + return type_.get(index); + } + + // optional int32 first_nullable = 2 [default = -1]; + public static final int FIRST_NULLABLE_FIELD_NUMBER = 2; + private int firstNullable_; + /** + * optional int32 first_nullable = 2 [default = -1]; + * + *
+     * Index starting from which all types are nullable, or nothing if all types in this table are non-null.
+     * Note that the 'nullable' field of Type messages is ignored and shouldn't be written because it wastes too much space
+     * 
+ */ + public boolean hasFirstNullable() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 first_nullable = 2 [default = -1]; + * + *
+     * Index starting from which all types are nullable, or nothing if all types in this table are non-null.
+     * Note that the 'nullable' field of Type messages is ignored and shouldn't be written because it wastes too much space
+     * 
+ */ + public int getFirstNullable() { + return firstNullable_; + } + + private void initFields() { + type_ = java.util.Collections.emptyList(); + firstNullable_ = -1; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + for (int i = 0; i < getTypeCount(); i++) { + if (!getType(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < type_.size(); i++) { + output.writeMessage(1, type_.get(i)); + } + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt32(2, firstNullable_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < type_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, type_.get(i)); + } + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, firstNullable_); + } + 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.TypeTable parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable 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.TypeTable parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable 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.TypeTable parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable 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.TypeTable parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable 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.TypeTable parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable 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.TypeTable 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.TypeTable} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTableOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.jetbrains.kotlin.serialization.DebugProtoBuf.internal_static_org_jetbrains_kotlin_serialization_TypeTable_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.jetbrains.kotlin.serialization.DebugProtoBuf.internal_static_org_jetbrains_kotlin_serialization_TypeTable_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.class, org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.Builder.class); + } + + // Construct using org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getTypeFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (typeBuilder_ == null) { + type_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + typeBuilder_.clear(); + } + firstNullable_ = -1; + 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_TypeTable_descriptor; + } + + public org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable getDefaultInstanceForType() { + return org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.getDefaultInstance(); + } + + public org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable build() { + org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable buildPartial() { + org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable result = new org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (typeBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + type_ = java.util.Collections.unmodifiableList(type_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.type_ = type_; + } else { + result.type_ = typeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000001; + } + result.firstNullable_ = firstNullable_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable) { + return mergeFrom((org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable other) { + if (other == org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.getDefaultInstance()) return this; + if (typeBuilder_ == null) { + if (!other.type_.isEmpty()) { + if (type_.isEmpty()) { + type_ = other.type_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTypeIsMutable(); + type_.addAll(other.type_); + } + onChanged(); + } + } else { + if (!other.type_.isEmpty()) { + if (typeBuilder_.isEmpty()) { + typeBuilder_.dispose(); + typeBuilder_ = null; + type_ = other.type_; + bitField0_ = (bitField0_ & ~0x00000001); + typeBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getTypeFieldBuilder() : null; + } else { + typeBuilder_.addAllMessages(other.type_); + } + } + } + if (other.hasFirstNullable()) { + setFirstNullable(other.getFirstNullable()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + for (int i = 0; i < getTypeCount(); i++) { + if (!getType(i).isInitialized()) { + + 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.TypeTable parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // repeated .org.jetbrains.kotlin.serialization.Type type = 1; + private java.util.List type_ = + java.util.Collections.emptyList(); + private void ensureTypeIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + type_ = new java.util.ArrayList(type_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + org.jetbrains.kotlin.serialization.DebugProtoBuf.Type, org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeOrBuilder> typeBuilder_; + + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + public java.util.List getTypeList() { + if (typeBuilder_ == null) { + return java.util.Collections.unmodifiableList(type_); + } else { + return typeBuilder_.getMessageList(); + } + } + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + public int getTypeCount() { + if (typeBuilder_ == null) { + return type_.size(); + } else { + return typeBuilder_.getCount(); + } + } + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Type getType(int index) { + if (typeBuilder_ == null) { + return type_.get(index); + } else { + return typeBuilder_.getMessage(index); + } + } + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + public Builder setType( + int index, org.jetbrains.kotlin.serialization.DebugProtoBuf.Type value) { + if (typeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypeIsMutable(); + type_.set(index, value); + onChanged(); + } else { + typeBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + public Builder setType( + int index, org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Builder builderForValue) { + if (typeBuilder_ == null) { + ensureTypeIsMutable(); + type_.set(index, builderForValue.build()); + onChanged(); + } else { + typeBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + public Builder addType(org.jetbrains.kotlin.serialization.DebugProtoBuf.Type value) { + if (typeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypeIsMutable(); + type_.add(value); + onChanged(); + } else { + typeBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + public Builder addType( + int index, org.jetbrains.kotlin.serialization.DebugProtoBuf.Type value) { + if (typeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypeIsMutable(); + type_.add(index, value); + onChanged(); + } else { + typeBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + public Builder addType( + org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Builder builderForValue) { + if (typeBuilder_ == null) { + ensureTypeIsMutable(); + type_.add(builderForValue.build()); + onChanged(); + } else { + typeBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + public Builder addType( + int index, org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Builder builderForValue) { + if (typeBuilder_ == null) { + ensureTypeIsMutable(); + type_.add(index, builderForValue.build()); + onChanged(); + } else { + typeBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + public Builder addAllType( + java.lang.Iterable values) { + if (typeBuilder_ == null) { + ensureTypeIsMutable(); + super.addAll(values, type_); + onChanged(); + } else { + typeBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + public Builder clearType() { + if (typeBuilder_ == null) { + type_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + typeBuilder_.clear(); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + public Builder removeType(int index) { + if (typeBuilder_ == null) { + ensureTypeIsMutable(); + type_.remove(index); + onChanged(); + } else { + typeBuilder_.remove(index); + } + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Builder getTypeBuilder( + int index) { + return getTypeFieldBuilder().getBuilder(index); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeOrBuilder getTypeOrBuilder( + int index) { + if (typeBuilder_ == null) { + return type_.get(index); } else { + return typeBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + public java.util.List + getTypeOrBuilderList() { + if (typeBuilder_ != null) { + return typeBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(type_); + } + } + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Builder addTypeBuilder() { + return getTypeFieldBuilder().addBuilder( + org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.getDefaultInstance()); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Builder addTypeBuilder( + int index) { + return getTypeFieldBuilder().addBuilder( + index, org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.getDefaultInstance()); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + public java.util.List + getTypeBuilderList() { + return getTypeFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + org.jetbrains.kotlin.serialization.DebugProtoBuf.Type, org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeOrBuilder> + getTypeFieldBuilder() { + if (typeBuilder_ == null) { + typeBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + org.jetbrains.kotlin.serialization.DebugProtoBuf.Type, org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeOrBuilder>( + type_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + type_ = null; + } + return typeBuilder_; + } + + // optional int32 first_nullable = 2 [default = -1]; + private int firstNullable_ = -1; + /** + * optional int32 first_nullable = 2 [default = -1]; + * + *
+       * Index starting from which all types are nullable, or nothing if all types in this table are non-null.
+       * Note that the 'nullable' field of Type messages is ignored and shouldn't be written because it wastes too much space
+       * 
+ */ + public boolean hasFirstNullable() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional int32 first_nullable = 2 [default = -1]; + * + *
+       * Index starting from which all types are nullable, or nothing if all types in this table are non-null.
+       * Note that the 'nullable' field of Type messages is ignored and shouldn't be written because it wastes too much space
+       * 
+ */ + public int getFirstNullable() { + return firstNullable_; + } + /** + * optional int32 first_nullable = 2 [default = -1]; + * + *
+       * Index starting from which all types are nullable, or nothing if all types in this table are non-null.
+       * Note that the 'nullable' field of Type messages is ignored and shouldn't be written because it wastes too much space
+       * 
+ */ + public Builder setFirstNullable(int value) { + bitField0_ |= 0x00000002; + firstNullable_ = value; + onChanged(); + return this; + } + /** + * optional int32 first_nullable = 2 [default = -1]; + * + *
+       * Index starting from which all types are nullable, or nothing if all types in this table are non-null.
+       * Note that the 'nullable' field of Type messages is ignored and shouldn't be written because it wastes too much space
+       * 
+ */ + public Builder clearFirstNullable() { + bitField0_ = (bitField0_ & ~0x00000002); + firstNullable_ = -1; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.TypeTable) + } + + static { + defaultInstance = new TypeTable(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.serialization.TypeTable) + } + public interface ConstructorOrBuilder extends com.google.protobuf.GeneratedMessage. ExtendableMessageOrBuilder { @@ -13505,20 +15212,30 @@ public final class DebugProtoBuf { */ int getName(); - // required .org.jetbrains.kotlin.serialization.Type return_type = 3; + // optional .org.jetbrains.kotlin.serialization.Type return_type = 3; /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ boolean hasReturnType(); /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ org.jetbrains.kotlin.serialization.DebugProtoBuf.Type getReturnType(); /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeOrBuilder getReturnTypeOrBuilder(); + // optional int32 return_type_id = 7; + /** + * optional int32 return_type_id = 7; + */ + boolean hasReturnTypeId(); + /** + * optional int32 return_type_id = 7; + */ + int getReturnTypeId(); + // repeated .org.jetbrains.kotlin.serialization.TypeParameter type_parameter = 4; /** * repeated .org.jetbrains.kotlin.serialization.TypeParameter type_parameter = 4; @@ -13558,6 +15275,16 @@ public final class DebugProtoBuf { */ org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeOrBuilder getReceiverTypeOrBuilder(); + // optional int32 receiver_type_id = 8; + /** + * optional int32 receiver_type_id = 8; + */ + boolean hasReceiverTypeId(); + /** + * optional int32 receiver_type_id = 8; + */ + int getReceiverTypeId(); + // repeated .org.jetbrains.kotlin.serialization.ValueParameter value_parameter = 6; /** * repeated .org.jetbrains.kotlin.serialization.ValueParameter value_parameter = 6; @@ -13582,6 +15309,20 @@ public final class DebugProtoBuf { */ org.jetbrains.kotlin.serialization.DebugProtoBuf.ValueParameterOrBuilder getValueParameterOrBuilder( int index); + + // optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + boolean hasTypeTable(); + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable getTypeTable(); + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTableOrBuilder getTypeTableOrBuilder(); } /** * Protobuf type {@code org.jetbrains.kotlin.serialization.Function} @@ -13658,16 +15399,16 @@ public final class DebugProtoBuf { break; } case 34: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { typeParameter_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; + mutable_bitField0_ |= 0x00000010; } typeParameter_.add(input.readMessage(org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeParameter.PARSER, extensionRegistry)); break; } case 42: { org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Builder subBuilder = null; - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000010) == 0x00000010)) { subBuilder = receiverType_.toBuilder(); } receiverType_ = input.readMessage(org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.PARSER, extensionRegistry); @@ -13675,17 +15416,40 @@ public final class DebugProtoBuf { subBuilder.mergeFrom(receiverType_); receiverType_ = subBuilder.buildPartial(); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; break; } case 50: { - if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) { valueParameter_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000020; + mutable_bitField0_ |= 0x00000080; } valueParameter_.add(input.readMessage(org.jetbrains.kotlin.serialization.DebugProtoBuf.ValueParameter.PARSER, extensionRegistry)); break; } + case 56: { + bitField0_ |= 0x00000008; + returnTypeId_ = input.readInt32(); + break; + } + case 64: { + bitField0_ |= 0x00000020; + receiverTypeId_ = input.readInt32(); + break; + } + case 242: { + org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.Builder subBuilder = null; + if (((bitField0_ & 0x00000040) == 0x00000040)) { + subBuilder = typeTable_.toBuilder(); + } + typeTable_ = input.readMessage(org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(typeTable_); + typeTable_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000040; + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -13694,10 +15458,10 @@ public final class DebugProtoBuf { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { typeParameter_ = java.util.Collections.unmodifiableList(typeParameter_); } - if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + if (((mutable_bitField0_ & 0x00000080) == 0x00000080)) { valueParameter_ = java.util.Collections.unmodifiableList(valueParameter_); } this.unknownFields = unknownFields.build(); @@ -13784,28 +15548,44 @@ public final class DebugProtoBuf { return name_; } - // required .org.jetbrains.kotlin.serialization.Type return_type = 3; + // optional .org.jetbrains.kotlin.serialization.Type return_type = 3; public static final int RETURN_TYPE_FIELD_NUMBER = 3; private org.jetbrains.kotlin.serialization.DebugProtoBuf.Type returnType_; /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ public boolean hasReturnType() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ public org.jetbrains.kotlin.serialization.DebugProtoBuf.Type getReturnType() { return returnType_; } /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ public org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeOrBuilder getReturnTypeOrBuilder() { return returnType_; } + // optional int32 return_type_id = 7; + public static final int RETURN_TYPE_ID_FIELD_NUMBER = 7; + private int returnTypeId_; + /** + * optional int32 return_type_id = 7; + */ + public boolean hasReturnTypeId() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional int32 return_type_id = 7; + */ + public int getReturnTypeId() { + return returnTypeId_; + } + // repeated .org.jetbrains.kotlin.serialization.TypeParameter type_parameter = 4; public static final int TYPE_PARAMETER_FIELD_NUMBER = 4; private java.util.List typeParameter_; @@ -13849,7 +15629,7 @@ public final class DebugProtoBuf { * optional .org.jetbrains.kotlin.serialization.Type receiver_type = 5; */ public boolean hasReceiverType() { - return ((bitField0_ & 0x00000008) == 0x00000008); + return ((bitField0_ & 0x00000010) == 0x00000010); } /** * optional .org.jetbrains.kotlin.serialization.Type receiver_type = 5; @@ -13864,6 +15644,22 @@ public final class DebugProtoBuf { return receiverType_; } + // optional int32 receiver_type_id = 8; + public static final int RECEIVER_TYPE_ID_FIELD_NUMBER = 8; + private int receiverTypeId_; + /** + * optional int32 receiver_type_id = 8; + */ + public boolean hasReceiverTypeId() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional int32 receiver_type_id = 8; + */ + public int getReceiverTypeId() { + return receiverTypeId_; + } + // repeated .org.jetbrains.kotlin.serialization.ValueParameter value_parameter = 6; public static final int VALUE_PARAMETER_FIELD_NUMBER = 6; private java.util.List valueParameter_; @@ -13900,13 +15696,38 @@ public final class DebugProtoBuf { return valueParameter_.get(index); } + // optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + public static final int TYPE_TABLE_FIELD_NUMBER = 30; + private org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable typeTable_; + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public boolean hasTypeTable() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable getTypeTable() { + return typeTable_; + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTableOrBuilder getTypeTableOrBuilder() { + return typeTable_; + } + private void initFields() { flags_ = 6; name_ = 0; returnType_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.getDefaultInstance(); + returnTypeId_ = 0; typeParameter_ = java.util.Collections.emptyList(); receiverType_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.getDefaultInstance(); + receiverTypeId_ = 0; valueParameter_ = java.util.Collections.emptyList(); + typeTable_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -13917,13 +15738,11 @@ public final class DebugProtoBuf { memoizedIsInitialized = 0; return false; } - if (!hasReturnType()) { - memoizedIsInitialized = 0; - return false; - } - if (!getReturnType().isInitialized()) { - memoizedIsInitialized = 0; - return false; + if (hasReturnType()) { + if (!getReturnType().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } } for (int i = 0; i < getTypeParameterCount(); i++) { if (!getTypeParameter(i).isInitialized()) { @@ -13943,6 +15762,12 @@ public final class DebugProtoBuf { return false; } } + if (hasTypeTable()) { + if (!getTypeTable().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } if (!extensionsAreInitialized()) { memoizedIsInitialized = 0; return false; @@ -13969,12 +15794,21 @@ public final class DebugProtoBuf { for (int i = 0; i < typeParameter_.size(); i++) { output.writeMessage(4, typeParameter_.get(i)); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeMessage(5, receiverType_); } for (int i = 0; i < valueParameter_.size(); i++) { output.writeMessage(6, valueParameter_.get(i)); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeInt32(7, returnTypeId_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeInt32(8, receiverTypeId_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + output.writeMessage(30, typeTable_); + } extensionWriter.writeUntil(200, output); getUnknownFields().writeTo(output); } @@ -14001,7 +15835,7 @@ public final class DebugProtoBuf { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, typeParameter_.get(i)); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, receiverType_); } @@ -14009,6 +15843,18 @@ public final class DebugProtoBuf { size += com.google.protobuf.CodedOutputStream .computeMessageSize(6, valueParameter_.get(i)); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(7, returnTypeId_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(8, receiverTypeId_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(30, typeTable_); + } size += extensionsSerializedSize(); size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -14122,6 +15968,7 @@ public final class DebugProtoBuf { getTypeParameterFieldBuilder(); getReceiverTypeFieldBuilder(); getValueParameterFieldBuilder(); + getTypeTableFieldBuilder(); } } private static Builder create() { @@ -14140,9 +15987,11 @@ public final class DebugProtoBuf { returnTypeBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); + returnTypeId_ = 0; + bitField0_ = (bitField0_ & ~0x00000008); if (typeParameterBuilder_ == null) { typeParameter_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); } else { typeParameterBuilder_.clear(); } @@ -14151,13 +16000,21 @@ public final class DebugProtoBuf { } else { receiverTypeBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); + receiverTypeId_ = 0; + bitField0_ = (bitField0_ & ~0x00000040); if (valueParameterBuilder_ == null) { valueParameter_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000080); } else { valueParameterBuilder_.clear(); } + if (typeTableBuilder_ == null) { + typeTable_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.getDefaultInstance(); + } else { + typeTableBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000100); return this; } @@ -14202,32 +16059,48 @@ public final class DebugProtoBuf { } else { result.returnType_ = returnTypeBuilder_.build(); } + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.returnTypeId_ = returnTypeId_; if (typeParameterBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000010) == 0x00000010)) { typeParameter_ = java.util.Collections.unmodifiableList(typeParameter_); - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); } result.typeParameter_ = typeParameter_; } else { result.typeParameter_ = typeParameterBuilder_.build(); } - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000008; + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000010; } if (receiverTypeBuilder_ == null) { result.receiverType_ = receiverType_; } else { result.receiverType_ = receiverTypeBuilder_.build(); } + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000020; + } + result.receiverTypeId_ = receiverTypeId_; if (valueParameterBuilder_ == null) { - if (((bitField0_ & 0x00000020) == 0x00000020)) { + if (((bitField0_ & 0x00000080) == 0x00000080)) { valueParameter_ = java.util.Collections.unmodifiableList(valueParameter_); - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000080); } result.valueParameter_ = valueParameter_; } else { result.valueParameter_ = valueParameterBuilder_.build(); } + if (((from_bitField0_ & 0x00000100) == 0x00000100)) { + to_bitField0_ |= 0x00000040; + } + if (typeTableBuilder_ == null) { + result.typeTable_ = typeTable_; + } else { + result.typeTable_ = typeTableBuilder_.build(); + } result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -14253,11 +16126,14 @@ public final class DebugProtoBuf { if (other.hasReturnType()) { mergeReturnType(other.getReturnType()); } + if (other.hasReturnTypeId()) { + setReturnTypeId(other.getReturnTypeId()); + } if (typeParameterBuilder_ == null) { if (!other.typeParameter_.isEmpty()) { if (typeParameter_.isEmpty()) { typeParameter_ = other.typeParameter_; - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); } else { ensureTypeParameterIsMutable(); typeParameter_.addAll(other.typeParameter_); @@ -14270,7 +16146,7 @@ public final class DebugProtoBuf { typeParameterBuilder_.dispose(); typeParameterBuilder_ = null; typeParameter_ = other.typeParameter_; - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); typeParameterBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getTypeParameterFieldBuilder() : null; @@ -14282,11 +16158,14 @@ public final class DebugProtoBuf { if (other.hasReceiverType()) { mergeReceiverType(other.getReceiverType()); } + if (other.hasReceiverTypeId()) { + setReceiverTypeId(other.getReceiverTypeId()); + } if (valueParameterBuilder_ == null) { if (!other.valueParameter_.isEmpty()) { if (valueParameter_.isEmpty()) { valueParameter_ = other.valueParameter_; - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000080); } else { ensureValueParameterIsMutable(); valueParameter_.addAll(other.valueParameter_); @@ -14299,7 +16178,7 @@ public final class DebugProtoBuf { valueParameterBuilder_.dispose(); valueParameterBuilder_ = null; valueParameter_ = other.valueParameter_; - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000080); valueParameterBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getValueParameterFieldBuilder() : null; @@ -14308,6 +16187,9 @@ public final class DebugProtoBuf { } } } + if (other.hasTypeTable()) { + mergeTypeTable(other.getTypeTable()); + } this.mergeExtensionFields(other); this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -14318,13 +16200,11 @@ public final class DebugProtoBuf { return false; } - if (!hasReturnType()) { - - return false; - } - if (!getReturnType().isInitialized()) { - - return false; + if (hasReturnType()) { + if (!getReturnType().isInitialized()) { + + return false; + } } for (int i = 0; i < getTypeParameterCount(); i++) { if (!getTypeParameter(i).isInitialized()) { @@ -14344,6 +16224,12 @@ public final class DebugProtoBuf { return false; } } + if (hasTypeTable()) { + if (!getTypeTable().isInitialized()) { + + return false; + } + } if (!extensionsAreInitialized()) { return false; @@ -14476,18 +16362,18 @@ public final class DebugProtoBuf { return this; } - // required .org.jetbrains.kotlin.serialization.Type return_type = 3; + // optional .org.jetbrains.kotlin.serialization.Type return_type = 3; private org.jetbrains.kotlin.serialization.DebugProtoBuf.Type returnType_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< org.jetbrains.kotlin.serialization.DebugProtoBuf.Type, org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeOrBuilder> returnTypeBuilder_; /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ public boolean hasReturnType() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ public org.jetbrains.kotlin.serialization.DebugProtoBuf.Type getReturnType() { if (returnTypeBuilder_ == null) { @@ -14497,7 +16383,7 @@ public final class DebugProtoBuf { } } /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ public Builder setReturnType(org.jetbrains.kotlin.serialization.DebugProtoBuf.Type value) { if (returnTypeBuilder_ == null) { @@ -14513,7 +16399,7 @@ public final class DebugProtoBuf { return this; } /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ public Builder setReturnType( org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Builder builderForValue) { @@ -14527,7 +16413,7 @@ public final class DebugProtoBuf { return this; } /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ public Builder mergeReturnType(org.jetbrains.kotlin.serialization.DebugProtoBuf.Type value) { if (returnTypeBuilder_ == null) { @@ -14546,7 +16432,7 @@ public final class DebugProtoBuf { return this; } /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ public Builder clearReturnType() { if (returnTypeBuilder_ == null) { @@ -14559,7 +16445,7 @@ public final class DebugProtoBuf { return this; } /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ public org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Builder getReturnTypeBuilder() { bitField0_ |= 0x00000004; @@ -14567,7 +16453,7 @@ public final class DebugProtoBuf { return getReturnTypeFieldBuilder().getBuilder(); } /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ public org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeOrBuilder getReturnTypeOrBuilder() { if (returnTypeBuilder_ != null) { @@ -14577,7 +16463,7 @@ public final class DebugProtoBuf { } } /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ private com.google.protobuf.SingleFieldBuilder< org.jetbrains.kotlin.serialization.DebugProtoBuf.Type, org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeOrBuilder> @@ -14593,13 +16479,46 @@ public final class DebugProtoBuf { return returnTypeBuilder_; } + // optional int32 return_type_id = 7; + private int returnTypeId_ ; + /** + * optional int32 return_type_id = 7; + */ + public boolean hasReturnTypeId() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional int32 return_type_id = 7; + */ + public int getReturnTypeId() { + return returnTypeId_; + } + /** + * optional int32 return_type_id = 7; + */ + public Builder setReturnTypeId(int value) { + bitField0_ |= 0x00000008; + returnTypeId_ = value; + onChanged(); + return this; + } + /** + * optional int32 return_type_id = 7; + */ + public Builder clearReturnTypeId() { + bitField0_ = (bitField0_ & ~0x00000008); + returnTypeId_ = 0; + onChanged(); + return this; + } + // repeated .org.jetbrains.kotlin.serialization.TypeParameter type_parameter = 4; private java.util.List typeParameter_ = java.util.Collections.emptyList(); private void ensureTypeParameterIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { + if (!((bitField0_ & 0x00000010) == 0x00000010)) { typeParameter_ = new java.util.ArrayList(typeParameter_); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; } } @@ -14748,7 +16667,7 @@ public final class DebugProtoBuf { public Builder clearTypeParameter() { if (typeParameterBuilder_ == null) { typeParameter_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); onChanged(); } else { typeParameterBuilder_.clear(); @@ -14825,7 +16744,7 @@ public final class DebugProtoBuf { typeParameterBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeParameter, org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeParameter.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeParameterOrBuilder>( typeParameter_, - ((bitField0_ & 0x00000008) == 0x00000008), + ((bitField0_ & 0x00000010) == 0x00000010), getParentForChildren(), isClean()); typeParameter_ = null; @@ -14841,7 +16760,7 @@ public final class DebugProtoBuf { * optional .org.jetbrains.kotlin.serialization.Type receiver_type = 5; */ public boolean hasReceiverType() { - return ((bitField0_ & 0x00000010) == 0x00000010); + return ((bitField0_ & 0x00000020) == 0x00000020); } /** * optional .org.jetbrains.kotlin.serialization.Type receiver_type = 5; @@ -14866,7 +16785,7 @@ public final class DebugProtoBuf { } else { receiverTypeBuilder_.setMessage(value); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; return this; } /** @@ -14880,7 +16799,7 @@ public final class DebugProtoBuf { } else { receiverTypeBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; return this; } /** @@ -14888,7 +16807,7 @@ public final class DebugProtoBuf { */ public Builder mergeReceiverType(org.jetbrains.kotlin.serialization.DebugProtoBuf.Type value) { if (receiverTypeBuilder_ == null) { - if (((bitField0_ & 0x00000010) == 0x00000010) && + if (((bitField0_ & 0x00000020) == 0x00000020) && receiverType_ != org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.getDefaultInstance()) { receiverType_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.newBuilder(receiverType_).mergeFrom(value).buildPartial(); @@ -14899,7 +16818,7 @@ public final class DebugProtoBuf { } else { receiverTypeBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; return this; } /** @@ -14912,14 +16831,14 @@ public final class DebugProtoBuf { } else { receiverTypeBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); return this; } /** * optional .org.jetbrains.kotlin.serialization.Type receiver_type = 5; */ public org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Builder getReceiverTypeBuilder() { - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return getReceiverTypeFieldBuilder().getBuilder(); } @@ -14950,13 +16869,46 @@ public final class DebugProtoBuf { return receiverTypeBuilder_; } + // optional int32 receiver_type_id = 8; + private int receiverTypeId_ ; + /** + * optional int32 receiver_type_id = 8; + */ + public boolean hasReceiverTypeId() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional int32 receiver_type_id = 8; + */ + public int getReceiverTypeId() { + return receiverTypeId_; + } + /** + * optional int32 receiver_type_id = 8; + */ + public Builder setReceiverTypeId(int value) { + bitField0_ |= 0x00000040; + receiverTypeId_ = value; + onChanged(); + return this; + } + /** + * optional int32 receiver_type_id = 8; + */ + public Builder clearReceiverTypeId() { + bitField0_ = (bitField0_ & ~0x00000040); + receiverTypeId_ = 0; + onChanged(); + return this; + } + // repeated .org.jetbrains.kotlin.serialization.ValueParameter value_parameter = 6; private java.util.List valueParameter_ = java.util.Collections.emptyList(); private void ensureValueParameterIsMutable() { - if (!((bitField0_ & 0x00000020) == 0x00000020)) { + if (!((bitField0_ & 0x00000080) == 0x00000080)) { valueParameter_ = new java.util.ArrayList(valueParameter_); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000080; } } @@ -15105,7 +17057,7 @@ public final class DebugProtoBuf { public Builder clearValueParameter() { if (valueParameterBuilder_ == null) { valueParameter_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000080); onChanged(); } else { valueParameterBuilder_.clear(); @@ -15182,7 +17134,7 @@ public final class DebugProtoBuf { valueParameterBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< org.jetbrains.kotlin.serialization.DebugProtoBuf.ValueParameter, org.jetbrains.kotlin.serialization.DebugProtoBuf.ValueParameter.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.ValueParameterOrBuilder>( valueParameter_, - ((bitField0_ & 0x00000020) == 0x00000020), + ((bitField0_ & 0x00000080) == 0x00000080), getParentForChildren(), isClean()); valueParameter_ = null; @@ -15190,6 +17142,123 @@ public final class DebugProtoBuf { return valueParameterBuilder_; } + // optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + private org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable typeTable_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable, org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTableOrBuilder> typeTableBuilder_; + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public boolean hasTypeTable() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable getTypeTable() { + if (typeTableBuilder_ == null) { + return typeTable_; + } else { + return typeTableBuilder_.getMessage(); + } + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public Builder setTypeTable(org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable value) { + if (typeTableBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + typeTable_ = value; + onChanged(); + } else { + typeTableBuilder_.setMessage(value); + } + bitField0_ |= 0x00000100; + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public Builder setTypeTable( + org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.Builder builderForValue) { + if (typeTableBuilder_ == null) { + typeTable_ = builderForValue.build(); + onChanged(); + } else { + typeTableBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000100; + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public Builder mergeTypeTable(org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable value) { + if (typeTableBuilder_ == null) { + if (((bitField0_ & 0x00000100) == 0x00000100) && + typeTable_ != org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.getDefaultInstance()) { + typeTable_ = + org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.newBuilder(typeTable_).mergeFrom(value).buildPartial(); + } else { + typeTable_ = value; + } + onChanged(); + } else { + typeTableBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000100; + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public Builder clearTypeTable() { + if (typeTableBuilder_ == null) { + typeTable_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.getDefaultInstance(); + onChanged(); + } else { + typeTableBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000100); + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.Builder getTypeTableBuilder() { + bitField0_ |= 0x00000100; + onChanged(); + return getTypeTableFieldBuilder().getBuilder(); + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTableOrBuilder getTypeTableOrBuilder() { + if (typeTableBuilder_ != null) { + return typeTableBuilder_.getMessageOrBuilder(); + } else { + return typeTable_; + } + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + private com.google.protobuf.SingleFieldBuilder< + org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable, org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTableOrBuilder> + getTypeTableFieldBuilder() { + if (typeTableBuilder_ == null) { + typeTableBuilder_ = new com.google.protobuf.SingleFieldBuilder< + org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable, org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTable.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeTableOrBuilder>( + typeTable_, + getParentForChildren(), + isClean()); + typeTable_ = null; + } + return typeTableBuilder_; + } + // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.Function) } @@ -15253,20 +17322,30 @@ public final class DebugProtoBuf { */ int getName(); - // required .org.jetbrains.kotlin.serialization.Type return_type = 3; + // optional .org.jetbrains.kotlin.serialization.Type return_type = 3; /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ boolean hasReturnType(); /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ org.jetbrains.kotlin.serialization.DebugProtoBuf.Type getReturnType(); /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeOrBuilder getReturnTypeOrBuilder(); + // optional int32 return_type_id = 9; + /** + * optional int32 return_type_id = 9; + */ + boolean hasReturnTypeId(); + /** + * optional int32 return_type_id = 9; + */ + int getReturnTypeId(); + // repeated .org.jetbrains.kotlin.serialization.TypeParameter type_parameter = 4; /** * repeated .org.jetbrains.kotlin.serialization.TypeParameter type_parameter = 4; @@ -15306,6 +17385,16 @@ public final class DebugProtoBuf { */ org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeOrBuilder getReceiverTypeOrBuilder(); + // optional int32 receiver_type_id = 10; + /** + * optional int32 receiver_type_id = 10; + */ + boolean hasReceiverTypeId(); + /** + * optional int32 receiver_type_id = 10; + */ + int getReceiverTypeId(); + // optional .org.jetbrains.kotlin.serialization.ValueParameter setter_value_parameter = 6; /** * optional .org.jetbrains.kotlin.serialization.ValueParameter setter_value_parameter = 6; @@ -15431,16 +17520,16 @@ public final class DebugProtoBuf { break; } case 34: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { typeParameter_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; + mutable_bitField0_ |= 0x00000010; } typeParameter_.add(input.readMessage(org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeParameter.PARSER, extensionRegistry)); break; } case 42: { org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Builder subBuilder = null; - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000010) == 0x00000010)) { subBuilder = receiverType_.toBuilder(); } receiverType_ = input.readMessage(org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.PARSER, extensionRegistry); @@ -15448,12 +17537,12 @@ public final class DebugProtoBuf { subBuilder.mergeFrom(receiverType_); receiverType_ = subBuilder.buildPartial(); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; break; } case 50: { org.jetbrains.kotlin.serialization.DebugProtoBuf.ValueParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (((bitField0_ & 0x00000040) == 0x00000040)) { subBuilder = setterValueParameter_.toBuilder(); } setterValueParameter_ = input.readMessage(org.jetbrains.kotlin.serialization.DebugProtoBuf.ValueParameter.PARSER, extensionRegistry); @@ -15461,19 +17550,29 @@ public final class DebugProtoBuf { subBuilder.mergeFrom(setterValueParameter_); setterValueParameter_ = subBuilder.buildPartial(); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000040; break; } case 56: { - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000080; getterFlags_ = input.readInt32(); break; } case 64: { - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000100; setterFlags_ = input.readInt32(); break; } + case 72: { + bitField0_ |= 0x00000008; + returnTypeId_ = input.readInt32(); + break; + } + case 80: { + bitField0_ |= 0x00000020; + receiverTypeId_ = input.readInt32(); + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -15482,7 +17581,7 @@ public final class DebugProtoBuf { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { typeParameter_ = java.util.Collections.unmodifiableList(typeParameter_); } this.unknownFields = unknownFields.build(); @@ -15577,28 +17676,44 @@ public final class DebugProtoBuf { return name_; } - // required .org.jetbrains.kotlin.serialization.Type return_type = 3; + // optional .org.jetbrains.kotlin.serialization.Type return_type = 3; public static final int RETURN_TYPE_FIELD_NUMBER = 3; private org.jetbrains.kotlin.serialization.DebugProtoBuf.Type returnType_; /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ public boolean hasReturnType() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ public org.jetbrains.kotlin.serialization.DebugProtoBuf.Type getReturnType() { return returnType_; } /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ public org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeOrBuilder getReturnTypeOrBuilder() { return returnType_; } + // optional int32 return_type_id = 9; + public static final int RETURN_TYPE_ID_FIELD_NUMBER = 9; + private int returnTypeId_; + /** + * optional int32 return_type_id = 9; + */ + public boolean hasReturnTypeId() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional int32 return_type_id = 9; + */ + public int getReturnTypeId() { + return returnTypeId_; + } + // repeated .org.jetbrains.kotlin.serialization.TypeParameter type_parameter = 4; public static final int TYPE_PARAMETER_FIELD_NUMBER = 4; private java.util.List typeParameter_; @@ -15642,7 +17757,7 @@ public final class DebugProtoBuf { * optional .org.jetbrains.kotlin.serialization.Type receiver_type = 5; */ public boolean hasReceiverType() { - return ((bitField0_ & 0x00000008) == 0x00000008); + return ((bitField0_ & 0x00000010) == 0x00000010); } /** * optional .org.jetbrains.kotlin.serialization.Type receiver_type = 5; @@ -15657,6 +17772,22 @@ public final class DebugProtoBuf { return receiverType_; } + // optional int32 receiver_type_id = 10; + public static final int RECEIVER_TYPE_ID_FIELD_NUMBER = 10; + private int receiverTypeId_; + /** + * optional int32 receiver_type_id = 10; + */ + public boolean hasReceiverTypeId() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional int32 receiver_type_id = 10; + */ + public int getReceiverTypeId() { + return receiverTypeId_; + } + // optional .org.jetbrains.kotlin.serialization.ValueParameter setter_value_parameter = 6; public static final int SETTER_VALUE_PARAMETER_FIELD_NUMBER = 6; private org.jetbrains.kotlin.serialization.DebugProtoBuf.ValueParameter setterValueParameter_; @@ -15664,7 +17795,7 @@ public final class DebugProtoBuf { * optional .org.jetbrains.kotlin.serialization.ValueParameter setter_value_parameter = 6; */ public boolean hasSetterValueParameter() { - return ((bitField0_ & 0x00000010) == 0x00000010); + return ((bitField0_ & 0x00000040) == 0x00000040); } /** * optional .org.jetbrains.kotlin.serialization.ValueParameter setter_value_parameter = 6; @@ -15694,7 +17825,7 @@ public final class DebugProtoBuf { * */ public boolean hasGetterFlags() { - return ((bitField0_ & 0x00000020) == 0x00000020); + return ((bitField0_ & 0x00000080) == 0x00000080); } /** * optional int32 getter_flags = 7; @@ -15718,7 +17849,7 @@ public final class DebugProtoBuf { * optional int32 setter_flags = 8; */ public boolean hasSetterFlags() { - return ((bitField0_ & 0x00000040) == 0x00000040); + return ((bitField0_ & 0x00000100) == 0x00000100); } /** * optional int32 setter_flags = 8; @@ -15731,8 +17862,10 @@ public final class DebugProtoBuf { flags_ = 262; name_ = 0; returnType_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.getDefaultInstance(); + returnTypeId_ = 0; typeParameter_ = java.util.Collections.emptyList(); receiverType_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.getDefaultInstance(); + receiverTypeId_ = 0; setterValueParameter_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.ValueParameter.getDefaultInstance(); getterFlags_ = 0; setterFlags_ = 0; @@ -15746,13 +17879,11 @@ public final class DebugProtoBuf { memoizedIsInitialized = 0; return false; } - if (!hasReturnType()) { - memoizedIsInitialized = 0; - return false; - } - if (!getReturnType().isInitialized()) { - memoizedIsInitialized = 0; - return false; + if (hasReturnType()) { + if (!getReturnType().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } } for (int i = 0; i < getTypeParameterCount(); i++) { if (!getTypeParameter(i).isInitialized()) { @@ -15798,18 +17929,24 @@ public final class DebugProtoBuf { for (int i = 0; i < typeParameter_.size(); i++) { output.writeMessage(4, typeParameter_.get(i)); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeMessage(5, receiverType_); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (((bitField0_ & 0x00000040) == 0x00000040)) { output.writeMessage(6, setterValueParameter_); } - if (((bitField0_ & 0x00000020) == 0x00000020)) { + if (((bitField0_ & 0x00000080) == 0x00000080)) { output.writeInt32(7, getterFlags_); } - if (((bitField0_ & 0x00000040) == 0x00000040)) { + if (((bitField0_ & 0x00000100) == 0x00000100)) { output.writeInt32(8, setterFlags_); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeInt32(9, returnTypeId_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeInt32(10, receiverTypeId_); + } extensionWriter.writeUntil(200, output); getUnknownFields().writeTo(output); } @@ -15836,22 +17973,30 @@ public final class DebugProtoBuf { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, typeParameter_.get(i)); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, receiverType_); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (((bitField0_ & 0x00000040) == 0x00000040)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(6, setterValueParameter_); } - if (((bitField0_ & 0x00000020) == 0x00000020)) { + if (((bitField0_ & 0x00000080) == 0x00000080)) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(7, getterFlags_); } - if (((bitField0_ & 0x00000040) == 0x00000040)) { + if (((bitField0_ & 0x00000100) == 0x00000100)) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(8, setterFlags_); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(9, returnTypeId_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(10, receiverTypeId_); + } size += extensionsSerializedSize(); size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -15983,9 +18128,11 @@ public final class DebugProtoBuf { returnTypeBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); + returnTypeId_ = 0; + bitField0_ = (bitField0_ & ~0x00000008); if (typeParameterBuilder_ == null) { typeParameter_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); } else { typeParameterBuilder_.clear(); } @@ -15994,17 +18141,19 @@ public final class DebugProtoBuf { } else { receiverTypeBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); + receiverTypeId_ = 0; + bitField0_ = (bitField0_ & ~0x00000040); if (setterValueParameterBuilder_ == null) { setterValueParameter_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.ValueParameter.getDefaultInstance(); } else { setterValueParameterBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000020); - getterFlags_ = 0; - bitField0_ = (bitField0_ & ~0x00000040); - setterFlags_ = 0; bitField0_ = (bitField0_ & ~0x00000080); + getterFlags_ = 0; + bitField0_ = (bitField0_ & ~0x00000100); + setterFlags_ = 0; + bitField0_ = (bitField0_ & ~0x00000200); return this; } @@ -16049,37 +18198,45 @@ public final class DebugProtoBuf { } else { result.returnType_ = returnTypeBuilder_.build(); } + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.returnTypeId_ = returnTypeId_; if (typeParameterBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000010) == 0x00000010)) { typeParameter_ = java.util.Collections.unmodifiableList(typeParameter_); - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); } result.typeParameter_ = typeParameter_; } else { result.typeParameter_ = typeParameterBuilder_.build(); } - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000008; + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000010; } if (receiverTypeBuilder_ == null) { result.receiverType_ = receiverType_; } else { result.receiverType_ = receiverTypeBuilder_.build(); } - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x00000010; + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000020; + } + result.receiverTypeId_ = receiverTypeId_; + if (((from_bitField0_ & 0x00000080) == 0x00000080)) { + to_bitField0_ |= 0x00000040; } if (setterValueParameterBuilder_ == null) { result.setterValueParameter_ = setterValueParameter_; } else { result.setterValueParameter_ = setterValueParameterBuilder_.build(); } - if (((from_bitField0_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x00000020; + if (((from_bitField0_ & 0x00000100) == 0x00000100)) { + to_bitField0_ |= 0x00000080; } result.getterFlags_ = getterFlags_; - if (((from_bitField0_ & 0x00000080) == 0x00000080)) { - to_bitField0_ |= 0x00000040; + if (((from_bitField0_ & 0x00000200) == 0x00000200)) { + to_bitField0_ |= 0x00000100; } result.setterFlags_ = setterFlags_; result.bitField0_ = to_bitField0_; @@ -16107,11 +18264,14 @@ public final class DebugProtoBuf { if (other.hasReturnType()) { mergeReturnType(other.getReturnType()); } + if (other.hasReturnTypeId()) { + setReturnTypeId(other.getReturnTypeId()); + } if (typeParameterBuilder_ == null) { if (!other.typeParameter_.isEmpty()) { if (typeParameter_.isEmpty()) { typeParameter_ = other.typeParameter_; - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); } else { ensureTypeParameterIsMutable(); typeParameter_.addAll(other.typeParameter_); @@ -16124,7 +18284,7 @@ public final class DebugProtoBuf { typeParameterBuilder_.dispose(); typeParameterBuilder_ = null; typeParameter_ = other.typeParameter_; - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); typeParameterBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getTypeParameterFieldBuilder() : null; @@ -16136,6 +18296,9 @@ public final class DebugProtoBuf { if (other.hasReceiverType()) { mergeReceiverType(other.getReceiverType()); } + if (other.hasReceiverTypeId()) { + setReceiverTypeId(other.getReceiverTypeId()); + } if (other.hasSetterValueParameter()) { mergeSetterValueParameter(other.getSetterValueParameter()); } @@ -16155,13 +18318,11 @@ public final class DebugProtoBuf { return false; } - if (!hasReturnType()) { - - return false; - } - if (!getReturnType().isInitialized()) { - - return false; + if (hasReturnType()) { + if (!getReturnType().isInitialized()) { + + return false; + } } for (int i = 0; i < getTypeParameterCount(); i++) { if (!getTypeParameter(i).isInitialized()) { @@ -16329,18 +18490,18 @@ public final class DebugProtoBuf { return this; } - // required .org.jetbrains.kotlin.serialization.Type return_type = 3; + // optional .org.jetbrains.kotlin.serialization.Type return_type = 3; private org.jetbrains.kotlin.serialization.DebugProtoBuf.Type returnType_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< org.jetbrains.kotlin.serialization.DebugProtoBuf.Type, org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeOrBuilder> returnTypeBuilder_; /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ public boolean hasReturnType() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ public org.jetbrains.kotlin.serialization.DebugProtoBuf.Type getReturnType() { if (returnTypeBuilder_ == null) { @@ -16350,7 +18511,7 @@ public final class DebugProtoBuf { } } /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ public Builder setReturnType(org.jetbrains.kotlin.serialization.DebugProtoBuf.Type value) { if (returnTypeBuilder_ == null) { @@ -16366,7 +18527,7 @@ public final class DebugProtoBuf { return this; } /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ public Builder setReturnType( org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Builder builderForValue) { @@ -16380,7 +18541,7 @@ public final class DebugProtoBuf { return this; } /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ public Builder mergeReturnType(org.jetbrains.kotlin.serialization.DebugProtoBuf.Type value) { if (returnTypeBuilder_ == null) { @@ -16399,7 +18560,7 @@ public final class DebugProtoBuf { return this; } /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ public Builder clearReturnType() { if (returnTypeBuilder_ == null) { @@ -16412,7 +18573,7 @@ public final class DebugProtoBuf { return this; } /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ public org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Builder getReturnTypeBuilder() { bitField0_ |= 0x00000004; @@ -16420,7 +18581,7 @@ public final class DebugProtoBuf { return getReturnTypeFieldBuilder().getBuilder(); } /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ public org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeOrBuilder getReturnTypeOrBuilder() { if (returnTypeBuilder_ != null) { @@ -16430,7 +18591,7 @@ public final class DebugProtoBuf { } } /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ private com.google.protobuf.SingleFieldBuilder< org.jetbrains.kotlin.serialization.DebugProtoBuf.Type, org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeOrBuilder> @@ -16446,13 +18607,46 @@ public final class DebugProtoBuf { return returnTypeBuilder_; } + // optional int32 return_type_id = 9; + private int returnTypeId_ ; + /** + * optional int32 return_type_id = 9; + */ + public boolean hasReturnTypeId() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional int32 return_type_id = 9; + */ + public int getReturnTypeId() { + return returnTypeId_; + } + /** + * optional int32 return_type_id = 9; + */ + public Builder setReturnTypeId(int value) { + bitField0_ |= 0x00000008; + returnTypeId_ = value; + onChanged(); + return this; + } + /** + * optional int32 return_type_id = 9; + */ + public Builder clearReturnTypeId() { + bitField0_ = (bitField0_ & ~0x00000008); + returnTypeId_ = 0; + onChanged(); + return this; + } + // repeated .org.jetbrains.kotlin.serialization.TypeParameter type_parameter = 4; private java.util.List typeParameter_ = java.util.Collections.emptyList(); private void ensureTypeParameterIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { + if (!((bitField0_ & 0x00000010) == 0x00000010)) { typeParameter_ = new java.util.ArrayList(typeParameter_); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; } } @@ -16601,7 +18795,7 @@ public final class DebugProtoBuf { public Builder clearTypeParameter() { if (typeParameterBuilder_ == null) { typeParameter_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); onChanged(); } else { typeParameterBuilder_.clear(); @@ -16678,7 +18872,7 @@ public final class DebugProtoBuf { typeParameterBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeParameter, org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeParameter.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeParameterOrBuilder>( typeParameter_, - ((bitField0_ & 0x00000008) == 0x00000008), + ((bitField0_ & 0x00000010) == 0x00000010), getParentForChildren(), isClean()); typeParameter_ = null; @@ -16694,7 +18888,7 @@ public final class DebugProtoBuf { * optional .org.jetbrains.kotlin.serialization.Type receiver_type = 5; */ public boolean hasReceiverType() { - return ((bitField0_ & 0x00000010) == 0x00000010); + return ((bitField0_ & 0x00000020) == 0x00000020); } /** * optional .org.jetbrains.kotlin.serialization.Type receiver_type = 5; @@ -16719,7 +18913,7 @@ public final class DebugProtoBuf { } else { receiverTypeBuilder_.setMessage(value); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; return this; } /** @@ -16733,7 +18927,7 @@ public final class DebugProtoBuf { } else { receiverTypeBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; return this; } /** @@ -16741,7 +18935,7 @@ public final class DebugProtoBuf { */ public Builder mergeReceiverType(org.jetbrains.kotlin.serialization.DebugProtoBuf.Type value) { if (receiverTypeBuilder_ == null) { - if (((bitField0_ & 0x00000010) == 0x00000010) && + if (((bitField0_ & 0x00000020) == 0x00000020) && receiverType_ != org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.getDefaultInstance()) { receiverType_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.newBuilder(receiverType_).mergeFrom(value).buildPartial(); @@ -16752,7 +18946,7 @@ public final class DebugProtoBuf { } else { receiverTypeBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; return this; } /** @@ -16765,14 +18959,14 @@ public final class DebugProtoBuf { } else { receiverTypeBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); return this; } /** * optional .org.jetbrains.kotlin.serialization.Type receiver_type = 5; */ public org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Builder getReceiverTypeBuilder() { - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; onChanged(); return getReceiverTypeFieldBuilder().getBuilder(); } @@ -16803,6 +18997,39 @@ public final class DebugProtoBuf { return receiverTypeBuilder_; } + // optional int32 receiver_type_id = 10; + private int receiverTypeId_ ; + /** + * optional int32 receiver_type_id = 10; + */ + public boolean hasReceiverTypeId() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional int32 receiver_type_id = 10; + */ + public int getReceiverTypeId() { + return receiverTypeId_; + } + /** + * optional int32 receiver_type_id = 10; + */ + public Builder setReceiverTypeId(int value) { + bitField0_ |= 0x00000040; + receiverTypeId_ = value; + onChanged(); + return this; + } + /** + * optional int32 receiver_type_id = 10; + */ + public Builder clearReceiverTypeId() { + bitField0_ = (bitField0_ & ~0x00000040); + receiverTypeId_ = 0; + onChanged(); + return this; + } + // optional .org.jetbrains.kotlin.serialization.ValueParameter setter_value_parameter = 6; private org.jetbrains.kotlin.serialization.DebugProtoBuf.ValueParameter setterValueParameter_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.ValueParameter.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< @@ -16811,7 +19038,7 @@ public final class DebugProtoBuf { * optional .org.jetbrains.kotlin.serialization.ValueParameter setter_value_parameter = 6; */ public boolean hasSetterValueParameter() { - return ((bitField0_ & 0x00000020) == 0x00000020); + return ((bitField0_ & 0x00000080) == 0x00000080); } /** * optional .org.jetbrains.kotlin.serialization.ValueParameter setter_value_parameter = 6; @@ -16836,7 +19063,7 @@ public final class DebugProtoBuf { } else { setterValueParameterBuilder_.setMessage(value); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000080; return this; } /** @@ -16850,7 +19077,7 @@ public final class DebugProtoBuf { } else { setterValueParameterBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000080; return this; } /** @@ -16858,7 +19085,7 @@ public final class DebugProtoBuf { */ public Builder mergeSetterValueParameter(org.jetbrains.kotlin.serialization.DebugProtoBuf.ValueParameter value) { if (setterValueParameterBuilder_ == null) { - if (((bitField0_ & 0x00000020) == 0x00000020) && + if (((bitField0_ & 0x00000080) == 0x00000080) && setterValueParameter_ != org.jetbrains.kotlin.serialization.DebugProtoBuf.ValueParameter.getDefaultInstance()) { setterValueParameter_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.ValueParameter.newBuilder(setterValueParameter_).mergeFrom(value).buildPartial(); @@ -16869,7 +19096,7 @@ public final class DebugProtoBuf { } else { setterValueParameterBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000080; return this; } /** @@ -16882,14 +19109,14 @@ public final class DebugProtoBuf { } else { setterValueParameterBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000080); return this; } /** * optional .org.jetbrains.kotlin.serialization.ValueParameter setter_value_parameter = 6; */ public org.jetbrains.kotlin.serialization.DebugProtoBuf.ValueParameter.Builder getSetterValueParameterBuilder() { - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000080; onChanged(); return getSetterValueParameterFieldBuilder().getBuilder(); } @@ -16934,7 +19161,7 @@ public final class DebugProtoBuf { * */ public boolean hasGetterFlags() { - return ((bitField0_ & 0x00000040) == 0x00000040); + return ((bitField0_ & 0x00000100) == 0x00000100); } /** * optional int32 getter_flags = 7; @@ -16962,7 +19189,7 @@ public final class DebugProtoBuf { * */ public Builder setGetterFlags(int value) { - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000100; getterFlags_ = value; onChanged(); return this; @@ -16979,7 +19206,7 @@ public final class DebugProtoBuf { * */ public Builder clearGetterFlags() { - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000100); getterFlags_ = 0; onChanged(); return this; @@ -16991,7 +19218,7 @@ public final class DebugProtoBuf { * optional int32 setter_flags = 8; */ public boolean hasSetterFlags() { - return ((bitField0_ & 0x00000080) == 0x00000080); + return ((bitField0_ & 0x00000200) == 0x00000200); } /** * optional int32 setter_flags = 8; @@ -17003,7 +19230,7 @@ public final class DebugProtoBuf { * optional int32 setter_flags = 8; */ public Builder setSetterFlags(int value) { - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000200; setterFlags_ = value; onChanged(); return this; @@ -17012,7 +19239,7 @@ public final class DebugProtoBuf { * optional int32 setter_flags = 8; */ public Builder clearSetterFlags() { - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000200); setterFlags_ = 0; onChanged(); return this; @@ -17065,20 +19292,30 @@ public final class DebugProtoBuf { */ int getName(); - // required .org.jetbrains.kotlin.serialization.Type type = 3; + // optional .org.jetbrains.kotlin.serialization.Type type = 3; /** - * required .org.jetbrains.kotlin.serialization.Type type = 3; + * optional .org.jetbrains.kotlin.serialization.Type type = 3; */ boolean hasType(); /** - * required .org.jetbrains.kotlin.serialization.Type type = 3; + * optional .org.jetbrains.kotlin.serialization.Type type = 3; */ org.jetbrains.kotlin.serialization.DebugProtoBuf.Type getType(); /** - * required .org.jetbrains.kotlin.serialization.Type type = 3; + * optional .org.jetbrains.kotlin.serialization.Type type = 3; */ org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeOrBuilder getTypeOrBuilder(); + // optional int32 type_id = 5; + /** + * optional int32 type_id = 5; + */ + boolean hasTypeId(); + /** + * optional int32 type_id = 5; + */ + int getTypeId(); + // optional .org.jetbrains.kotlin.serialization.Type vararg_element_type = 4; /** * optional .org.jetbrains.kotlin.serialization.Type vararg_element_type = 4; @@ -17092,6 +19329,16 @@ public final class DebugProtoBuf { * optional .org.jetbrains.kotlin.serialization.Type vararg_element_type = 4; */ org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeOrBuilder getVarargElementTypeOrBuilder(); + + // optional int32 vararg_element_type_id = 6; + /** + * optional int32 vararg_element_type_id = 6; + */ + boolean hasVarargElementTypeId(); + /** + * optional int32 vararg_element_type_id = 6; + */ + int getVarargElementTypeId(); } /** * Protobuf type {@code org.jetbrains.kotlin.serialization.ValueParameter} @@ -17169,7 +19416,7 @@ public final class DebugProtoBuf { } case 34: { org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Builder subBuilder = null; - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000010) == 0x00000010)) { subBuilder = varargElementType_.toBuilder(); } varargElementType_ = input.readMessage(org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.PARSER, extensionRegistry); @@ -17177,7 +19424,17 @@ public final class DebugProtoBuf { subBuilder.mergeFrom(varargElementType_); varargElementType_ = subBuilder.buildPartial(); } + bitField0_ |= 0x00000010; + break; + } + case 40: { bitField0_ |= 0x00000008; + typeId_ = input.readInt32(); + break; + } + case 48: { + bitField0_ |= 0x00000020; + varargElementTypeId_ = input.readInt32(); break; } } @@ -17264,28 +19521,44 @@ public final class DebugProtoBuf { return name_; } - // required .org.jetbrains.kotlin.serialization.Type type = 3; + // optional .org.jetbrains.kotlin.serialization.Type type = 3; public static final int TYPE_FIELD_NUMBER = 3; private org.jetbrains.kotlin.serialization.DebugProtoBuf.Type type_; /** - * required .org.jetbrains.kotlin.serialization.Type type = 3; + * optional .org.jetbrains.kotlin.serialization.Type type = 3; */ public boolean hasType() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * required .org.jetbrains.kotlin.serialization.Type type = 3; + * optional .org.jetbrains.kotlin.serialization.Type type = 3; */ public org.jetbrains.kotlin.serialization.DebugProtoBuf.Type getType() { return type_; } /** - * required .org.jetbrains.kotlin.serialization.Type type = 3; + * optional .org.jetbrains.kotlin.serialization.Type type = 3; */ public org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeOrBuilder getTypeOrBuilder() { return type_; } + // optional int32 type_id = 5; + public static final int TYPE_ID_FIELD_NUMBER = 5; + private int typeId_; + /** + * optional int32 type_id = 5; + */ + public boolean hasTypeId() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional int32 type_id = 5; + */ + public int getTypeId() { + return typeId_; + } + // optional .org.jetbrains.kotlin.serialization.Type vararg_element_type = 4; public static final int VARARG_ELEMENT_TYPE_FIELD_NUMBER = 4; private org.jetbrains.kotlin.serialization.DebugProtoBuf.Type varargElementType_; @@ -17293,7 +19566,7 @@ public final class DebugProtoBuf { * optional .org.jetbrains.kotlin.serialization.Type vararg_element_type = 4; */ public boolean hasVarargElementType() { - return ((bitField0_ & 0x00000008) == 0x00000008); + return ((bitField0_ & 0x00000010) == 0x00000010); } /** * optional .org.jetbrains.kotlin.serialization.Type vararg_element_type = 4; @@ -17308,11 +19581,29 @@ public final class DebugProtoBuf { return varargElementType_; } + // optional int32 vararg_element_type_id = 6; + public static final int VARARG_ELEMENT_TYPE_ID_FIELD_NUMBER = 6; + private int varargElementTypeId_; + /** + * optional int32 vararg_element_type_id = 6; + */ + public boolean hasVarargElementTypeId() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional int32 vararg_element_type_id = 6; + */ + public int getVarargElementTypeId() { + return varargElementTypeId_; + } + private void initFields() { flags_ = 0; name_ = 0; type_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.getDefaultInstance(); + typeId_ = 0; varargElementType_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.getDefaultInstance(); + varargElementTypeId_ = 0; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -17323,13 +19614,11 @@ public final class DebugProtoBuf { memoizedIsInitialized = 0; return false; } - if (!hasType()) { - memoizedIsInitialized = 0; - return false; - } - if (!getType().isInitialized()) { - memoizedIsInitialized = 0; - return false; + if (hasType()) { + if (!getType().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } } if (hasVarargElementType()) { if (!getVarargElementType().isInitialized()) { @@ -17360,9 +19649,15 @@ public final class DebugProtoBuf { if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeMessage(3, type_); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeMessage(4, varargElementType_); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeInt32(5, typeId_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeInt32(6, varargElementTypeId_); + } extensionWriter.writeUntil(200, output); getUnknownFields().writeTo(output); } @@ -17385,10 +19680,18 @@ public final class DebugProtoBuf { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, type_); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, varargElementType_); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(5, typeId_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(6, varargElementTypeId_); + } size += extensionsSerializedSize(); size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -17518,12 +19821,16 @@ public final class DebugProtoBuf { typeBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); + typeId_ = 0; + bitField0_ = (bitField0_ & ~0x00000008); if (varargElementTypeBuilder_ == null) { varargElementType_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.getDefaultInstance(); } else { varargElementTypeBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); + varargElementTypeId_ = 0; + bitField0_ = (bitField0_ & ~0x00000020); return this; } @@ -17571,11 +19878,19 @@ public final class DebugProtoBuf { if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } + result.typeId_ = typeId_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } if (varargElementTypeBuilder_ == null) { result.varargElementType_ = varargElementType_; } else { result.varargElementType_ = varargElementTypeBuilder_.build(); } + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000020; + } + result.varargElementTypeId_ = varargElementTypeId_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -17601,9 +19916,15 @@ public final class DebugProtoBuf { if (other.hasType()) { mergeType(other.getType()); } + if (other.hasTypeId()) { + setTypeId(other.getTypeId()); + } if (other.hasVarargElementType()) { mergeVarargElementType(other.getVarargElementType()); } + if (other.hasVarargElementTypeId()) { + setVarargElementTypeId(other.getVarargElementTypeId()); + } this.mergeExtensionFields(other); this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -17614,13 +19935,11 @@ public final class DebugProtoBuf { return false; } - if (!hasType()) { - - return false; - } - if (!getType().isInitialized()) { - - return false; + if (hasType()) { + if (!getType().isInitialized()) { + + return false; + } } if (hasVarargElementType()) { if (!getVarargElementType().isInitialized()) { @@ -17744,18 +20063,18 @@ public final class DebugProtoBuf { return this; } - // required .org.jetbrains.kotlin.serialization.Type type = 3; + // optional .org.jetbrains.kotlin.serialization.Type type = 3; private org.jetbrains.kotlin.serialization.DebugProtoBuf.Type type_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< org.jetbrains.kotlin.serialization.DebugProtoBuf.Type, org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeOrBuilder> typeBuilder_; /** - * required .org.jetbrains.kotlin.serialization.Type type = 3; + * optional .org.jetbrains.kotlin.serialization.Type type = 3; */ public boolean hasType() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * required .org.jetbrains.kotlin.serialization.Type type = 3; + * optional .org.jetbrains.kotlin.serialization.Type type = 3; */ public org.jetbrains.kotlin.serialization.DebugProtoBuf.Type getType() { if (typeBuilder_ == null) { @@ -17765,7 +20084,7 @@ public final class DebugProtoBuf { } } /** - * required .org.jetbrains.kotlin.serialization.Type type = 3; + * optional .org.jetbrains.kotlin.serialization.Type type = 3; */ public Builder setType(org.jetbrains.kotlin.serialization.DebugProtoBuf.Type value) { if (typeBuilder_ == null) { @@ -17781,7 +20100,7 @@ public final class DebugProtoBuf { return this; } /** - * required .org.jetbrains.kotlin.serialization.Type type = 3; + * optional .org.jetbrains.kotlin.serialization.Type type = 3; */ public Builder setType( org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Builder builderForValue) { @@ -17795,7 +20114,7 @@ public final class DebugProtoBuf { return this; } /** - * required .org.jetbrains.kotlin.serialization.Type type = 3; + * optional .org.jetbrains.kotlin.serialization.Type type = 3; */ public Builder mergeType(org.jetbrains.kotlin.serialization.DebugProtoBuf.Type value) { if (typeBuilder_ == null) { @@ -17814,7 +20133,7 @@ public final class DebugProtoBuf { return this; } /** - * required .org.jetbrains.kotlin.serialization.Type type = 3; + * optional .org.jetbrains.kotlin.serialization.Type type = 3; */ public Builder clearType() { if (typeBuilder_ == null) { @@ -17827,7 +20146,7 @@ public final class DebugProtoBuf { return this; } /** - * required .org.jetbrains.kotlin.serialization.Type type = 3; + * optional .org.jetbrains.kotlin.serialization.Type type = 3; */ public org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Builder getTypeBuilder() { bitField0_ |= 0x00000004; @@ -17835,7 +20154,7 @@ public final class DebugProtoBuf { return getTypeFieldBuilder().getBuilder(); } /** - * required .org.jetbrains.kotlin.serialization.Type type = 3; + * optional .org.jetbrains.kotlin.serialization.Type type = 3; */ public org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeOrBuilder getTypeOrBuilder() { if (typeBuilder_ != null) { @@ -17845,7 +20164,7 @@ public final class DebugProtoBuf { } } /** - * required .org.jetbrains.kotlin.serialization.Type type = 3; + * optional .org.jetbrains.kotlin.serialization.Type type = 3; */ private com.google.protobuf.SingleFieldBuilder< org.jetbrains.kotlin.serialization.DebugProtoBuf.Type, org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Builder, org.jetbrains.kotlin.serialization.DebugProtoBuf.TypeOrBuilder> @@ -17861,6 +20180,39 @@ public final class DebugProtoBuf { return typeBuilder_; } + // optional int32 type_id = 5; + private int typeId_ ; + /** + * optional int32 type_id = 5; + */ + public boolean hasTypeId() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional int32 type_id = 5; + */ + public int getTypeId() { + return typeId_; + } + /** + * optional int32 type_id = 5; + */ + public Builder setTypeId(int value) { + bitField0_ |= 0x00000008; + typeId_ = value; + onChanged(); + return this; + } + /** + * optional int32 type_id = 5; + */ + public Builder clearTypeId() { + bitField0_ = (bitField0_ & ~0x00000008); + typeId_ = 0; + onChanged(); + return this; + } + // optional .org.jetbrains.kotlin.serialization.Type vararg_element_type = 4; private org.jetbrains.kotlin.serialization.DebugProtoBuf.Type varargElementType_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< @@ -17869,7 +20221,7 @@ public final class DebugProtoBuf { * optional .org.jetbrains.kotlin.serialization.Type vararg_element_type = 4; */ public boolean hasVarargElementType() { - return ((bitField0_ & 0x00000008) == 0x00000008); + return ((bitField0_ & 0x00000010) == 0x00000010); } /** * optional .org.jetbrains.kotlin.serialization.Type vararg_element_type = 4; @@ -17894,7 +20246,7 @@ public final class DebugProtoBuf { } else { varargElementTypeBuilder_.setMessage(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; return this; } /** @@ -17908,7 +20260,7 @@ public final class DebugProtoBuf { } else { varargElementTypeBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; return this; } /** @@ -17916,7 +20268,7 @@ public final class DebugProtoBuf { */ public Builder mergeVarargElementType(org.jetbrains.kotlin.serialization.DebugProtoBuf.Type value) { if (varargElementTypeBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008) && + if (((bitField0_ & 0x00000010) == 0x00000010) && varargElementType_ != org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.getDefaultInstance()) { varargElementType_ = org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.newBuilder(varargElementType_).mergeFrom(value).buildPartial(); @@ -17927,7 +20279,7 @@ public final class DebugProtoBuf { } else { varargElementTypeBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; return this; } /** @@ -17940,14 +20292,14 @@ public final class DebugProtoBuf { } else { varargElementTypeBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); return this; } /** * optional .org.jetbrains.kotlin.serialization.Type vararg_element_type = 4; */ public org.jetbrains.kotlin.serialization.DebugProtoBuf.Type.Builder getVarargElementTypeBuilder() { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return getVarargElementTypeFieldBuilder().getBuilder(); } @@ -17978,6 +20330,39 @@ public final class DebugProtoBuf { return varargElementTypeBuilder_; } + // optional int32 vararg_element_type_id = 6; + private int varargElementTypeId_ ; + /** + * optional int32 vararg_element_type_id = 6; + */ + public boolean hasVarargElementTypeId() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional int32 vararg_element_type_id = 6; + */ + public int getVarargElementTypeId() { + return varargElementTypeId_; + } + /** + * optional int32 vararg_element_type_id = 6; + */ + public Builder setVarargElementTypeId(int value) { + bitField0_ |= 0x00000020; + varargElementTypeId_ = value; + onChanged(); + return this; + } + /** + * optional int32 vararg_element_type_id = 6; + */ + public Builder clearVarargElementTypeId() { + bitField0_ = (bitField0_ & ~0x00000020); + varargElementTypeId_ = 0; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.ValueParameter) } @@ -18044,6 +20429,11 @@ public final class DebugProtoBuf { private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_org_jetbrains_kotlin_serialization_Package_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_org_jetbrains_kotlin_serialization_TypeTable_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_org_jetbrains_kotlin_serialization_TypeTable_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_org_jetbrains_kotlin_serialization_Constructor_descriptor; private static @@ -18104,77 +20494,91 @@ 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\"\340\003\n\004Type\022C\n\010arg" + + "\nANNOTATION\020\013\022\t\n\005ARRAY\020\014\"\222\004\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\"\343\004\n\005Class\022\020\n\005flags\030\001 \001(\005:\0016\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\022D\n\013constructor\030" + - "\010 \003(\0132/.org.jetbrains.kotlin.serializati" + - "on.Constructor\022>\n\010function\030\t \003(\0132,.org.j" + - "etbrains.kotlin.serialization.Function\022>", - "\n\010property\030\n \003(\0132,.org.jetbrains.kotlin." + - "serialization.Property\022\032\n\nenum_entry\030\014 \003" + - "(\005B\006\020\001\210\265\030\001\"x\n\004Kind\022\t\n\005CLASS\020\000\022\r\n\tINTERFA" + - "CE\020\001\022\016\n\nENUM_CLASS\020\002\022\016\n\nENUM_ENTRY\020\003\022\024\n\020" + - "ANNOTATION_CLASS\020\004\022\n\n\006OBJECT\020\005\022\024\n\020COMPAN" + - "ION_OBJECT\020\006*\005\010d\020\310\001\"\220\001\n\007Package\022>\n\010funct" + - "ion\030\003 \003(\0132,.org.jetbrains.kotlin.seriali" + - "zation.Function\022>\n\010property\030\004 \003(\0132,.org." + - "jetbrains.kotlin.serialization.Property*" + - "\005\010d\020\310\001\"s\n\013Constructor\022\020\n\005flags\030\001 \001(\005:\0016\022", - "K\n\017value_parameter\030\002 \003(\01322.org.jetbrains" + - ".kotlin.serialization.ValueParameter*\005\010d" + - "\020\310\001\"\317\002\n\010Function\022\020\n\005flags\030\001 \001(\005:\0016\022\022\n\004na" + - "me\030\002 \002(\005B\004\210\265\030\001\022=\n\013return_type\030\003 \002(\0132(.or" + - "g.jetbrains.kotlin.serialization.Type\022I\n" + - "\016type_parameter\030\004 \003(\01321.org.jetbrains.ko" + - "tlin.serialization.TypeParameter\022?\n\rrece" + - "iver_type\030\005 \001(\0132(.org.jetbrains.kotlin.s" + - "erialization.Type\022K\n\017value_parameter\030\006 \003" + - "(\01322.org.jetbrains.kotlin.serialization.", - "ValueParameter*\005\010d\020\310\001\"\204\003\n\010Property\022\022\n\005fl" + - "ags\030\001 \001(\005:\003262\022\022\n\004name\030\002 \002(\005B\004\210\265\030\001\022=\n\013re" + - "turn_type\030\003 \002(\0132(.org.jetbrains.kotlin.s" + - "erialization.Type\022I\n\016type_parameter\030\004 \003(" + - "\01321.org.jetbrains.kotlin.serialization.T" + - "ypeParameter\022?\n\rreceiver_type\030\005 \001(\0132(.or" + - "g.jetbrains.kotlin.serialization.Type\022R\n" + - "\026setter_value_parameter\030\006 \001(\01322.org.jetb" + - "rains.kotlin.serialization.ValueParamete" + - "r\022\024\n\014getter_flags\030\007 \001(\005\022\024\n\014setter_flags\030", - "\010 \001(\005*\005\010d\020\310\001\"\274\001\n\016ValueParameter\022\020\n\005flags" + - "\030\001 \001(\005:\0010\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" + - ".jetbrains.kotlin.serialization.Type*\005\010d" + - "\020\310\001*9\n\010Modality\022\t\n\005FINAL\020\000\022\010\n\004OPEN\020\001\022\014\n\010" + - "ABSTRACT\020\002\022\n\n\006SEALED\020\003*b\n\nVisibility\022\014\n\010" + - "INTERNAL\020\000\022\013\n\007PRIVATE\020\001\022\r\n\tPROTECTED\020\002\022\n" + - "\n\006PUBLIC\020\003\022\023\n\017PRIVATE_TO_THIS\020\004\022\t\n\005LOCAL" + - "\020\005*Q\n\nMemberKind\022\017\n\013DECLARATION\020\000\022\021\n\rFAK", - "E_OVERRIDE\020\001\022\016\n\nDELEGATION\020\002\022\017\n\013SYNTHESI" + - "ZED\020\003B\022B\rDebugProtoBuf\210\001\000" + "Type\022\037\n\027flexible_upper_bound_id\030\010 \001(\005\022\030\n" + + "\nclass_name\030\006 \001(\005B\004\220\265\030\001\022\026\n\016type_paramete" + + "r\030\007 \001(\005\032\334\001\n\010Argument\022U\n\nprojection\030\001 \001(\016", + "2<.org.jetbrains.kotlin.serialization.Ty" + + "pe.Argument.Projection:\003INV\0226\n\004type\030\002 \001(" + + "\0132(.org.jetbrains.kotlin.serialization.T" + + "ype\022\017\n\007type_id\030\003 \001(\005\"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\"\227\002" + + "\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:\005false\022Q\n\010varia" + + "nce\030\004 \001(\0162:.org.jetbrains.kotlin.seriali" + + "zation.TypeParameter.Variance:\003INV\022=\n\013up" + + "per_bound\030\005 \003(\0132(.org.jetbrains.kotlin.s", + "erialization.Type\022\026\n\016upper_bound_id\030\006 \003(" + + "\005\"$\n\010Variance\022\006\n\002IN\020\000\022\007\n\003OUT\020\001\022\007\n\003INV\020\002\"" + + "\300\005\n\005Class\022\020\n\005flags\030\001 \001(\005:\0016\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.je" + + "tbrains.kotlin.serialization.TypeParamet" + + "er\022;\n\tsupertype\030\006 \003(\0132(.org.jetbrains.ko" + + "tlin.serialization.Type\022\030\n\014supertype_id\030" + + "\002 \003(\005B\002\020\001\022!\n\021nested_class_name\030\007 \003(\005B\006\020\001" + + "\210\265\030\001\022D\n\013constructor\030\010 \003(\0132/.org.jetbrain", + "s.kotlin.serialization.Constructor\022>\n\010fu" + + "nction\030\t \003(\0132,.org.jetbrains.kotlin.seri" + + "alization.Function\022>\n\010property\030\n \003(\0132,.o" + + "rg.jetbrains.kotlin.serialization.Proper" + + "ty\022\032\n\nenum_entry\030\014 \003(\005B\006\020\001\210\265\030\001\022A\n\ntype_t" + + "able\030\036 \001(\0132-.org.jetbrains.kotlin.serial" + + "ization.TypeTable\"x\n\004Kind\022\t\n\005CLASS\020\000\022\r\n\t" + + "INTERFACE\020\001\022\016\n\nENUM_CLASS\020\002\022\016\n\nENUM_ENTR" + + "Y\020\003\022\024\n\020ANNOTATION_CLASS\020\004\022\n\n\006OBJECT\020\005\022\024\n" + + "\020COMPANION_OBJECT\020\006*\005\010d\020\310\001\"\323\001\n\007Package\022>", + "\n\010function\030\003 \003(\0132,.org.jetbrains.kotlin." + + "serialization.Function\022>\n\010property\030\004 \003(\013" + + "2,.org.jetbrains.kotlin.serialization.Pr" + + "operty\022A\n\ntype_table\030\036 \001(\0132-.org.jetbrai" + + "ns.kotlin.serialization.TypeTable*\005\010d\020\310\001" + + "\"_\n\tTypeTable\0226\n\004type\030\001 \003(\0132(.org.jetbra" + + "ins.kotlin.serialization.Type\022\032\n\016first_n" + + "ullable\030\002 \001(\005:\002-1\"s\n\013Constructor\022\020\n\005flag" + + "s\030\001 \001(\005:\0016\022K\n\017value_parameter\030\002 \003(\01322.or" + + "g.jetbrains.kotlin.serialization.ValuePa", + "rameter*\005\010d\020\310\001\"\304\003\n\010Function\022\020\n\005flags\030\001 \001" + + "(\005:\0016\022\022\n\004name\030\002 \002(\005B\004\210\265\030\001\022=\n\013return_type" + + "\030\003 \001(\0132(.org.jetbrains.kotlin.serializat" + + "ion.Type\022\026\n\016return_type_id\030\007 \001(\005\022I\n\016type" + + "_parameter\030\004 \003(\01321.org.jetbrains.kotlin." + + "serialization.TypeParameter\022?\n\rreceiver_" + + "type\030\005 \001(\0132(.org.jetbrains.kotlin.serial" + + "ization.Type\022\030\n\020receiver_type_id\030\010 \001(\005\022K" + + "\n\017value_parameter\030\006 \003(\01322.org.jetbrains." + + "kotlin.serialization.ValueParameter\022A\n\nt", + "ype_table\030\036 \001(\0132-.org.jetbrains.kotlin.s" + + "erialization.TypeTable*\005\010d\020\310\001\"\266\003\n\010Proper" + + "ty\022\022\n\005flags\030\001 \001(\005:\003262\022\022\n\004name\030\002 \002(\005B\004\210\265" + + "\030\001\022=\n\013return_type\030\003 \001(\0132(.org.jetbrains." + + "kotlin.serialization.Type\022\026\n\016return_type" + + "_id\030\t \001(\005\022I\n\016type_parameter\030\004 \003(\01321.org." + + "jetbrains.kotlin.serialization.TypeParam" + + "eter\022?\n\rreceiver_type\030\005 \001(\0132(.org.jetbra" + + "ins.kotlin.serialization.Type\022\030\n\020receive" + + "r_type_id\030\n \001(\005\022R\n\026setter_value_paramete", + "r\030\006 \001(\01322.org.jetbrains.kotlin.serializa" + + "tion.ValueParameter\022\024\n\014getter_flags\030\007 \001(" + + "\005\022\024\n\014setter_flags\030\010 \001(\005*\005\010d\020\310\001\"\355\001\n\016Value" + + "Parameter\022\020\n\005flags\030\001 \001(\005:\0010\022\022\n\004name\030\002 \002(" + + "\005B\004\210\265\030\001\0226\n\004type\030\003 \001(\0132(.org.jetbrains.ko" + + "tlin.serialization.Type\022\017\n\007type_id\030\005 \001(\005" + + "\022E\n\023vararg_element_type\030\004 \001(\0132(.org.jetb" + + "rains.kotlin.serialization.Type\022\036\n\026varar" + + "g_element_type_id\030\006 \001(\005*\005\010d\020\310\001*9\n\010Modali" + + "ty\022\t\n\005FINAL\020\000\022\010\n\004OPEN\020\001\022\014\n\010ABSTRACT\020\002\022\n\n", + "\006SEALED\020\003*b\n\nVisibility\022\014\n\010INTERNAL\020\000\022\013\n" + + "\007PRIVATE\020\001\022\r\n\tPROTECTED\020\002\022\n\n\006PUBLIC\020\003\022\023\n" + + "\017PRIVATE_TO_THIS\020\004\022\t\n\005LOCAL\020\005*Q\n\nMemberK" + + "ind\022\017\n\013DECLARATION\020\000\022\021\n\rFAKE_OVERRIDE\020\001\022" + + "\016\n\nDELEGATION\020\002\022\017\n\013SYNTHESIZED\020\003B\022B\rDebu" + + "gProtoBuf\210\001\000" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -18222,55 +20626,61 @@ 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[] { "Argument", "Nullable", "FlexibleTypeCapabilitiesId", "FlexibleUpperBound", "ClassName", "TypeParameter", }); + new java.lang.String[] { "Argument", "Nullable", "FlexibleTypeCapabilitiesId", "FlexibleUpperBound", "FlexibleUpperBoundId", "ClassName", "TypeParameter", }); internal_static_org_jetbrains_kotlin_serialization_Type_Argument_descriptor = 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, - new java.lang.String[] { "Projection", "Type", }); + new java.lang.String[] { "Projection", "Type", "TypeId", }); internal_static_org_jetbrains_kotlin_serialization_TypeParameter_descriptor = getDescriptor().getMessageTypes().get(4); internal_static_org_jetbrains_kotlin_serialization_TypeParameter_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_org_jetbrains_kotlin_serialization_TypeParameter_descriptor, - new java.lang.String[] { "Id", "Name", "Reified", "Variance", "UpperBound", }); + new java.lang.String[] { "Id", "Name", "Reified", "Variance", "UpperBound", "UpperBoundId", }); internal_static_org_jetbrains_kotlin_serialization_Class_descriptor = getDescriptor().getMessageTypes().get(5); internal_static_org_jetbrains_kotlin_serialization_Class_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_org_jetbrains_kotlin_serialization_Class_descriptor, - new java.lang.String[] { "Flags", "FqName", "CompanionObjectName", "TypeParameter", "Supertype", "NestedClassName", "Constructor", "Function", "Property", "EnumEntry", }); + new java.lang.String[] { "Flags", "FqName", "CompanionObjectName", "TypeParameter", "Supertype", "SupertypeId", "NestedClassName", "Constructor", "Function", "Property", "EnumEntry", "TypeTable", }); internal_static_org_jetbrains_kotlin_serialization_Package_descriptor = getDescriptor().getMessageTypes().get(6); internal_static_org_jetbrains_kotlin_serialization_Package_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_org_jetbrains_kotlin_serialization_Package_descriptor, - new java.lang.String[] { "Function", "Property", }); - internal_static_org_jetbrains_kotlin_serialization_Constructor_descriptor = + new java.lang.String[] { "Function", "Property", "TypeTable", }); + internal_static_org_jetbrains_kotlin_serialization_TypeTable_descriptor = getDescriptor().getMessageTypes().get(7); + internal_static_org_jetbrains_kotlin_serialization_TypeTable_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_org_jetbrains_kotlin_serialization_TypeTable_descriptor, + new java.lang.String[] { "Type", "FirstNullable", }); + internal_static_org_jetbrains_kotlin_serialization_Constructor_descriptor = + getDescriptor().getMessageTypes().get(8); internal_static_org_jetbrains_kotlin_serialization_Constructor_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_org_jetbrains_kotlin_serialization_Constructor_descriptor, new java.lang.String[] { "Flags", "ValueParameter", }); internal_static_org_jetbrains_kotlin_serialization_Function_descriptor = - getDescriptor().getMessageTypes().get(8); + getDescriptor().getMessageTypes().get(9); internal_static_org_jetbrains_kotlin_serialization_Function_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_org_jetbrains_kotlin_serialization_Function_descriptor, - new java.lang.String[] { "Flags", "Name", "ReturnType", "TypeParameter", "ReceiverType", "ValueParameter", }); + new java.lang.String[] { "Flags", "Name", "ReturnType", "ReturnTypeId", "TypeParameter", "ReceiverType", "ReceiverTypeId", "ValueParameter", "TypeTable", }); internal_static_org_jetbrains_kotlin_serialization_Property_descriptor = - getDescriptor().getMessageTypes().get(9); + getDescriptor().getMessageTypes().get(10); internal_static_org_jetbrains_kotlin_serialization_Property_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_org_jetbrains_kotlin_serialization_Property_descriptor, - new java.lang.String[] { "Flags", "Name", "ReturnType", "TypeParameter", "ReceiverType", "SetterValueParameter", "GetterFlags", "SetterFlags", }); + new java.lang.String[] { "Flags", "Name", "ReturnType", "ReturnTypeId", "TypeParameter", "ReceiverType", "ReceiverTypeId", "SetterValueParameter", "GetterFlags", "SetterFlags", }); internal_static_org_jetbrains_kotlin_serialization_ValueParameter_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(11); internal_static_org_jetbrains_kotlin_serialization_ValueParameter_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_org_jetbrains_kotlin_serialization_ValueParameter_descriptor, - new java.lang.String[] { "Flags", "Name", "Type", "VarargElementType", }); + new java.lang.String[] { "Flags", "Name", "Type", "TypeId", "VarargElementType", "VarargElementTypeId", }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(org.jetbrains.kotlin.serialization.DebugExtOptionsProtoBuf.fqNameIdInTable); diff --git a/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/kotlin/AbstractBinaryClassAnnotationAndConstantLoader.kt b/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/kotlin/AbstractBinaryClassAnnotationAndConstantLoader.kt index 24da49d432a..ca8986cdbe1 100644 --- a/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/kotlin/AbstractBinaryClassAnnotationAndConstantLoader.kt +++ b/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/kotlin/AbstractBinaryClassAnnotationAndConstantLoader.kt @@ -92,8 +92,8 @@ public abstract class AbstractBinaryClassAnnotationAndConstantLoader findClassAndLoadMemberAnnotations(container, proto, sig) @@ -106,7 +106,7 @@ public abstract class AbstractBinaryClassAnnotationAndConstantLoader { - val methodSignature = getCallableSignature(message, container.nameResolver, kind) + val methodSignature = getCallableSignature(message, container.nameResolver, container.typeTable, kind) if (methodSignature != null) { val index = if (proto.hasExtension(index)) proto.getExtension(index) else parameterIndex val paramSignature = MemberSignature.fromMethodSignatureAndParameterIndex(methodSignature, index) @@ -153,7 +153,7 @@ public abstract class AbstractBinaryClassAnnotationAndConstantLoader { - val methodSignature = getCallableSignature(message, container.nameResolver, kind) + val methodSignature = getCallableSignature(message, container.nameResolver, container.typeTable, kind) if (methodSignature != null) { val paramSignature = MemberSignature.fromMethodSignatureAndParameterIndex(methodSignature, 0) return findClassAndLoadMemberAnnotations(container, message, paramSignature) @@ -168,7 +168,7 @@ public abstract class AbstractBinaryClassAnnotationAndConstantLoader { - MemberSignature.fromMethodNameAndDesc(JvmProtoBufUtil.getJvmConstructorSignature(proto, nameResolver) ?: return null) + MemberSignature.fromMethodNameAndDesc(JvmProtoBufUtil.getJvmConstructorSignature(proto, nameResolver, typeTable) ?: return null) } proto is ProtoBuf.Function -> { - MemberSignature.fromMethodNameAndDesc(JvmProtoBufUtil.getJvmMethodSignature(proto, nameResolver) ?: return null) + MemberSignature.fromMethodNameAndDesc(JvmProtoBufUtil.getJvmMethodSignature(proto, nameResolver, typeTable) ?: return null) } proto is ProtoBuf.Property && proto.hasExtension(propertySignature) -> { val signature = proto.getExtension(propertySignature) when (kind) { AnnotatedCallableKind.PROPERTY_GETTER -> MemberSignature.fromMethod(nameResolver, signature.getter) AnnotatedCallableKind.PROPERTY_SETTER -> MemberSignature.fromMethod(nameResolver, signature.setter) - AnnotatedCallableKind.PROPERTY -> getPropertySignature(proto, nameResolver, true, true) + AnnotatedCallableKind.PROPERTY -> getPropertySignature(proto, nameResolver, typeTable, true, true) else -> null } } diff --git a/core/descriptor.loader.java/src/org/jetbrains/kotlin/serialization/jvm/JvmProtoBufUtil.kt b/core/descriptor.loader.java/src/org/jetbrains/kotlin/serialization/jvm/JvmProtoBufUtil.kt index 670c1c075c9..1658fdab8a4 100644 --- a/core/descriptor.loader.java/src/org/jetbrains/kotlin/serialization/jvm/JvmProtoBufUtil.kt +++ b/core/descriptor.loader.java/src/org/jetbrains/kotlin/serialization/jvm/JvmProtoBufUtil.kt @@ -25,7 +25,8 @@ import org.jetbrains.kotlin.resolve.jvm.JvmPrimitiveType import org.jetbrains.kotlin.serialization.ClassData import org.jetbrains.kotlin.serialization.PackageData import org.jetbrains.kotlin.serialization.ProtoBuf -import org.jetbrains.kotlin.serialization.deserialization.NameResolver +import org.jetbrains.kotlin.serialization.deserialization.* +import org.jetbrains.kotlin.utils.singletonOrEmptyList import java.io.ByteArrayInputStream public object JvmProtoBufUtil { @@ -60,7 +61,11 @@ public object JvmProtoBufUtil { } // returns JVM signature in the format: "equals(Ljava/lang/Object;)Z" - fun getJvmMethodSignature(proto: ProtoBuf.FunctionOrBuilder, nameResolver: NameResolver): String? { + fun getJvmMethodSignature( + proto: ProtoBuf.Function, + nameResolver: NameResolver, + typeTable: TypeTable + ): String? { val signature = if (proto.hasExtension(JvmProtoBuf.methodSignature)) proto.getExtension(JvmProtoBuf.methodSignature) else null val name = if (signature != null && signature.hasName()) signature.name else proto.name @@ -68,18 +73,21 @@ public object JvmProtoBufUtil { nameResolver.getString(signature.desc) } else { - val parameterTypes = - (if (proto.hasReceiverType()) listOf(proto.receiverType) else listOf()) + proto.valueParameterList.map { it.type } + val parameterTypes = proto.receiverType(typeTable).singletonOrEmptyList() + proto.valueParameterList.map { it.type(typeTable) } val parametersDesc = parameterTypes.map { mapTypeDefault(it, nameResolver) ?: return null } - val returnTypeDesc = mapTypeDefault(proto.returnType, nameResolver) ?: return null + val returnTypeDesc = mapTypeDefault(proto.returnType(typeTable), nameResolver) ?: return null parametersDesc.joinToString(separator = "", prefix = "(", postfix = ")") + returnTypeDesc } return nameResolver.getString(name) + desc } - fun getJvmConstructorSignature(proto: ProtoBuf.ConstructorOrBuilder, nameResolver: NameResolver): String? { + fun getJvmConstructorSignature( + proto: ProtoBuf.Constructor, + nameResolver: NameResolver, + typeTable: TypeTable + ): String? { val signature = if (proto.hasExtension(JvmProtoBuf.constructorSignature)) proto.getExtension(JvmProtoBuf.constructorSignature) else null val desc = if (signature != null && signature.hasDesc()) { @@ -87,13 +95,17 @@ public object JvmProtoBufUtil { } else { proto.valueParameterList.map { - mapTypeDefault(it.type, nameResolver) ?: return null + mapTypeDefault(it.type(typeTable), nameResolver) ?: return null }.joinToString(separator = "", prefix = "(", postfix = ")V") } return "" + desc } - fun getJvmFieldSignature(proto: ProtoBuf.Property, nameResolver: NameResolver): PropertySignature? { + fun getJvmFieldSignature( + proto: ProtoBuf.Property, + nameResolver: NameResolver, + typeTable: TypeTable + ): PropertySignature? { val signature = if (proto.hasExtension(JvmProtoBuf.propertySignature)) proto.getExtension(JvmProtoBuf.propertySignature) else return null val field = @@ -102,7 +114,7 @@ public object JvmProtoBufUtil { val name = if (field != null && field.hasName()) field.name else proto.name val desc = if (field != null && field.hasDesc()) nameResolver.getString(field.desc) - else mapTypeDefault(proto.returnType, nameResolver) ?: return null + else mapTypeDefault(proto.returnType(typeTable), nameResolver) ?: return null return PropertySignature(nameResolver.getString(name), desc) } diff --git a/core/deserialization/src/descriptors.proto b/core/deserialization/src/descriptors.proto index e2b5cc73a4d..875cc4540ce 100644 --- a/core/deserialization/src/descriptors.proto +++ b/core/deserialization/src/descriptors.proto @@ -105,7 +105,10 @@ message Type { } optional Projection projection = 1 [default = INV]; - optional Type type = 2; // when projection is STAR, no type is written, otherwise type must be specified + + // When projection is STAR, no type is written, otherwise type must be specified + optional Type type = 2; + optional int32 type_id = 3; } repeated Argument argument = 2; @@ -117,6 +120,7 @@ message Type { optional int32 flexible_type_capabilities_id = 4 [(string_id_in_table) = true]; optional Type flexible_upper_bound = 5; + optional int32 flexible_upper_bound_id = 8; // Only one of the following values should be present @@ -141,6 +145,7 @@ message TypeParameter { optional Variance variance = 4 [default = INV]; repeated Type upper_bound = 5; + repeated int32 upper_bound_id = 6; } message Class { @@ -169,7 +174,9 @@ message Class { optional int32 companion_object_name = 4 [(name_id_in_table) = true]; repeated TypeParameter type_parameter = 5; + repeated Type supertype = 6; + repeated int32 supertype_id = 2 [packed = true]; repeated int32 nested_class_name = 7 [packed = true, (name_id_in_table) = true]; @@ -179,6 +186,8 @@ message Class { repeated int32 enum_entry = 12 [packed = true, (name_id_in_table) = true]; + optional TypeTable type_table = 30; + extensions 100 to 199; } @@ -186,9 +195,19 @@ message Package { repeated Function function = 3; repeated Property property = 4; + optional TypeTable type_table = 30; + extensions 100 to 199; } +message TypeTable { + repeated Type type = 1; + + // Index starting from which all types are nullable, or nothing if all types in this table are non-null. + // Note that the 'nullable' field of Type messages is ignored and shouldn't be written because it wastes too much space + optional int32 first_nullable = 2 [default = -1]; +} + message Constructor { /* hasAnnotations @@ -215,14 +234,18 @@ message Function { required int32 name = 2 [(name_id_in_table) = true]; - required Type return_type = 3; + optional Type return_type = 3; + optional int32 return_type_id = 7; repeated TypeParameter type_parameter = 4; optional Type receiver_type = 5; + optional int32 receiver_type_id = 8; repeated ValueParameter value_parameter = 6; + optional TypeTable type_table = 30; + extensions 100 to 199; } @@ -243,11 +266,13 @@ message Property { required int32 name = 2 [(name_id_in_table) = true]; - required Type return_type = 3; + optional Type return_type = 3; + optional int32 return_type_id = 9; repeated TypeParameter type_parameter = 4; optional Type receiver_type = 5; + optional int32 receiver_type_id = 10; optional ValueParameter setter_value_parameter = 6; @@ -272,9 +297,11 @@ message ValueParameter { required int32 name = 2 [(name_id_in_table) = true]; - required Type type = 3; + optional Type type = 3; + optional int32 type_id = 5; optional Type vararg_element_type = 4; + optional int32 vararg_element_type_id = 6; 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 49d709a179d..4d904b47f06 100644 --- a/core/deserialization/src/org/jetbrains/kotlin/serialization/ProtoBuf.java +++ b/core/deserialization/src/org/jetbrains/kotlin/serialization/ProtoBuf.java @@ -4298,6 +4298,16 @@ public final class ProtoBuf { */ org.jetbrains.kotlin.serialization.ProtoBuf.Type getFlexibleUpperBound(); + // optional int32 flexible_upper_bound_id = 8; + /** + * optional int32 flexible_upper_bound_id = 8; + */ + boolean hasFlexibleUpperBoundId(); + /** + * optional int32 flexible_upper_bound_id = 8; + */ + int getFlexibleUpperBoundId(); + // optional int32 class_name = 6; /** * optional int32 class_name = 6; @@ -4401,15 +4411,20 @@ public final class ProtoBuf { break; } case 48: { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; className_ = input.readInt32(); break; } case 56: { - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; typeParameter_ = input.readInt32(); break; } + case 64: { + bitField0_ |= 0x00000008; + flexibleUpperBoundId_ = input.readInt32(); + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -4457,7 +4472,7 @@ public final class ProtoBuf { * optional .org.jetbrains.kotlin.serialization.Type type = 2; * *
-       * when projection is STAR, no type is written, otherwise type must be specified
+       * When projection is STAR, no type is written, otherwise type must be specified
        * 
*/ boolean hasType(); @@ -4465,10 +4480,20 @@ public final class ProtoBuf { * optional .org.jetbrains.kotlin.serialization.Type type = 2; * *
-       * when projection is STAR, no type is written, otherwise type must be specified
+       * When projection is STAR, no type is written, otherwise type must be specified
        * 
*/ org.jetbrains.kotlin.serialization.ProtoBuf.Type getType(); + + // optional int32 type_id = 3; + /** + * optional int32 type_id = 3; + */ + boolean hasTypeId(); + /** + * optional int32 type_id = 3; + */ + int getTypeId(); } /** * Protobuf type {@code org.jetbrains.kotlin.serialization.Type.Argument} @@ -4535,6 +4560,11 @@ public final class ProtoBuf { bitField0_ |= 0x00000002; break; } + case 24: { + bitField0_ |= 0x00000004; + typeId_ = input.readInt32(); + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -4659,7 +4689,7 @@ public final class ProtoBuf { * optional .org.jetbrains.kotlin.serialization.Type type = 2; * *
-       * when projection is STAR, no type is written, otherwise type must be specified
+       * When projection is STAR, no type is written, otherwise type must be specified
        * 
*/ public boolean hasType() { @@ -4669,16 +4699,33 @@ public final class ProtoBuf { * optional .org.jetbrains.kotlin.serialization.Type type = 2; * *
-       * when projection is STAR, no type is written, otherwise type must be specified
+       * When projection is STAR, no type is written, otherwise type must be specified
        * 
*/ public org.jetbrains.kotlin.serialization.ProtoBuf.Type getType() { return type_; } + // optional int32 type_id = 3; + public static final int TYPE_ID_FIELD_NUMBER = 3; + private int typeId_; + /** + * optional int32 type_id = 3; + */ + public boolean hasTypeId() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional int32 type_id = 3; + */ + public int getTypeId() { + return typeId_; + } + private void initFields() { projection_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.Argument.Projection.INV; type_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance(); + typeId_ = 0; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -4704,6 +4751,9 @@ public final class ProtoBuf { if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeMessage(2, type_); } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeInt32(3, typeId_); + } } private int memoizedSerializedSize = -1; @@ -4720,6 +4770,10 @@ public final class ProtoBuf { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, type_); } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, typeId_); + } memoizedSerializedSize = size; return size; } @@ -4815,6 +4869,8 @@ public final class ProtoBuf { bitField0_ = (bitField0_ & ~0x00000001); type_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance(); bitField0_ = (bitField0_ & ~0x00000002); + typeId_ = 0; + bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -4846,6 +4902,10 @@ public final class ProtoBuf { to_bitField0_ |= 0x00000002; } result.type_ = type_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.typeId_ = typeId_; result.bitField0_ = to_bitField0_; return result; } @@ -4858,6 +4918,9 @@ public final class ProtoBuf { if (other.hasType()) { mergeType(other.getType()); } + if (other.hasTypeId()) { + setTypeId(other.getTypeId()); + } return this; } @@ -4932,7 +4995,7 @@ public final class ProtoBuf { * optional .org.jetbrains.kotlin.serialization.Type type = 2; * *
-         * when projection is STAR, no type is written, otherwise type must be specified
+         * When projection is STAR, no type is written, otherwise type must be specified
          * 
*/ public boolean hasType() { @@ -4942,7 +5005,7 @@ public final class ProtoBuf { * optional .org.jetbrains.kotlin.serialization.Type type = 2; * *
-         * when projection is STAR, no type is written, otherwise type must be specified
+         * When projection is STAR, no type is written, otherwise type must be specified
          * 
*/ public org.jetbrains.kotlin.serialization.ProtoBuf.Type getType() { @@ -4952,7 +5015,7 @@ public final class ProtoBuf { * optional .org.jetbrains.kotlin.serialization.Type type = 2; * *
-         * when projection is STAR, no type is written, otherwise type must be specified
+         * When projection is STAR, no type is written, otherwise type must be specified
          * 
*/ public Builder setType(org.jetbrains.kotlin.serialization.ProtoBuf.Type value) { @@ -4968,7 +5031,7 @@ public final class ProtoBuf { * optional .org.jetbrains.kotlin.serialization.Type type = 2; * *
-         * when projection is STAR, no type is written, otherwise type must be specified
+         * When projection is STAR, no type is written, otherwise type must be specified
          * 
*/ public Builder setType( @@ -4982,7 +5045,7 @@ public final class ProtoBuf { * optional .org.jetbrains.kotlin.serialization.Type type = 2; * *
-         * when projection is STAR, no type is written, otherwise type must be specified
+         * When projection is STAR, no type is written, otherwise type must be specified
          * 
*/ public Builder mergeType(org.jetbrains.kotlin.serialization.ProtoBuf.Type value) { @@ -5001,7 +5064,7 @@ public final class ProtoBuf { * optional .org.jetbrains.kotlin.serialization.Type type = 2; * *
-         * when projection is STAR, no type is written, otherwise type must be specified
+         * When projection is STAR, no type is written, otherwise type must be specified
          * 
*/ public Builder clearType() { @@ -5011,6 +5074,39 @@ public final class ProtoBuf { return this; } + // optional int32 type_id = 3; + private int typeId_ ; + /** + * optional int32 type_id = 3; + */ + public boolean hasTypeId() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional int32 type_id = 3; + */ + public int getTypeId() { + return typeId_; + } + /** + * optional int32 type_id = 3; + */ + public Builder setTypeId(int value) { + bitField0_ |= 0x00000004; + typeId_ = value; + + return this; + } + /** + * optional int32 type_id = 3; + */ + public Builder clearTypeId() { + bitField0_ = (bitField0_ & ~0x00000004); + typeId_ = 0; + + return this; + } + // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.Type.Argument) } @@ -5117,6 +5213,22 @@ public final class ProtoBuf { return flexibleUpperBound_; } + // optional int32 flexible_upper_bound_id = 8; + public static final int FLEXIBLE_UPPER_BOUND_ID_FIELD_NUMBER = 8; + private int flexibleUpperBoundId_; + /** + * optional int32 flexible_upper_bound_id = 8; + */ + public boolean hasFlexibleUpperBoundId() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional int32 flexible_upper_bound_id = 8; + */ + public int getFlexibleUpperBoundId() { + return flexibleUpperBoundId_; + } + // optional int32 class_name = 6; public static final int CLASS_NAME_FIELD_NUMBER = 6; private int className_; @@ -5124,7 +5236,7 @@ public final class ProtoBuf { * optional int32 class_name = 6; */ public boolean hasClassName() { - return ((bitField0_ & 0x00000008) == 0x00000008); + return ((bitField0_ & 0x00000010) == 0x00000010); } /** * optional int32 class_name = 6; @@ -5144,7 +5256,7 @@ public final class ProtoBuf { * */ public boolean hasTypeParameter() { - return ((bitField0_ & 0x00000010) == 0x00000010); + return ((bitField0_ & 0x00000020) == 0x00000020); } /** * optional int32 type_parameter = 7; @@ -5162,6 +5274,7 @@ public final class ProtoBuf { nullable_ = false; flexibleTypeCapabilitiesId_ = 0; flexibleUpperBound_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance(); + flexibleUpperBoundId_ = 0; className_ = 0; typeParameter_ = 0; } @@ -5208,12 +5321,15 @@ public final class ProtoBuf { if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeMessage(5, flexibleUpperBound_); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeInt32(6, className_); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (((bitField0_ & 0x00000020) == 0x00000020)) { output.writeInt32(7, typeParameter_); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeInt32(8, flexibleUpperBoundId_); + } extensionWriter.writeUntil(200, output); } @@ -5239,14 +5355,18 @@ public final class ProtoBuf { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, flexibleUpperBound_); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(6, className_); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (((bitField0_ & 0x00000020) == 0x00000020)) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(7, typeParameter_); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(8, flexibleUpperBoundId_); + } size += extensionsSerializedSize(); memoizedSerializedSize = size; return size; @@ -5346,10 +5466,12 @@ public final class ProtoBuf { bitField0_ = (bitField0_ & ~0x00000004); flexibleUpperBound_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance(); bitField0_ = (bitField0_ & ~0x00000008); - className_ = 0; + flexibleUpperBoundId_ = 0; bitField0_ = (bitField0_ & ~0x00000010); - typeParameter_ = 0; + className_ = 0; bitField0_ = (bitField0_ & ~0x00000020); + typeParameter_ = 0; + bitField0_ = (bitField0_ & ~0x00000040); return this; } @@ -5393,10 +5515,14 @@ public final class ProtoBuf { if (((from_bitField0_ & 0x00000010) == 0x00000010)) { to_bitField0_ |= 0x00000008; } - result.className_ = className_; + result.flexibleUpperBoundId_ = flexibleUpperBoundId_; if (((from_bitField0_ & 0x00000020) == 0x00000020)) { to_bitField0_ |= 0x00000010; } + result.className_ = className_; + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000020; + } result.typeParameter_ = typeParameter_; result.bitField0_ = to_bitField0_; return result; @@ -5423,6 +5549,9 @@ public final class ProtoBuf { if (other.hasFlexibleUpperBound()) { mergeFlexibleUpperBound(other.getFlexibleUpperBound()); } + if (other.hasFlexibleUpperBoundId()) { + setFlexibleUpperBoundId(other.getFlexibleUpperBoundId()); + } if (other.hasClassName()) { setClassName(other.getClassName()); } @@ -5744,13 +5873,46 @@ public final class ProtoBuf { return this; } + // optional int32 flexible_upper_bound_id = 8; + private int flexibleUpperBoundId_ ; + /** + * optional int32 flexible_upper_bound_id = 8; + */ + public boolean hasFlexibleUpperBoundId() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional int32 flexible_upper_bound_id = 8; + */ + public int getFlexibleUpperBoundId() { + return flexibleUpperBoundId_; + } + /** + * optional int32 flexible_upper_bound_id = 8; + */ + public Builder setFlexibleUpperBoundId(int value) { + bitField0_ |= 0x00000010; + flexibleUpperBoundId_ = value; + + return this; + } + /** + * optional int32 flexible_upper_bound_id = 8; + */ + public Builder clearFlexibleUpperBoundId() { + bitField0_ = (bitField0_ & ~0x00000010); + flexibleUpperBoundId_ = 0; + + return this; + } + // optional int32 class_name = 6; private int className_ ; /** * optional int32 class_name = 6; */ public boolean hasClassName() { - return ((bitField0_ & 0x00000010) == 0x00000010); + return ((bitField0_ & 0x00000020) == 0x00000020); } /** * optional int32 class_name = 6; @@ -5762,7 +5924,7 @@ public final class ProtoBuf { * optional int32 class_name = 6; */ public Builder setClassName(int value) { - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; className_ = value; return this; @@ -5771,7 +5933,7 @@ public final class ProtoBuf { * optional int32 class_name = 6; */ public Builder clearClassName() { - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); className_ = 0; return this; @@ -5787,7 +5949,7 @@ public final class ProtoBuf { * */ public boolean hasTypeParameter() { - return ((bitField0_ & 0x00000020) == 0x00000020); + return ((bitField0_ & 0x00000040) == 0x00000040); } /** * optional int32 type_parameter = 7; @@ -5807,7 +5969,7 @@ public final class ProtoBuf { * */ public Builder setTypeParameter(int value) { - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; typeParameter_ = value; return this; @@ -5820,7 +5982,7 @@ public final class ProtoBuf { * */ public Builder clearTypeParameter() { - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); typeParameter_ = 0; return this; @@ -5894,6 +6056,20 @@ public final class ProtoBuf { * repeated .org.jetbrains.kotlin.serialization.Type upper_bound = 5; */ int getUpperBoundCount(); + + // repeated int32 upper_bound_id = 6; + /** + * repeated int32 upper_bound_id = 6; + */ + java.util.List getUpperBoundIdList(); + /** + * repeated int32 upper_bound_id = 6; + */ + int getUpperBoundIdCount(); + /** + * repeated int32 upper_bound_id = 6; + */ + int getUpperBoundId(int index); } /** * Protobuf type {@code org.jetbrains.kotlin.serialization.TypeParameter} @@ -5970,6 +6146,27 @@ public final class ProtoBuf { upperBound_.add(input.readMessage(org.jetbrains.kotlin.serialization.ProtoBuf.Type.PARSER, extensionRegistry)); break; } + case 48: { + if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + upperBoundId_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000020; + } + upperBoundId_.add(input.readInt32()); + break; + } + case 50: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000020) == 0x00000020) && input.getBytesUntilLimit() > 0) { + upperBoundId_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000020; + } + while (input.getBytesUntilLimit() > 0) { + upperBoundId_.add(input.readInt32()); + } + input.popLimit(limit); + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -5981,6 +6178,9 @@ public final class ProtoBuf { if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { upperBound_ = java.util.Collections.unmodifiableList(upperBound_); } + if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + upperBoundId_ = java.util.Collections.unmodifiableList(upperBoundId_); + } makeExtensionsImmutable(); } } @@ -6165,12 +6365,36 @@ public final class ProtoBuf { return upperBound_.get(index); } + // repeated int32 upper_bound_id = 6; + public static final int UPPER_BOUND_ID_FIELD_NUMBER = 6; + private java.util.List upperBoundId_; + /** + * repeated int32 upper_bound_id = 6; + */ + public java.util.List + getUpperBoundIdList() { + return upperBoundId_; + } + /** + * repeated int32 upper_bound_id = 6; + */ + public int getUpperBoundIdCount() { + return upperBoundId_.size(); + } + /** + * repeated int32 upper_bound_id = 6; + */ + public int getUpperBoundId(int index) { + return upperBoundId_.get(index); + } + private void initFields() { id_ = 0; name_ = 0; reified_ = false; variance_ = org.jetbrains.kotlin.serialization.ProtoBuf.TypeParameter.Variance.INV; upperBound_ = java.util.Collections.emptyList(); + upperBoundId_ = java.util.Collections.emptyList(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -6213,6 +6437,9 @@ public final class ProtoBuf { for (int i = 0; i < upperBound_.size(); i++) { output.writeMessage(5, upperBound_.get(i)); } + for (int i = 0; i < upperBoundId_.size(); i++) { + output.writeInt32(6, upperBoundId_.get(i)); + } } private int memoizedSerializedSize = -1; @@ -6241,6 +6468,15 @@ public final class ProtoBuf { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, upperBound_.get(i)); } + { + int dataSize = 0; + for (int i = 0; i < upperBoundId_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(upperBoundId_.get(i)); + } + size += dataSize; + size += 1 * getUpperBoundIdList().size(); + } memoizedSerializedSize = size; return size; } @@ -6342,6 +6578,8 @@ public final class ProtoBuf { bitField0_ = (bitField0_ & ~0x00000008); upperBound_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000010); + upperBoundId_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); return this; } @@ -6386,6 +6624,11 @@ public final class ProtoBuf { bitField0_ = (bitField0_ & ~0x00000010); } result.upperBound_ = upperBound_; + if (((bitField0_ & 0x00000020) == 0x00000020)) { + upperBoundId_ = java.util.Collections.unmodifiableList(upperBoundId_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.upperBoundId_ = upperBoundId_; result.bitField0_ = to_bitField0_; return result; } @@ -6413,6 +6656,16 @@ public final class ProtoBuf { upperBound_.addAll(other.upperBound_); } + } + if (!other.upperBoundId_.isEmpty()) { + if (upperBoundId_.isEmpty()) { + upperBoundId_ = other.upperBoundId_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureUpperBoundIdIsMutable(); + upperBoundId_.addAll(other.upperBoundId_); + } + } return this; } @@ -6714,6 +6967,72 @@ public final class ProtoBuf { return this; } + // repeated int32 upper_bound_id = 6; + private java.util.List upperBoundId_ = java.util.Collections.emptyList(); + private void ensureUpperBoundIdIsMutable() { + if (!((bitField0_ & 0x00000020) == 0x00000020)) { + upperBoundId_ = new java.util.ArrayList(upperBoundId_); + bitField0_ |= 0x00000020; + } + } + /** + * repeated int32 upper_bound_id = 6; + */ + public java.util.List + getUpperBoundIdList() { + return java.util.Collections.unmodifiableList(upperBoundId_); + } + /** + * repeated int32 upper_bound_id = 6; + */ + public int getUpperBoundIdCount() { + return upperBoundId_.size(); + } + /** + * repeated int32 upper_bound_id = 6; + */ + public int getUpperBoundId(int index) { + return upperBoundId_.get(index); + } + /** + * repeated int32 upper_bound_id = 6; + */ + public Builder setUpperBoundId( + int index, int value) { + ensureUpperBoundIdIsMutable(); + upperBoundId_.set(index, value); + + return this; + } + /** + * repeated int32 upper_bound_id = 6; + */ + public Builder addUpperBoundId(int value) { + ensureUpperBoundIdIsMutable(); + upperBoundId_.add(value); + + return this; + } + /** + * repeated int32 upper_bound_id = 6; + */ + public Builder addAllUpperBoundId( + java.lang.Iterable values) { + ensureUpperBoundIdIsMutable(); + super.addAll(values, upperBoundId_); + + return this; + } + /** + * repeated int32 upper_bound_id = 6; + */ + public Builder clearUpperBoundId() { + upperBoundId_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + + return this; + } + // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.TypeParameter) } @@ -6807,6 +7126,20 @@ public final class ProtoBuf { */ int getSupertypeCount(); + // repeated int32 supertype_id = 2 [packed = true]; + /** + * repeated int32 supertype_id = 2 [packed = true]; + */ + java.util.List getSupertypeIdList(); + /** + * repeated int32 supertype_id = 2 [packed = true]; + */ + int getSupertypeIdCount(); + /** + * repeated int32 supertype_id = 2 [packed = true]; + */ + int getSupertypeId(int index); + // repeated int32 nested_class_name = 7 [packed = true]; /** * repeated int32 nested_class_name = 7 [packed = true]; @@ -6879,6 +7212,16 @@ public final class ProtoBuf { * repeated int32 enum_entry = 12 [packed = true]; */ int getEnumEntry(int index); + + // optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + boolean hasTypeTable(); + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable getTypeTable(); } /** * Protobuf type {@code org.jetbrains.kotlin.serialization.Class} @@ -6928,6 +7271,27 @@ public final class ProtoBuf { flags_ = input.readInt32(); break; } + case 16: { + if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + supertypeId_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000020; + } + supertypeId_.add(input.readInt32()); + break; + } + case 18: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000020) == 0x00000020) && input.getBytesUntilLimit() > 0) { + supertypeId_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000020; + } + while (input.getBytesUntilLimit() > 0) { + supertypeId_.add(input.readInt32()); + } + input.popLimit(limit); + break; + } case 24: { bitField0_ |= 0x00000002; fqName_ = input.readInt32(); @@ -6955,9 +7319,9 @@ public final class ProtoBuf { break; } case 56: { - if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) { nestedClassName_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000020; + mutable_bitField0_ |= 0x00000040; } nestedClassName_.add(input.readInt32()); break; @@ -6965,9 +7329,9 @@ public final class ProtoBuf { case 58: { int length = input.readRawVarint32(); int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000020) == 0x00000020) && input.getBytesUntilLimit() > 0) { + if (!((mutable_bitField0_ & 0x00000040) == 0x00000040) && input.getBytesUntilLimit() > 0) { nestedClassName_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000020; + mutable_bitField0_ |= 0x00000040; } while (input.getBytesUntilLimit() > 0) { nestedClassName_.add(input.readInt32()); @@ -6976,33 +7340,33 @@ public final class ProtoBuf { break; } case 66: { - if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) { + if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) { constructor_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000040; + mutable_bitField0_ |= 0x00000080; } constructor_.add(input.readMessage(org.jetbrains.kotlin.serialization.ProtoBuf.Constructor.PARSER, extensionRegistry)); break; } case 74: { - if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) { + if (!((mutable_bitField0_ & 0x00000100) == 0x00000100)) { function_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000080; + mutable_bitField0_ |= 0x00000100; } function_.add(input.readMessage(org.jetbrains.kotlin.serialization.ProtoBuf.Function.PARSER, extensionRegistry)); break; } case 82: { - if (!((mutable_bitField0_ & 0x00000100) == 0x00000100)) { + if (!((mutable_bitField0_ & 0x00000200) == 0x00000200)) { property_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000100; + mutable_bitField0_ |= 0x00000200; } property_.add(input.readMessage(org.jetbrains.kotlin.serialization.ProtoBuf.Property.PARSER, extensionRegistry)); break; } case 96: { - if (!((mutable_bitField0_ & 0x00000200) == 0x00000200)) { + if (!((mutable_bitField0_ & 0x00000400) == 0x00000400)) { enumEntry_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000200; + mutable_bitField0_ |= 0x00000400; } enumEntry_.add(input.readInt32()); break; @@ -7010,9 +7374,9 @@ public final class ProtoBuf { case 98: { int length = input.readRawVarint32(); int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000200) == 0x00000200) && input.getBytesUntilLimit() > 0) { + if (!((mutable_bitField0_ & 0x00000400) == 0x00000400) && input.getBytesUntilLimit() > 0) { enumEntry_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000200; + mutable_bitField0_ |= 0x00000400; } while (input.getBytesUntilLimit() > 0) { enumEntry_.add(input.readInt32()); @@ -7020,6 +7384,19 @@ public final class ProtoBuf { input.popLimit(limit); break; } + case 242: { + org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable.Builder subBuilder = null; + if (((bitField0_ & 0x00000008) == 0x00000008)) { + subBuilder = typeTable_.toBuilder(); + } + typeTable_ = input.readMessage(org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(typeTable_); + typeTable_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000008; + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -7028,25 +7405,28 @@ public final class ProtoBuf { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { + if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + supertypeId_ = java.util.Collections.unmodifiableList(supertypeId_); + } if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { typeParameter_ = java.util.Collections.unmodifiableList(typeParameter_); } if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { supertype_ = java.util.Collections.unmodifiableList(supertype_); } - if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) { nestedClassName_ = java.util.Collections.unmodifiableList(nestedClassName_); } - if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) { + if (((mutable_bitField0_ & 0x00000080) == 0x00000080)) { constructor_ = java.util.Collections.unmodifiableList(constructor_); } - if (((mutable_bitField0_ & 0x00000080) == 0x00000080)) { + if (((mutable_bitField0_ & 0x00000100) == 0x00000100)) { function_ = java.util.Collections.unmodifiableList(function_); } - if (((mutable_bitField0_ & 0x00000100) == 0x00000100)) { + if (((mutable_bitField0_ & 0x00000200) == 0x00000200)) { property_ = java.util.Collections.unmodifiableList(property_); } - if (((mutable_bitField0_ & 0x00000200) == 0x00000200)) { + if (((mutable_bitField0_ & 0x00000400) == 0x00000400)) { enumEntry_ = java.util.Collections.unmodifiableList(enumEntry_); } makeExtensionsImmutable(); @@ -7315,6 +7695,30 @@ public final class ProtoBuf { return supertype_.get(index); } + // repeated int32 supertype_id = 2 [packed = true]; + public static final int SUPERTYPE_ID_FIELD_NUMBER = 2; + private java.util.List supertypeId_; + /** + * repeated int32 supertype_id = 2 [packed = true]; + */ + public java.util.List + getSupertypeIdList() { + return supertypeId_; + } + /** + * repeated int32 supertype_id = 2 [packed = true]; + */ + public int getSupertypeIdCount() { + return supertypeId_.size(); + } + /** + * repeated int32 supertype_id = 2 [packed = true]; + */ + public int getSupertypeId(int index) { + return supertypeId_.get(index); + } + private int supertypeIdMemoizedSerializedSize = -1; + // repeated int32 nested_class_name = 7 [packed = true]; public static final int NESTED_CLASS_NAME_FIELD_NUMBER = 7; private java.util.List nestedClassName_; @@ -7471,17 +7875,35 @@ public final class ProtoBuf { } private int enumEntryMemoizedSerializedSize = -1; + // optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + public static final int TYPE_TABLE_FIELD_NUMBER = 30; + private org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable typeTable_; + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public boolean hasTypeTable() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable getTypeTable() { + return typeTable_; + } + private void initFields() { flags_ = 6; fqName_ = 0; companionObjectName_ = 0; typeParameter_ = java.util.Collections.emptyList(); supertype_ = java.util.Collections.emptyList(); + supertypeId_ = java.util.Collections.emptyList(); nestedClassName_ = java.util.Collections.emptyList(); constructor_ = java.util.Collections.emptyList(); function_ = java.util.Collections.emptyList(); property_ = java.util.Collections.emptyList(); enumEntry_ = java.util.Collections.emptyList(); + typeTable_ = org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -7522,6 +7944,12 @@ public final class ProtoBuf { return false; } } + if (hasTypeTable()) { + if (!getTypeTable().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } if (!extensionsAreInitialized()) { memoizedIsInitialized = 0; return false; @@ -7539,6 +7967,13 @@ public final class ProtoBuf { if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeInt32(1, flags_); } + if (getSupertypeIdList().size() > 0) { + output.writeRawVarint32(18); + output.writeRawVarint32(supertypeIdMemoizedSerializedSize); + } + for (int i = 0; i < supertypeId_.size(); i++) { + output.writeInt32NoTag(supertypeId_.get(i)); + } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeInt32(3, fqName_); } @@ -7574,6 +8009,9 @@ public final class ProtoBuf { for (int i = 0; i < enumEntry_.size(); i++) { output.writeInt32NoTag(enumEntry_.get(i)); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeMessage(30, typeTable_); + } extensionWriter.writeUntil(200, output); } @@ -7587,6 +8025,20 @@ public final class ProtoBuf { size += com.google.protobuf.CodedOutputStream .computeInt32Size(1, flags_); } + { + int dataSize = 0; + for (int i = 0; i < supertypeId_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(supertypeId_.get(i)); + } + size += dataSize; + if (!getSupertypeIdList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(dataSize); + } + supertypeIdMemoizedSerializedSize = dataSize; + } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(3, fqName_); @@ -7643,6 +8095,10 @@ public final class ProtoBuf { } enumEntryMemoizedSerializedSize = dataSize; } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(30, typeTable_); + } size += extensionsSerializedSize(); memoizedSerializedSize = size; return size; @@ -7744,16 +8200,20 @@ public final class ProtoBuf { bitField0_ = (bitField0_ & ~0x00000008); supertype_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000010); - nestedClassName_ = java.util.Collections.emptyList(); + supertypeId_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000020); - constructor_ = java.util.Collections.emptyList(); + nestedClassName_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000040); - function_ = java.util.Collections.emptyList(); + constructor_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000080); - property_ = java.util.Collections.emptyList(); + function_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000100); - enumEntry_ = java.util.Collections.emptyList(); + property_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000200); + enumEntry_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000400); + typeTable_ = org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable.getDefaultInstance(); + bitField0_ = (bitField0_ & ~0x00000800); return this; } @@ -7800,30 +8260,39 @@ public final class ProtoBuf { } result.supertype_ = supertype_; if (((bitField0_ & 0x00000020) == 0x00000020)) { - nestedClassName_ = java.util.Collections.unmodifiableList(nestedClassName_); + supertypeId_ = java.util.Collections.unmodifiableList(supertypeId_); bitField0_ = (bitField0_ & ~0x00000020); } - result.nestedClassName_ = nestedClassName_; + result.supertypeId_ = supertypeId_; if (((bitField0_ & 0x00000040) == 0x00000040)) { - constructor_ = java.util.Collections.unmodifiableList(constructor_); + nestedClassName_ = java.util.Collections.unmodifiableList(nestedClassName_); bitField0_ = (bitField0_ & ~0x00000040); } - result.constructor_ = constructor_; + result.nestedClassName_ = nestedClassName_; if (((bitField0_ & 0x00000080) == 0x00000080)) { - function_ = java.util.Collections.unmodifiableList(function_); + constructor_ = java.util.Collections.unmodifiableList(constructor_); bitField0_ = (bitField0_ & ~0x00000080); } - result.function_ = function_; + result.constructor_ = constructor_; if (((bitField0_ & 0x00000100) == 0x00000100)) { - property_ = java.util.Collections.unmodifiableList(property_); + function_ = java.util.Collections.unmodifiableList(function_); bitField0_ = (bitField0_ & ~0x00000100); } - result.property_ = property_; + result.function_ = function_; if (((bitField0_ & 0x00000200) == 0x00000200)) { - enumEntry_ = java.util.Collections.unmodifiableList(enumEntry_); + property_ = java.util.Collections.unmodifiableList(property_); bitField0_ = (bitField0_ & ~0x00000200); } + result.property_ = property_; + if (((bitField0_ & 0x00000400) == 0x00000400)) { + enumEntry_ = java.util.Collections.unmodifiableList(enumEntry_); + bitField0_ = (bitField0_ & ~0x00000400); + } result.enumEntry_ = enumEntry_; + if (((from_bitField0_ & 0x00000800) == 0x00000800)) { + to_bitField0_ |= 0x00000008; + } + result.typeTable_ = typeTable_; result.bitField0_ = to_bitField0_; return result; } @@ -7858,11 +8327,21 @@ public final class ProtoBuf { supertype_.addAll(other.supertype_); } + } + if (!other.supertypeId_.isEmpty()) { + if (supertypeId_.isEmpty()) { + supertypeId_ = other.supertypeId_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureSupertypeIdIsMutable(); + supertypeId_.addAll(other.supertypeId_); + } + } if (!other.nestedClassName_.isEmpty()) { if (nestedClassName_.isEmpty()) { nestedClassName_ = other.nestedClassName_; - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); } else { ensureNestedClassNameIsMutable(); nestedClassName_.addAll(other.nestedClassName_); @@ -7872,7 +8351,7 @@ public final class ProtoBuf { if (!other.constructor_.isEmpty()) { if (constructor_.isEmpty()) { constructor_ = other.constructor_; - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000080); } else { ensureConstructorIsMutable(); constructor_.addAll(other.constructor_); @@ -7882,7 +8361,7 @@ public final class ProtoBuf { if (!other.function_.isEmpty()) { if (function_.isEmpty()) { function_ = other.function_; - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); } else { ensureFunctionIsMutable(); function_.addAll(other.function_); @@ -7892,7 +8371,7 @@ public final class ProtoBuf { if (!other.property_.isEmpty()) { if (property_.isEmpty()) { property_ = other.property_; - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000200); } else { ensurePropertyIsMutable(); property_.addAll(other.property_); @@ -7902,13 +8381,16 @@ public final class ProtoBuf { if (!other.enumEntry_.isEmpty()) { if (enumEntry_.isEmpty()) { enumEntry_ = other.enumEntry_; - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000400); } else { ensureEnumEntryIsMutable(); enumEntry_.addAll(other.enumEntry_); } } + if (other.hasTypeTable()) { + mergeTypeTable(other.getTypeTable()); + } this.mergeExtensionFields(other); return this; } @@ -7948,6 +8430,12 @@ public final class ProtoBuf { return false; } } + if (hasTypeTable()) { + if (!getTypeTable().isInitialized()) { + + return false; + } + } if (!extensionsAreInitialized()) { return false; @@ -8359,12 +8847,78 @@ public final class ProtoBuf { return this; } + // repeated int32 supertype_id = 2 [packed = true]; + private java.util.List supertypeId_ = java.util.Collections.emptyList(); + private void ensureSupertypeIdIsMutable() { + if (!((bitField0_ & 0x00000020) == 0x00000020)) { + supertypeId_ = new java.util.ArrayList(supertypeId_); + bitField0_ |= 0x00000020; + } + } + /** + * repeated int32 supertype_id = 2 [packed = true]; + */ + public java.util.List + getSupertypeIdList() { + return java.util.Collections.unmodifiableList(supertypeId_); + } + /** + * repeated int32 supertype_id = 2 [packed = true]; + */ + public int getSupertypeIdCount() { + return supertypeId_.size(); + } + /** + * repeated int32 supertype_id = 2 [packed = true]; + */ + public int getSupertypeId(int index) { + return supertypeId_.get(index); + } + /** + * repeated int32 supertype_id = 2 [packed = true]; + */ + public Builder setSupertypeId( + int index, int value) { + ensureSupertypeIdIsMutable(); + supertypeId_.set(index, value); + + return this; + } + /** + * repeated int32 supertype_id = 2 [packed = true]; + */ + public Builder addSupertypeId(int value) { + ensureSupertypeIdIsMutable(); + supertypeId_.add(value); + + return this; + } + /** + * repeated int32 supertype_id = 2 [packed = true]; + */ + public Builder addAllSupertypeId( + java.lang.Iterable values) { + ensureSupertypeIdIsMutable(); + super.addAll(values, supertypeId_); + + return this; + } + /** + * repeated int32 supertype_id = 2 [packed = true]; + */ + public Builder clearSupertypeId() { + supertypeId_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + + return this; + } + // repeated int32 nested_class_name = 7 [packed = true]; private java.util.List nestedClassName_ = java.util.Collections.emptyList(); private void ensureNestedClassNameIsMutable() { - if (!((bitField0_ & 0x00000020) == 0x00000020)) { + if (!((bitField0_ & 0x00000040) == 0x00000040)) { nestedClassName_ = new java.util.ArrayList(nestedClassName_); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; } } /** @@ -8420,7 +8974,7 @@ public final class ProtoBuf { */ public Builder clearNestedClassName() { nestedClassName_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); return this; } @@ -8429,9 +8983,9 @@ public final class ProtoBuf { private java.util.List constructor_ = java.util.Collections.emptyList(); private void ensureConstructorIsMutable() { - if (!((bitField0_ & 0x00000040) == 0x00000040)) { + if (!((bitField0_ & 0x00000080) == 0x00000080)) { constructor_ = new java.util.ArrayList(constructor_); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000080; } } @@ -8536,7 +9090,7 @@ public final class ProtoBuf { */ public Builder clearConstructor() { constructor_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000080); return this; } @@ -8554,9 +9108,9 @@ public final class ProtoBuf { private java.util.List function_ = java.util.Collections.emptyList(); private void ensureFunctionIsMutable() { - if (!((bitField0_ & 0x00000080) == 0x00000080)) { + if (!((bitField0_ & 0x00000100) == 0x00000100)) { function_ = new java.util.ArrayList(function_); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000100; } } @@ -8661,7 +9215,7 @@ public final class ProtoBuf { */ public Builder clearFunction() { function_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); return this; } @@ -8679,9 +9233,9 @@ public final class ProtoBuf { private java.util.List property_ = java.util.Collections.emptyList(); private void ensurePropertyIsMutable() { - if (!((bitField0_ & 0x00000100) == 0x00000100)) { + if (!((bitField0_ & 0x00000200) == 0x00000200)) { property_ = new java.util.ArrayList(property_); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000200; } } @@ -8786,7 +9340,7 @@ public final class ProtoBuf { */ public Builder clearProperty() { property_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000200); return this; } @@ -8803,9 +9357,9 @@ public final class ProtoBuf { // repeated int32 enum_entry = 12 [packed = true]; private java.util.List enumEntry_ = java.util.Collections.emptyList(); private void ensureEnumEntryIsMutable() { - if (!((bitField0_ & 0x00000200) == 0x00000200)) { + if (!((bitField0_ & 0x00000400) == 0x00000400)) { enumEntry_ = new java.util.ArrayList(enumEntry_); - bitField0_ |= 0x00000200; + bitField0_ |= 0x00000400; } } /** @@ -8861,11 +9415,72 @@ public final class ProtoBuf { */ public Builder clearEnumEntry() { enumEntry_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000400); return this; } + // optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + private org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable typeTable_ = org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable.getDefaultInstance(); + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public boolean hasTypeTable() { + return ((bitField0_ & 0x00000800) == 0x00000800); + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable getTypeTable() { + return typeTable_; + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public Builder setTypeTable(org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable value) { + if (value == null) { + throw new NullPointerException(); + } + typeTable_ = value; + + bitField0_ |= 0x00000800; + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public Builder setTypeTable( + org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable.Builder builderForValue) { + typeTable_ = builderForValue.build(); + + bitField0_ |= 0x00000800; + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public Builder mergeTypeTable(org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable value) { + if (((bitField0_ & 0x00000800) == 0x00000800) && + typeTable_ != org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable.getDefaultInstance()) { + typeTable_ = + org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable.newBuilder(typeTable_).mergeFrom(value).buildPartial(); + } else { + typeTable_ = value; + } + + bitField0_ |= 0x00000800; + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public Builder clearTypeTable() { + typeTable_ = org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable.getDefaultInstance(); + + bitField0_ = (bitField0_ & ~0x00000800); + return this; + } + // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.Class) } @@ -8910,6 +9525,16 @@ public final class ProtoBuf { * repeated .org.jetbrains.kotlin.serialization.Property property = 4; */ int getPropertyCount(); + + // optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + boolean hasTypeTable(); + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable getTypeTable(); } /** * Protobuf type {@code org.jetbrains.kotlin.serialization.Package} @@ -8970,6 +9595,19 @@ public final class ProtoBuf { property_.add(input.readMessage(org.jetbrains.kotlin.serialization.ProtoBuf.Property.PARSER, extensionRegistry)); break; } + case 242: { + org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable.Builder subBuilder = null; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + subBuilder = typeTable_.toBuilder(); + } + typeTable_ = input.readMessage(org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(typeTable_); + typeTable_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000001; + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -9002,6 +9640,7 @@ public final class ProtoBuf { return PARSER; } + private int bitField0_; // repeated .org.jetbrains.kotlin.serialization.Function function = 3; public static final int FUNCTION_FIELD_NUMBER = 3; private java.util.List function_; @@ -9074,9 +9713,26 @@ public final class ProtoBuf { return property_.get(index); } + // optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + public static final int TYPE_TABLE_FIELD_NUMBER = 30; + private org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable typeTable_; + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public boolean hasTypeTable() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable getTypeTable() { + return typeTable_; + } + private void initFields() { function_ = java.util.Collections.emptyList(); property_ = java.util.Collections.emptyList(); + typeTable_ = org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -9095,6 +9751,12 @@ public final class ProtoBuf { return false; } } + if (hasTypeTable()) { + if (!getTypeTable().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } if (!extensionsAreInitialized()) { memoizedIsInitialized = 0; return false; @@ -9115,6 +9777,9 @@ public final class ProtoBuf { for (int i = 0; i < property_.size(); i++) { output.writeMessage(4, property_.get(i)); } + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(30, typeTable_); + } extensionWriter.writeUntil(200, output); } @@ -9132,6 +9797,10 @@ public final class ProtoBuf { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, property_.get(i)); } + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(30, typeTable_); + } size += extensionsSerializedSize(); memoizedSerializedSize = size; return size; @@ -9227,6 +9896,8 @@ public final class ProtoBuf { bitField0_ = (bitField0_ & ~0x00000001); property_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); + typeTable_ = org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable.getDefaultInstance(); + bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -9249,6 +9920,7 @@ public final class ProtoBuf { public org.jetbrains.kotlin.serialization.ProtoBuf.Package buildPartial() { org.jetbrains.kotlin.serialization.ProtoBuf.Package result = new org.jetbrains.kotlin.serialization.ProtoBuf.Package(this); int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { function_ = java.util.Collections.unmodifiableList(function_); bitField0_ = (bitField0_ & ~0x00000001); @@ -9259,6 +9931,11 @@ public final class ProtoBuf { bitField0_ = (bitField0_ & ~0x00000002); } result.property_ = property_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000001; + } + result.typeTable_ = typeTable_; + result.bitField0_ = to_bitField0_; return result; } @@ -9284,6 +9961,9 @@ public final class ProtoBuf { } } + if (other.hasTypeTable()) { + mergeTypeTable(other.getTypeTable()); + } this.mergeExtensionFields(other); return this; } @@ -9301,6 +9981,12 @@ public final class ProtoBuf { return false; } } + if (hasTypeTable()) { + if (!getTypeTable().isInitialized()) { + + return false; + } + } if (!extensionsAreInitialized()) { return false; @@ -9577,6 +10263,67 @@ public final class ProtoBuf { return this; } + // optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + private org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable typeTable_ = org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable.getDefaultInstance(); + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public boolean hasTypeTable() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable getTypeTable() { + return typeTable_; + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public Builder setTypeTable(org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable value) { + if (value == null) { + throw new NullPointerException(); + } + typeTable_ = value; + + bitField0_ |= 0x00000004; + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public Builder setTypeTable( + org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable.Builder builderForValue) { + typeTable_ = builderForValue.build(); + + bitField0_ |= 0x00000004; + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public Builder mergeTypeTable(org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable value) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + typeTable_ != org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable.getDefaultInstance()) { + typeTable_ = + org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable.newBuilder(typeTable_).mergeFrom(value).buildPartial(); + } else { + typeTable_ = value; + } + + bitField0_ |= 0x00000004; + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public Builder clearTypeTable() { + typeTable_ = org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable.getDefaultInstance(); + + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.Package) } @@ -9588,6 +10335,603 @@ public final class ProtoBuf { // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.serialization.Package) } + public interface TypeTableOrBuilder + extends com.google.protobuf.MessageLiteOrBuilder { + + // repeated .org.jetbrains.kotlin.serialization.Type type = 1; + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + java.util.List + getTypeList(); + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + org.jetbrains.kotlin.serialization.ProtoBuf.Type getType(int index); + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + int getTypeCount(); + + // optional int32 first_nullable = 2 [default = -1]; + /** + * optional int32 first_nullable = 2 [default = -1]; + * + *
+     * Index starting from which all types are nullable, or nothing if all types in this table are non-null.
+     * Note that the 'nullable' field of Type messages is ignored and shouldn't be written because it wastes too much space
+     * 
+ */ + boolean hasFirstNullable(); + /** + * optional int32 first_nullable = 2 [default = -1]; + * + *
+     * Index starting from which all types are nullable, or nothing if all types in this table are non-null.
+     * Note that the 'nullable' field of Type messages is ignored and shouldn't be written because it wastes too much space
+     * 
+ */ + int getFirstNullable(); + } + /** + * Protobuf type {@code org.jetbrains.kotlin.serialization.TypeTable} + */ + public static final class TypeTable extends + com.google.protobuf.GeneratedMessageLite + implements TypeTableOrBuilder { + // Use TypeTable.newBuilder() to construct. + private TypeTable(com.google.protobuf.GeneratedMessageLite.Builder builder) { + super(builder); + + } + private TypeTable(boolean noInit) {} + + private static final TypeTable defaultInstance; + public static TypeTable getDefaultInstance() { + return defaultInstance; + } + + public TypeTable getDefaultInstanceForType() { + return defaultInstance; + } + + private TypeTable( + 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 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + type_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + type_.add(input.readMessage(org.jetbrains.kotlin.serialization.ProtoBuf.Type.PARSER, extensionRegistry)); + break; + } + case 16: { + bitField0_ |= 0x00000001; + firstNullable_ = 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 { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + type_ = java.util.Collections.unmodifiableList(type_); + } + makeExtensionsImmutable(); + } + } + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public TypeTable parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TypeTable(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // repeated .org.jetbrains.kotlin.serialization.Type type = 1; + public static final int TYPE_FIELD_NUMBER = 1; + private java.util.List type_; + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + public java.util.List getTypeList() { + return type_; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + public java.util.List + getTypeOrBuilderList() { + return type_; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + public int getTypeCount() { + return type_.size(); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + public org.jetbrains.kotlin.serialization.ProtoBuf.Type getType(int index) { + return type_.get(index); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + public org.jetbrains.kotlin.serialization.ProtoBuf.TypeOrBuilder getTypeOrBuilder( + int index) { + return type_.get(index); + } + + // optional int32 first_nullable = 2 [default = -1]; + public static final int FIRST_NULLABLE_FIELD_NUMBER = 2; + private int firstNullable_; + /** + * optional int32 first_nullable = 2 [default = -1]; + * + *
+     * Index starting from which all types are nullable, or nothing if all types in this table are non-null.
+     * Note that the 'nullable' field of Type messages is ignored and shouldn't be written because it wastes too much space
+     * 
+ */ + public boolean hasFirstNullable() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 first_nullable = 2 [default = -1]; + * + *
+     * Index starting from which all types are nullable, or nothing if all types in this table are non-null.
+     * Note that the 'nullable' field of Type messages is ignored and shouldn't be written because it wastes too much space
+     * 
+ */ + public int getFirstNullable() { + return firstNullable_; + } + + private void initFields() { + type_ = java.util.Collections.emptyList(); + firstNullable_ = -1; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + for (int i = 0; i < getTypeCount(); i++) { + if (!getType(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < type_.size(); i++) { + output.writeMessage(1, type_.get(i)); + } + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt32(2, firstNullable_); + } + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < type_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, type_.get(i)); + } + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, firstNullable_); + } + 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.TypeTable parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable 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.TypeTable parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable 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.TypeTable parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable 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.TypeTable parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable 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.TypeTable parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable 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.TypeTable prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + /** + * Protobuf type {@code org.jetbrains.kotlin.serialization.TypeTable} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageLite.Builder< + org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable, Builder> + implements org.jetbrains.kotlin.serialization.ProtoBuf.TypeTableOrBuilder { + // Construct using org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + type_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + firstNullable_ = -1; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable getDefaultInstanceForType() { + return org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable.getDefaultInstance(); + } + + public org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable build() { + org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable buildPartial() { + org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable result = new org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + type_ = java.util.Collections.unmodifiableList(type_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.type_ = type_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000001; + } + result.firstNullable_ = firstNullable_; + result.bitField0_ = to_bitField0_; + return result; + } + + public Builder mergeFrom(org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable other) { + if (other == org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable.getDefaultInstance()) return this; + if (!other.type_.isEmpty()) { + if (type_.isEmpty()) { + type_ = other.type_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTypeIsMutable(); + type_.addAll(other.type_); + } + + } + if (other.hasFirstNullable()) { + setFirstNullable(other.getFirstNullable()); + } + return this; + } + + public final boolean isInitialized() { + for (int i = 0; i < getTypeCount(); i++) { + if (!getType(i).isInitialized()) { + + 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.TypeTable parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // repeated .org.jetbrains.kotlin.serialization.Type type = 1; + private java.util.List type_ = + java.util.Collections.emptyList(); + private void ensureTypeIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + type_ = new java.util.ArrayList(type_); + bitField0_ |= 0x00000001; + } + } + + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + public java.util.List getTypeList() { + return java.util.Collections.unmodifiableList(type_); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + public int getTypeCount() { + return type_.size(); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + public org.jetbrains.kotlin.serialization.ProtoBuf.Type getType(int index) { + return type_.get(index); + } + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + public Builder setType( + int index, org.jetbrains.kotlin.serialization.ProtoBuf.Type value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypeIsMutable(); + type_.set(index, value); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + public Builder setType( + int index, org.jetbrains.kotlin.serialization.ProtoBuf.Type.Builder builderForValue) { + ensureTypeIsMutable(); + type_.set(index, builderForValue.build()); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + public Builder addType(org.jetbrains.kotlin.serialization.ProtoBuf.Type value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypeIsMutable(); + type_.add(value); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + public Builder addType( + int index, org.jetbrains.kotlin.serialization.ProtoBuf.Type value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypeIsMutable(); + type_.add(index, value); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + public Builder addType( + org.jetbrains.kotlin.serialization.ProtoBuf.Type.Builder builderForValue) { + ensureTypeIsMutable(); + type_.add(builderForValue.build()); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + public Builder addType( + int index, org.jetbrains.kotlin.serialization.ProtoBuf.Type.Builder builderForValue) { + ensureTypeIsMutable(); + type_.add(index, builderForValue.build()); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + public Builder addAllType( + java.lang.Iterable values) { + ensureTypeIsMutable(); + super.addAll(values, type_); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + public Builder clearType() { + type_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.serialization.Type type = 1; + */ + public Builder removeType(int index) { + ensureTypeIsMutable(); + type_.remove(index); + + return this; + } + + // optional int32 first_nullable = 2 [default = -1]; + private int firstNullable_ = -1; + /** + * optional int32 first_nullable = 2 [default = -1]; + * + *
+       * Index starting from which all types are nullable, or nothing if all types in this table are non-null.
+       * Note that the 'nullable' field of Type messages is ignored and shouldn't be written because it wastes too much space
+       * 
+ */ + public boolean hasFirstNullable() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional int32 first_nullable = 2 [default = -1]; + * + *
+       * Index starting from which all types are nullable, or nothing if all types in this table are non-null.
+       * Note that the 'nullable' field of Type messages is ignored and shouldn't be written because it wastes too much space
+       * 
+ */ + public int getFirstNullable() { + return firstNullable_; + } + /** + * optional int32 first_nullable = 2 [default = -1]; + * + *
+       * Index starting from which all types are nullable, or nothing if all types in this table are non-null.
+       * Note that the 'nullable' field of Type messages is ignored and shouldn't be written because it wastes too much space
+       * 
+ */ + public Builder setFirstNullable(int value) { + bitField0_ |= 0x00000002; + firstNullable_ = value; + + return this; + } + /** + * optional int32 first_nullable = 2 [default = -1]; + * + *
+       * Index starting from which all types are nullable, or nothing if all types in this table are non-null.
+       * Note that the 'nullable' field of Type messages is ignored and shouldn't be written because it wastes too much space
+       * 
+ */ + public Builder clearFirstNullable() { + bitField0_ = (bitField0_ & ~0x00000002); + firstNullable_ = -1; + + return this; + } + + // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.TypeTable) + } + + static { + defaultInstance = new TypeTable(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.serialization.TypeTable) + } + public interface ConstructorOrBuilder extends com.google.protobuf.GeneratedMessageLite. ExtendableMessageOrBuilder { @@ -10259,16 +11603,26 @@ public final class ProtoBuf { */ int getName(); - // required .org.jetbrains.kotlin.serialization.Type return_type = 3; + // optional .org.jetbrains.kotlin.serialization.Type return_type = 3; /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ boolean hasReturnType(); /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ org.jetbrains.kotlin.serialization.ProtoBuf.Type getReturnType(); + // optional int32 return_type_id = 7; + /** + * optional int32 return_type_id = 7; + */ + boolean hasReturnTypeId(); + /** + * optional int32 return_type_id = 7; + */ + int getReturnTypeId(); + // repeated .org.jetbrains.kotlin.serialization.TypeParameter type_parameter = 4; /** * repeated .org.jetbrains.kotlin.serialization.TypeParameter type_parameter = 4; @@ -10294,6 +11648,16 @@ public final class ProtoBuf { */ org.jetbrains.kotlin.serialization.ProtoBuf.Type getReceiverType(); + // optional int32 receiver_type_id = 8; + /** + * optional int32 receiver_type_id = 8; + */ + boolean hasReceiverTypeId(); + /** + * optional int32 receiver_type_id = 8; + */ + int getReceiverTypeId(); + // repeated .org.jetbrains.kotlin.serialization.ValueParameter value_parameter = 6; /** * repeated .org.jetbrains.kotlin.serialization.ValueParameter value_parameter = 6; @@ -10308,6 +11672,16 @@ public final class ProtoBuf { * repeated .org.jetbrains.kotlin.serialization.ValueParameter value_parameter = 6; */ int getValueParameterCount(); + + // optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + boolean hasTypeTable(); + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable getTypeTable(); } /** * Protobuf type {@code org.jetbrains.kotlin.serialization.Function} @@ -10376,16 +11750,16 @@ public final class ProtoBuf { break; } case 34: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { typeParameter_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; + mutable_bitField0_ |= 0x00000010; } typeParameter_.add(input.readMessage(org.jetbrains.kotlin.serialization.ProtoBuf.TypeParameter.PARSER, extensionRegistry)); break; } case 42: { org.jetbrains.kotlin.serialization.ProtoBuf.Type.Builder subBuilder = null; - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000010) == 0x00000010)) { subBuilder = receiverType_.toBuilder(); } receiverType_ = input.readMessage(org.jetbrains.kotlin.serialization.ProtoBuf.Type.PARSER, extensionRegistry); @@ -10393,17 +11767,40 @@ public final class ProtoBuf { subBuilder.mergeFrom(receiverType_); receiverType_ = subBuilder.buildPartial(); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; break; } case 50: { - if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) { valueParameter_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000020; + mutable_bitField0_ |= 0x00000080; } valueParameter_.add(input.readMessage(org.jetbrains.kotlin.serialization.ProtoBuf.ValueParameter.PARSER, extensionRegistry)); break; } + case 56: { + bitField0_ |= 0x00000008; + returnTypeId_ = input.readInt32(); + break; + } + case 64: { + bitField0_ |= 0x00000020; + receiverTypeId_ = input.readInt32(); + break; + } + case 242: { + org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable.Builder subBuilder = null; + if (((bitField0_ & 0x00000040) == 0x00000040)) { + subBuilder = typeTable_.toBuilder(); + } + typeTable_ = input.readMessage(org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(typeTable_); + typeTable_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000040; + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -10412,10 +11809,10 @@ public final class ProtoBuf { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { typeParameter_ = java.util.Collections.unmodifiableList(typeParameter_); } - if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + if (((mutable_bitField0_ & 0x00000080) == 0x00000080)) { valueParameter_ = java.util.Collections.unmodifiableList(valueParameter_); } makeExtensionsImmutable(); @@ -10489,22 +11886,38 @@ public final class ProtoBuf { return name_; } - // required .org.jetbrains.kotlin.serialization.Type return_type = 3; + // optional .org.jetbrains.kotlin.serialization.Type return_type = 3; public static final int RETURN_TYPE_FIELD_NUMBER = 3; private org.jetbrains.kotlin.serialization.ProtoBuf.Type returnType_; /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ public boolean hasReturnType() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ public org.jetbrains.kotlin.serialization.ProtoBuf.Type getReturnType() { return returnType_; } + // optional int32 return_type_id = 7; + public static final int RETURN_TYPE_ID_FIELD_NUMBER = 7; + private int returnTypeId_; + /** + * optional int32 return_type_id = 7; + */ + public boolean hasReturnTypeId() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional int32 return_type_id = 7; + */ + public int getReturnTypeId() { + return returnTypeId_; + } + // repeated .org.jetbrains.kotlin.serialization.TypeParameter type_parameter = 4; public static final int TYPE_PARAMETER_FIELD_NUMBER = 4; private java.util.List typeParameter_; @@ -10548,7 +11961,7 @@ public final class ProtoBuf { * optional .org.jetbrains.kotlin.serialization.Type receiver_type = 5; */ public boolean hasReceiverType() { - return ((bitField0_ & 0x00000008) == 0x00000008); + return ((bitField0_ & 0x00000010) == 0x00000010); } /** * optional .org.jetbrains.kotlin.serialization.Type receiver_type = 5; @@ -10557,6 +11970,22 @@ public final class ProtoBuf { return receiverType_; } + // optional int32 receiver_type_id = 8; + public static final int RECEIVER_TYPE_ID_FIELD_NUMBER = 8; + private int receiverTypeId_; + /** + * optional int32 receiver_type_id = 8; + */ + public boolean hasReceiverTypeId() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional int32 receiver_type_id = 8; + */ + public int getReceiverTypeId() { + return receiverTypeId_; + } + // repeated .org.jetbrains.kotlin.serialization.ValueParameter value_parameter = 6; public static final int VALUE_PARAMETER_FIELD_NUMBER = 6; private java.util.List valueParameter_; @@ -10593,13 +12022,32 @@ public final class ProtoBuf { return valueParameter_.get(index); } + // optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + public static final int TYPE_TABLE_FIELD_NUMBER = 30; + private org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable typeTable_; + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public boolean hasTypeTable() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable getTypeTable() { + return typeTable_; + } + private void initFields() { flags_ = 6; name_ = 0; returnType_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance(); + returnTypeId_ = 0; typeParameter_ = java.util.Collections.emptyList(); receiverType_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance(); + receiverTypeId_ = 0; valueParameter_ = java.util.Collections.emptyList(); + typeTable_ = org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable.getDefaultInstance(); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -10610,13 +12058,11 @@ public final class ProtoBuf { memoizedIsInitialized = 0; return false; } - if (!hasReturnType()) { - memoizedIsInitialized = 0; - return false; - } - if (!getReturnType().isInitialized()) { - memoizedIsInitialized = 0; - return false; + if (hasReturnType()) { + if (!getReturnType().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } } for (int i = 0; i < getTypeParameterCount(); i++) { if (!getTypeParameter(i).isInitialized()) { @@ -10636,6 +12082,12 @@ public final class ProtoBuf { return false; } } + if (hasTypeTable()) { + if (!getTypeTable().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } if (!extensionsAreInitialized()) { memoizedIsInitialized = 0; return false; @@ -10662,12 +12114,21 @@ public final class ProtoBuf { for (int i = 0; i < typeParameter_.size(); i++) { output.writeMessage(4, typeParameter_.get(i)); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeMessage(5, receiverType_); } for (int i = 0; i < valueParameter_.size(); i++) { output.writeMessage(6, valueParameter_.get(i)); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeInt32(7, returnTypeId_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeInt32(8, receiverTypeId_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + output.writeMessage(30, typeTable_); + } extensionWriter.writeUntil(200, output); } @@ -10693,7 +12154,7 @@ public final class ProtoBuf { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, typeParameter_.get(i)); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, receiverType_); } @@ -10701,6 +12162,18 @@ public final class ProtoBuf { size += com.google.protobuf.CodedOutputStream .computeMessageSize(6, valueParameter_.get(i)); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(7, returnTypeId_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(8, receiverTypeId_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(30, typeTable_); + } size += extensionsSerializedSize(); memoizedSerializedSize = size; return size; @@ -10798,12 +12271,18 @@ public final class ProtoBuf { bitField0_ = (bitField0_ & ~0x00000002); returnType_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance(); bitField0_ = (bitField0_ & ~0x00000004); - typeParameter_ = java.util.Collections.emptyList(); + returnTypeId_ = 0; bitField0_ = (bitField0_ & ~0x00000008); - receiverType_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance(); + typeParameter_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000010); - valueParameter_ = java.util.Collections.emptyList(); + receiverType_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance(); bitField0_ = (bitField0_ & ~0x00000020); + receiverTypeId_ = 0; + bitField0_ = (bitField0_ & ~0x00000040); + valueParameter_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + typeTable_ = org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable.getDefaultInstance(); + bitField0_ = (bitField0_ & ~0x00000100); return this; } @@ -10839,20 +12318,32 @@ public final class ProtoBuf { to_bitField0_ |= 0x00000004; } result.returnType_ = returnType_; - if (((bitField0_ & 0x00000008) == 0x00000008)) { - typeParameter_ = java.util.Collections.unmodifiableList(typeParameter_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.typeParameter_ = typeParameter_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } + result.returnTypeId_ = returnTypeId_; + if (((bitField0_ & 0x00000010) == 0x00000010)) { + typeParameter_ = java.util.Collections.unmodifiableList(typeParameter_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.typeParameter_ = typeParameter_; + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000010; + } result.receiverType_ = receiverType_; - if (((bitField0_ & 0x00000020) == 0x00000020)) { + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000020; + } + result.receiverTypeId_ = receiverTypeId_; + if (((bitField0_ & 0x00000080) == 0x00000080)) { valueParameter_ = java.util.Collections.unmodifiableList(valueParameter_); - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000080); } result.valueParameter_ = valueParameter_; + if (((from_bitField0_ & 0x00000100) == 0x00000100)) { + to_bitField0_ |= 0x00000040; + } + result.typeTable_ = typeTable_; result.bitField0_ = to_bitField0_; return result; } @@ -10868,10 +12359,13 @@ public final class ProtoBuf { if (other.hasReturnType()) { mergeReturnType(other.getReturnType()); } + if (other.hasReturnTypeId()) { + setReturnTypeId(other.getReturnTypeId()); + } if (!other.typeParameter_.isEmpty()) { if (typeParameter_.isEmpty()) { typeParameter_ = other.typeParameter_; - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); } else { ensureTypeParameterIsMutable(); typeParameter_.addAll(other.typeParameter_); @@ -10881,16 +12375,22 @@ public final class ProtoBuf { if (other.hasReceiverType()) { mergeReceiverType(other.getReceiverType()); } + if (other.hasReceiverTypeId()) { + setReceiverTypeId(other.getReceiverTypeId()); + } if (!other.valueParameter_.isEmpty()) { if (valueParameter_.isEmpty()) { valueParameter_ = other.valueParameter_; - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000080); } else { ensureValueParameterIsMutable(); valueParameter_.addAll(other.valueParameter_); } } + if (other.hasTypeTable()) { + mergeTypeTable(other.getTypeTable()); + } this.mergeExtensionFields(other); return this; } @@ -10900,13 +12400,11 @@ public final class ProtoBuf { return false; } - if (!hasReturnType()) { - - return false; - } - if (!getReturnType().isInitialized()) { - - return false; + if (hasReturnType()) { + if (!getReturnType().isInitialized()) { + + return false; + } } for (int i = 0; i < getTypeParameterCount(); i++) { if (!getTypeParameter(i).isInitialized()) { @@ -10926,6 +12424,12 @@ public final class ProtoBuf { return false; } } + if (hasTypeTable()) { + if (!getTypeTable().isInitialized()) { + + return false; + } + } if (!extensionsAreInitialized()) { return false; @@ -11058,22 +12562,22 @@ public final class ProtoBuf { return this; } - // required .org.jetbrains.kotlin.serialization.Type return_type = 3; + // optional .org.jetbrains.kotlin.serialization.Type return_type = 3; private org.jetbrains.kotlin.serialization.ProtoBuf.Type returnType_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance(); /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ public boolean hasReturnType() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ public org.jetbrains.kotlin.serialization.ProtoBuf.Type getReturnType() { return returnType_; } /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ public Builder setReturnType(org.jetbrains.kotlin.serialization.ProtoBuf.Type value) { if (value == null) { @@ -11085,7 +12589,7 @@ public final class ProtoBuf { return this; } /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ public Builder setReturnType( org.jetbrains.kotlin.serialization.ProtoBuf.Type.Builder builderForValue) { @@ -11095,7 +12599,7 @@ public final class ProtoBuf { return this; } /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ public Builder mergeReturnType(org.jetbrains.kotlin.serialization.ProtoBuf.Type value) { if (((bitField0_ & 0x00000004) == 0x00000004) && @@ -11110,7 +12614,7 @@ public final class ProtoBuf { return this; } /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ public Builder clearReturnType() { returnType_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance(); @@ -11119,13 +12623,46 @@ public final class ProtoBuf { return this; } + // optional int32 return_type_id = 7; + private int returnTypeId_ ; + /** + * optional int32 return_type_id = 7; + */ + public boolean hasReturnTypeId() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional int32 return_type_id = 7; + */ + public int getReturnTypeId() { + return returnTypeId_; + } + /** + * optional int32 return_type_id = 7; + */ + public Builder setReturnTypeId(int value) { + bitField0_ |= 0x00000008; + returnTypeId_ = value; + + return this; + } + /** + * optional int32 return_type_id = 7; + */ + public Builder clearReturnTypeId() { + bitField0_ = (bitField0_ & ~0x00000008); + returnTypeId_ = 0; + + return this; + } + // repeated .org.jetbrains.kotlin.serialization.TypeParameter type_parameter = 4; private java.util.List typeParameter_ = java.util.Collections.emptyList(); private void ensureTypeParameterIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { + if (!((bitField0_ & 0x00000010) == 0x00000010)) { typeParameter_ = new java.util.ArrayList(typeParameter_); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; } } @@ -11230,7 +12767,7 @@ public final class ProtoBuf { */ public Builder clearTypeParameter() { typeParameter_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); return this; } @@ -11250,7 +12787,7 @@ public final class ProtoBuf { * optional .org.jetbrains.kotlin.serialization.Type receiver_type = 5; */ public boolean hasReceiverType() { - return ((bitField0_ & 0x00000010) == 0x00000010); + return ((bitField0_ & 0x00000020) == 0x00000020); } /** * optional .org.jetbrains.kotlin.serialization.Type receiver_type = 5; @@ -11267,7 +12804,7 @@ public final class ProtoBuf { } receiverType_ = value; - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; return this; } /** @@ -11277,14 +12814,14 @@ public final class ProtoBuf { org.jetbrains.kotlin.serialization.ProtoBuf.Type.Builder builderForValue) { receiverType_ = builderForValue.build(); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; return this; } /** * optional .org.jetbrains.kotlin.serialization.Type receiver_type = 5; */ public Builder mergeReceiverType(org.jetbrains.kotlin.serialization.ProtoBuf.Type value) { - if (((bitField0_ & 0x00000010) == 0x00000010) && + if (((bitField0_ & 0x00000020) == 0x00000020) && receiverType_ != org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance()) { receiverType_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.newBuilder(receiverType_).mergeFrom(value).buildPartial(); @@ -11292,7 +12829,7 @@ public final class ProtoBuf { receiverType_ = value; } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; return this; } /** @@ -11301,7 +12838,40 @@ public final class ProtoBuf { public Builder clearReceiverType() { receiverType_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance(); - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); + return this; + } + + // optional int32 receiver_type_id = 8; + private int receiverTypeId_ ; + /** + * optional int32 receiver_type_id = 8; + */ + public boolean hasReceiverTypeId() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional int32 receiver_type_id = 8; + */ + public int getReceiverTypeId() { + return receiverTypeId_; + } + /** + * optional int32 receiver_type_id = 8; + */ + public Builder setReceiverTypeId(int value) { + bitField0_ |= 0x00000040; + receiverTypeId_ = value; + + return this; + } + /** + * optional int32 receiver_type_id = 8; + */ + public Builder clearReceiverTypeId() { + bitField0_ = (bitField0_ & ~0x00000040); + receiverTypeId_ = 0; + return this; } @@ -11309,9 +12879,9 @@ public final class ProtoBuf { private java.util.List valueParameter_ = java.util.Collections.emptyList(); private void ensureValueParameterIsMutable() { - if (!((bitField0_ & 0x00000020) == 0x00000020)) { + if (!((bitField0_ & 0x00000080) == 0x00000080)) { valueParameter_ = new java.util.ArrayList(valueParameter_); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000080; } } @@ -11416,7 +12986,7 @@ public final class ProtoBuf { */ public Builder clearValueParameter() { valueParameter_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000080); return this; } @@ -11430,6 +13000,67 @@ public final class ProtoBuf { return this; } + // optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + private org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable typeTable_ = org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable.getDefaultInstance(); + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public boolean hasTypeTable() { + return ((bitField0_ & 0x00000100) == 0x00000100); + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable getTypeTable() { + return typeTable_; + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public Builder setTypeTable(org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable value) { + if (value == null) { + throw new NullPointerException(); + } + typeTable_ = value; + + bitField0_ |= 0x00000100; + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public Builder setTypeTable( + org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable.Builder builderForValue) { + typeTable_ = builderForValue.build(); + + bitField0_ |= 0x00000100; + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public Builder mergeTypeTable(org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable value) { + if (((bitField0_ & 0x00000100) == 0x00000100) && + typeTable_ != org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable.getDefaultInstance()) { + typeTable_ = + org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable.newBuilder(typeTable_).mergeFrom(value).buildPartial(); + } else { + typeTable_ = value; + } + + bitField0_ |= 0x00000100; + return this; + } + /** + * optional .org.jetbrains.kotlin.serialization.TypeTable type_table = 30; + */ + public Builder clearTypeTable() { + typeTable_ = org.jetbrains.kotlin.serialization.ProtoBuf.TypeTable.getDefaultInstance(); + + bitField0_ = (bitField0_ & ~0x00000100); + return this; + } + // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.Function) } @@ -11493,16 +13124,26 @@ public final class ProtoBuf { */ int getName(); - // required .org.jetbrains.kotlin.serialization.Type return_type = 3; + // optional .org.jetbrains.kotlin.serialization.Type return_type = 3; /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ boolean hasReturnType(); /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ org.jetbrains.kotlin.serialization.ProtoBuf.Type getReturnType(); + // optional int32 return_type_id = 9; + /** + * optional int32 return_type_id = 9; + */ + boolean hasReturnTypeId(); + /** + * optional int32 return_type_id = 9; + */ + int getReturnTypeId(); + // repeated .org.jetbrains.kotlin.serialization.TypeParameter type_parameter = 4; /** * repeated .org.jetbrains.kotlin.serialization.TypeParameter type_parameter = 4; @@ -11528,6 +13169,16 @@ public final class ProtoBuf { */ org.jetbrains.kotlin.serialization.ProtoBuf.Type getReceiverType(); + // optional int32 receiver_type_id = 10; + /** + * optional int32 receiver_type_id = 10; + */ + boolean hasReceiverTypeId(); + /** + * optional int32 receiver_type_id = 10; + */ + int getReceiverTypeId(); + // optional .org.jetbrains.kotlin.serialization.ValueParameter setter_value_parameter = 6; /** * optional .org.jetbrains.kotlin.serialization.ValueParameter setter_value_parameter = 6; @@ -11641,16 +13292,16 @@ public final class ProtoBuf { break; } case 34: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { typeParameter_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; + mutable_bitField0_ |= 0x00000010; } typeParameter_.add(input.readMessage(org.jetbrains.kotlin.serialization.ProtoBuf.TypeParameter.PARSER, extensionRegistry)); break; } case 42: { org.jetbrains.kotlin.serialization.ProtoBuf.Type.Builder subBuilder = null; - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000010) == 0x00000010)) { subBuilder = receiverType_.toBuilder(); } receiverType_ = input.readMessage(org.jetbrains.kotlin.serialization.ProtoBuf.Type.PARSER, extensionRegistry); @@ -11658,12 +13309,12 @@ public final class ProtoBuf { subBuilder.mergeFrom(receiverType_); receiverType_ = subBuilder.buildPartial(); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; break; } case 50: { org.jetbrains.kotlin.serialization.ProtoBuf.ValueParameter.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (((bitField0_ & 0x00000040) == 0x00000040)) { subBuilder = setterValueParameter_.toBuilder(); } setterValueParameter_ = input.readMessage(org.jetbrains.kotlin.serialization.ProtoBuf.ValueParameter.PARSER, extensionRegistry); @@ -11671,19 +13322,29 @@ public final class ProtoBuf { subBuilder.mergeFrom(setterValueParameter_); setterValueParameter_ = subBuilder.buildPartial(); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000040; break; } case 56: { - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000080; getterFlags_ = input.readInt32(); break; } case 64: { - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000100; setterFlags_ = input.readInt32(); break; } + case 72: { + bitField0_ |= 0x00000008; + returnTypeId_ = input.readInt32(); + break; + } + case 80: { + bitField0_ |= 0x00000020; + receiverTypeId_ = input.readInt32(); + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -11692,7 +13353,7 @@ public final class ProtoBuf { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { typeParameter_ = java.util.Collections.unmodifiableList(typeParameter_); } makeExtensionsImmutable(); @@ -11774,22 +13435,38 @@ public final class ProtoBuf { return name_; } - // required .org.jetbrains.kotlin.serialization.Type return_type = 3; + // optional .org.jetbrains.kotlin.serialization.Type return_type = 3; public static final int RETURN_TYPE_FIELD_NUMBER = 3; private org.jetbrains.kotlin.serialization.ProtoBuf.Type returnType_; /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ public boolean hasReturnType() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ public org.jetbrains.kotlin.serialization.ProtoBuf.Type getReturnType() { return returnType_; } + // optional int32 return_type_id = 9; + public static final int RETURN_TYPE_ID_FIELD_NUMBER = 9; + private int returnTypeId_; + /** + * optional int32 return_type_id = 9; + */ + public boolean hasReturnTypeId() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional int32 return_type_id = 9; + */ + public int getReturnTypeId() { + return returnTypeId_; + } + // repeated .org.jetbrains.kotlin.serialization.TypeParameter type_parameter = 4; public static final int TYPE_PARAMETER_FIELD_NUMBER = 4; private java.util.List typeParameter_; @@ -11833,7 +13510,7 @@ public final class ProtoBuf { * optional .org.jetbrains.kotlin.serialization.Type receiver_type = 5; */ public boolean hasReceiverType() { - return ((bitField0_ & 0x00000008) == 0x00000008); + return ((bitField0_ & 0x00000010) == 0x00000010); } /** * optional .org.jetbrains.kotlin.serialization.Type receiver_type = 5; @@ -11842,6 +13519,22 @@ public final class ProtoBuf { return receiverType_; } + // optional int32 receiver_type_id = 10; + public static final int RECEIVER_TYPE_ID_FIELD_NUMBER = 10; + private int receiverTypeId_; + /** + * optional int32 receiver_type_id = 10; + */ + public boolean hasReceiverTypeId() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional int32 receiver_type_id = 10; + */ + public int getReceiverTypeId() { + return receiverTypeId_; + } + // optional .org.jetbrains.kotlin.serialization.ValueParameter setter_value_parameter = 6; public static final int SETTER_VALUE_PARAMETER_FIELD_NUMBER = 6; private org.jetbrains.kotlin.serialization.ProtoBuf.ValueParameter setterValueParameter_; @@ -11849,7 +13542,7 @@ public final class ProtoBuf { * optional .org.jetbrains.kotlin.serialization.ValueParameter setter_value_parameter = 6; */ public boolean hasSetterValueParameter() { - return ((bitField0_ & 0x00000010) == 0x00000010); + return ((bitField0_ & 0x00000040) == 0x00000040); } /** * optional .org.jetbrains.kotlin.serialization.ValueParameter setter_value_parameter = 6; @@ -11873,7 +13566,7 @@ public final class ProtoBuf { * */ public boolean hasGetterFlags() { - return ((bitField0_ & 0x00000020) == 0x00000020); + return ((bitField0_ & 0x00000080) == 0x00000080); } /** * optional int32 getter_flags = 7; @@ -11897,7 +13590,7 @@ public final class ProtoBuf { * optional int32 setter_flags = 8; */ public boolean hasSetterFlags() { - return ((bitField0_ & 0x00000040) == 0x00000040); + return ((bitField0_ & 0x00000100) == 0x00000100); } /** * optional int32 setter_flags = 8; @@ -11910,8 +13603,10 @@ public final class ProtoBuf { flags_ = 262; name_ = 0; returnType_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance(); + returnTypeId_ = 0; typeParameter_ = java.util.Collections.emptyList(); receiverType_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance(); + receiverTypeId_ = 0; setterValueParameter_ = org.jetbrains.kotlin.serialization.ProtoBuf.ValueParameter.getDefaultInstance(); getterFlags_ = 0; setterFlags_ = 0; @@ -11925,13 +13620,11 @@ public final class ProtoBuf { memoizedIsInitialized = 0; return false; } - if (!hasReturnType()) { - memoizedIsInitialized = 0; - return false; - } - if (!getReturnType().isInitialized()) { - memoizedIsInitialized = 0; - return false; + if (hasReturnType()) { + if (!getReturnType().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } } for (int i = 0; i < getTypeParameterCount(); i++) { if (!getTypeParameter(i).isInitialized()) { @@ -11977,18 +13670,24 @@ public final class ProtoBuf { for (int i = 0; i < typeParameter_.size(); i++) { output.writeMessage(4, typeParameter_.get(i)); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeMessage(5, receiverType_); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (((bitField0_ & 0x00000040) == 0x00000040)) { output.writeMessage(6, setterValueParameter_); } - if (((bitField0_ & 0x00000020) == 0x00000020)) { + if (((bitField0_ & 0x00000080) == 0x00000080)) { output.writeInt32(7, getterFlags_); } - if (((bitField0_ & 0x00000040) == 0x00000040)) { + if (((bitField0_ & 0x00000100) == 0x00000100)) { output.writeInt32(8, setterFlags_); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeInt32(9, returnTypeId_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeInt32(10, receiverTypeId_); + } extensionWriter.writeUntil(200, output); } @@ -12014,22 +13713,30 @@ public final class ProtoBuf { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, typeParameter_.get(i)); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, receiverType_); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (((bitField0_ & 0x00000040) == 0x00000040)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(6, setterValueParameter_); } - if (((bitField0_ & 0x00000020) == 0x00000020)) { + if (((bitField0_ & 0x00000080) == 0x00000080)) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(7, getterFlags_); } - if (((bitField0_ & 0x00000040) == 0x00000040)) { + if (((bitField0_ & 0x00000100) == 0x00000100)) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(8, setterFlags_); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(9, returnTypeId_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(10, receiverTypeId_); + } size += extensionsSerializedSize(); memoizedSerializedSize = size; return size; @@ -12127,16 +13834,20 @@ public final class ProtoBuf { bitField0_ = (bitField0_ & ~0x00000002); returnType_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance(); bitField0_ = (bitField0_ & ~0x00000004); - typeParameter_ = java.util.Collections.emptyList(); + returnTypeId_ = 0; bitField0_ = (bitField0_ & ~0x00000008); - receiverType_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance(); + typeParameter_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000010); - setterValueParameter_ = org.jetbrains.kotlin.serialization.ProtoBuf.ValueParameter.getDefaultInstance(); + receiverType_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance(); bitField0_ = (bitField0_ & ~0x00000020); - getterFlags_ = 0; + receiverTypeId_ = 0; bitField0_ = (bitField0_ & ~0x00000040); - setterFlags_ = 0; + setterValueParameter_ = org.jetbrains.kotlin.serialization.ProtoBuf.ValueParameter.getDefaultInstance(); bitField0_ = (bitField0_ & ~0x00000080); + getterFlags_ = 0; + bitField0_ = (bitField0_ & ~0x00000100); + setterFlags_ = 0; + bitField0_ = (bitField0_ & ~0x00000200); return this; } @@ -12172,26 +13883,34 @@ public final class ProtoBuf { to_bitField0_ |= 0x00000004; } result.returnType_ = returnType_; - if (((bitField0_ & 0x00000008) == 0x00000008)) { - typeParameter_ = java.util.Collections.unmodifiableList(typeParameter_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.typeParameter_ = typeParameter_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } - result.receiverType_ = receiverType_; + result.returnTypeId_ = returnTypeId_; + if (((bitField0_ & 0x00000010) == 0x00000010)) { + typeParameter_ = java.util.Collections.unmodifiableList(typeParameter_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.typeParameter_ = typeParameter_; if (((from_bitField0_ & 0x00000020) == 0x00000020)) { to_bitField0_ |= 0x00000010; } - result.setterValueParameter_ = setterValueParameter_; + result.receiverType_ = receiverType_; if (((from_bitField0_ & 0x00000040) == 0x00000040)) { to_bitField0_ |= 0x00000020; } - result.getterFlags_ = getterFlags_; + result.receiverTypeId_ = receiverTypeId_; if (((from_bitField0_ & 0x00000080) == 0x00000080)) { to_bitField0_ |= 0x00000040; } + result.setterValueParameter_ = setterValueParameter_; + if (((from_bitField0_ & 0x00000100) == 0x00000100)) { + to_bitField0_ |= 0x00000080; + } + result.getterFlags_ = getterFlags_; + if (((from_bitField0_ & 0x00000200) == 0x00000200)) { + to_bitField0_ |= 0x00000100; + } result.setterFlags_ = setterFlags_; result.bitField0_ = to_bitField0_; return result; @@ -12208,10 +13927,13 @@ public final class ProtoBuf { if (other.hasReturnType()) { mergeReturnType(other.getReturnType()); } + if (other.hasReturnTypeId()) { + setReturnTypeId(other.getReturnTypeId()); + } if (!other.typeParameter_.isEmpty()) { if (typeParameter_.isEmpty()) { typeParameter_ = other.typeParameter_; - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); } else { ensureTypeParameterIsMutable(); typeParameter_.addAll(other.typeParameter_); @@ -12221,6 +13943,9 @@ public final class ProtoBuf { if (other.hasReceiverType()) { mergeReceiverType(other.getReceiverType()); } + if (other.hasReceiverTypeId()) { + setReceiverTypeId(other.getReceiverTypeId()); + } if (other.hasSetterValueParameter()) { mergeSetterValueParameter(other.getSetterValueParameter()); } @@ -12239,13 +13964,11 @@ public final class ProtoBuf { return false; } - if (!hasReturnType()) { - - return false; - } - if (!getReturnType().isInitialized()) { - - return false; + if (hasReturnType()) { + if (!getReturnType().isInitialized()) { + + return false; + } } for (int i = 0; i < getTypeParameterCount(); i++) { if (!getTypeParameter(i).isInitialized()) { @@ -12413,22 +14136,22 @@ public final class ProtoBuf { return this; } - // required .org.jetbrains.kotlin.serialization.Type return_type = 3; + // optional .org.jetbrains.kotlin.serialization.Type return_type = 3; private org.jetbrains.kotlin.serialization.ProtoBuf.Type returnType_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance(); /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ public boolean hasReturnType() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ public org.jetbrains.kotlin.serialization.ProtoBuf.Type getReturnType() { return returnType_; } /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ public Builder setReturnType(org.jetbrains.kotlin.serialization.ProtoBuf.Type value) { if (value == null) { @@ -12440,7 +14163,7 @@ public final class ProtoBuf { return this; } /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ public Builder setReturnType( org.jetbrains.kotlin.serialization.ProtoBuf.Type.Builder builderForValue) { @@ -12450,7 +14173,7 @@ public final class ProtoBuf { return this; } /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ public Builder mergeReturnType(org.jetbrains.kotlin.serialization.ProtoBuf.Type value) { if (((bitField0_ & 0x00000004) == 0x00000004) && @@ -12465,7 +14188,7 @@ public final class ProtoBuf { return this; } /** - * required .org.jetbrains.kotlin.serialization.Type return_type = 3; + * optional .org.jetbrains.kotlin.serialization.Type return_type = 3; */ public Builder clearReturnType() { returnType_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance(); @@ -12474,13 +14197,46 @@ public final class ProtoBuf { return this; } + // optional int32 return_type_id = 9; + private int returnTypeId_ ; + /** + * optional int32 return_type_id = 9; + */ + public boolean hasReturnTypeId() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional int32 return_type_id = 9; + */ + public int getReturnTypeId() { + return returnTypeId_; + } + /** + * optional int32 return_type_id = 9; + */ + public Builder setReturnTypeId(int value) { + bitField0_ |= 0x00000008; + returnTypeId_ = value; + + return this; + } + /** + * optional int32 return_type_id = 9; + */ + public Builder clearReturnTypeId() { + bitField0_ = (bitField0_ & ~0x00000008); + returnTypeId_ = 0; + + return this; + } + // repeated .org.jetbrains.kotlin.serialization.TypeParameter type_parameter = 4; private java.util.List typeParameter_ = java.util.Collections.emptyList(); private void ensureTypeParameterIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { + if (!((bitField0_ & 0x00000010) == 0x00000010)) { typeParameter_ = new java.util.ArrayList(typeParameter_); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; } } @@ -12585,7 +14341,7 @@ public final class ProtoBuf { */ public Builder clearTypeParameter() { typeParameter_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); return this; } @@ -12605,7 +14361,7 @@ public final class ProtoBuf { * optional .org.jetbrains.kotlin.serialization.Type receiver_type = 5; */ public boolean hasReceiverType() { - return ((bitField0_ & 0x00000010) == 0x00000010); + return ((bitField0_ & 0x00000020) == 0x00000020); } /** * optional .org.jetbrains.kotlin.serialization.Type receiver_type = 5; @@ -12622,7 +14378,7 @@ public final class ProtoBuf { } receiverType_ = value; - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; return this; } /** @@ -12632,14 +14388,14 @@ public final class ProtoBuf { org.jetbrains.kotlin.serialization.ProtoBuf.Type.Builder builderForValue) { receiverType_ = builderForValue.build(); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; return this; } /** * optional .org.jetbrains.kotlin.serialization.Type receiver_type = 5; */ public Builder mergeReceiverType(org.jetbrains.kotlin.serialization.ProtoBuf.Type value) { - if (((bitField0_ & 0x00000010) == 0x00000010) && + if (((bitField0_ & 0x00000020) == 0x00000020) && receiverType_ != org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance()) { receiverType_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.newBuilder(receiverType_).mergeFrom(value).buildPartial(); @@ -12647,7 +14403,7 @@ public final class ProtoBuf { receiverType_ = value; } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; return this; } /** @@ -12656,7 +14412,40 @@ public final class ProtoBuf { public Builder clearReceiverType() { receiverType_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance(); - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); + return this; + } + + // optional int32 receiver_type_id = 10; + private int receiverTypeId_ ; + /** + * optional int32 receiver_type_id = 10; + */ + public boolean hasReceiverTypeId() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional int32 receiver_type_id = 10; + */ + public int getReceiverTypeId() { + return receiverTypeId_; + } + /** + * optional int32 receiver_type_id = 10; + */ + public Builder setReceiverTypeId(int value) { + bitField0_ |= 0x00000040; + receiverTypeId_ = value; + + return this; + } + /** + * optional int32 receiver_type_id = 10; + */ + public Builder clearReceiverTypeId() { + bitField0_ = (bitField0_ & ~0x00000040); + receiverTypeId_ = 0; + return this; } @@ -12666,7 +14455,7 @@ public final class ProtoBuf { * optional .org.jetbrains.kotlin.serialization.ValueParameter setter_value_parameter = 6; */ public boolean hasSetterValueParameter() { - return ((bitField0_ & 0x00000020) == 0x00000020); + return ((bitField0_ & 0x00000080) == 0x00000080); } /** * optional .org.jetbrains.kotlin.serialization.ValueParameter setter_value_parameter = 6; @@ -12683,7 +14472,7 @@ public final class ProtoBuf { } setterValueParameter_ = value; - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000080; return this; } /** @@ -12693,14 +14482,14 @@ public final class ProtoBuf { org.jetbrains.kotlin.serialization.ProtoBuf.ValueParameter.Builder builderForValue) { setterValueParameter_ = builderForValue.build(); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000080; return this; } /** * optional .org.jetbrains.kotlin.serialization.ValueParameter setter_value_parameter = 6; */ public Builder mergeSetterValueParameter(org.jetbrains.kotlin.serialization.ProtoBuf.ValueParameter value) { - if (((bitField0_ & 0x00000020) == 0x00000020) && + if (((bitField0_ & 0x00000080) == 0x00000080) && setterValueParameter_ != org.jetbrains.kotlin.serialization.ProtoBuf.ValueParameter.getDefaultInstance()) { setterValueParameter_ = org.jetbrains.kotlin.serialization.ProtoBuf.ValueParameter.newBuilder(setterValueParameter_).mergeFrom(value).buildPartial(); @@ -12708,7 +14497,7 @@ public final class ProtoBuf { setterValueParameter_ = value; } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000080; return this; } /** @@ -12717,7 +14506,7 @@ public final class ProtoBuf { public Builder clearSetterValueParameter() { setterValueParameter_ = org.jetbrains.kotlin.serialization.ProtoBuf.ValueParameter.getDefaultInstance(); - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000080); return this; } @@ -12735,7 +14524,7 @@ public final class ProtoBuf { * */ public boolean hasGetterFlags() { - return ((bitField0_ & 0x00000040) == 0x00000040); + return ((bitField0_ & 0x00000100) == 0x00000100); } /** * optional int32 getter_flags = 7; @@ -12763,7 +14552,7 @@ public final class ProtoBuf { * */ public Builder setGetterFlags(int value) { - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000100; getterFlags_ = value; return this; @@ -12780,7 +14569,7 @@ public final class ProtoBuf { * */ public Builder clearGetterFlags() { - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000100); getterFlags_ = 0; return this; @@ -12792,7 +14581,7 @@ public final class ProtoBuf { * optional int32 setter_flags = 8; */ public boolean hasSetterFlags() { - return ((bitField0_ & 0x00000080) == 0x00000080); + return ((bitField0_ & 0x00000200) == 0x00000200); } /** * optional int32 setter_flags = 8; @@ -12804,7 +14593,7 @@ public final class ProtoBuf { * optional int32 setter_flags = 8; */ public Builder setSetterFlags(int value) { - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000200; setterFlags_ = value; return this; @@ -12813,7 +14602,7 @@ public final class ProtoBuf { * optional int32 setter_flags = 8; */ public Builder clearSetterFlags() { - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000200); setterFlags_ = 0; return this; @@ -12866,16 +14655,26 @@ public final class ProtoBuf { */ int getName(); - // required .org.jetbrains.kotlin.serialization.Type type = 3; + // optional .org.jetbrains.kotlin.serialization.Type type = 3; /** - * required .org.jetbrains.kotlin.serialization.Type type = 3; + * optional .org.jetbrains.kotlin.serialization.Type type = 3; */ boolean hasType(); /** - * required .org.jetbrains.kotlin.serialization.Type type = 3; + * optional .org.jetbrains.kotlin.serialization.Type type = 3; */ org.jetbrains.kotlin.serialization.ProtoBuf.Type getType(); + // optional int32 type_id = 5; + /** + * optional int32 type_id = 5; + */ + boolean hasTypeId(); + /** + * optional int32 type_id = 5; + */ + int getTypeId(); + // optional .org.jetbrains.kotlin.serialization.Type vararg_element_type = 4; /** * optional .org.jetbrains.kotlin.serialization.Type vararg_element_type = 4; @@ -12885,6 +14684,16 @@ public final class ProtoBuf { * optional .org.jetbrains.kotlin.serialization.Type vararg_element_type = 4; */ org.jetbrains.kotlin.serialization.ProtoBuf.Type getVarargElementType(); + + // optional int32 vararg_element_type_id = 6; + /** + * optional int32 vararg_element_type_id = 6; + */ + boolean hasVarargElementTypeId(); + /** + * optional int32 vararg_element_type_id = 6; + */ + int getVarargElementTypeId(); } /** * Protobuf type {@code org.jetbrains.kotlin.serialization.ValueParameter} @@ -12954,7 +14763,7 @@ public final class ProtoBuf { } case 34: { org.jetbrains.kotlin.serialization.ProtoBuf.Type.Builder subBuilder = null; - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000010) == 0x00000010)) { subBuilder = varargElementType_.toBuilder(); } varargElementType_ = input.readMessage(org.jetbrains.kotlin.serialization.ProtoBuf.Type.PARSER, extensionRegistry); @@ -12962,7 +14771,17 @@ public final class ProtoBuf { subBuilder.mergeFrom(varargElementType_); varargElementType_ = subBuilder.buildPartial(); } + bitField0_ |= 0x00000010; + break; + } + case 40: { bitField0_ |= 0x00000008; + typeId_ = input.readInt32(); + break; + } + case 48: { + bitField0_ |= 0x00000020; + varargElementTypeId_ = input.readInt32(); break; } } @@ -13036,22 +14855,38 @@ public final class ProtoBuf { return name_; } - // required .org.jetbrains.kotlin.serialization.Type type = 3; + // optional .org.jetbrains.kotlin.serialization.Type type = 3; public static final int TYPE_FIELD_NUMBER = 3; private org.jetbrains.kotlin.serialization.ProtoBuf.Type type_; /** - * required .org.jetbrains.kotlin.serialization.Type type = 3; + * optional .org.jetbrains.kotlin.serialization.Type type = 3; */ public boolean hasType() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * required .org.jetbrains.kotlin.serialization.Type type = 3; + * optional .org.jetbrains.kotlin.serialization.Type type = 3; */ public org.jetbrains.kotlin.serialization.ProtoBuf.Type getType() { return type_; } + // optional int32 type_id = 5; + public static final int TYPE_ID_FIELD_NUMBER = 5; + private int typeId_; + /** + * optional int32 type_id = 5; + */ + public boolean hasTypeId() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional int32 type_id = 5; + */ + public int getTypeId() { + return typeId_; + } + // optional .org.jetbrains.kotlin.serialization.Type vararg_element_type = 4; public static final int VARARG_ELEMENT_TYPE_FIELD_NUMBER = 4; private org.jetbrains.kotlin.serialization.ProtoBuf.Type varargElementType_; @@ -13059,7 +14894,7 @@ public final class ProtoBuf { * optional .org.jetbrains.kotlin.serialization.Type vararg_element_type = 4; */ public boolean hasVarargElementType() { - return ((bitField0_ & 0x00000008) == 0x00000008); + return ((bitField0_ & 0x00000010) == 0x00000010); } /** * optional .org.jetbrains.kotlin.serialization.Type vararg_element_type = 4; @@ -13068,11 +14903,29 @@ public final class ProtoBuf { return varargElementType_; } + // optional int32 vararg_element_type_id = 6; + public static final int VARARG_ELEMENT_TYPE_ID_FIELD_NUMBER = 6; + private int varargElementTypeId_; + /** + * optional int32 vararg_element_type_id = 6; + */ + public boolean hasVarargElementTypeId() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional int32 vararg_element_type_id = 6; + */ + public int getVarargElementTypeId() { + return varargElementTypeId_; + } + private void initFields() { flags_ = 0; name_ = 0; type_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance(); + typeId_ = 0; varargElementType_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance(); + varargElementTypeId_ = 0; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -13083,13 +14936,11 @@ public final class ProtoBuf { memoizedIsInitialized = 0; return false; } - if (!hasType()) { - memoizedIsInitialized = 0; - return false; - } - if (!getType().isInitialized()) { - memoizedIsInitialized = 0; - return false; + if (hasType()) { + if (!getType().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } } if (hasVarargElementType()) { if (!getVarargElementType().isInitialized()) { @@ -13120,9 +14971,15 @@ public final class ProtoBuf { if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeMessage(3, type_); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000010) == 0x00000010)) { output.writeMessage(4, varargElementType_); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeInt32(5, typeId_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeInt32(6, varargElementTypeId_); + } extensionWriter.writeUntil(200, output); } @@ -13144,10 +15001,18 @@ public final class ProtoBuf { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, type_); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000010) == 0x00000010)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, varargElementType_); } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(5, typeId_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(6, varargElementTypeId_); + } size += extensionsSerializedSize(); memoizedSerializedSize = size; return size; @@ -13245,8 +15110,12 @@ public final class ProtoBuf { bitField0_ = (bitField0_ & ~0x00000002); type_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance(); bitField0_ = (bitField0_ & ~0x00000004); - varargElementType_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance(); + typeId_ = 0; bitField0_ = (bitField0_ & ~0x00000008); + varargElementType_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance(); + bitField0_ = (bitField0_ & ~0x00000010); + varargElementTypeId_ = 0; + bitField0_ = (bitField0_ & ~0x00000020); return this; } @@ -13285,7 +15154,15 @@ public final class ProtoBuf { if (((from_bitField0_ & 0x00000008) == 0x00000008)) { to_bitField0_ |= 0x00000008; } + result.typeId_ = typeId_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000010; + } result.varargElementType_ = varargElementType_; + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000020; + } + result.varargElementTypeId_ = varargElementTypeId_; result.bitField0_ = to_bitField0_; return result; } @@ -13301,9 +15178,15 @@ public final class ProtoBuf { if (other.hasType()) { mergeType(other.getType()); } + if (other.hasTypeId()) { + setTypeId(other.getTypeId()); + } if (other.hasVarargElementType()) { mergeVarargElementType(other.getVarargElementType()); } + if (other.hasVarargElementTypeId()) { + setVarargElementTypeId(other.getVarargElementTypeId()); + } this.mergeExtensionFields(other); return this; } @@ -13313,13 +15196,11 @@ public final class ProtoBuf { return false; } - if (!hasType()) { - - return false; - } - if (!getType().isInitialized()) { - - return false; + if (hasType()) { + if (!getType().isInitialized()) { + + return false; + } } if (hasVarargElementType()) { if (!getVarargElementType().isInitialized()) { @@ -13443,22 +15324,22 @@ public final class ProtoBuf { return this; } - // required .org.jetbrains.kotlin.serialization.Type type = 3; + // optional .org.jetbrains.kotlin.serialization.Type type = 3; private org.jetbrains.kotlin.serialization.ProtoBuf.Type type_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance(); /** - * required .org.jetbrains.kotlin.serialization.Type type = 3; + * optional .org.jetbrains.kotlin.serialization.Type type = 3; */ public boolean hasType() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** - * required .org.jetbrains.kotlin.serialization.Type type = 3; + * optional .org.jetbrains.kotlin.serialization.Type type = 3; */ public org.jetbrains.kotlin.serialization.ProtoBuf.Type getType() { return type_; } /** - * required .org.jetbrains.kotlin.serialization.Type type = 3; + * optional .org.jetbrains.kotlin.serialization.Type type = 3; */ public Builder setType(org.jetbrains.kotlin.serialization.ProtoBuf.Type value) { if (value == null) { @@ -13470,7 +15351,7 @@ public final class ProtoBuf { return this; } /** - * required .org.jetbrains.kotlin.serialization.Type type = 3; + * optional .org.jetbrains.kotlin.serialization.Type type = 3; */ public Builder setType( org.jetbrains.kotlin.serialization.ProtoBuf.Type.Builder builderForValue) { @@ -13480,7 +15361,7 @@ public final class ProtoBuf { return this; } /** - * required .org.jetbrains.kotlin.serialization.Type type = 3; + * optional .org.jetbrains.kotlin.serialization.Type type = 3; */ public Builder mergeType(org.jetbrains.kotlin.serialization.ProtoBuf.Type value) { if (((bitField0_ & 0x00000004) == 0x00000004) && @@ -13495,7 +15376,7 @@ public final class ProtoBuf { return this; } /** - * required .org.jetbrains.kotlin.serialization.Type type = 3; + * optional .org.jetbrains.kotlin.serialization.Type type = 3; */ public Builder clearType() { type_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance(); @@ -13504,13 +15385,46 @@ public final class ProtoBuf { return this; } + // optional int32 type_id = 5; + private int typeId_ ; + /** + * optional int32 type_id = 5; + */ + public boolean hasTypeId() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional int32 type_id = 5; + */ + public int getTypeId() { + return typeId_; + } + /** + * optional int32 type_id = 5; + */ + public Builder setTypeId(int value) { + bitField0_ |= 0x00000008; + typeId_ = value; + + return this; + } + /** + * optional int32 type_id = 5; + */ + public Builder clearTypeId() { + bitField0_ = (bitField0_ & ~0x00000008); + typeId_ = 0; + + return this; + } + // optional .org.jetbrains.kotlin.serialization.Type vararg_element_type = 4; private org.jetbrains.kotlin.serialization.ProtoBuf.Type varargElementType_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance(); /** * optional .org.jetbrains.kotlin.serialization.Type vararg_element_type = 4; */ public boolean hasVarargElementType() { - return ((bitField0_ & 0x00000008) == 0x00000008); + return ((bitField0_ & 0x00000010) == 0x00000010); } /** * optional .org.jetbrains.kotlin.serialization.Type vararg_element_type = 4; @@ -13527,7 +15441,7 @@ public final class ProtoBuf { } varargElementType_ = value; - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; return this; } /** @@ -13537,14 +15451,14 @@ public final class ProtoBuf { org.jetbrains.kotlin.serialization.ProtoBuf.Type.Builder builderForValue) { varargElementType_ = builderForValue.build(); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; return this; } /** * optional .org.jetbrains.kotlin.serialization.Type vararg_element_type = 4; */ public Builder mergeVarargElementType(org.jetbrains.kotlin.serialization.ProtoBuf.Type value) { - if (((bitField0_ & 0x00000008) == 0x00000008) && + if (((bitField0_ & 0x00000010) == 0x00000010) && varargElementType_ != org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance()) { varargElementType_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.newBuilder(varargElementType_).mergeFrom(value).buildPartial(); @@ -13552,7 +15466,7 @@ public final class ProtoBuf { varargElementType_ = value; } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; return this; } /** @@ -13561,7 +15475,40 @@ public final class ProtoBuf { public Builder clearVarargElementType() { varargElementType_ = org.jetbrains.kotlin.serialization.ProtoBuf.Type.getDefaultInstance(); - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + + // optional int32 vararg_element_type_id = 6; + private int varargElementTypeId_ ; + /** + * optional int32 vararg_element_type_id = 6; + */ + public boolean hasVarargElementTypeId() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional int32 vararg_element_type_id = 6; + */ + public int getVarargElementTypeId() { + return varargElementTypeId_; + } + /** + * optional int32 vararg_element_type_id = 6; + */ + public Builder setVarargElementTypeId(int value) { + bitField0_ |= 0x00000020; + varargElementTypeId_ = value; + + return this; + } + /** + * optional int32 vararg_element_type_id = 6; + */ + public Builder clearVarargElementTypeId() { + bitField0_ = (bitField0_ & ~0x00000020); + varargElementTypeId_ = 0; + return this; } diff --git a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/ClassDeserializer.kt b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/ClassDeserializer.kt index 42925ba0155..73cbe9ba1f8 100644 --- a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/ClassDeserializer.kt +++ b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/ClassDeserializer.kt @@ -56,7 +56,7 @@ public class ClassDeserializer(private val components: DeserializationComponents if (!fragment.hasTopLevelClass(classId.shortClassName)) return null } - components.createContext(fragment, nameResolver) + components.createContext(fragment, nameResolver, TypeTable(classProto.typeTable)) } return DeserializedClassDescriptor(outerContext, classProto, nameResolver, sourceElement) diff --git a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/MemberDeserializer.kt b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/MemberDeserializer.kt index 14bc31e7148..4a4134d37ee 100644 --- a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/MemberDeserializer.kt +++ b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/MemberDeserializer.kt @@ -42,25 +42,26 @@ public class MemberDeserializer(private val c: DeserializationContext) { Flags.IS_VAR.get(flags), c.nameResolver.getName(proto.getName()), Deserialization.memberKind(Flags.MEMBER_KIND.get(flags)), + Flags.IS_LATEINIT.get(flags), + Flags.IS_CONST.get(flags), proto, c.nameResolver, - Flags.IS_LATEINIT.get(flags), - Flags.IS_CONST.get(flags) + c.typeTable ) val local = c.childContext(property, proto.getTypeParameterList()) val hasGetter = Flags.HAS_GETTER.get(flags) - val receiverAnnotations = if (hasGetter && proto.hasReceiverType()) + val receiverAnnotations = if (hasGetter && (proto.hasReceiverType() || proto.hasReceiverTypeId())) getReceiverParameterAnnotations(proto, AnnotatedCallableKind.PROPERTY_GETTER) else Annotations.EMPTY property.setType( - local.typeDeserializer.type(proto.getReturnType()), + local.typeDeserializer.type(proto.returnType(c.typeTable)), local.typeDeserializer.ownTypeParameters, getDispatchReceiverParameter(), - if (proto.hasReceiverType()) local.typeDeserializer.type(proto.getReceiverType(), receiverAnnotations) else null + proto.receiverType(c.typeTable)?.let { local.typeDeserializer.type(it, receiverAnnotations) } ) val getter = if (hasGetter) { @@ -130,18 +131,18 @@ public class MemberDeserializer(private val c: DeserializationContext) { } public fun loadFunction(proto: ProtoBuf.Function): FunctionDescriptor { - val annotations = getAnnotations(proto, proto.getFlags(), AnnotatedCallableKind.FUNCTION) - val receiverAnnotations = if (proto.hasReceiverType()) + val annotations = getAnnotations(proto, proto.flags, AnnotatedCallableKind.FUNCTION) + val receiverAnnotations = if (proto.hasReceiverType() || proto.hasReceiverTypeId()) getReceiverParameterAnnotations(proto, AnnotatedCallableKind.FUNCTION) else Annotations.EMPTY - val function = DeserializedSimpleFunctionDescriptor.create(c.containingDeclaration, proto, c.nameResolver, annotations) - val local = c.childContext(function, proto.getTypeParameterList()) + val function = DeserializedSimpleFunctionDescriptor.create(c.containingDeclaration, annotations, proto, c.nameResolver, c.typeTable) + val local = c.childContext(function, proto.typeParameterList) function.initialize( - if (proto.hasReceiverType()) local.typeDeserializer.type(proto.getReceiverType(), receiverAnnotations) else null, + proto.receiverType(c.typeTable)?.let { local.typeDeserializer.type(it, receiverAnnotations) }, getDispatchReceiverParameter(), local.typeDeserializer.ownTypeParameters, local.memberDeserializer.valueParameters(proto.valueParameterList, proto, AnnotatedCallableKind.FUNCTION), - local.typeDeserializer.type(proto.returnType), + local.typeDeserializer.type(proto.returnType(c.typeTable)), Deserialization.modality(Flags.MODALITY.get(proto.flags)), Deserialization.visibility(Flags.VISIBILITY.get(proto.flags)) ) @@ -158,7 +159,7 @@ public class MemberDeserializer(private val c: DeserializationContext) { val classDescriptor = c.containingDeclaration as ClassDescriptor val descriptor = DeserializedConstructorDescriptor( classDescriptor, null, getAnnotations(proto, proto.flags, AnnotatedCallableKind.FUNCTION), - isPrimary, CallableMemberDescriptor.Kind.DECLARATION, proto, c.nameResolver + isPrimary, CallableMemberDescriptor.Kind.DECLARATION, proto, c.nameResolver, c.typeTable ) val local = c.childContext(descriptor, listOf()) descriptor.initialize( @@ -209,9 +210,9 @@ public class MemberDeserializer(private val c: DeserializationContext) { callableDescriptor, null, i, containerOfCallable?.let { getParameterAnnotations(it, callable, kind, i, proto) } ?: Annotations.EMPTY, c.nameResolver.getName(proto.name), - c.typeDeserializer.type(proto.type), + c.typeDeserializer.type(proto.type(c.typeTable)), Flags.DECLARES_DEFAULT_VALUE.get(flags), - if (proto.hasVarargElementType()) c.typeDeserializer.type(proto.varargElementType) else null, + proto.varargElementType(c.typeTable)?.let { c.typeDeserializer.type(it) }, SourceElement.NO_SOURCE ) }.toReadOnlyList() @@ -230,8 +231,8 @@ public class MemberDeserializer(private val c: DeserializationContext) { } private fun DeclarationDescriptor.asProtoContainer(): ProtoContainer? = when(this) { - is PackageFragmentDescriptor -> ProtoContainer(null, fqName, c.nameResolver) - is DeserializedClassDescriptor -> ProtoContainer(classProto, null, c.nameResolver) + is PackageFragmentDescriptor -> ProtoContainer(null, fqName, c.nameResolver, c.typeTable) + is DeserializedClassDescriptor -> ProtoContainer(classProto, null, c.nameResolver, c.typeTable) else -> null // TODO: support annotations on lambdas and their parameters } } diff --git a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/ProtoContainer.kt b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/ProtoContainer.kt index 4c73b386468..e06990c1a77 100644 --- a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/ProtoContainer.kt +++ b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/ProtoContainer.kt @@ -22,7 +22,8 @@ import org.jetbrains.kotlin.serialization.ProtoBuf public data class ProtoContainer( val classProto: ProtoBuf.Class?, val packageFqName: FqName?, - val nameResolver: NameResolver + val nameResolver: NameResolver, + val typeTable: TypeTable ) { init { assert((classProto != null) xor (packageFqName != null)) 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 d3e762b6165..e5d34b4811d 100644 --- a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/TypeDeserializer.kt +++ b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/TypeDeserializer.kt @@ -42,7 +42,7 @@ public class TypeDeserializer( else { val result = LinkedHashMap() for ((index, proto) in typeParameterProtos.withIndex()) { - result[proto.getId()] = DeserializedTypeParameterDescriptor(c, proto, index) + result[proto.id] = DeserializedTypeParameterDescriptor(c, proto, index) } result } @@ -51,18 +51,16 @@ public class TypeDeserializer( val ownTypeParameters: List get() = typeParameterDescriptors().values().toReadOnlyList() + // TODO: don't load identical types from TypeTable more than once fun type(proto: ProtoBuf.Type, additionalAnnotations: Annotations = Annotations.EMPTY): JetType { if (proto.hasFlexibleTypeCapabilitiesId()) { - val id = c.nameResolver.getString(proto.getFlexibleTypeCapabilitiesId()) - val capabilities = c.components.flexibleTypeCapabilitiesDeserializer.capabilitiesById(id) - - if (capabilities == null) { - return ErrorUtils.createErrorType("${DeserializedType(c, proto)}: Capabilities not found for id $id") - } + val id = c.nameResolver.getString(proto.flexibleTypeCapabilitiesId) + val capabilities = c.components.flexibleTypeCapabilitiesDeserializer.capabilitiesById(id) ?: + return ErrorUtils.createErrorType("${DeserializedType(c, proto)}: Capabilities not found for id $id") return DelegatingFlexibleType.create( DeserializedType(c, proto), - DeserializedType(c, proto.getFlexibleUpperBound()), + DeserializedType(c, proto.flexibleUpperBound(c.typeTable)!!), capabilities ) } @@ -95,7 +93,7 @@ public class TypeDeserializer( private fun computeClassDescriptor(fqNameIndex: Int): ClassDescriptor? { val id = c.nameResolver.getClassId(fqNameIndex) - if (id.isLocal()) { + if (id.isLocal) { // Local classes can't be found in scopes return c.components.localClassResolver.resolveLocalClass(id) } @@ -103,12 +101,18 @@ public class TypeDeserializer( } fun typeArgument(parameter: TypeParameterDescriptor?, typeArgumentProto: ProtoBuf.Type.Argument): TypeProjection { - return if (typeArgumentProto.getProjection() == ProtoBuf.Type.Argument.Projection.STAR) - if (parameter == null) - TypeBasedStarProjectionImpl(c.components.moduleDescriptor.builtIns.getNullableAnyType()) + if (typeArgumentProto.projection == ProtoBuf.Type.Argument.Projection.STAR) { + return if (parameter == null) + TypeBasedStarProjectionImpl(c.components.moduleDescriptor.builtIns.nullableAnyType) else StarProjectionImpl(parameter) - else TypeProjectionImpl(Deserialization.variance(typeArgumentProto.getProjection()), type(typeArgumentProto.getType())) + } + + val variance = Deserialization.variance(typeArgumentProto.projection) + val type = typeArgumentProto.type(c.typeTable) ?: + return TypeProjectionImpl(ErrorUtils.createErrorType("No type recorded")) + + return TypeProjectionImpl(variance, type(type)) } override fun toString() = debugName + (if (parent == null) "" else ". Child of ${parent.debugName}") diff --git a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/TypeTable.kt b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/TypeTable.kt new file mode 100644 index 00000000000..90790723a24 --- /dev/null +++ b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/TypeTable.kt @@ -0,0 +1,37 @@ +/* + * Copyright 2010-2015 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.jetbrains.kotlin.serialization.deserialization + +import org.jetbrains.kotlin.serialization.ProtoBuf + +class TypeTable(typeTable: ProtoBuf.TypeTable) { + val types: List = run { + val originalTypes = typeTable.typeList + if (typeTable.hasFirstNullable()) { + val firstNullable = typeTable.firstNullable + typeTable.typeList.mapIndexed { i, type -> + if (i >= firstNullable) { + type.toBuilder().setNullable(true).build() + } + else type + } + } + else originalTypes + } + + operator fun get(index: Int) = types[index] +} diff --git a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/context.kt b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/context.kt index d8931332998..e6bc696ee66 100644 --- a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/context.kt +++ b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/context.kt @@ -24,7 +24,7 @@ import org.jetbrains.kotlin.resolve.constants.ConstantValue import org.jetbrains.kotlin.serialization.ProtoBuf import org.jetbrains.kotlin.storage.StorageManager -public class DeserializationComponents( +class DeserializationComponents( val storageManager: StorageManager, val moduleDescriptor: ModuleDescriptor, val classDataFinder: ClassDataFinder, @@ -37,19 +37,24 @@ public class DeserializationComponents( val typeCapabilitiesLoader: TypeCapabilitiesLoader = TypeCapabilitiesLoader.NONE, val additionalSupertypes: AdditionalSupertypes = AdditionalSupertypes.None ) { - public val classDeserializer: ClassDeserializer = ClassDeserializer(this) + val classDeserializer: ClassDeserializer = ClassDeserializer(this) - public fun deserializeClass(classId: ClassId): ClassDescriptor? = classDeserializer.deserializeClass(classId) + fun deserializeClass(classId: ClassId): ClassDescriptor? = classDeserializer.deserializeClass(classId) - public fun createContext(descriptor: PackageFragmentDescriptor, nameResolver: NameResolver): DeserializationContext = - DeserializationContext(this, nameResolver, descriptor, parentTypeDeserializer = null, typeParameters = listOf()) + fun createContext( + descriptor: PackageFragmentDescriptor, + nameResolver: NameResolver, + typeTable: TypeTable + ): DeserializationContext = + DeserializationContext(this, nameResolver, descriptor, typeTable, parentTypeDeserializer = null, typeParameters = listOf()) } -public class DeserializationContext( - public val components: DeserializationComponents, - public val nameResolver: NameResolver, - public val containingDeclaration: DeclarationDescriptor, +class DeserializationContext( + val components: DeserializationComponents, + val nameResolver: NameResolver, + val containingDeclaration: DeclarationDescriptor, + val typeTable: TypeTable, parentTypeDeserializer: TypeDeserializer?, typeParameters: List ) { @@ -63,8 +68,11 @@ public class DeserializationContext( fun childContext( descriptor: DeclarationDescriptor, typeParameterProtos: List, - nameResolver: NameResolver = this.nameResolver + nameResolver: NameResolver = this.nameResolver, + typeTable: TypeTable = this.typeTable ) = DeserializationContext( - components, nameResolver, descriptor, parentTypeDeserializer = this.typeDeserializer, typeParameters = typeParameterProtos + components, nameResolver, descriptor, typeTable, + parentTypeDeserializer = this.typeDeserializer, + typeParameters = typeParameterProtos ) } diff --git a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedCallableMemberDescriptor.kt b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedCallableMemberDescriptor.kt index 7227f828271..5bd2cdf5366 100644 --- a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedCallableMemberDescriptor.kt +++ b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedCallableMemberDescriptor.kt @@ -19,9 +19,12 @@ package org.jetbrains.kotlin.serialization.deserialization.descriptors import com.google.protobuf.MessageLite import org.jetbrains.kotlin.descriptors.CallableMemberDescriptor import org.jetbrains.kotlin.serialization.deserialization.NameResolver +import org.jetbrains.kotlin.serialization.deserialization.TypeTable interface DeserializedCallableMemberDescriptor : CallableMemberDescriptor { val proto: MessageLite val nameResolver: NameResolver + + val typeTable: TypeTable } diff --git a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedClassDescriptor.kt b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedClassDescriptor.kt index 24b9f6db4a3..43e2abbcd56 100644 --- a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedClassDescriptor.kt +++ b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedClassDescriptor.kt @@ -30,10 +30,7 @@ import org.jetbrains.kotlin.resolve.scopes.JetScope import org.jetbrains.kotlin.resolve.scopes.StaticScopeForKotlinClass import org.jetbrains.kotlin.serialization.Flags import org.jetbrains.kotlin.serialization.ProtoBuf -import org.jetbrains.kotlin.serialization.deserialization.Deserialization -import org.jetbrains.kotlin.serialization.deserialization.DeserializationContext -import org.jetbrains.kotlin.serialization.deserialization.DeserializedType -import org.jetbrains.kotlin.serialization.deserialization.NameResolver +import org.jetbrains.kotlin.serialization.deserialization.* import org.jetbrains.kotlin.types.AbstractClassTypeConstructor import org.jetbrains.kotlin.types.JetType import org.jetbrains.kotlin.types.upperIfFlexible @@ -58,7 +55,7 @@ public class DeserializedClassDescriptor( private val isCompanion = kindFromProto == ProtoBuf.Class.Kind.COMPANION_OBJECT private val isInner = Flags.IS_INNER.get(classProto.getFlags()) - val c = outerContext.childContext(this, classProto.getTypeParameterList(), nameResolver) + val c = outerContext.childContext(this, classProto.typeParameterList, nameResolver, TypeTable(classProto.typeTable)) private val classId = nameResolver.getClassId(classProto.getFqName()) @@ -138,7 +135,7 @@ public class DeserializedClassDescriptor( val result = ArrayList(classProto.supertypeCount) val unresolved = ArrayList(0) - for (supertypeProto in classProto.supertypeList) { + for (supertypeProto in classProto.supertypes(c.typeTable)) { val supertype = c.typeDeserializer.type(supertypeProto) if (supertype.isError) { unresolved.add(supertype.upperIfFlexible() as? DeserializedType ?: error("Not a deserialized type: $supertype")) diff --git a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedConstructorDescriptor.kt b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedConstructorDescriptor.kt index 4ad18017aae..eddbe6b539c 100644 --- a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedConstructorDescriptor.kt +++ b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedConstructorDescriptor.kt @@ -21,6 +21,7 @@ import org.jetbrains.kotlin.descriptors.annotations.Annotations import org.jetbrains.kotlin.descriptors.impl.ConstructorDescriptorImpl import org.jetbrains.kotlin.serialization.ProtoBuf import org.jetbrains.kotlin.serialization.deserialization.NameResolver +import org.jetbrains.kotlin.serialization.deserialization.TypeTable public class DeserializedConstructorDescriptor( containingDeclaration: ClassDescriptor, @@ -29,7 +30,8 @@ public class DeserializedConstructorDescriptor( isPrimary: Boolean, kind: CallableMemberDescriptor.Kind, override val proto: ProtoBuf.Constructor, - override val nameResolver: NameResolver + override val nameResolver: NameResolver, + override val typeTable: TypeTable ) : ConstructorDescriptorImpl(containingDeclaration, original, annotations, isPrimary, kind, SourceElement.NO_SOURCE), DeserializedCallableMemberDescriptor { @@ -39,7 +41,8 @@ public class DeserializedConstructorDescriptor( kind: CallableMemberDescriptor.Kind ): DeserializedConstructorDescriptor { return DeserializedConstructorDescriptor( - newOwner as ClassDescriptor, original as ConstructorDescriptor?, getAnnotations(), isPrimary, kind, proto, nameResolver + newOwner as ClassDescriptor, original as ConstructorDescriptor?, + annotations, isPrimary, kind, proto, nameResolver, typeTable ) } } diff --git a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedMemberScope.kt b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedMemberScope.kt index d872cf70393..cd1cefee520 100644 --- a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedMemberScope.kt +++ b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedMemberScope.kt @@ -24,6 +24,7 @@ import org.jetbrains.kotlin.resolve.scopes.DescriptorKindFilter import org.jetbrains.kotlin.resolve.scopes.JetScopeImpl import org.jetbrains.kotlin.serialization.ProtoBuf import org.jetbrains.kotlin.serialization.deserialization.DeserializationContext +import org.jetbrains.kotlin.serialization.deserialization.receiverType import org.jetbrains.kotlin.utils.Printer import org.jetbrains.kotlin.utils.toReadOnlyList import java.util.* @@ -38,11 +39,11 @@ public abstract class DeserializedMemberScope protected constructor( private val functionProtos = c.storageManager.createLazyValue { - groupByKey(filteredFunctionProtos(functionList), { it.name }) { it.hasReceiverType() } + groupByKey(filteredFunctionProtos(functionList), { it.name }) { it.receiverType(c.typeTable) != null } } private val propertyProtos = c.storageManager.createLazyValue { - groupByKey(filteredPropertyProtos(propertyList), { it.name }) { it.hasReceiverType() } + groupByKey(filteredPropertyProtos(propertyList), { it.name }) { it.receiverType(c.typeTable) != null } } private val functions = diff --git a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedPackageMemberScope.kt b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedPackageMemberScope.kt index 7eb19fb524e..68057cefc2e 100644 --- a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedPackageMemberScope.kt +++ b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedPackageMemberScope.kt @@ -29,6 +29,7 @@ import org.jetbrains.kotlin.resolve.scopes.DescriptorKindFilter import org.jetbrains.kotlin.serialization.ProtoBuf import org.jetbrains.kotlin.serialization.deserialization.DeserializationComponents import org.jetbrains.kotlin.serialization.deserialization.NameResolver +import org.jetbrains.kotlin.serialization.deserialization.TypeTable import org.jetbrains.kotlin.storage.getValue import org.jetbrains.kotlin.utils.addIfNotNull @@ -38,7 +39,10 @@ public open class DeserializedPackageMemberScope( nameResolver: NameResolver, components: DeserializationComponents, classNames: () -> Collection -) : DeserializedMemberScope(components.createContext(packageDescriptor, nameResolver), proto.functionList, proto.propertyList) { +) : DeserializedMemberScope( + components.createContext(packageDescriptor, nameResolver, TypeTable(proto.typeTable)), + proto.functionList, proto.propertyList +) { private val packageFqName = packageDescriptor.fqName internal val classNames by c.storageManager.createLazyValue { classNames().toSet() } diff --git a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedPropertyDescriptor.kt b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedPropertyDescriptor.kt index ae10825bd86..6dec77ca309 100644 --- a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedPropertyDescriptor.kt +++ b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedPropertyDescriptor.kt @@ -23,6 +23,7 @@ import org.jetbrains.kotlin.descriptors.impl.PropertyDescriptorImpl import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.serialization.ProtoBuf import org.jetbrains.kotlin.serialization.deserialization.NameResolver +import org.jetbrains.kotlin.serialization.deserialization.TypeTable class DeserializedPropertyDescriptor( containingDeclaration: DeclarationDescriptor, @@ -33,10 +34,11 @@ class DeserializedPropertyDescriptor( isVar: Boolean, name: Name, kind: Kind, + lateInit: Boolean, + isConst: Boolean, override val proto: ProtoBuf.Property, override val nameResolver: NameResolver, - lateInit: Boolean, - isConst: Boolean + override val typeTable: TypeTable ) : DeserializedCallableMemberDescriptor, PropertyDescriptorImpl(containingDeclaration, original, annotations, modality, visibility, isVar, name, kind, SourceElement.NO_SOURCE, lateInit, isConst) { @@ -49,6 +51,8 @@ class DeserializedPropertyDescriptor( kind: Kind ): PropertyDescriptorImpl { return DeserializedPropertyDescriptor( - newOwner, original, annotations, newModality, newVisibility, isVar, name, kind, proto, nameResolver, isLateInit, isConst) + newOwner, original, annotations, newModality, newVisibility, isVar, name, kind, isLateInit, isConst, + proto, nameResolver, typeTable + ) } } diff --git a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedSimpleFunctionDescriptor.java b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedSimpleFunctionDescriptor.java index a905f265d22..cdcaf5a4d05 100644 --- a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedSimpleFunctionDescriptor.java +++ b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedSimpleFunctionDescriptor.java @@ -30,11 +30,13 @@ import org.jetbrains.kotlin.serialization.Flags; import org.jetbrains.kotlin.serialization.ProtoBuf; import org.jetbrains.kotlin.serialization.deserialization.Deserialization; import org.jetbrains.kotlin.serialization.deserialization.NameResolver; +import org.jetbrains.kotlin.serialization.deserialization.TypeTable; public class DeserializedSimpleFunctionDescriptor extends SimpleFunctionDescriptorImpl implements DeserializedCallableMemberDescriptor { private final ProtoBuf.Function proto; private final NameResolver nameResolver; + private final TypeTable typeTable; private DeserializedSimpleFunctionDescriptor( @NotNull DeclarationDescriptor containingDeclaration, @@ -43,11 +45,13 @@ public class DeserializedSimpleFunctionDescriptor extends SimpleFunctionDescript @NotNull Name name, @NotNull Kind kind, @NotNull ProtoBuf.Function proto, - @NotNull NameResolver nameResolver + @NotNull NameResolver nameResolver, + @NotNull TypeTable typeTable ) { super(containingDeclaration, original, annotations, name, kind, SourceElement.NO_SOURCE); this.proto = proto; this.nameResolver = nameResolver; + this.typeTable = typeTable; } @NotNull @@ -64,7 +68,8 @@ public class DeserializedSimpleFunctionDescriptor extends SimpleFunctionDescript getName(), kind, proto, - nameResolver + nameResolver, + typeTable ); } @@ -86,12 +91,19 @@ public class DeserializedSimpleFunctionDescriptor extends SimpleFunctionDescript return nameResolver; } + @NotNull + @Override + public TypeTable getTypeTable() { + return typeTable; + } + @NotNull public static DeserializedSimpleFunctionDescriptor create( @NotNull DeclarationDescriptor containingDeclaration, + @NotNull Annotations annotations, @NotNull ProtoBuf.Function proto, @NotNull NameResolver nameResolver, - @NotNull Annotations annotations + @NotNull TypeTable typeTable ) { return new DeserializedSimpleFunctionDescriptor( containingDeclaration, @@ -100,7 +112,8 @@ public class DeserializedSimpleFunctionDescriptor extends SimpleFunctionDescript nameResolver.getName(proto.getName()), Deserialization.memberKind(Flags.MEMBER_KIND.get(proto.getFlags())), proto, - nameResolver + nameResolver, + typeTable ); } } diff --git a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedTypeParameterDescriptor.java b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedTypeParameterDescriptor.java index 6fdc650f38e..aaa5f1b0f98 100644 --- a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedTypeParameterDescriptor.java +++ b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedTypeParameterDescriptor.java @@ -21,13 +21,12 @@ import org.jetbrains.kotlin.descriptors.SourceElement; import org.jetbrains.kotlin.descriptors.annotations.Annotations; import org.jetbrains.kotlin.descriptors.impl.AbstractLazyTypeParameterDescriptor; import org.jetbrains.kotlin.serialization.ProtoBuf; -import org.jetbrains.kotlin.serialization.deserialization.Deserialization; -import org.jetbrains.kotlin.serialization.deserialization.DeserializationContext; -import org.jetbrains.kotlin.serialization.deserialization.TypeDeserializer; +import org.jetbrains.kotlin.serialization.deserialization.*; import org.jetbrains.kotlin.types.JetType; import java.util.Collections; import java.util.LinkedHashSet; +import java.util.List; import java.util.Set; import static org.jetbrains.kotlin.resolve.descriptorUtil.DescriptorUtilsKt.getBuiltIns; @@ -35,6 +34,7 @@ import static org.jetbrains.kotlin.resolve.descriptorUtil.DescriptorUtilsKt.getB public class DeserializedTypeParameterDescriptor extends AbstractLazyTypeParameterDescriptor { private final ProtoBuf.TypeParameter proto; private final TypeDeserializer typeDeserializer; + private final TypeTable typeTable; public DeserializedTypeParameterDescriptor(@NotNull DeserializationContext c, @NotNull ProtoBuf.TypeParameter proto, int index) { super(c.getStorageManager(), @@ -46,16 +46,18 @@ public class DeserializedTypeParameterDescriptor extends AbstractLazyTypeParamet SourceElement.NO_SOURCE); this.proto = proto; this.typeDeserializer = c.getTypeDeserializer(); + this.typeTable = c.getTypeTable(); } @NotNull @Override protected Set resolveUpperBounds() { - if (proto.getUpperBoundCount() == 0) { + List upperBounds = ProtoTypeTableUtilKt.upperBounds(proto, typeTable); + if (upperBounds.isEmpty()) { return Collections.singleton(getBuiltIns(this).getDefaultBound()); } - Set result = new LinkedHashSet(proto.getUpperBoundCount()); - for (ProtoBuf.Type upperBound : proto.getUpperBoundList()) { + Set result = new LinkedHashSet(upperBounds.size()); + for (ProtoBuf.Type upperBound : upperBounds) { result.add(typeDeserializer.type(upperBound, Annotations.Companion.getEMPTY())); } return result; diff --git a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/protoTypeTableUtil.kt b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/protoTypeTableUtil.kt new file mode 100644 index 00000000000..45c6960baa0 --- /dev/null +++ b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/protoTypeTableUtil.kt @@ -0,0 +1,80 @@ +/* + * Copyright 2010-2015 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.jetbrains.kotlin.serialization.deserialization + +import org.jetbrains.kotlin.serialization.ProtoBuf +import org.jetbrains.kotlin.utils.ifEmpty + +fun ProtoBuf.Class.supertypes(typeTable: TypeTable): List { + return supertypeList.ifEmpty { supertypeIdList.map { typeTable[it] } } +} + +fun ProtoBuf.Type.Argument.type(typeTable: TypeTable): ProtoBuf.Type? { + return when { + hasType() -> type + hasTypeId() -> typeTable[typeId] + else -> null + } +} + +fun ProtoBuf.Type.flexibleUpperBound(typeTable: TypeTable): ProtoBuf.Type? { + return when { + hasFlexibleUpperBound() -> flexibleUpperBound + hasFlexibleUpperBoundId() -> typeTable[flexibleUpperBoundId] + else -> null + } +} + +fun ProtoBuf.TypeParameter.upperBounds(typeTable: TypeTable): List { + return upperBoundList.ifEmpty { upperBoundIdList.map { typeTable[it] } } +} + +fun ProtoBuf.Function.returnType(typeTable: TypeTable): ProtoBuf.Type { + return if (hasReturnType()) returnType else typeTable[returnTypeId] +} + +fun ProtoBuf.Function.receiverType(typeTable: TypeTable): ProtoBuf.Type? { + return when { + hasReceiverType() -> receiverType + hasReceiverTypeId() -> typeTable[receiverTypeId] + else -> null + } +} + +fun ProtoBuf.Property.returnType(typeTable: TypeTable): ProtoBuf.Type { + return if (hasReturnType()) returnType else typeTable[returnTypeId] +} + +fun ProtoBuf.Property.receiverType(typeTable: TypeTable): ProtoBuf.Type? { + return when { + hasReceiverType() -> receiverType + hasReceiverTypeId() -> typeTable[receiverTypeId] + else -> null + } +} + +fun ProtoBuf.ValueParameter.type(typeTable: TypeTable): ProtoBuf.Type { + return if (hasType()) type else typeTable[typeId] +} + +fun ProtoBuf.ValueParameter.varargElementType(typeTable: TypeTable): ProtoBuf.Type? { + return when { + hasVarargElementType() -> varargElementType + hasVarargElementTypeId() -> typeTable[varargElementTypeId] + else -> null + } +} diff --git a/core/reflection.jvm/src/kotlin/reflect/jvm/internal/DescriptorBasedProperty.kt b/core/reflection.jvm/src/kotlin/reflect/jvm/internal/DescriptorBasedProperty.kt index dc9bdc1bd16..6460f046ee4 100644 --- a/core/reflection.jvm/src/kotlin/reflect/jvm/internal/DescriptorBasedProperty.kt +++ b/core/reflection.jvm/src/kotlin/reflect/jvm/internal/DescriptorBasedProperty.kt @@ -47,7 +47,7 @@ internal abstract class DescriptorBasedProperty protected constructor( val jvmSignature = RuntimeTypeMapper.mapPropertySignature(descriptor) when (jvmSignature) { is KotlinProperty -> { - JvmProtoBufUtil.getJvmFieldSignature(jvmSignature.proto, jvmSignature.nameResolver)?.let { + JvmProtoBufUtil.getJvmFieldSignature(jvmSignature.proto, jvmSignature.nameResolver, jvmSignature.typeTable)?.let { container.findFieldBySignature(jvmSignature.proto, jvmSignature.nameResolver, it.name) } } diff --git a/core/reflection.jvm/src/kotlin/reflect/jvm/internal/RuntimeTypeMapper.kt b/core/reflection.jvm/src/kotlin/reflect/jvm/internal/RuntimeTypeMapper.kt index 14a3e190a7d..e0bb56d0c78 100644 --- a/core/reflection.jvm/src/kotlin/reflect/jvm/internal/RuntimeTypeMapper.kt +++ b/core/reflection.jvm/src/kotlin/reflect/jvm/internal/RuntimeTypeMapper.kt @@ -37,6 +37,7 @@ import org.jetbrains.kotlin.resolve.descriptorUtil.classId import org.jetbrains.kotlin.resolve.jvm.JvmPrimitiveType import org.jetbrains.kotlin.serialization.ProtoBuf import org.jetbrains.kotlin.serialization.deserialization.NameResolver +import org.jetbrains.kotlin.serialization.deserialization.TypeTable import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedCallableMemberDescriptor import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedPropertyDescriptor import org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf @@ -100,7 +101,8 @@ internal sealed class JvmPropertySignature { val descriptor: PropertyDescriptor, val proto: ProtoBuf.Property, val signature: JvmProtoBuf.JvmPropertySignature, - val nameResolver: NameResolver + val nameResolver: NameResolver, + val typeTable: TypeTable ) : JvmPropertySignature() { private val string: String @@ -110,7 +112,7 @@ internal sealed class JvmPropertySignature { } else { val (name, desc) = - JvmProtoBufUtil.getJvmFieldSignature(proto, nameResolver) ?: + JvmProtoBufUtil.getJvmFieldSignature(proto, nameResolver, typeTable) ?: throw KotlinReflectionInternalError("No field signature for property: $descriptor") val moduleSuffix = @@ -154,12 +156,12 @@ internal object RuntimeTypeMapper { val proto = function.proto if (proto is ProtoBuf.Function) { - JvmProtoBufUtil.getJvmMethodSignature(proto, function.nameResolver)?.let { signature -> + JvmProtoBufUtil.getJvmMethodSignature(proto, function.nameResolver, function.typeTable)?.let { signature -> return JvmFunctionSignature.KotlinFunction(signature) } } if (proto is ProtoBuf.Constructor) { - JvmProtoBufUtil.getJvmConstructorSignature(proto, function.nameResolver)?.let { signature -> + JvmProtoBufUtil.getJvmConstructorSignature(proto, function.nameResolver, function.typeTable)?.let { signature -> return JvmFunctionSignature.KotlinConstructor(signature) } } @@ -191,7 +193,7 @@ internal object RuntimeTypeMapper { throw KotlinReflectionInternalError("No metadata found for $property") } return JvmPropertySignature.KotlinProperty( - property, proto, proto.getExtension(JvmProtoBuf.propertySignature), property.nameResolver + property, proto, proto.getExtension(JvmProtoBuf.propertySignature), property.nameResolver, property.typeTable ) } else if (property is JavaPropertyDescriptor) { diff --git a/core/reflection.jvm/src/kotlin/reflect/jvm/reflectLambda.kt b/core/reflection.jvm/src/kotlin/reflect/jvm/reflectLambda.kt index 10db32cdc9d..7b61e9de39f 100644 --- a/core/reflection.jvm/src/kotlin/reflect/jvm/reflectLambda.kt +++ b/core/reflection.jvm/src/kotlin/reflect/jvm/reflectLambda.kt @@ -20,6 +20,7 @@ import org.jetbrains.kotlin.load.kotlin.JvmNameResolver import org.jetbrains.kotlin.serialization.ProtoBuf import org.jetbrains.kotlin.serialization.deserialization.DeserializationContext import org.jetbrains.kotlin.serialization.deserialization.MemberDeserializer +import org.jetbrains.kotlin.serialization.deserialization.TypeTable import org.jetbrains.kotlin.serialization.jvm.BitEncoding import org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf import org.jetbrains.kotlin.serialization.jvm.JvmProtoBufUtil @@ -43,8 +44,10 @@ public fun Function.reflect(): KFunction? { ) val proto = ProtoBuf.Function.parseFrom(input, JvmProtoBufUtil.EXTENSION_REGISTRY) val moduleData = javaClass.getOrCreateModule() - val context = DeserializationContext(moduleData.deserialization, nameResolver, moduleData.module, - parentTypeDeserializer = null, typeParameters = listOf()) + val context = DeserializationContext( + moduleData.deserialization, nameResolver, moduleData.module, + typeTable = TypeTable(proto.typeTable), parentTypeDeserializer = null, typeParameters = listOf() + ) val descriptor = MemberDeserializer(context).loadFunction(proto) @Suppress("UNCHECKED_CAST") return KFunctionImpl(EmptyContainerForLocal, descriptor) as KFunction diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/stubBuilder/CallableClsStubBuilder.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/stubBuilder/CallableClsStubBuilder.kt index 5635d76448d..3e2ce826333 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/stubBuilder/CallableClsStubBuilder.kt +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/stubBuilder/CallableClsStubBuilder.kt @@ -31,6 +31,8 @@ import org.jetbrains.kotlin.serialization.ProtoBuf.MemberKind import org.jetbrains.kotlin.serialization.ProtoBuf.Modality import org.jetbrains.kotlin.serialization.deserialization.AnnotatedCallableKind import org.jetbrains.kotlin.serialization.deserialization.ProtoContainer +import org.jetbrains.kotlin.serialization.deserialization.receiverType +import org.jetbrains.kotlin.serialization.deserialization.returnType fun createCallableStubs( parentStub: StubElement, @@ -118,10 +120,10 @@ private class FunctionClsStubBuilder( private val functionProto: ProtoBuf.Function ) : CallableClsStubBuilder(parent, outerContext, protoContainer, functionProto.typeParameterList) { override val receiverType: ProtoBuf.Type? - get() = if (functionProto.hasReceiverType()) functionProto.receiverType else null + get() = functionProto.receiverType(c.typeTable) override val returnType: ProtoBuf.Type? - get() = if (functionProto.hasReturnType()) functionProto.returnType else null + get() = functionProto.returnType(c.typeTable) override fun createValueParameterList() { typeStubBuilder.createValueParameterListStub(callableStub, functionProto, functionProto.valueParameterList, protoContainer) @@ -165,10 +167,10 @@ private class PropertyClsStubBuilder( private val isVar = Flags.IS_VAR.get(propertyProto.flags) override val receiverType: ProtoBuf.Type? - get() = if (propertyProto.hasReceiverType()) propertyProto.receiverType else null + get() = propertyProto.receiverType(c.typeTable) override val returnType: ProtoBuf.Type? - get() = if (propertyProto.hasReturnType()) propertyProto.returnType else null + get() = propertyProto.returnType(c.typeTable) override fun createValueParameterList() { } 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 6ddb7c866c4..e01afe87bf9 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,6 +37,8 @@ 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.TypeTable +import org.jetbrains.kotlin.serialization.deserialization.supertypes fun createClassStub(parent: StubElement, classProto: ProtoBuf.Class, classId: ClassId, context: ClsStubBuilderContext) { ClassClsStubBuilder(parent, classProto, classId, context).build() @@ -48,11 +50,11 @@ private class ClassClsStubBuilder( private val classId: ClassId, private val outerContext: ClsStubBuilderContext ) { - private val c = outerContext.child(classProto.getTypeParameterList(), classId.getShortClassName()) + private val c = outerContext.child(classProto.typeParameterList, classId.shortClassName, TypeTable(classProto.typeTable)) private val typeStubBuilder = TypeClsStubBuilder(c) - private val classKind = Flags.CLASS_KIND[classProto.getFlags()] + private val classKind = Flags.CLASS_KIND[classProto.flags] private val supertypeIds = run { - val supertypeIds = classProto.supertypeList.map { c.nameResolver.getClassId(it.className) } + val supertypeIds = classProto.supertypes(c.typeTable).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() @@ -133,7 +135,7 @@ private class ClassClsStubBuilder( val primaryConstructorProto = classProto.constructorList.find { !Flags.IS_SECONDARY.get(it.flags) } ?: return - createConstructorStub(classOrObjectStub, primaryConstructorProto, c, ProtoContainer(classProto, null, c.nameResolver)) + createConstructorStub(classOrObjectStub, primaryConstructorProto, c, ProtoContainer(classProto, null, c.nameResolver, c.typeTable)) } private fun createDelegationSpecifierList() { @@ -143,7 +145,7 @@ private class ClassClsStubBuilder( val delegationSpecifierListStub = KotlinPlaceHolderStubImpl(classOrObjectStub, JetStubElementTypes.DELEGATION_SPECIFIER_LIST) - classProto.getSupertypeList().forEach { type -> + classProto.supertypes(c.typeTable).forEach { type -> val superClassStub = KotlinPlaceHolderStubImpl( delegationSpecifierListStub, JetStubElementTypes.DELEGATOR_SUPER_CLASS ) @@ -186,7 +188,7 @@ private class ClassClsStubBuilder( } private fun createCallableMemberStubs(classBody: KotlinPlaceHolderStubImpl) { - val container = ProtoContainer(classProto, null, c.nameResolver) + val container = ProtoContainer(classProto, null, c.nameResolver, c.typeTable) for (secondaryConstructorProto in classProto.constructorList) { if (Flags.IS_SECONDARY.get(secondaryConstructorProto.flags)) { @@ -216,6 +218,6 @@ private class ClassClsStubBuilder( private fun createNestedClassStub(classBody: StubElement, nestedClassId: ClassId) { val classDataWithSource = c.components.classDataFinder.findClassData(nestedClassId)!! val (nameResolver, classProto) = classDataWithSource.classData - createClassStub(classBody, classProto, nestedClassId, c.child(nameResolver)) + createClassStub(classBody, classProto, nestedClassId, c.child(nameResolver, TypeTable(classProto.typeTable))) } } diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/stubBuilder/ClsStubBuilderContext.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/stubBuilder/ClsStubBuilderContext.kt index dc35164c688..22424991581 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/stubBuilder/ClsStubBuilderContext.kt +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/stubBuilder/ClsStubBuilderContext.kt @@ -25,10 +25,7 @@ import org.jetbrains.kotlin.name.ClassId import org.jetbrains.kotlin.name.FqName import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.serialization.ProtoBuf -import org.jetbrains.kotlin.serialization.deserialization.AnnotationAndConstantLoader -import org.jetbrains.kotlin.serialization.deserialization.ClassDataFinder -import org.jetbrains.kotlin.serialization.deserialization.ErrorReporter -import org.jetbrains.kotlin.serialization.deserialization.NameResolver +import org.jetbrains.kotlin.serialization.deserialization.* import org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf import org.jetbrains.kotlin.storage.LockBasedStorageManager @@ -40,9 +37,10 @@ class ClsStubBuilderComponents( ) { fun createContext( nameResolver: NameResolver, - packageFqName: FqName + packageFqName: FqName, + typeTable: TypeTable ): ClsStubBuilderContext { - return ClsStubBuilderContext(this, nameResolver, packageFqName, EmptyTypeParameters) + return ClsStubBuilderContext(this, nameResolver, packageFqName, EmptyTypeParameters, typeTable) } } @@ -71,24 +69,31 @@ class ClsStubBuilderContext( val components: ClsStubBuilderComponents, val nameResolver: NameResolver, val containerFqName: FqName, - val typeParameters: TypeParameters + val typeParameters: TypeParameters, + val typeTable: TypeTable ) -internal fun ClsStubBuilderContext.child(typeParameterList: List, name: Name? = null): ClsStubBuilderContext { +internal fun ClsStubBuilderContext.child( + typeParameterList: List, + name: Name? = null, + typeTable: TypeTable = this.typeTable +): ClsStubBuilderContext { return ClsStubBuilderContext( this.components, this.nameResolver, if (name != null) this.containerFqName.child(name) else this.containerFqName, - this.typeParameters.child(nameResolver, typeParameterList) + this.typeParameters.child(nameResolver, typeParameterList), + typeTable ) } -internal fun ClsStubBuilderContext.child(nameResolver: NameResolver): ClsStubBuilderContext { +internal fun ClsStubBuilderContext.child(nameResolver: NameResolver, typeTable: TypeTable): ClsStubBuilderContext { return ClsStubBuilderContext( this.components, nameResolver, this.containerFqName, - this.typeParameters + this.typeParameters, + typeTable ) } diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/stubBuilder/KotlinClsStubBuilder.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/stubBuilder/KotlinClsStubBuilder.kt index fc5cb8d7fd7..48c59ba2c92 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/stubBuilder/KotlinClsStubBuilder.kt +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/stubBuilder/KotlinClsStubBuilder.kt @@ -34,6 +34,7 @@ import org.jetbrains.kotlin.load.kotlin.header.isCompatibleMultifileClassKind import org.jetbrains.kotlin.load.kotlin.header.isCompatiblePackageFacadeKind import org.jetbrains.kotlin.name.FqName import org.jetbrains.kotlin.psi.JetFile +import org.jetbrains.kotlin.serialization.deserialization.TypeTable import org.jetbrains.kotlin.serialization.jvm.JvmProtoBufUtil public open class KotlinClsStubBuilder : ClsStubBuilder() { @@ -77,18 +78,18 @@ public open class KotlinClsStubBuilder : ClsStubBuilder() { return when { header.isCompatiblePackageFacadeKind() -> { val (nameResolver, packageProto) = JvmProtoBufUtil.readPackageDataFrom(annotationData, strings) - val context = components.createContext(nameResolver, packageFqName) + val context = components.createContext(nameResolver, packageFqName, TypeTable(packageProto.typeTable)) createPackageFacadeStub(packageProto, packageFqName, context) } header.isCompatibleClassKind() -> { if (header.isLocalClass) return null val (nameResolver, classProto) = JvmProtoBufUtil.readClassDataFrom(annotationData, strings) - val context = components.createContext(nameResolver, packageFqName) + val context = components.createContext(nameResolver, packageFqName, TypeTable(classProto.typeTable)) createTopLevelClassStub(classId, classProto, context) } header.isCompatibleFileFacadeKind() -> { val (nameResolver, packageProto) = JvmProtoBufUtil.readPackageDataFrom(annotationData, strings) - val context = components.createContext(nameResolver, packageFqName) + val context = components.createContext(nameResolver, packageFqName, TypeTable(packageProto.typeTable)) createFileFacadeStub(packageProto, classId.asSingleFqName(), context) } else -> throw IllegalStateException("Should have processed " + file.getPath() + " with header $header") diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/stubBuilder/KotlinJavaScriptStubBuilder.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/stubBuilder/KotlinJavaScriptStubBuilder.kt index fb6360bb814..c4a87d7657b 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/stubBuilder/KotlinJavaScriptStubBuilder.kt +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/stubBuilder/KotlinJavaScriptStubBuilder.kt @@ -31,6 +31,7 @@ import org.jetbrains.kotlin.name.FqName import org.jetbrains.kotlin.psi.JetFile import org.jetbrains.kotlin.serialization.deserialization.NameResolver import org.jetbrains.kotlin.serialization.deserialization.NameResolverImpl +import org.jetbrains.kotlin.serialization.deserialization.TypeTable import org.jetbrains.kotlin.serialization.js.KotlinJavascriptSerializedResourcePaths import org.jetbrains.kotlin.serialization.js.toClassData import org.jetbrains.kotlin.serialization.js.toPackageData @@ -63,12 +64,14 @@ public open class KotlinJavaScriptStubBuilder : ClsStubBuilder() { if (isPackageHeader) { val packageData = content.toPackageData(nameResolver) - val context = components.createContext(packageData.nameResolver, packageFqName) + val context = components.createContext( + packageData.nameResolver, packageFqName, TypeTable(packageData.packageProto.typeTable) + ) return createPackageFacadeStub(packageData.packageProto, packageFqName, context) } else { val classData = content.toClassData(nameResolver) - val context = components.createContext(classData.nameResolver, packageFqName) + val context = components.createContext(classData.nameResolver, packageFqName, TypeTable(classData.classProto.typeTable)) val classId = JsMetaFileUtils.getClassId(file) return createTopLevelClassStub(classId, classData.classProto, context) } 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 0b3c8926ee8..ea298d5f812 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 @@ -35,6 +35,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.type +import org.jetbrains.kotlin.serialization.deserialization.upperBounds +import org.jetbrains.kotlin.serialization.deserialization.varargElementType import org.jetbrains.kotlin.types.DynamicTypeCapabilities import org.jetbrains.kotlin.utils.addToStdlib.singletonOrEmptyList import java.util.* @@ -98,12 +101,12 @@ class TypeClsStubBuilder(private val c: ClsStubBuilderContext) { } val typeArgumentsListStub = KotlinPlaceHolderStubImpl(typeStub, JetStubElementTypes.TYPE_ARGUMENT_LIST) typeArgumentProtoList.forEach { typeArgumentProto -> - val projectionKind = typeArgumentProto.getProjection().toProjectionKind() + val projectionKind = typeArgumentProto.projection.toProjectionKind() val typeProjection = KotlinTypeProjectionStubImpl(typeArgumentsListStub, projectionKind.ordinal()) if (projectionKind != JetProjectionKind.STAR) { - val modifierKeywordToken = projectionKind.getToken() as? JetModifierKeywordToken + val modifierKeywordToken = projectionKind.token as? JetModifierKeywordToken createModifierListStub(typeProjection, modifierKeywordToken.singletonOrEmptyList()) - createTypeReferenceStub(typeProjection, typeArgumentProto.getType()) + createTypeReferenceStub(typeProjection, typeArgumentProto.type(c.typeTable)!!) } } } @@ -116,12 +119,12 @@ class TypeClsStubBuilder(private val c: ClsStubBuilderContext) { } private fun createFunctionTypeStub(parent: StubElement, type: Type, isExtensionFunctionType: Boolean) { - val typeArgumentList = type.getArgumentList() + val typeArgumentList = type.argumentList val functionType = KotlinPlaceHolderStubImpl(parent, JetStubElementTypes.FUNCTION_TYPE) if (isExtensionFunctionType) { val functionTypeReceiverStub = KotlinPlaceHolderStubImpl(functionType, JetStubElementTypes.FUNCTION_TYPE_RECEIVER) - val receiverTypeProto = typeArgumentList.first().getType() + val receiverTypeProto = typeArgumentList.first().type(c.typeTable)!! createTypeReferenceStub(functionTypeReceiverStub, receiverTypeProto) } @@ -129,11 +132,13 @@ class TypeClsStubBuilder(private val c: ClsStubBuilderContext) { val typeArgumentsWithoutReceiverAndReturnType = typeArgumentList.subList(if (isExtensionFunctionType) 1 else 0, typeArgumentList.size() - 1) typeArgumentsWithoutReceiverAndReturnType.forEach { argument -> - val parameter = KotlinParameterStubImpl(parameterList, fqName = null, name = null, isMutable = false, hasValOrVar = false, hasDefaultValue = false) - createTypeReferenceStub(parameter, argument.getType()) + val parameter = KotlinParameterStubImpl( + parameterList, fqName = null, name = null, isMutable = false, hasValOrVar = false, hasDefaultValue = false + ) + createTypeReferenceStub(parameter, argument.type(c.typeTable)!!) } - val returnType = typeArgumentList.last().getType() + val returnType = typeArgumentList.last().type(c.typeTable)!! createTypeReferenceStub(functionType, returnType) } @@ -154,8 +159,10 @@ class TypeClsStubBuilder(private val c: ClsStubBuilderContext) { hasValOrVar = false, isMutable = false ) - val isVararg = valueParameterProto.hasVarargElementType() - val modifierList = if (isVararg) createModifierListStub(parameterStub, listOf(JetTokens.VARARG_KEYWORD)) else null + val varargElementType = valueParameterProto.varargElementType(c.typeTable) + val typeProto = varargElementType ?: valueParameterProto.type(c.typeTable) + val modifierList = + if (varargElementType != null) createModifierListStub(parameterStub, listOf(JetTokens.VARARG_KEYWORD)) else null val parameterAnnotations = c.components.annotationLoader.loadValueParameterAnnotations( container, callableProto, callableProto.annotatedCallableKind, index, valueParameterProto ) @@ -163,7 +170,6 @@ class TypeClsStubBuilder(private val c: ClsStubBuilderContext) { createAnnotationStubs(parameterAnnotations, modifierList ?: createEmptyModifierList(parameterStub)) } - val typeProto = if (isVararg) valueParameterProto.varargElementType else valueParameterProto.type createTypeReferenceStub(parameterStub, typeProto) } } @@ -185,21 +191,21 @@ class TypeClsStubBuilder(private val c: ClsStubBuilderContext) { val typeParameterListStub = KotlinPlaceHolderStubImpl(parent, JetStubElementTypes.TYPE_PARAMETER_LIST) val protosForTypeConstraintList = arrayListOf>() for (proto in typeParameterProtoList) { - val name = c.nameResolver.getName(proto.getName()) + val name = c.nameResolver.getName(proto.name) val typeParameterStub = KotlinTypeParameterStubImpl( typeParameterListStub, name = name.ref(), - isInVariance = proto.getVariance() == Variance.IN, - isOutVariance = proto.getVariance() == Variance.OUT + isInVariance = proto.variance == Variance.IN, + isOutVariance = proto.variance == Variance.OUT ) createTypeParameterModifierListStub(typeParameterStub, proto) - val upperBoundProtos = proto.getUpperBoundList() + val upperBoundProtos = proto.upperBounds(c.typeTable) if (upperBoundProtos.isNotEmpty()) { val upperBound = upperBoundProtos.first() if (!upperBound.isDefaultUpperBound()) { createTypeReferenceStub(typeParameterStub, upperBound) } - protosForTypeConstraintList addAll upperBoundProtos.drop(1).map { Pair(name, it) } + protosForTypeConstraintList.addAll(upperBoundProtos.drop(1).map { Pair(name, it) }) } } return protosForTypeConstraintList diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/stubBuilder/clsStubBuilding.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/stubBuilder/clsStubBuilding.kt index b9e2760c6e3..9356b65f25e 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/stubBuilder/clsStubBuilding.kt +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/stubBuilder/clsStubBuilding.kt @@ -36,6 +36,7 @@ import org.jetbrains.kotlin.serialization.Flags import org.jetbrains.kotlin.serialization.ProtoBuf import org.jetbrains.kotlin.serialization.deserialization.AnnotatedCallableKind import org.jetbrains.kotlin.serialization.deserialization.ProtoContainer +import org.jetbrains.kotlin.serialization.deserialization.TypeTable import org.jetbrains.kotlin.serialization.jvm.JvmProtoBufUtil fun createTopLevelClassStub(classId: ClassId, classProto: ProtoBuf.Class, context: ClsStubBuilderContext): KotlinFileStubImpl { @@ -51,7 +52,7 @@ fun createPackageFacadeStub( ): KotlinFileStubImpl { val fileStub = KotlinFileStubForIde.forFile(packageFqName, packageFqName.isRoot) setupFileStub(fileStub, packageFqName) - createCallableStubs(fileStub, c, ProtoContainer(null, packageFqName, c.nameResolver), + createCallableStubs(fileStub, c, ProtoContainer(null, packageFqName, c.nameResolver, c.typeTable), packageProto.functionList, packageProto.propertyList) return fileStub } @@ -64,7 +65,7 @@ fun createFileFacadeStub( val packageFqName = facadeFqName.parent() val fileStub = KotlinFileStubForIde.forFileFacadeStub(facadeFqName, packageFqName.isRoot) setupFileStub(fileStub, packageFqName) - createCallableStubs(fileStub, c, ProtoContainer(null, packageFqName, c.nameResolver), + createCallableStubs(fileStub, c, ProtoContainer(null, packageFqName, c.nameResolver, c.typeTable), packageProto.functionList, packageProto.propertyList) return fileStub } @@ -82,8 +83,8 @@ fun createMultifileClassStub( for (partFile in partFiles) { val partHeader = partFile.classHeader val (nameResolver, packageProto) = JvmProtoBufUtil.readPackageDataFrom(partHeader.annotationData!!, partHeader.strings!!) - val partContext = components.createContext(nameResolver, packageFqName) - createCallableStubs(fileStub, partContext, ProtoContainer(null, packageFqName, partContext.nameResolver), + val partContext = components.createContext(nameResolver, packageFqName, TypeTable(packageProto.typeTable)) + createCallableStubs(fileStub, partContext, ProtoContainer(null, packageFqName, partContext.nameResolver, partContext.typeTable), packageProto.functionList, packageProto.propertyList) } return fileStub 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 597ba7dcbfb..4401a64b791 100644 --- a/jps-plugin/src/org/jetbrains/kotlin/jps/incremental/ProtoCompareGenerated.kt +++ b/jps-plugin/src/org/jetbrains/kotlin/jps/incremental/ProtoCompareGenerated.kt @@ -39,11 +39,17 @@ open class ProtoCompareGenerated(public val oldNameResolver: NameResolver, publi if (!checkEqualsPackageProperty(old, new)) return false + if (old.hasTypeTable() != new.hasTypeTable()) return false + if (old.hasTypeTable()) { + if (!checkEquals(old.typeTable, new.typeTable)) return false + } + return true } public enum class ProtoBufPackageKind { FUNCTION_LIST, - PROPERTY_LIST + PROPERTY_LIST, + TYPE_TABLE } public fun difference(old: ProtoBuf.Package, new: ProtoBuf.Package): EnumSet { @@ -53,6 +59,11 @@ open class ProtoCompareGenerated(public val oldNameResolver: NameResolver, publi if (!checkEqualsPackageProperty(old, new)) result.add(ProtoBufPackageKind.PROPERTY_LIST) + if (old.hasTypeTable() != new.hasTypeTable()) result.add(ProtoBufPackageKind.TYPE_TABLE) + if (old.hasTypeTable()) { + if (!checkEquals(old.typeTable, new.typeTable)) result.add(ProtoBufPackageKind.TYPE_TABLE) + } + return result } @@ -73,6 +84,8 @@ open class ProtoCompareGenerated(public val oldNameResolver: NameResolver, publi if (!checkEqualsClassSupertype(old, new)) return false + if (!checkEqualsClassSupertypeId(old, new)) return false + if (!checkEqualsClassNestedClassName(old, new)) return false if (!checkEqualsClassConstructor(old, new)) return false @@ -83,6 +96,11 @@ open class ProtoCompareGenerated(public val oldNameResolver: NameResolver, publi if (!checkEqualsClassEnumEntry(old, new)) return false + if (old.hasTypeTable() != new.hasTypeTable()) return false + if (old.hasTypeTable()) { + if (!checkEquals(old.typeTable, new.typeTable)) return false + } + if (old.getExtensionCount(JvmProtoBuf.classAnnotation) != new.getExtensionCount(JvmProtoBuf.classAnnotation)) return false for(i in 0..old.getExtensionCount(JvmProtoBuf.classAnnotation) - 1) { @@ -97,11 +115,13 @@ open class ProtoCompareGenerated(public val oldNameResolver: NameResolver, publi COMPANION_OBJECT_NAME, TYPE_PARAMETER_LIST, SUPERTYPE_LIST, + SUPERTYPE_ID_LIST, NESTED_CLASS_NAME_LIST, CONSTRUCTOR_LIST, FUNCTION_LIST, PROPERTY_LIST, ENUM_ENTRY_LIST, + TYPE_TABLE, CLASS_ANNOTATION_LIST } @@ -124,6 +144,8 @@ open class ProtoCompareGenerated(public val oldNameResolver: NameResolver, publi if (!checkEqualsClassSupertype(old, new)) result.add(ProtoBufClassKind.SUPERTYPE_LIST) + if (!checkEqualsClassSupertypeId(old, new)) result.add(ProtoBufClassKind.SUPERTYPE_ID_LIST) + if (!checkEqualsClassNestedClassName(old, new)) result.add(ProtoBufClassKind.NESTED_CLASS_NAME_LIST) if (!checkEqualsClassConstructor(old, new)) result.add(ProtoBufClassKind.CONSTRUCTOR_LIST) @@ -134,6 +156,11 @@ open class ProtoCompareGenerated(public val oldNameResolver: NameResolver, publi if (!checkEqualsClassEnumEntry(old, new)) result.add(ProtoBufClassKind.ENUM_ENTRY_LIST) + if (old.hasTypeTable() != new.hasTypeTable()) result.add(ProtoBufClassKind.TYPE_TABLE) + if (old.hasTypeTable()) { + if (!checkEquals(old.typeTable, new.typeTable)) result.add(ProtoBufClassKind.TYPE_TABLE) + } + if (old.getExtensionCount(JvmProtoBuf.classAnnotation) != new.getExtensionCount(JvmProtoBuf.classAnnotation)) result.add(ProtoBufClassKind.CLASS_ANNOTATION_LIST) for(i in 0..old.getExtensionCount(JvmProtoBuf.classAnnotation) - 1) { @@ -151,7 +178,15 @@ open class ProtoCompareGenerated(public val oldNameResolver: NameResolver, publi if (!checkStringEquals(old.name, new.name)) return false - if (!checkEquals(old.returnType, new.returnType)) return false + if (old.hasReturnType() != new.hasReturnType()) return false + if (old.hasReturnType()) { + if (!checkEquals(old.returnType, new.returnType)) return false + } + + if (old.hasReturnTypeId() != new.hasReturnTypeId()) return false + if (old.hasReturnTypeId()) { + if (old.returnTypeId != new.returnTypeId) return false + } if (!checkEqualsFunctionTypeParameter(old, new)) return false @@ -160,8 +195,18 @@ open class ProtoCompareGenerated(public val oldNameResolver: NameResolver, publi if (!checkEquals(old.receiverType, new.receiverType)) return false } + if (old.hasReceiverTypeId() != new.hasReceiverTypeId()) return false + if (old.hasReceiverTypeId()) { + if (old.receiverTypeId != new.receiverTypeId) return false + } + if (!checkEqualsFunctionValueParameter(old, new)) return false + if (old.hasTypeTable() != new.hasTypeTable()) return false + if (old.hasTypeTable()) { + if (!checkEquals(old.typeTable, new.typeTable)) return false + } + if (old.hasExtension(JvmProtoBuf.methodSignature) != new.hasExtension(JvmProtoBuf.methodSignature)) return false if (old.hasExtension(JvmProtoBuf.methodSignature)) { if (!checkEquals(old.getExtension(JvmProtoBuf.methodSignature), new.getExtension(JvmProtoBuf.methodSignature))) return false @@ -183,7 +228,15 @@ open class ProtoCompareGenerated(public val oldNameResolver: NameResolver, publi if (!checkStringEquals(old.name, new.name)) return false - if (!checkEquals(old.returnType, new.returnType)) return false + if (old.hasReturnType() != new.hasReturnType()) return false + if (old.hasReturnType()) { + if (!checkEquals(old.returnType, new.returnType)) return false + } + + if (old.hasReturnTypeId() != new.hasReturnTypeId()) return false + if (old.hasReturnTypeId()) { + if (old.returnTypeId != new.returnTypeId) return false + } if (!checkEqualsPropertyTypeParameter(old, new)) return false @@ -192,6 +245,11 @@ open class ProtoCompareGenerated(public val oldNameResolver: NameResolver, publi if (!checkEquals(old.receiverType, new.receiverType)) return false } + if (old.hasReceiverTypeId() != new.hasReceiverTypeId()) return false + if (old.hasReceiverTypeId()) { + if (old.receiverTypeId != new.receiverTypeId) return false + } + if (old.hasSetterValueParameter() != new.hasSetterValueParameter()) return false if (old.hasSetterValueParameter()) { if (!checkEquals(old.setterValueParameter, new.setterValueParameter)) return false @@ -220,6 +278,17 @@ open class ProtoCompareGenerated(public val oldNameResolver: NameResolver, publi return true } + open fun checkEquals(old: ProtoBuf.TypeTable, new: ProtoBuf.TypeTable): Boolean { + if (!checkEqualsTypeTableType(old, new)) return false + + if (old.hasFirstNullable() != new.hasFirstNullable()) return false + if (old.hasFirstNullable()) { + if (old.firstNullable != new.firstNullable) return false + } + + return true + } + open fun checkEquals(old: ProtoBuf.TypeParameter, new: ProtoBuf.TypeParameter): Boolean { if (old.id != new.id) return false @@ -237,6 +306,8 @@ open class ProtoCompareGenerated(public val oldNameResolver: NameResolver, publi if (!checkEqualsTypeParameterUpperBound(old, new)) return false + if (!checkEqualsTypeParameterUpperBoundId(old, new)) return false + return true } @@ -258,6 +329,11 @@ open class ProtoCompareGenerated(public val oldNameResolver: NameResolver, publi if (!checkEquals(old.flexibleUpperBound, new.flexibleUpperBound)) return false } + if (old.hasFlexibleUpperBoundId() != new.hasFlexibleUpperBoundId()) return false + if (old.hasFlexibleUpperBoundId()) { + if (old.flexibleUpperBoundId != new.flexibleUpperBoundId) return false + } + if (old.hasClassName() != new.hasClassName()) return false if (old.hasClassName()) { if (!checkClassIdEquals(old.className, new.className)) return false @@ -314,13 +390,26 @@ open class ProtoCompareGenerated(public val oldNameResolver: NameResolver, publi if (!checkStringEquals(old.name, new.name)) return false - if (!checkEquals(old.type, new.type)) return false + if (old.hasType() != new.hasType()) return false + if (old.hasType()) { + if (!checkEquals(old.type, new.type)) return false + } + + if (old.hasTypeId() != new.hasTypeId()) return false + if (old.hasTypeId()) { + if (old.typeId != new.typeId) return false + } if (old.hasVarargElementType() != new.hasVarargElementType()) return false if (old.hasVarargElementType()) { if (!checkEquals(old.varargElementType, new.varargElementType)) return false } + if (old.hasVarargElementTypeId() != new.hasVarargElementTypeId()) return false + if (old.hasVarargElementTypeId()) { + if (old.varargElementTypeId != new.varargElementTypeId) return false + } + if (old.hasExtension(JvmProtoBuf.index) != new.hasExtension(JvmProtoBuf.index)) return false if (old.hasExtension(JvmProtoBuf.index)) { if (old.getExtension(JvmProtoBuf.index) != new.getExtension(JvmProtoBuf.index)) return false @@ -378,6 +467,11 @@ open class ProtoCompareGenerated(public val oldNameResolver: NameResolver, publi if (!checkEquals(old.type, new.type)) return false } + if (old.hasTypeId() != new.hasTypeId()) return false + if (old.hasTypeId()) { + if (old.typeId != new.typeId) return false + } + return true } @@ -494,6 +588,16 @@ open class ProtoCompareGenerated(public val oldNameResolver: NameResolver, publi return true } + open fun checkEqualsClassSupertypeId(old: ProtoBuf.Class, new: ProtoBuf.Class): Boolean { + if (old.supertypeIdCount != new.supertypeIdCount) return false + + for(i in 0..old.supertypeIdCount - 1) { + if (old.getSupertypeId(i) != new.getSupertypeId(i)) return false + } + + return true + } + open fun checkEqualsClassNestedClassName(old: ProtoBuf.Class, new: ProtoBuf.Class): Boolean { if (old.nestedClassNameCount != new.nestedClassNameCount) return false @@ -574,6 +678,16 @@ open class ProtoCompareGenerated(public val oldNameResolver: NameResolver, publi return true } + open fun checkEqualsTypeTableType(old: ProtoBuf.TypeTable, new: ProtoBuf.TypeTable): Boolean { + if (old.typeCount != new.typeCount) return false + + for(i in 0..old.typeCount - 1) { + if (!checkEquals(old.getType(i), new.getType(i))) return false + } + + return true + } + open fun checkEqualsTypeParameterUpperBound(old: ProtoBuf.TypeParameter, new: ProtoBuf.TypeParameter): Boolean { if (old.upperBoundCount != new.upperBoundCount) return false @@ -584,6 +698,16 @@ open class ProtoCompareGenerated(public val oldNameResolver: NameResolver, publi return true } + open fun checkEqualsTypeParameterUpperBoundId(old: ProtoBuf.TypeParameter, new: ProtoBuf.TypeParameter): Boolean { + if (old.upperBoundIdCount != new.upperBoundIdCount) return false + + for(i in 0..old.upperBoundIdCount - 1) { + if (old.getUpperBoundId(i) != new.getUpperBoundId(i)) return false + } + + return true + } + open fun checkEqualsTypeArgument(old: ProtoBuf.Type, new: ProtoBuf.Type): Boolean { if (old.argumentCount != new.argumentCount) return false @@ -666,6 +790,10 @@ public fun ProtoBuf.Package.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: hashCode = 31 * hashCode + getProperty(i).hashCode(stringIndexes, fqNameIndexes) } + if (hasTypeTable()) { + hashCode = 31 * hashCode + typeTable.hashCode(stringIndexes, fqNameIndexes) + } + return hashCode } @@ -690,6 +818,10 @@ public fun ProtoBuf.Class.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: ( hashCode = 31 * hashCode + getSupertype(i).hashCode(stringIndexes, fqNameIndexes) } + for(i in 0..supertypeIdCount - 1) { + hashCode = 31 * hashCode + getSupertypeId(i) + } + for(i in 0..nestedClassNameCount - 1) { hashCode = 31 * hashCode + stringIndexes(getNestedClassName(i)) } @@ -710,6 +842,10 @@ public fun ProtoBuf.Class.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: ( hashCode = 31 * hashCode + stringIndexes(getEnumEntry(i)) } + if (hasTypeTable()) { + hashCode = 31 * hashCode + typeTable.hashCode(stringIndexes, fqNameIndexes) + } + for(i in 0..getExtensionCount(JvmProtoBuf.classAnnotation) - 1) { hashCode = 31 * hashCode + getExtension(JvmProtoBuf.classAnnotation, i).hashCode(stringIndexes, fqNameIndexes) } @@ -726,7 +862,13 @@ public fun ProtoBuf.Function.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes hashCode = 31 * hashCode + stringIndexes(name) - hashCode = 31 * hashCode + returnType.hashCode(stringIndexes, fqNameIndexes) + if (hasReturnType()) { + hashCode = 31 * hashCode + returnType.hashCode(stringIndexes, fqNameIndexes) + } + + if (hasReturnTypeId()) { + hashCode = 31 * hashCode + returnTypeId + } for(i in 0..typeParameterCount - 1) { hashCode = 31 * hashCode + getTypeParameter(i).hashCode(stringIndexes, fqNameIndexes) @@ -736,10 +878,18 @@ public fun ProtoBuf.Function.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes hashCode = 31 * hashCode + receiverType.hashCode(stringIndexes, fqNameIndexes) } + if (hasReceiverTypeId()) { + hashCode = 31 * hashCode + receiverTypeId + } + for(i in 0..valueParameterCount - 1) { hashCode = 31 * hashCode + getValueParameter(i).hashCode(stringIndexes, fqNameIndexes) } + if (hasTypeTable()) { + hashCode = 31 * hashCode + typeTable.hashCode(stringIndexes, fqNameIndexes) + } + if (hasExtension(JvmProtoBuf.methodSignature)) { hashCode = 31 * hashCode + getExtension(JvmProtoBuf.methodSignature).hashCode(stringIndexes, fqNameIndexes) } @@ -760,7 +910,13 @@ public fun ProtoBuf.Property.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes hashCode = 31 * hashCode + stringIndexes(name) - hashCode = 31 * hashCode + returnType.hashCode(stringIndexes, fqNameIndexes) + if (hasReturnType()) { + hashCode = 31 * hashCode + returnType.hashCode(stringIndexes, fqNameIndexes) + } + + if (hasReturnTypeId()) { + hashCode = 31 * hashCode + returnTypeId + } for(i in 0..typeParameterCount - 1) { hashCode = 31 * hashCode + getTypeParameter(i).hashCode(stringIndexes, fqNameIndexes) @@ -770,6 +926,10 @@ public fun ProtoBuf.Property.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes hashCode = 31 * hashCode + receiverType.hashCode(stringIndexes, fqNameIndexes) } + if (hasReceiverTypeId()) { + hashCode = 31 * hashCode + receiverTypeId + } + if (hasSetterValueParameter()) { hashCode = 31 * hashCode + setterValueParameter.hashCode(stringIndexes, fqNameIndexes) } @@ -793,6 +953,20 @@ public fun ProtoBuf.Property.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes return hashCode } +public fun ProtoBuf.TypeTable.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (Int) -> Int): Int { + var hashCode = 1 + + for(i in 0..typeCount - 1) { + hashCode = 31 * hashCode + getType(i).hashCode(stringIndexes, fqNameIndexes) + } + + if (hasFirstNullable()) { + hashCode = 31 * hashCode + firstNullable + } + + return hashCode +} + public fun ProtoBuf.TypeParameter.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (Int) -> Int): Int { var hashCode = 1 @@ -812,6 +986,10 @@ public fun ProtoBuf.TypeParameter.hashCode(stringIndexes: (Int) -> Int, fqNameIn hashCode = 31 * hashCode + getUpperBound(i).hashCode(stringIndexes, fqNameIndexes) } + for(i in 0..upperBoundIdCount - 1) { + hashCode = 31 * hashCode + getUpperBoundId(i) + } + return hashCode } @@ -834,6 +1012,10 @@ public fun ProtoBuf.Type.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (I hashCode = 31 * hashCode + flexibleUpperBound.hashCode(stringIndexes, fqNameIndexes) } + if (hasFlexibleUpperBoundId()) { + hashCode = 31 * hashCode + flexibleUpperBoundId + } + if (hasClassName()) { hashCode = 31 * hashCode + fqNameIndexes(className) } @@ -892,12 +1074,22 @@ public fun ProtoBuf.ValueParameter.hashCode(stringIndexes: (Int) -> Int, fqNameI hashCode = 31 * hashCode + stringIndexes(name) - hashCode = 31 * hashCode + type.hashCode(stringIndexes, fqNameIndexes) + if (hasType()) { + hashCode = 31 * hashCode + type.hashCode(stringIndexes, fqNameIndexes) + } + + if (hasTypeId()) { + hashCode = 31 * hashCode + typeId + } if (hasVarargElementType()) { hashCode = 31 * hashCode + varargElementType.hashCode(stringIndexes, fqNameIndexes) } + if (hasVarargElementTypeId()) { + hashCode = 31 * hashCode + varargElementTypeId + } + if (hasExtension(JvmProtoBuf.index)) { hashCode = 31 * hashCode + getExtension(JvmProtoBuf.index) } @@ -952,6 +1144,10 @@ public fun ProtoBuf.Type.Argument.hashCode(stringIndexes: (Int) -> Int, fqNameIn hashCode = 31 * hashCode + type.hashCode(stringIndexes, fqNameIndexes) } + if (hasTypeId()) { + hashCode = 31 * hashCode + typeId + } + return hashCode } diff --git a/jps-plugin/src/org/jetbrains/kotlin/jps/incremental/protoDifferenceUtils.kt b/jps-plugin/src/org/jetbrains/kotlin/jps/incremental/protoDifferenceUtils.kt index f80ba52a0cf..60954d7d26e 100644 --- a/jps-plugin/src/org/jetbrains/kotlin/jps/incremental/protoDifferenceUtils.kt +++ b/jps-plugin/src/org/jetbrains/kotlin/jps/incremental/protoDifferenceUtils.kt @@ -210,6 +210,9 @@ private class DifferenceCalculatorForClass(oldData: ProtoMapValue, newData: Prot names.addAll(calcDifferenceForNonPrivateMembers(ProtoBuf.Class::getPropertyList)) ProtoBufClassKind.ENUM_ENTRY_LIST -> names.addAll(calcDifferenceForNames(oldProto.enumEntryList, newProto.enumEntryList)) + ProtoBufClassKind.TYPE_TABLE -> { + // TODO + } ProtoBufClassKind.FLAGS, ProtoBufClassKind.FQ_NAME, ProtoBufClassKind.TYPE_PARAMETER_LIST, @@ -257,6 +260,9 @@ private class DifferenceCalculatorForPackageFacade(oldData: ProtoMapValue, newDa names.addAll(calcDifferenceForNonPrivateMembers(ProtoBuf.Package::getFunctionList)) ProtoBufPackageKind.PROPERTY_LIST -> names.addAll(calcDifferenceForNonPrivateMembers(ProtoBuf.Package::getPropertyList)) + ProtoBufPackageKind.TYPE_TABLE -> { + // TODO + } else -> throw IllegalArgumentException("Unsupported kind: $kind") }