From 7d5bd3cf50e9dcf3287fea5df82041d358248023 Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Sat, 19 Sep 2015 03:16:02 +0300 Subject: [PATCH] Simplify storage of JVM signatures in binary metadata Store the whole method & field descriptor strings. Moving these strings to separate annotation arguments later will allow to reuse them with the ones in the constant pool, presumably allowing to save lots of space (up to 10%) --- .../codegen/JvmSerializerExtension.java | 132 +- .../kotlin/serialization/StringTable.java | 3 - .../kotlin/serialization/StringTableImpl.java | 5 +- .../serialization/jvm/DebugJvmProtoBuf.java | 1704 ++--------------- .../src/jvm_descriptors.proto | 37 +- ...tBinaryClassAnnotationAndConstantLoader.kt | 31 +- .../kotlin/load/kotlin/MemberSignature.kt | 16 +- .../load/kotlin/SignatureDeserializer.java | 82 - .../kotlin/serialization/jvm/JvmProtoBuf.java | 1179 +----------- .../jvm/internal/KDeclarationContainerImpl.kt | 75 +- .../reflect/jvm/internal/RuntimeTypeMapper.kt | 13 +- .../jps/incremental/ProtoCompareGenerated.kt | 61 +- 12 files changed, 347 insertions(+), 2991 deletions(-) delete mode 100644 core/descriptor.loader.java/src/org/jetbrains/kotlin/load/kotlin/SignatureDeserializer.java diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/JvmSerializerExtension.java b/compiler/backend/src/org/jetbrains/kotlin/codegen/JvmSerializerExtension.java index 59a38014ebf..5775784cf12 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/JvmSerializerExtension.java +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/JvmSerializerExtension.java @@ -24,8 +24,6 @@ import org.jetbrains.kotlin.codegen.state.JetTypeMapper; import org.jetbrains.kotlin.descriptors.*; import org.jetbrains.kotlin.descriptors.annotations.AnnotationDescriptor; import org.jetbrains.kotlin.load.java.lazy.types.RawTypeCapabilities; -import org.jetbrains.kotlin.load.kotlin.SignatureDeserializer; -import org.jetbrains.kotlin.name.FqName; import org.jetbrains.kotlin.serialization.*; import org.jetbrains.kotlin.serialization.deserialization.NameResolver; import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedPropertyDescriptor; @@ -35,8 +33,6 @@ import org.jetbrains.kotlin.types.JetType; import org.jetbrains.org.objectweb.asm.Type; import org.jetbrains.org.objectweb.asm.commons.Method; -import java.util.Arrays; - import static org.jetbrains.kotlin.codegen.AsmUtil.shortNameByAsmType; import static org.jetbrains.kotlin.codegen.JvmSerializationBindings.*; @@ -107,7 +103,8 @@ public class JvmSerializerExtension extends SerializerExtension { if (callable instanceof DeserializedSimpleFunctionDescriptor) { DeserializedSimpleFunctionDescriptor deserialized = (DeserializedSimpleFunctionDescriptor) callable; signature = signatureSerializer.copyMethodSignature( - deserialized.getProto().getExtension(JvmProtoBuf.methodSignature), deserialized.getNameResolver()); + deserialized.getProto().getExtension(JvmProtoBuf.methodSignature), deserialized.getNameResolver() + ); } else { Method method = bindings.get(METHOD_FOR_FUNCTION, (FunctionDescriptor) callable); @@ -126,23 +123,22 @@ public class JvmSerializerExtension extends SerializerExtension { Method setterMethod = setter == null ? null : bindings.get(METHOD_FOR_FUNCTION, setter); Pair field = bindings.get(FIELD_FOR_PROPERTY, property); - Type fieldType; String fieldName; + String fieldDesc; boolean isStaticInOuter; - Method syntheticMethod; if (field != null) { - fieldType = field.first; fieldName = field.second; + fieldDesc = field.first.getDescriptor(); isStaticInOuter = bindings.get(STATIC_FIELD_IN_OUTER_CLASS, property); - syntheticMethod = bindings.get(SYNTHETIC_METHOD_FOR_PROPERTY, property); } else { - fieldType = null; fieldName = null; + fieldDesc = null; isStaticInOuter = false; - syntheticMethod = bindings.get(SYNTHETIC_METHOD_FOR_PROPERTY, property); } + Method syntheticMethod = bindings.get(SYNTHETIC_METHOD_FOR_PROPERTY, property); + JvmProtoBuf.JvmPropertySignature signature; if (callable instanceof DeserializedPropertyDescriptor) { DeserializedPropertyDescriptor deserializedCallable = (DeserializedPropertyDescriptor) callable; @@ -152,8 +148,12 @@ public class JvmSerializerExtension extends SerializerExtension { ); } else { - signature = signatureSerializer - .propertySignature(fieldType, fieldName, isStaticInOuter, syntheticMethod, getterMethod, setterMethod); + signature = signatureSerializer.propertySignature( + fieldName, fieldDesc, isStaticInOuter, + syntheticMethod != null ? signatureSerializer.methodSignature(syntheticMethod) : null, + getterMethod != null ? signatureSerializer.methodSignature(getterMethod) : null, + setterMethod != null ? signatureSerializer.methodSignature(setterMethod) : null + ); } proto.setExtension(JvmProtoBuf.propertySignature, signature); } @@ -172,23 +172,18 @@ public class JvmSerializerExtension extends SerializerExtension { @NotNull JvmProtoBuf.JvmMethodSignature signature, @NotNull NameResolver nameResolver ) { - String method = new SignatureDeserializer(nameResolver).methodSignatureString(signature); - return methodSignature(getAsmMethod(method)); + return methodSignature(new Method( + nameResolver.getString(signature.getName()), + nameResolver.getString(signature.getDesc()) + )); } @NotNull public JvmProtoBuf.JvmMethodSignature methodSignature(@NotNull Method method) { - JvmProtoBuf.JvmMethodSignature.Builder signature = JvmProtoBuf.JvmMethodSignature.newBuilder(); - - signature.setName(stringTable.getStringIndex(method.getName())); - - signature.setReturnType(type(method.getReturnType())); - - for (Type type : method.getArgumentTypes()) { - signature.addParameterType(type(type)); - } - - return signature.build(); + return JvmProtoBuf.JvmMethodSignature.newBuilder() + .setName(stringTable.getStringIndex(method.getName())) + .setDesc(stringTable.getStringIndex(method.getDescriptor())) + .build(); } @NotNull @@ -196,103 +191,68 @@ public class JvmSerializerExtension extends SerializerExtension { @NotNull JvmProtoBuf.JvmPropertySignature signature, @NotNull NameResolver nameResolver ) { - Type fieldType; String fieldName; + String fieldDesc; boolean isStaticInOuter; - SignatureDeserializer signatureDeserializer = new SignatureDeserializer(nameResolver); if (signature.hasField()) { JvmProtoBuf.JvmFieldSignature field = signature.getField(); - fieldType = Type.getType(signatureDeserializer.typeDescriptor(field.getType())); - fieldName = nameResolver.getName(field.getName()).asString(); + fieldName = nameResolver.getString(field.getName()); + fieldDesc = nameResolver.getString(field.getDesc()); isStaticInOuter = field.getIsStaticInOuter(); } else { - fieldType = null; fieldName = null; + fieldDesc = null; isStaticInOuter = false; } - Method syntheticMethod = signature.hasSyntheticMethod() - ? getAsmMethod(signatureDeserializer.methodSignatureString(signature.getSyntheticMethod())) - : null; - - Method getter = signature.hasGetter() ? getAsmMethod(signatureDeserializer.methodSignatureString(signature.getGetter())) : null; - Method setter = signature.hasSetter() ? getAsmMethod(signatureDeserializer.methodSignatureString(signature.getSetter())) : null; - - return propertySignature(fieldType, fieldName, isStaticInOuter, syntheticMethod, getter, setter); + return propertySignature( + fieldName, fieldDesc, isStaticInOuter, + signature.hasSyntheticMethod() ? copyMethodSignature(signature.getSyntheticMethod(), nameResolver) : null, + signature.hasGetter() ? copyMethodSignature(signature.getGetter(), nameResolver) : null, + signature.hasSetter() ? copyMethodSignature(signature.getSetter(), nameResolver) : null + ); } @NotNull public JvmProtoBuf.JvmPropertySignature propertySignature( - @Nullable Type fieldType, @Nullable String fieldName, + @Nullable String fieldDesc, boolean isStaticInOuter, - @Nullable Method syntheticMethod, - @Nullable Method getter, - @Nullable Method setter + @Nullable JvmProtoBuf.JvmMethodSignature syntheticMethod, + @Nullable JvmProtoBuf.JvmMethodSignature getter, + @Nullable JvmProtoBuf.JvmMethodSignature setter ) { JvmProtoBuf.JvmPropertySignature.Builder signature = JvmProtoBuf.JvmPropertySignature.newBuilder(); - if (fieldType != null) { - assert fieldName != null : "Field name shouldn't be null when there's a field type: " + fieldType; - signature.setField(fieldSignature(fieldType, fieldName, isStaticInOuter)); + if (fieldDesc != null) { + assert fieldName != null : "Field name shouldn't be null when there's a field type: " + fieldDesc; + signature.setField(fieldSignature(fieldName, fieldDesc, isStaticInOuter)); } if (syntheticMethod != null) { - signature.setSyntheticMethod(methodSignature(syntheticMethod)); + signature.setSyntheticMethod(syntheticMethod); } if (getter != null) { - signature.setGetter(methodSignature(getter)); + signature.setGetter(getter); } if (setter != null) { - signature.setSetter(methodSignature(setter)); + signature.setSetter(setter); } return signature.build(); } @NotNull - public JvmProtoBuf.JvmFieldSignature fieldSignature(@NotNull Type type, @NotNull String name, boolean isStaticInOuter) { - JvmProtoBuf.JvmFieldSignature.Builder signature = JvmProtoBuf.JvmFieldSignature.newBuilder(); - signature.setName(stringTable.getStringIndex(name)); - signature.setType(type(type)); + public JvmProtoBuf.JvmFieldSignature fieldSignature(@NotNull String name, @NotNull String desc, boolean isStaticInOuter) { + JvmProtoBuf.JvmFieldSignature.Builder builder = JvmProtoBuf.JvmFieldSignature.newBuilder() + .setName(stringTable.getStringIndex(name)) + .setDesc(stringTable.getStringIndex(desc)); if (isStaticInOuter) { - signature.setIsStaticInOuter(true); + builder.setIsStaticInOuter(true); } - return signature.build(); - } - - @NotNull - public JvmProtoBuf.JvmType type(@NotNull Type givenType) { - JvmProtoBuf.JvmType.Builder builder = JvmProtoBuf.JvmType.newBuilder(); - - Type type = givenType; - if (type.getSort() == Type.ARRAY) { - builder.setArrayDimension(type.getDimensions()); - type = type.getElementType(); - } - - if (type.getSort() == Type.OBJECT) { - FqName fqName = internalNameToFqName(type.getInternalName()); - builder.setClassFqName(stringTable.getFqNameIndex(fqName)); - } - else { - builder.setPrimitiveType(JvmProtoBuf.JvmType.PrimitiveType.valueOf(type.getSort())); - } - return builder.build(); } - - @NotNull - private FqName internalNameToFqName(@NotNull String internalName) { - return FqName.fromSegments(Arrays.asList(internalName.split("/"))); - } - } - - @NotNull - private static Method getAsmMethod(@NotNull String nameAndDesc) { - int indexOf = nameAndDesc.indexOf('('); - return new Method(nameAndDesc.substring(0, indexOf), nameAndDesc.substring(indexOf)); } } diff --git a/compiler/serialization/src/org/jetbrains/kotlin/serialization/StringTable.java b/compiler/serialization/src/org/jetbrains/kotlin/serialization/StringTable.java index 62db7a8c6d4..03f6cc4d442 100644 --- a/compiler/serialization/src/org/jetbrains/kotlin/serialization/StringTable.java +++ b/compiler/serialization/src/org/jetbrains/kotlin/serialization/StringTable.java @@ -18,7 +18,6 @@ package org.jetbrains.kotlin.serialization; import org.jetbrains.annotations.NotNull; import org.jetbrains.kotlin.descriptors.ClassDescriptor; -import org.jetbrains.kotlin.name.FqName; import java.io.OutputStream; @@ -27,7 +26,5 @@ public interface StringTable { int getFqNameIndex(@NotNull ClassDescriptor descriptor); - int getFqNameIndex(@NotNull FqName fqName); - void serializeTo(@NotNull OutputStream output); } diff --git a/compiler/serialization/src/org/jetbrains/kotlin/serialization/StringTableImpl.java b/compiler/serialization/src/org/jetbrains/kotlin/serialization/StringTableImpl.java index 68639b594dd..11d9d8e1904 100644 --- a/compiler/serialization/src/org/jetbrains/kotlin/serialization/StringTableImpl.java +++ b/compiler/serialization/src/org/jetbrains/kotlin/serialization/StringTableImpl.java @@ -91,7 +91,7 @@ public class StringTableImpl implements StringTable { shortName = descriptor.getName().asString(); FqName packageFqName = ((PackageFragmentDescriptor) containingDeclaration).getFqName(); if (!packageFqName.isRoot()) { - builder.setParentQualifiedName(getFqNameIndex(packageFqName)); + builder.setParentQualifiedName(getPackageFqNameIndex(packageFqName)); } } else if (containingDeclaration instanceof ClassDescriptor) { @@ -109,8 +109,7 @@ public class StringTableImpl implements StringTable { return qualifiedNames.intern(new FqNameProto(builder)); } - @Override - public int getFqNameIndex(@NotNull FqName fqName) { + private int getPackageFqNameIndex(@NotNull FqName fqName) { int result = -1; for (Name segment : fqName.pathSegments()) { QualifiedName.Builder builder = QualifiedName.newBuilder(); diff --git a/compiler/tests/org/jetbrains/kotlin/serialization/jvm/DebugJvmProtoBuf.java b/compiler/tests/org/jetbrains/kotlin/serialization/jvm/DebugJvmProtoBuf.java index 171295a1be4..264b7970a94 100644 --- a/compiler/tests/org/jetbrains/kotlin/serialization/jvm/DebugJvmProtoBuf.java +++ b/compiler/tests/org/jetbrains/kotlin/serialization/jvm/DebugJvmProtoBuf.java @@ -15,766 +15,6 @@ public final class DebugJvmProtoBuf { registry.add(org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.index); registry.add(org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.classAnnotation); } - public interface JvmTypeOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional .org.jetbrains.kotlin.serialization.jvm.JvmType.PrimitiveType primitive_type = 1; - /** - * optional .org.jetbrains.kotlin.serialization.jvm.JvmType.PrimitiveType primitive_type = 1; - */ - boolean hasPrimitiveType(); - /** - * optional .org.jetbrains.kotlin.serialization.jvm.JvmType.PrimitiveType primitive_type = 1; - */ - org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.PrimitiveType getPrimitiveType(); - - // optional int32 class_fq_name = 2; - /** - * optional int32 class_fq_name = 2; - * - *
-     * id in QualifiedNameTable of a name in the following format: 'package.Outer$Nested'
-     * 
- */ - boolean hasClassFqName(); - /** - * optional int32 class_fq_name = 2; - * - *
-     * id in QualifiedNameTable of a name in the following format: 'package.Outer$Nested'
-     * 
- */ - int getClassFqName(); - - // optional int32 array_dimension = 3 [default = 0]; - /** - * optional int32 array_dimension = 3 [default = 0]; - */ - boolean hasArrayDimension(); - /** - * optional int32 array_dimension = 3 [default = 0]; - */ - int getArrayDimension(); - } - /** - * Protobuf type {@code org.jetbrains.kotlin.serialization.jvm.JvmType} - * - *
-   * Either a primitive type, or a class FQ name should be present
-   * 
- */ - public static final class JvmType extends - com.google.protobuf.GeneratedMessage - implements JvmTypeOrBuilder { - // Use JvmType.newBuilder() to construct. - private JvmType(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private JvmType(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } - - private static final JvmType defaultInstance; - public static JvmType getDefaultInstance() { - return defaultInstance; - } - - public JvmType getDefaultInstanceForType() { - return defaultInstance; - } - - private final com.google.protobuf.UnknownFieldSet unknownFields; - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private JvmType( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, unknownFields, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - int rawValue = input.readEnum(); - org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.PrimitiveType value = org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.PrimitiveType.valueOf(rawValue); - if (value == null) { - unknownFields.mergeVarintField(1, rawValue); - } else { - bitField0_ |= 0x00000001; - primitiveType_ = value; - } - break; - } - case 16: { - bitField0_ |= 0x00000002; - classFqName_ = input.readInt32(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - arrayDimension_ = input.readInt32(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.internal_static_org_jetbrains_kotlin_serialization_jvm_JvmType_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.internal_static_org_jetbrains_kotlin_serialization_jvm_JvmType_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.class, org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.Builder.class); - } - - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public JvmType parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new JvmType(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - /** - * Protobuf enum {@code org.jetbrains.kotlin.serialization.jvm.JvmType.PrimitiveType} - */ - public enum PrimitiveType - implements com.google.protobuf.ProtocolMessageEnum { - /** - * VOID = 0; - * - *
-       * These values correspond to ASM Type sorts
-       * 
- */ - VOID(0, 0), - /** - * BOOLEAN = 1; - */ - BOOLEAN(1, 1), - /** - * CHAR = 2; - */ - CHAR(2, 2), - /** - * BYTE = 3; - */ - BYTE(3, 3), - /** - * SHORT = 4; - */ - SHORT(4, 4), - /** - * INT = 5; - */ - INT(5, 5), - /** - * FLOAT = 6; - */ - FLOAT(6, 6), - /** - * LONG = 7; - */ - LONG(7, 7), - /** - * DOUBLE = 8; - */ - DOUBLE(8, 8), - ; - - /** - * VOID = 0; - * - *
-       * These values correspond to ASM Type sorts
-       * 
- */ - public static final int VOID_VALUE = 0; - /** - * BOOLEAN = 1; - */ - public static final int BOOLEAN_VALUE = 1; - /** - * CHAR = 2; - */ - public static final int CHAR_VALUE = 2; - /** - * BYTE = 3; - */ - public static final int BYTE_VALUE = 3; - /** - * SHORT = 4; - */ - public static final int SHORT_VALUE = 4; - /** - * INT = 5; - */ - public static final int INT_VALUE = 5; - /** - * FLOAT = 6; - */ - public static final int FLOAT_VALUE = 6; - /** - * LONG = 7; - */ - public static final int LONG_VALUE = 7; - /** - * DOUBLE = 8; - */ - public static final int DOUBLE_VALUE = 8; - - - public final int getNumber() { return value; } - - public static PrimitiveType valueOf(int value) { - switch (value) { - case 0: return VOID; - case 1: return BOOLEAN; - case 2: return CHAR; - case 3: return BYTE; - case 4: return SHORT; - case 5: return INT; - case 6: return FLOAT; - case 7: return LONG; - case 8: return DOUBLE; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static com.google.protobuf.Internal.EnumLiteMap - internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public PrimitiveType findValueByNumber(int number) { - return PrimitiveType.valueOf(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - return getDescriptor().getValues().get(index); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.getDescriptor().getEnumTypes().get(0); - } - - private static final PrimitiveType[] VALUES = values(); - - public static PrimitiveType valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - return VALUES[desc.getIndex()]; - } - - private final int index; - private final int value; - - private PrimitiveType(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:org.jetbrains.kotlin.serialization.jvm.JvmType.PrimitiveType) - } - - private int bitField0_; - // optional .org.jetbrains.kotlin.serialization.jvm.JvmType.PrimitiveType primitive_type = 1; - public static final int PRIMITIVE_TYPE_FIELD_NUMBER = 1; - private org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.PrimitiveType primitiveType_; - /** - * optional .org.jetbrains.kotlin.serialization.jvm.JvmType.PrimitiveType primitive_type = 1; - */ - public boolean hasPrimitiveType() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional .org.jetbrains.kotlin.serialization.jvm.JvmType.PrimitiveType primitive_type = 1; - */ - public org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.PrimitiveType getPrimitiveType() { - return primitiveType_; - } - - // optional int32 class_fq_name = 2; - public static final int CLASS_FQ_NAME_FIELD_NUMBER = 2; - private int classFqName_; - /** - * optional int32 class_fq_name = 2; - * - *
-     * id in QualifiedNameTable of a name in the following format: 'package.Outer$Nested'
-     * 
- */ - public boolean hasClassFqName() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional int32 class_fq_name = 2; - * - *
-     * id in QualifiedNameTable of a name in the following format: 'package.Outer$Nested'
-     * 
- */ - public int getClassFqName() { - return classFqName_; - } - - // optional int32 array_dimension = 3 [default = 0]; - public static final int ARRAY_DIMENSION_FIELD_NUMBER = 3; - private int arrayDimension_; - /** - * optional int32 array_dimension = 3 [default = 0]; - */ - public boolean hasArrayDimension() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int32 array_dimension = 3 [default = 0]; - */ - public int getArrayDimension() { - return arrayDimension_; - } - - private void initFields() { - primitiveType_ = org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.PrimitiveType.VOID; - classFqName_ = 0; - arrayDimension_ = 0; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeEnum(1, primitiveType_.getNumber()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeInt32(2, classFqName_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeInt32(3, arrayDimension_); - } - getUnknownFields().writeTo(output); - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, primitiveType_.getNumber()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, classFqName_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, arrayDimension_); - } - 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.jvm.DebugJvmProtoBuf.JvmType parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType 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.jvm.DebugJvmProtoBuf.JvmType parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType 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.jvm.DebugJvmProtoBuf.JvmType parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType 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.jvm.DebugJvmProtoBuf.JvmType parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType 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.jvm.DebugJvmProtoBuf.JvmType 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.jvm.JvmType} - * - *
-     * Either a primitive type, or a class FQ name should be present
-     * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmTypeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.internal_static_org_jetbrains_kotlin_serialization_jvm_JvmType_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.internal_static_org_jetbrains_kotlin_serialization_jvm_JvmType_fieldAccessorTable - .ensureFieldAccessorsInitialized( - org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.class, org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.Builder.class); - } - - // Construct using org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - primitiveType_ = org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.PrimitiveType.VOID; - bitField0_ = (bitField0_ & ~0x00000001); - classFqName_ = 0; - bitField0_ = (bitField0_ & ~0x00000002); - arrayDimension_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.internal_static_org_jetbrains_kotlin_serialization_jvm_JvmType_descriptor; - } - - public org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType getDefaultInstanceForType() { - return org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.getDefaultInstance(); - } - - public org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType build() { - org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType buildPartial() { - org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType result = new org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.primitiveType_ = primitiveType_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.classFqName_ = classFqName_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.arrayDimension_ = arrayDimension_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType) { - return mergeFrom((org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType other) { - if (other == org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.getDefaultInstance()) return this; - if (other.hasPrimitiveType()) { - setPrimitiveType(other.getPrimitiveType()); - } - if (other.hasClassFqName()) { - setClassFqName(other.getClassFqName()); - } - if (other.hasArrayDimension()) { - setArrayDimension(other.getArrayDimension()); - } - this.mergeUnknownFields(other.getUnknownFields()); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - // optional .org.jetbrains.kotlin.serialization.jvm.JvmType.PrimitiveType primitive_type = 1; - private org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.PrimitiveType primitiveType_ = org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.PrimitiveType.VOID; - /** - * optional .org.jetbrains.kotlin.serialization.jvm.JvmType.PrimitiveType primitive_type = 1; - */ - public boolean hasPrimitiveType() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional .org.jetbrains.kotlin.serialization.jvm.JvmType.PrimitiveType primitive_type = 1; - */ - public org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.PrimitiveType getPrimitiveType() { - return primitiveType_; - } - /** - * optional .org.jetbrains.kotlin.serialization.jvm.JvmType.PrimitiveType primitive_type = 1; - */ - public Builder setPrimitiveType(org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.PrimitiveType value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - primitiveType_ = value; - onChanged(); - return this; - } - /** - * optional .org.jetbrains.kotlin.serialization.jvm.JvmType.PrimitiveType primitive_type = 1; - */ - public Builder clearPrimitiveType() { - bitField0_ = (bitField0_ & ~0x00000001); - primitiveType_ = org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.PrimitiveType.VOID; - onChanged(); - return this; - } - - // optional int32 class_fq_name = 2; - private int classFqName_ ; - /** - * optional int32 class_fq_name = 2; - * - *
-       * id in QualifiedNameTable of a name in the following format: 'package.Outer$Nested'
-       * 
- */ - public boolean hasClassFqName() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional int32 class_fq_name = 2; - * - *
-       * id in QualifiedNameTable of a name in the following format: 'package.Outer$Nested'
-       * 
- */ - public int getClassFqName() { - return classFqName_; - } - /** - * optional int32 class_fq_name = 2; - * - *
-       * id in QualifiedNameTable of a name in the following format: 'package.Outer$Nested'
-       * 
- */ - public Builder setClassFqName(int value) { - bitField0_ |= 0x00000002; - classFqName_ = value; - onChanged(); - return this; - } - /** - * optional int32 class_fq_name = 2; - * - *
-       * id in QualifiedNameTable of a name in the following format: 'package.Outer$Nested'
-       * 
- */ - public Builder clearClassFqName() { - bitField0_ = (bitField0_ & ~0x00000002); - classFqName_ = 0; - onChanged(); - return this; - } - - // optional int32 array_dimension = 3 [default = 0]; - private int arrayDimension_ ; - /** - * optional int32 array_dimension = 3 [default = 0]; - */ - public boolean hasArrayDimension() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int32 array_dimension = 3 [default = 0]; - */ - public int getArrayDimension() { - return arrayDimension_; - } - /** - * optional int32 array_dimension = 3 [default = 0]; - */ - public Builder setArrayDimension(int value) { - bitField0_ |= 0x00000004; - arrayDimension_ = value; - onChanged(); - return this; - } - /** - * optional int32 array_dimension = 3 [default = 0]; - */ - public Builder clearArrayDimension() { - bitField0_ = (bitField0_ & ~0x00000004); - arrayDimension_ = 0; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.jvm.JvmType) - } - - static { - defaultInstance = new JvmType(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.serialization.jvm.JvmType) - } - public interface JvmMethodSignatureOrBuilder extends com.google.protobuf.MessageOrBuilder { @@ -788,44 +28,15 @@ public final class DebugJvmProtoBuf { */ int getName(); - // required .org.jetbrains.kotlin.serialization.jvm.JvmType return_type = 2; + // required int32 desc = 2; /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType return_type = 2; + * required int32 desc = 2; */ - boolean hasReturnType(); + boolean hasDesc(); /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType return_type = 2; + * required int32 desc = 2; */ - org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType getReturnType(); - /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType return_type = 2; - */ - org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmTypeOrBuilder getReturnTypeOrBuilder(); - - // repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - java.util.List - getParameterTypeList(); - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType getParameterType(int index); - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - int getParameterTypeCount(); - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - java.util.List - getParameterTypeOrBuilderList(); - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmTypeOrBuilder getParameterTypeOrBuilder( - int index); + int getDesc(); } /** * Protobuf type {@code org.jetbrains.kotlin.serialization.jvm.JvmMethodSignature} @@ -883,25 +94,9 @@ public final class DebugJvmProtoBuf { name_ = input.readInt32(); break; } - case 18: { - org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) == 0x00000002)) { - subBuilder = returnType_.toBuilder(); - } - returnType_ = input.readMessage(org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(returnType_); - returnType_ = subBuilder.buildPartial(); - } + case 16: { bitField0_ |= 0x00000002; - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - parameterType_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - parameterType_.add(input.readMessage(org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.PARSER, extensionRegistry)); + desc_ = input.readInt32(); break; } } @@ -912,9 +107,6 @@ public final class DebugJvmProtoBuf { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - parameterType_ = java.util.Collections.unmodifiableList(parameterType_); - } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } @@ -963,68 +155,25 @@ public final class DebugJvmProtoBuf { return name_; } - // required .org.jetbrains.kotlin.serialization.jvm.JvmType return_type = 2; - public static final int RETURN_TYPE_FIELD_NUMBER = 2; - private org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType returnType_; + // required int32 desc = 2; + public static final int DESC_FIELD_NUMBER = 2; + private int desc_; /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType return_type = 2; + * required int32 desc = 2; */ - public boolean hasReturnType() { + public boolean hasDesc() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType return_type = 2; + * required int32 desc = 2; */ - public org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType getReturnType() { - return returnType_; - } - /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType return_type = 2; - */ - public org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmTypeOrBuilder getReturnTypeOrBuilder() { - return returnType_; - } - - // repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - public static final int PARAMETER_TYPE_FIELD_NUMBER = 3; - private java.util.List parameterType_; - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - public java.util.List getParameterTypeList() { - return parameterType_; - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - public java.util.List - getParameterTypeOrBuilderList() { - return parameterType_; - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - public int getParameterTypeCount() { - return parameterType_.size(); - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - public org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType getParameterType(int index) { - return parameterType_.get(index); - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - public org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmTypeOrBuilder getParameterTypeOrBuilder( - int index) { - return parameterType_.get(index); + public int getDesc() { + return desc_; } private void initFields() { name_ = 0; - returnType_ = org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.getDefaultInstance(); - parameterType_ = java.util.Collections.emptyList(); + desc_ = 0; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -1035,7 +184,7 @@ public final class DebugJvmProtoBuf { memoizedIsInitialized = 0; return false; } - if (!hasReturnType()) { + if (!hasDesc()) { memoizedIsInitialized = 0; return false; } @@ -1050,10 +199,7 @@ public final class DebugJvmProtoBuf { output.writeInt32(1, name_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeMessage(2, returnType_); - } - for (int i = 0; i < parameterType_.size(); i++) { - output.writeMessage(3, parameterType_.get(i)); + output.writeInt32(2, desc_); } getUnknownFields().writeTo(output); } @@ -1070,11 +216,7 @@ public final class DebugJvmProtoBuf { } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, returnType_); - } - for (int i = 0; i < parameterType_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, parameterType_.get(i)); + .computeInt32Size(2, desc_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; @@ -1184,8 +326,6 @@ public final class DebugJvmProtoBuf { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getReturnTypeFieldBuilder(); - getParameterTypeFieldBuilder(); } } private static Builder create() { @@ -1196,18 +336,8 @@ public final class DebugJvmProtoBuf { super.clear(); name_ = 0; bitField0_ = (bitField0_ & ~0x00000001); - if (returnTypeBuilder_ == null) { - returnType_ = org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.getDefaultInstance(); - } else { - returnTypeBuilder_.clear(); - } + desc_ = 0; bitField0_ = (bitField0_ & ~0x00000002); - if (parameterTypeBuilder_ == null) { - parameterType_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - parameterTypeBuilder_.clear(); - } return this; } @@ -1243,20 +373,7 @@ public final class DebugJvmProtoBuf { if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - if (returnTypeBuilder_ == null) { - result.returnType_ = returnType_; - } else { - result.returnType_ = returnTypeBuilder_.build(); - } - if (parameterTypeBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { - parameterType_ = java.util.Collections.unmodifiableList(parameterType_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.parameterType_ = parameterType_; - } else { - result.parameterType_ = parameterTypeBuilder_.build(); - } + result.desc_ = desc_; result.bitField0_ = to_bitField0_; onBuilt(); return result; @@ -1276,34 +393,8 @@ public final class DebugJvmProtoBuf { if (other.hasName()) { setName(other.getName()); } - if (other.hasReturnType()) { - mergeReturnType(other.getReturnType()); - } - if (parameterTypeBuilder_ == null) { - if (!other.parameterType_.isEmpty()) { - if (parameterType_.isEmpty()) { - parameterType_ = other.parameterType_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureParameterTypeIsMutable(); - parameterType_.addAll(other.parameterType_); - } - onChanged(); - } - } else { - if (!other.parameterType_.isEmpty()) { - if (parameterTypeBuilder_.isEmpty()) { - parameterTypeBuilder_.dispose(); - parameterTypeBuilder_ = null; - parameterType_ = other.parameterType_; - bitField0_ = (bitField0_ & ~0x00000004); - parameterTypeBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getParameterTypeFieldBuilder() : null; - } else { - parameterTypeBuilder_.addAllMessages(other.parameterType_); - } - } + if (other.hasDesc()) { + setDesc(other.getDesc()); } this.mergeUnknownFields(other.getUnknownFields()); return this; @@ -1314,7 +405,7 @@ public final class DebugJvmProtoBuf { return false; } - if (!hasReturnType()) { + if (!hasDesc()) { return false; } @@ -1373,362 +464,38 @@ public final class DebugJvmProtoBuf { return this; } - // required .org.jetbrains.kotlin.serialization.jvm.JvmType return_type = 2; - private org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType returnType_ = org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType, org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.Builder, org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmTypeOrBuilder> returnTypeBuilder_; + // required int32 desc = 2; + private int desc_ ; /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType return_type = 2; + * required int32 desc = 2; */ - public boolean hasReturnType() { + public boolean hasDesc() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType return_type = 2; + * required int32 desc = 2; */ - public org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType getReturnType() { - if (returnTypeBuilder_ == null) { - return returnType_; - } else { - return returnTypeBuilder_.getMessage(); - } + public int getDesc() { + return desc_; } /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType return_type = 2; + * required int32 desc = 2; */ - public Builder setReturnType(org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType value) { - if (returnTypeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - returnType_ = value; - onChanged(); - } else { - returnTypeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - return this; - } - /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType return_type = 2; - */ - public Builder setReturnType( - org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.Builder builderForValue) { - if (returnTypeBuilder_ == null) { - returnType_ = builderForValue.build(); - onChanged(); - } else { - returnTypeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - return this; - } - /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType return_type = 2; - */ - public Builder mergeReturnType(org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType value) { - if (returnTypeBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002) && - returnType_ != org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.getDefaultInstance()) { - returnType_ = - org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.newBuilder(returnType_).mergeFrom(value).buildPartial(); - } else { - returnType_ = value; - } - onChanged(); - } else { - returnTypeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - return this; - } - /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType return_type = 2; - */ - public Builder clearReturnType() { - if (returnTypeBuilder_ == null) { - returnType_ = org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.getDefaultInstance(); - onChanged(); - } else { - returnTypeBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType return_type = 2; - */ - public org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.Builder getReturnTypeBuilder() { + public Builder setDesc(int value) { bitField0_ |= 0x00000002; + desc_ = value; onChanged(); - return getReturnTypeFieldBuilder().getBuilder(); - } - /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType return_type = 2; - */ - public org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmTypeOrBuilder getReturnTypeOrBuilder() { - if (returnTypeBuilder_ != null) { - return returnTypeBuilder_.getMessageOrBuilder(); - } else { - return returnType_; - } - } - /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType return_type = 2; - */ - private com.google.protobuf.SingleFieldBuilder< - org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType, org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.Builder, org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmTypeOrBuilder> - getReturnTypeFieldBuilder() { - if (returnTypeBuilder_ == null) { - returnTypeBuilder_ = new com.google.protobuf.SingleFieldBuilder< - org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType, org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.Builder, org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmTypeOrBuilder>( - returnType_, - getParentForChildren(), - isClean()); - returnType_ = null; - } - return returnTypeBuilder_; - } - - // repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - private java.util.List parameterType_ = - java.util.Collections.emptyList(); - private void ensureParameterTypeIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { - parameterType_ = new java.util.ArrayList(parameterType_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType, org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.Builder, org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmTypeOrBuilder> parameterTypeBuilder_; - - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - public java.util.List getParameterTypeList() { - if (parameterTypeBuilder_ == null) { - return java.util.Collections.unmodifiableList(parameterType_); - } else { - return parameterTypeBuilder_.getMessageList(); - } - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - public int getParameterTypeCount() { - if (parameterTypeBuilder_ == null) { - return parameterType_.size(); - } else { - return parameterTypeBuilder_.getCount(); - } - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - public org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType getParameterType(int index) { - if (parameterTypeBuilder_ == null) { - return parameterType_.get(index); - } else { - return parameterTypeBuilder_.getMessage(index); - } - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - public Builder setParameterType( - int index, org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType value) { - if (parameterTypeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureParameterTypeIsMutable(); - parameterType_.set(index, value); - onChanged(); - } else { - parameterTypeBuilder_.setMessage(index, value); - } return this; } /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; + * required int32 desc = 2; */ - public Builder setParameterType( - int index, org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.Builder builderForValue) { - if (parameterTypeBuilder_ == null) { - ensureParameterTypeIsMutable(); - parameterType_.set(index, builderForValue.build()); - onChanged(); - } else { - parameterTypeBuilder_.setMessage(index, builderForValue.build()); - } + public Builder clearDesc() { + bitField0_ = (bitField0_ & ~0x00000002); + desc_ = 0; + onChanged(); return this; } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - public Builder addParameterType(org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType value) { - if (parameterTypeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureParameterTypeIsMutable(); - parameterType_.add(value); - onChanged(); - } else { - parameterTypeBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - public Builder addParameterType( - int index, org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType value) { - if (parameterTypeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureParameterTypeIsMutable(); - parameterType_.add(index, value); - onChanged(); - } else { - parameterTypeBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - public Builder addParameterType( - org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.Builder builderForValue) { - if (parameterTypeBuilder_ == null) { - ensureParameterTypeIsMutable(); - parameterType_.add(builderForValue.build()); - onChanged(); - } else { - parameterTypeBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - public Builder addParameterType( - int index, org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.Builder builderForValue) { - if (parameterTypeBuilder_ == null) { - ensureParameterTypeIsMutable(); - parameterType_.add(index, builderForValue.build()); - onChanged(); - } else { - parameterTypeBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - public Builder addAllParameterType( - java.lang.Iterable values) { - if (parameterTypeBuilder_ == null) { - ensureParameterTypeIsMutable(); - super.addAll(values, parameterType_); - onChanged(); - } else { - parameterTypeBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - public Builder clearParameterType() { - if (parameterTypeBuilder_ == null) { - parameterType_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - parameterTypeBuilder_.clear(); - } - return this; - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - public Builder removeParameterType(int index) { - if (parameterTypeBuilder_ == null) { - ensureParameterTypeIsMutable(); - parameterType_.remove(index); - onChanged(); - } else { - parameterTypeBuilder_.remove(index); - } - return this; - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - public org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.Builder getParameterTypeBuilder( - int index) { - return getParameterTypeFieldBuilder().getBuilder(index); - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - public org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmTypeOrBuilder getParameterTypeOrBuilder( - int index) { - if (parameterTypeBuilder_ == null) { - return parameterType_.get(index); } else { - return parameterTypeBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - public java.util.List - getParameterTypeOrBuilderList() { - if (parameterTypeBuilder_ != null) { - return parameterTypeBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(parameterType_); - } - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - public org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.Builder addParameterTypeBuilder() { - return getParameterTypeFieldBuilder().addBuilder( - org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.getDefaultInstance()); - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - public org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.Builder addParameterTypeBuilder( - int index) { - return getParameterTypeFieldBuilder().addBuilder( - index, org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.getDefaultInstance()); - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - public java.util.List - getParameterTypeBuilderList() { - return getParameterTypeFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType, org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.Builder, org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmTypeOrBuilder> - getParameterTypeFieldBuilder() { - if (parameterTypeBuilder_ == null) { - parameterTypeBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType, org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.Builder, org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmTypeOrBuilder>( - parameterType_, - ((bitField0_ & 0x00000004) == 0x00000004), - getParentForChildren(), - isClean()); - parameterType_ = null; - } - return parameterTypeBuilder_; - } // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.jvm.JvmMethodSignature) } @@ -1754,19 +521,15 @@ public final class DebugJvmProtoBuf { */ int getName(); - // required .org.jetbrains.kotlin.serialization.jvm.JvmType type = 2; + // required int32 desc = 2; /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType type = 2; + * required int32 desc = 2; */ - boolean hasType(); + boolean hasDesc(); /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType type = 2; + * required int32 desc = 2; */ - org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType getType(); - /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType type = 2; - */ - org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmTypeOrBuilder getTypeOrBuilder(); + int getDesc(); // optional bool is_static_in_outer = 3 [default = false]; /** @@ -1844,17 +607,9 @@ public final class DebugJvmProtoBuf { name_ = input.readInt32(); break; } - case 18: { - org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) == 0x00000002)) { - subBuilder = type_.toBuilder(); - } - type_ = input.readMessage(org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(type_); - type_ = subBuilder.buildPartial(); - } + case 16: { bitField0_ |= 0x00000002; + desc_ = input.readInt32(); break; } case 24: { @@ -1918,26 +673,20 @@ public final class DebugJvmProtoBuf { return name_; } - // required .org.jetbrains.kotlin.serialization.jvm.JvmType type = 2; - public static final int TYPE_FIELD_NUMBER = 2; - private org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType type_; + // required int32 desc = 2; + public static final int DESC_FIELD_NUMBER = 2; + private int desc_; /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType type = 2; + * required int32 desc = 2; */ - public boolean hasType() { + public boolean hasDesc() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType type = 2; + * required int32 desc = 2; */ - public org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType getType() { - return type_; - } - /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType type = 2; - */ - public org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmTypeOrBuilder getTypeOrBuilder() { - return type_; + public int getDesc() { + return desc_; } // optional bool is_static_in_outer = 3 [default = false]; @@ -1968,7 +717,7 @@ public final class DebugJvmProtoBuf { private void initFields() { name_ = 0; - type_ = org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.getDefaultInstance(); + desc_ = 0; isStaticInOuter_ = false; } private byte memoizedIsInitialized = -1; @@ -1980,7 +729,7 @@ public final class DebugJvmProtoBuf { memoizedIsInitialized = 0; return false; } - if (!hasType()) { + if (!hasDesc()) { memoizedIsInitialized = 0; return false; } @@ -1995,7 +744,7 @@ public final class DebugJvmProtoBuf { output.writeInt32(1, name_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeMessage(2, type_); + output.writeInt32(2, desc_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBool(3, isStaticInOuter_); @@ -2015,7 +764,7 @@ public final class DebugJvmProtoBuf { } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, type_); + .computeInt32Size(2, desc_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream @@ -2129,7 +878,6 @@ public final class DebugJvmProtoBuf { } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getTypeFieldBuilder(); } } private static Builder create() { @@ -2140,11 +888,7 @@ public final class DebugJvmProtoBuf { super.clear(); name_ = 0; bitField0_ = (bitField0_ & ~0x00000001); - if (typeBuilder_ == null) { - type_ = org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.getDefaultInstance(); - } else { - typeBuilder_.clear(); - } + desc_ = 0; bitField0_ = (bitField0_ & ~0x00000002); isStaticInOuter_ = false; bitField0_ = (bitField0_ & ~0x00000004); @@ -2183,11 +927,7 @@ public final class DebugJvmProtoBuf { if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - if (typeBuilder_ == null) { - result.type_ = type_; - } else { - result.type_ = typeBuilder_.build(); - } + result.desc_ = desc_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } @@ -2211,8 +951,8 @@ public final class DebugJvmProtoBuf { if (other.hasName()) { setName(other.getName()); } - if (other.hasType()) { - mergeType(other.getType()); + if (other.hasDesc()) { + setDesc(other.getDesc()); } if (other.hasIsStaticInOuter()) { setIsStaticInOuter(other.getIsStaticInOuter()); @@ -2226,7 +966,7 @@ public final class DebugJvmProtoBuf { return false; } - if (!hasType()) { + if (!hasDesc()) { return false; } @@ -2285,121 +1025,37 @@ public final class DebugJvmProtoBuf { return this; } - // required .org.jetbrains.kotlin.serialization.jvm.JvmType type = 2; - private org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType type_ = org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType, org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.Builder, org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmTypeOrBuilder> typeBuilder_; + // required int32 desc = 2; + private int desc_ ; /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType type = 2; + * required int32 desc = 2; */ - public boolean hasType() { + public boolean hasDesc() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType type = 2; + * required int32 desc = 2; */ - public org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType getType() { - if (typeBuilder_ == null) { - return type_; - } else { - return typeBuilder_.getMessage(); - } + public int getDesc() { + return desc_; } /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType type = 2; + * required int32 desc = 2; */ - public Builder setType(org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType value) { - if (typeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - onChanged(); - } else { - typeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - return this; - } - /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType type = 2; - */ - public Builder setType( - org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.Builder builderForValue) { - if (typeBuilder_ == null) { - type_ = builderForValue.build(); - onChanged(); - } else { - typeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - return this; - } - /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType type = 2; - */ - public Builder mergeType(org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType value) { - if (typeBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002) && - type_ != org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.getDefaultInstance()) { - type_ = - org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.newBuilder(type_).mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - onChanged(); - } else { - typeBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000002; - return this; - } - /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType type = 2; - */ - public Builder clearType() { - if (typeBuilder_ == null) { - type_ = org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.getDefaultInstance(); - onChanged(); - } else { - typeBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType type = 2; - */ - public org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.Builder getTypeBuilder() { + public Builder setDesc(int value) { bitField0_ |= 0x00000002; + desc_ = value; onChanged(); - return getTypeFieldBuilder().getBuilder(); + return this; } /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType type = 2; + * required int32 desc = 2; */ - public org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmTypeOrBuilder getTypeOrBuilder() { - if (typeBuilder_ != null) { - return typeBuilder_.getMessageOrBuilder(); - } else { - return type_; - } - } - /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType type = 2; - */ - private com.google.protobuf.SingleFieldBuilder< - org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType, org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.Builder, org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmTypeOrBuilder> - getTypeFieldBuilder() { - if (typeBuilder_ == null) { - typeBuilder_ = new com.google.protobuf.SingleFieldBuilder< - org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType, org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmType.Builder, org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmTypeOrBuilder>( - type_, - getParentForChildren(), - isClean()); - type_ = null; - } - return typeBuilder_; + public Builder clearDesc() { + bitField0_ = (bitField0_ & ~0x00000002); + desc_ = 0; + onChanged(); + return this; } // optional bool is_static_in_outer = 3 [default = false]; @@ -2472,29 +1128,14 @@ public final class DebugJvmProtoBuf { // optional .org.jetbrains.kotlin.serialization.jvm.JvmFieldSignature field = 1; /** * optional .org.jetbrains.kotlin.serialization.jvm.JvmFieldSignature field = 1; - * - *
-     * A property itself is identified either by the field, or by the synthetic method.
-     * If the property is annotated, then either field or synthetic_method should be present
-     * 
*/ boolean hasField(); /** * optional .org.jetbrains.kotlin.serialization.jvm.JvmFieldSignature field = 1; - * - *
-     * A property itself is identified either by the field, or by the synthetic method.
-     * If the property is annotated, then either field or synthetic_method should be present
-     * 
*/ org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmFieldSignature getField(); /** * optional .org.jetbrains.kotlin.serialization.jvm.JvmFieldSignature field = 1; - * - *
-     * A property itself is identified either by the field, or by the synthetic method.
-     * If the property is annotated, then either field or synthetic_method should be present
-     * 
*/ org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmFieldSignatureOrBuilder getFieldOrBuilder(); @@ -2503,7 +1144,7 @@ public final class DebugJvmProtoBuf { * optional .org.jetbrains.kotlin.serialization.jvm.JvmMethodSignature synthetic_method = 2; * *
-     * Annotations on properties without backing fields are written on a synthetic method with this signature
+     * Annotations on properties are written on a synthetic method with this signature
      * 
*/ boolean hasSyntheticMethod(); @@ -2511,7 +1152,7 @@ public final class DebugJvmProtoBuf { * optional .org.jetbrains.kotlin.serialization.jvm.JvmMethodSignature synthetic_method = 2; * *
-     * Annotations on properties without backing fields are written on a synthetic method with this signature
+     * Annotations on properties are written on a synthetic method with this signature
      * 
*/ org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmMethodSignature getSyntheticMethod(); @@ -2519,7 +1160,7 @@ public final class DebugJvmProtoBuf { * optional .org.jetbrains.kotlin.serialization.jvm.JvmMethodSignature synthetic_method = 2; * *
-     * Annotations on properties without backing fields are written on a synthetic method with this signature
+     * Annotations on properties are written on a synthetic method with this signature
      * 
*/ org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmMethodSignatureOrBuilder getSyntheticMethodOrBuilder(); @@ -2700,33 +1341,18 @@ public final class DebugJvmProtoBuf { private org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmFieldSignature field_; /** * optional .org.jetbrains.kotlin.serialization.jvm.JvmFieldSignature field = 1; - * - *
-     * A property itself is identified either by the field, or by the synthetic method.
-     * If the property is annotated, then either field or synthetic_method should be present
-     * 
*/ public boolean hasField() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * optional .org.jetbrains.kotlin.serialization.jvm.JvmFieldSignature field = 1; - * - *
-     * A property itself is identified either by the field, or by the synthetic method.
-     * If the property is annotated, then either field or synthetic_method should be present
-     * 
*/ public org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmFieldSignature getField() { return field_; } /** * optional .org.jetbrains.kotlin.serialization.jvm.JvmFieldSignature field = 1; - * - *
-     * A property itself is identified either by the field, or by the synthetic method.
-     * If the property is annotated, then either field or synthetic_method should be present
-     * 
*/ public org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmFieldSignatureOrBuilder getFieldOrBuilder() { return field_; @@ -2739,7 +1365,7 @@ public final class DebugJvmProtoBuf { * optional .org.jetbrains.kotlin.serialization.jvm.JvmMethodSignature synthetic_method = 2; * *
-     * Annotations on properties without backing fields are written on a synthetic method with this signature
+     * Annotations on properties are written on a synthetic method with this signature
      * 
*/ public boolean hasSyntheticMethod() { @@ -2749,7 +1375,7 @@ public final class DebugJvmProtoBuf { * optional .org.jetbrains.kotlin.serialization.jvm.JvmMethodSignature synthetic_method = 2; * *
-     * Annotations on properties without backing fields are written on a synthetic method with this signature
+     * Annotations on properties are written on a synthetic method with this signature
      * 
*/ public org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmMethodSignature getSyntheticMethod() { @@ -2759,7 +1385,7 @@ public final class DebugJvmProtoBuf { * optional .org.jetbrains.kotlin.serialization.jvm.JvmMethodSignature synthetic_method = 2; * *
-     * Annotations on properties without backing fields are written on a synthetic method with this signature
+     * Annotations on properties are written on a synthetic method with this signature
      * 
*/ public org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmMethodSignatureOrBuilder getSyntheticMethodOrBuilder() { @@ -3178,22 +1804,12 @@ public final class DebugJvmProtoBuf { org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmFieldSignature, org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmFieldSignature.Builder, org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmFieldSignatureOrBuilder> fieldBuilder_; /** * optional .org.jetbrains.kotlin.serialization.jvm.JvmFieldSignature field = 1; - * - *
-       * A property itself is identified either by the field, or by the synthetic method.
-       * If the property is annotated, then either field or synthetic_method should be present
-       * 
*/ public boolean hasField() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * optional .org.jetbrains.kotlin.serialization.jvm.JvmFieldSignature field = 1; - * - *
-       * A property itself is identified either by the field, or by the synthetic method.
-       * If the property is annotated, then either field or synthetic_method should be present
-       * 
*/ public org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmFieldSignature getField() { if (fieldBuilder_ == null) { @@ -3204,11 +1820,6 @@ public final class DebugJvmProtoBuf { } /** * optional .org.jetbrains.kotlin.serialization.jvm.JvmFieldSignature field = 1; - * - *
-       * A property itself is identified either by the field, or by the synthetic method.
-       * If the property is annotated, then either field or synthetic_method should be present
-       * 
*/ public Builder setField(org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmFieldSignature value) { if (fieldBuilder_ == null) { @@ -3225,11 +1836,6 @@ public final class DebugJvmProtoBuf { } /** * optional .org.jetbrains.kotlin.serialization.jvm.JvmFieldSignature field = 1; - * - *
-       * A property itself is identified either by the field, or by the synthetic method.
-       * If the property is annotated, then either field or synthetic_method should be present
-       * 
*/ public Builder setField( org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmFieldSignature.Builder builderForValue) { @@ -3244,11 +1850,6 @@ public final class DebugJvmProtoBuf { } /** * optional .org.jetbrains.kotlin.serialization.jvm.JvmFieldSignature field = 1; - * - *
-       * A property itself is identified either by the field, or by the synthetic method.
-       * If the property is annotated, then either field or synthetic_method should be present
-       * 
*/ public Builder mergeField(org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmFieldSignature value) { if (fieldBuilder_ == null) { @@ -3268,11 +1869,6 @@ public final class DebugJvmProtoBuf { } /** * optional .org.jetbrains.kotlin.serialization.jvm.JvmFieldSignature field = 1; - * - *
-       * A property itself is identified either by the field, or by the synthetic method.
-       * If the property is annotated, then either field or synthetic_method should be present
-       * 
*/ public Builder clearField() { if (fieldBuilder_ == null) { @@ -3286,11 +1882,6 @@ public final class DebugJvmProtoBuf { } /** * optional .org.jetbrains.kotlin.serialization.jvm.JvmFieldSignature field = 1; - * - *
-       * A property itself is identified either by the field, or by the synthetic method.
-       * If the property is annotated, then either field or synthetic_method should be present
-       * 
*/ public org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmFieldSignature.Builder getFieldBuilder() { bitField0_ |= 0x00000001; @@ -3299,11 +1890,6 @@ public final class DebugJvmProtoBuf { } /** * optional .org.jetbrains.kotlin.serialization.jvm.JvmFieldSignature field = 1; - * - *
-       * A property itself is identified either by the field, or by the synthetic method.
-       * If the property is annotated, then either field or synthetic_method should be present
-       * 
*/ public org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmFieldSignatureOrBuilder getFieldOrBuilder() { if (fieldBuilder_ != null) { @@ -3314,11 +1900,6 @@ public final class DebugJvmProtoBuf { } /** * optional .org.jetbrains.kotlin.serialization.jvm.JvmFieldSignature field = 1; - * - *
-       * A property itself is identified either by the field, or by the synthetic method.
-       * If the property is annotated, then either field or synthetic_method should be present
-       * 
*/ private com.google.protobuf.SingleFieldBuilder< org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmFieldSignature, org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmFieldSignature.Builder, org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmFieldSignatureOrBuilder> @@ -3342,7 +1923,7 @@ public final class DebugJvmProtoBuf { * optional .org.jetbrains.kotlin.serialization.jvm.JvmMethodSignature synthetic_method = 2; * *
-       * Annotations on properties without backing fields are written on a synthetic method with this signature
+       * Annotations on properties are written on a synthetic method with this signature
        * 
*/ public boolean hasSyntheticMethod() { @@ -3352,7 +1933,7 @@ public final class DebugJvmProtoBuf { * optional .org.jetbrains.kotlin.serialization.jvm.JvmMethodSignature synthetic_method = 2; * *
-       * Annotations on properties without backing fields are written on a synthetic method with this signature
+       * Annotations on properties are written on a synthetic method with this signature
        * 
*/ public org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmMethodSignature getSyntheticMethod() { @@ -3366,7 +1947,7 @@ public final class DebugJvmProtoBuf { * optional .org.jetbrains.kotlin.serialization.jvm.JvmMethodSignature synthetic_method = 2; * *
-       * Annotations on properties without backing fields are written on a synthetic method with this signature
+       * Annotations on properties are written on a synthetic method with this signature
        * 
*/ public Builder setSyntheticMethod(org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmMethodSignature value) { @@ -3386,7 +1967,7 @@ public final class DebugJvmProtoBuf { * optional .org.jetbrains.kotlin.serialization.jvm.JvmMethodSignature synthetic_method = 2; * *
-       * Annotations on properties without backing fields are written on a synthetic method with this signature
+       * Annotations on properties are written on a synthetic method with this signature
        * 
*/ public Builder setSyntheticMethod( @@ -3404,7 +1985,7 @@ public final class DebugJvmProtoBuf { * optional .org.jetbrains.kotlin.serialization.jvm.JvmMethodSignature synthetic_method = 2; * *
-       * Annotations on properties without backing fields are written on a synthetic method with this signature
+       * Annotations on properties are written on a synthetic method with this signature
        * 
*/ public Builder mergeSyntheticMethod(org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmMethodSignature value) { @@ -3427,7 +2008,7 @@ public final class DebugJvmProtoBuf { * optional .org.jetbrains.kotlin.serialization.jvm.JvmMethodSignature synthetic_method = 2; * *
-       * Annotations on properties without backing fields are written on a synthetic method with this signature
+       * Annotations on properties are written on a synthetic method with this signature
        * 
*/ public Builder clearSyntheticMethod() { @@ -3444,7 +2025,7 @@ public final class DebugJvmProtoBuf { * optional .org.jetbrains.kotlin.serialization.jvm.JvmMethodSignature synthetic_method = 2; * *
-       * Annotations on properties without backing fields are written on a synthetic method with this signature
+       * Annotations on properties are written on a synthetic method with this signature
        * 
*/ public org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmMethodSignature.Builder getSyntheticMethodBuilder() { @@ -3456,7 +2037,7 @@ public final class DebugJvmProtoBuf { * optional .org.jetbrains.kotlin.serialization.jvm.JvmMethodSignature synthetic_method = 2; * *
-       * Annotations on properties without backing fields are written on a synthetic method with this signature
+       * Annotations on properties are written on a synthetic method with this signature
        * 
*/ public org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmMethodSignatureOrBuilder getSyntheticMethodOrBuilder() { @@ -3470,7 +2051,7 @@ public final class DebugJvmProtoBuf { * optional .org.jetbrains.kotlin.serialization.jvm.JvmMethodSignature synthetic_method = 2; * *
-       * Annotations on properties without backing fields are written on a synthetic method with this signature
+       * Annotations on properties are written on a synthetic method with this signature
        * 
*/ private com.google.protobuf.SingleFieldBuilder< @@ -3809,11 +2390,6 @@ public final class DebugJvmProtoBuf { .newFileScopedGeneratedExtension( org.jetbrains.kotlin.serialization.DebugProtoBuf.Annotation.class, org.jetbrains.kotlin.serialization.DebugProtoBuf.Annotation.getDefaultInstance()); - private static com.google.protobuf.Descriptors.Descriptor - internal_static_org_jetbrains_kotlin_serialization_jvm_JvmType_descriptor; - private static - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_org_jetbrains_kotlin_serialization_jvm_JvmType_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_org_jetbrains_kotlin_serialization_jvm_JvmMethodSignature_descriptor; private static @@ -3843,74 +2419,57 @@ public final class DebugJvmProtoBuf { "lin.serialization.jvm\0320core/deserializat" + "ion/src/ext_options.debug.proto\0320core/de" + "serialization/src/descriptors.debug.prot" + - "o\"\212\002\n\007JvmType\022U\n\016primitive_type\030\001 \001(\0162=." + - "org.jetbrains.kotlin.serialization.jvm.J" + - "vmType.PrimitiveType\022\033\n\rclass_fq_name\030\002 " + - "\001(\005B\004\220\265\030\001\022\032\n\017array_dimension\030\003 \001(\005:\0010\"o\n" + - "\rPrimitiveType\022\010\n\004VOID\020\000\022\013\n\007BOOLEAN\020\001\022\010\n", - "\004CHAR\020\002\022\010\n\004BYTE\020\003\022\t\n\005SHORT\020\004\022\007\n\003INT\020\005\022\t\n" + - "\005FLOAT\020\006\022\010\n\004LONG\020\007\022\n\n\006DOUBLE\020\010\"\267\001\n\022JvmMe" + - "thodSignature\022\022\n\004name\030\001 \002(\005B\004\230\265\030\001\022D\n\013ret" + - "urn_type\030\002 \002(\0132/.org.jetbrains.kotlin.se" + - "rialization.jvm.JvmType\022G\n\016parameter_typ" + - "e\030\003 \003(\0132/.org.jetbrains.kotlin.serializa" + - "tion.jvm.JvmType\"\211\001\n\021JvmFieldSignature\022\022" + - "\n\004name\030\001 \002(\005B\004\230\265\030\001\022=\n\004type\030\002 \002(\0132/.org.j" + - "etbrains.kotlin.serialization.jvm.JvmTyp" + - "e\022!\n\022is_static_in_outer\030\003 \001(\010:\005false\"\316\002\n", - "\024JvmPropertySignature\022H\n\005field\030\001 \001(\01329.o" + + "o\"<\n\022JvmMethodSignature\022\022\n\004name\030\001 \002(\005B\004\230" + + "\265\030\001\022\022\n\004desc\030\002 \002(\005B\004\230\265\030\001\"^\n\021JvmFieldSigna" + + "ture\022\022\n\004name\030\001 \002(\005B\004\230\265\030\001\022\022\n\004desc\030\002 \002(\005B\004" + + "\230\265\030\001\022!\n\022is_static_in_outer\030\003 \001(\010:\005false\"" + + "\316\002\n\024JvmPropertySignature\022H\n\005field\030\001 \001(\0132", + "9.org.jetbrains.kotlin.serialization.jvm" + + ".JvmFieldSignature\022T\n\020synthetic_method\030\002" + + " \001(\0132:.org.jetbrains.kotlin.serializatio" + + "n.jvm.JvmMethodSignature\022J\n\006getter\030\003 \001(\013" + + "2:.org.jetbrains.kotlin.serialization.jv" + + "m.JvmMethodSignature\022J\n\006setter\030\004 \001(\0132:.o" + "rg.jetbrains.kotlin.serialization.jvm.Jv" + - "mFieldSignature\022T\n\020synthetic_method\030\002 \001(" + - "\0132:.org.jetbrains.kotlin.serialization.j" + - "vm.JvmMethodSignature\022J\n\006getter\030\003 \001(\0132:." + - "org.jetbrains.kotlin.serialization.jvm.J" + - "vmMethodSignature\022J\n\006setter\030\004 \001(\0132:.org." + - "jetbrains.kotlin.serialization.jvm.JvmMe" + - "thodSignature:\202\001\n\020method_signature\022,.org" + - ".jetbrains.kotlin.serialization.Callable", - "\030d \001(\0132:.org.jetbrains.kotlin.serializat" + - "ion.jvm.JvmMethodSignature:\206\001\n\022property_" + - "signature\022,.org.jetbrains.kotlin.seriali" + - "zation.Callable\030e \001(\0132<.org.jetbrains.ko" + - "tlin.serialization.jvm.JvmPropertySignat" + - "ure:K\n\017impl_class_name\022,.org.jetbrains.k" + - "otlin.serialization.Callable\030f \001(\005B\004\210\265\030\001" + - ":q\n\017type_annotation\022(.org.jetbrains.kotl" + - "in.serialization.Type\030d \003(\0132..org.jetbra" + - "ins.kotlin.serialization.Annotation:8\n\006i", - "s_raw\022(.org.jetbrains.kotlin.serializati" + - "on.Type\030e \001(\010:J\n\005index\022;.org.jetbrains.k" + - "otlin.serialization.Callable.ValueParame" + - "ter\030d \001(\005:s\n\020class_annotation\022).org.jetb" + - "rains.kotlin.serialization.Class\030d \003(\0132." + - ".org.jetbrains.kotlin.serialization.Anno" + - "tationB\022B\020DebugJvmProtoBuf" + "mMethodSignature:\202\001\n\020method_signature\022,." + + "org.jetbrains.kotlin.serialization.Calla" + + "ble\030d \001(\0132:.org.jetbrains.kotlin.seriali", + "zation.jvm.JvmMethodSignature:\206\001\n\022proper" + + "ty_signature\022,.org.jetbrains.kotlin.seri" + + "alization.Callable\030e \001(\0132<.org.jetbrains" + + ".kotlin.serialization.jvm.JvmPropertySig" + + "nature:K\n\017impl_class_name\022,.org.jetbrain" + + "s.kotlin.serialization.Callable\030f \001(\005B\004\210" + + "\265\030\001:q\n\017type_annotation\022(.org.jetbrains.k" + + "otlin.serialization.Type\030d \003(\0132..org.jet" + + "brains.kotlin.serialization.Annotation:8" + + "\n\006is_raw\022(.org.jetbrains.kotlin.serializ", + "ation.Type\030e \001(\010:J\n\005index\022;.org.jetbrain" + + "s.kotlin.serialization.Callable.ValuePar" + + "ameter\030d \001(\005:s\n\020class_annotation\022).org.j" + + "etbrains.kotlin.serialization.Class\030d \003(" + + "\0132..org.jetbrains.kotlin.serialization.A" + + "nnotationB\022B\020DebugJvmProtoBuf" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.protobuf.Descriptors.FileDescriptor root) { descriptor = root; - internal_static_org_jetbrains_kotlin_serialization_jvm_JvmType_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_org_jetbrains_kotlin_serialization_jvm_JvmType_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_org_jetbrains_kotlin_serialization_jvm_JvmType_descriptor, - new java.lang.String[] { "PrimitiveType", "ClassFqName", "ArrayDimension", }); internal_static_org_jetbrains_kotlin_serialization_jvm_JvmMethodSignature_descriptor = - getDescriptor().getMessageTypes().get(1); + getDescriptor().getMessageTypes().get(0); internal_static_org_jetbrains_kotlin_serialization_jvm_JvmMethodSignature_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_org_jetbrains_kotlin_serialization_jvm_JvmMethodSignature_descriptor, - new java.lang.String[] { "Name", "ReturnType", "ParameterType", }); + new java.lang.String[] { "Name", "Desc", }); internal_static_org_jetbrains_kotlin_serialization_jvm_JvmFieldSignature_descriptor = - getDescriptor().getMessageTypes().get(2); + getDescriptor().getMessageTypes().get(1); internal_static_org_jetbrains_kotlin_serialization_jvm_JvmFieldSignature_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_org_jetbrains_kotlin_serialization_jvm_JvmFieldSignature_descriptor, - new java.lang.String[] { "Name", "Type", "IsStaticInOuter", }); + new java.lang.String[] { "Name", "Desc", "IsStaticInOuter", }); internal_static_org_jetbrains_kotlin_serialization_jvm_JvmPropertySignature_descriptor = - getDescriptor().getMessageTypes().get(3); + getDescriptor().getMessageTypes().get(2); internal_static_org_jetbrains_kotlin_serialization_jvm_JvmPropertySignature_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_org_jetbrains_kotlin_serialization_jvm_JvmPropertySignature_descriptor, @@ -3924,7 +2483,8 @@ public final class DebugJvmProtoBuf { classAnnotation.internalInit(descriptor.getExtensions().get(6)); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(org.jetbrains.kotlin.serialization.DebugExtOptionsProtoBuf.fqNameIdInTable); + registry.add(org.jetbrains.kotlin.serialization.DebugExtOptionsProtoBuf.stringIdInTable); + registry.add(org.jetbrains.kotlin.serialization.DebugExtOptionsProtoBuf.stringIdInTable); registry.add(org.jetbrains.kotlin.serialization.DebugExtOptionsProtoBuf.stringIdInTable); registry.add(org.jetbrains.kotlin.serialization.DebugExtOptionsProtoBuf.stringIdInTable); registry.add(org.jetbrains.kotlin.serialization.DebugExtOptionsProtoBuf.nameIdInTable); diff --git a/core/descriptor.loader.java/src/jvm_descriptors.proto b/core/descriptor.loader.java/src/jvm_descriptors.proto index ce9b3640ca3..b3048e1a5b6 100644 --- a/core/descriptor.loader.java/src/jvm_descriptors.proto +++ b/core/descriptor.loader.java/src/jvm_descriptors.proto @@ -22,39 +22,18 @@ import "core/deserialization/src/descriptors.proto"; option java_outer_classname = "JvmProtoBuf"; option optimize_for = LITE_RUNTIME; -message JvmType { - // Either a primitive type, or a class FQ name should be present - - enum PrimitiveType { - // These values correspond to ASM Type sorts - VOID = 0; - BOOLEAN = 1; - CHAR = 2; - BYTE = 3; - SHORT = 4; - INT = 5; - FLOAT = 6; - LONG = 7; - DOUBLE = 8; - } - - optional PrimitiveType primitive_type = 1; - - // id in QualifiedNameTable of a name in the following format: 'package.Outer$Nested' - optional int32 class_fq_name = 2 [(fq_name_id_in_table) = true]; - - optional int32 array_dimension = 3 [default = 0]; -} - message JvmMethodSignature { required int32 name = 1 [(string_id_in_table) = true]; - required JvmType return_type = 2; - repeated JvmType parameter_type = 3; + + // JVM descriptor of the method, e.g. '(Ljava/util/List;)[Ljava/lang/Object;' + required int32 desc = 2 [(string_id_in_table) = true]; } message JvmFieldSignature { required int32 name = 1 [(string_id_in_table) = true]; - required JvmType type = 2; + + // JVM descriptor of the field type, e.g. 'Ljava/lang/String;' + required int32 desc = 2 [(string_id_in_table) = true]; // True iff this field is a backing field for a companion object and is really present as a static // field in the outer class, not as an instance field here @@ -62,11 +41,9 @@ message JvmFieldSignature { } message JvmPropertySignature { - // A property itself is identified either by the field, or by the synthetic method. - // If the property is annotated, then either field or synthetic_method should be present optional JvmFieldSignature field = 1; - // Annotations on properties without backing fields are written on a synthetic method with this signature + // Annotations on properties are written on a synthetic method with this signature optional JvmMethodSignature synthetic_method = 2; optional JvmMethodSignature getter = 3; 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 68252b2a173..1a586228722 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 @@ -243,11 +243,11 @@ public abstract class AbstractBinaryClassAnnotationAndConstantLoader if (proto.hasExtension(methodSignature)) { - return deserializer.methodSignature(proto.getExtension(methodSignature)) + return MemberSignature.fromMethod(nameResolver, proto.getExtension(methodSignature)) } AnnotatedCallableKind.PROPERTY_GETTER -> if (proto.hasExtension(propertySignature)) { - return deserializer.methodSignature(proto.getExtension(propertySignature).getGetter()) + return MemberSignature.fromMethod(nameResolver, proto.getExtension(propertySignature).getter) } AnnotatedCallableKind.PROPERTY_SETTER -> if (proto.hasExtension(propertySignature)) { - return deserializer.methodSignature(proto.getExtension(propertySignature).getSetter()) + return MemberSignature.fromMethod(nameResolver, proto.getExtension(propertySignature).setter) } AnnotatedCallableKind.PROPERTY -> return getPropertySignature(proto, nameResolver, true, true) } @@ -341,4 +338,4 @@ public abstract class AbstractBinaryClassAnnotationAndConstantLoader>, public val propertyConstants: Map ) -} \ No newline at end of file +} diff --git a/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/kotlin/MemberSignature.kt b/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/kotlin/MemberSignature.kt index fb72c81d605..83a7240755f 100644 --- a/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/kotlin/MemberSignature.kt +++ b/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/kotlin/MemberSignature.kt @@ -16,20 +16,26 @@ package org.jetbrains.kotlin.load.kotlin -import org.jetbrains.kotlin.name.Name +import org.jetbrains.kotlin.serialization.deserialization.NameResolver +import org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf // The purpose of this class is to hold a unique signature of either a method or a field, so that annotations on a member can be put // into a map indexed by these signatures data class MemberSignature private constructor(private val signature: String) { companion object { @JvmStatic - public fun fromMethodNameAndDesc(nameAndDesc: String): MemberSignature { - return MemberSignature(nameAndDesc) + public fun fromMethod(nameResolver: NameResolver, signature: JvmProtoBuf.JvmMethodSignature): MemberSignature { + return fromMethodNameAndDesc(nameResolver.getString(signature.name), nameResolver.getString(signature.desc)) } @JvmStatic - public fun fromFieldNameAndDesc(name: Name, desc: String): MemberSignature { - return MemberSignature(name.asString() + "#" + desc) + public fun fromMethodNameAndDesc(name: String, desc: String): MemberSignature { + return MemberSignature(name + desc) + } + + @JvmStatic + public fun fromFieldNameAndDesc(name: String, desc: String): MemberSignature { + return MemberSignature(name + "#" + desc) } @JvmStatic diff --git a/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/kotlin/SignatureDeserializer.java b/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/kotlin/SignatureDeserializer.java deleted file mode 100644 index afaef0c8b0b..00000000000 --- a/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/kotlin/SignatureDeserializer.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * 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.load.kotlin; - -import org.jetbrains.annotations.NotNull; -import org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf; -import org.jetbrains.kotlin.serialization.deserialization.NameResolver; -import org.jetbrains.kotlin.name.FqName; -import org.jetbrains.kotlin.name.Name; - -public class SignatureDeserializer { - // These types are ordered according to their sorts, this is significant for deserialization - private static final char[] PRIMITIVE_TYPES = new char[] {'V', 'Z', 'C', 'B', 'S', 'I', 'F', 'J', 'D'}; - - private final NameResolver nameResolver; - - public SignatureDeserializer(@NotNull NameResolver nameResolver) { - this.nameResolver = nameResolver; - } - - @NotNull - public String methodSignatureString(@NotNull JvmProtoBuf.JvmMethodSignature signature) { - Name name = nameResolver.getName(signature.getName()); - - StringBuilder sb = new StringBuilder(); - sb.append('('); - for (int i = 0, length = signature.getParameterTypeCount(); i < length; i++) { - typeDescriptor(signature.getParameterType(i), sb); - } - sb.append(')'); - typeDescriptor(signature.getReturnType(), sb); - - return name.asString() + sb.toString(); - } - - @NotNull - public MemberSignature methodSignature(@NotNull JvmProtoBuf.JvmMethodSignature signature) { - return MemberSignature.fromMethodNameAndDesc(methodSignatureString(signature)); - } - - @NotNull - public String typeDescriptor(@NotNull JvmProtoBuf.JvmType type) { - return typeDescriptor(type, new StringBuilder()).toString(); - } - - @NotNull - private StringBuilder typeDescriptor(@NotNull JvmProtoBuf.JvmType type, @NotNull StringBuilder sb) { - for (int i = 0; i < type.getArrayDimension(); i++) { - sb.append('['); - } - - if (type.hasPrimitiveType()) { - sb.append(PRIMITIVE_TYPES[type.getPrimitiveType().ordinal()]); - } - else { - sb.append("L"); - sb.append(fqNameToInternalName(nameResolver.getFqName(type.getClassFqName()))); - sb.append(";"); - } - - return sb; - } - - @NotNull - private static String fqNameToInternalName(@NotNull FqName fqName) { - return fqName.asString().replace('.', '/'); - } -} diff --git a/core/descriptor.loader.java/src/org/jetbrains/kotlin/serialization/jvm/JvmProtoBuf.java b/core/descriptor.loader.java/src/org/jetbrains/kotlin/serialization/jvm/JvmProtoBuf.java index c594519b4b4..44fc3ce33bb 100644 --- a/core/descriptor.loader.java/src/org/jetbrains/kotlin/serialization/jvm/JvmProtoBuf.java +++ b/core/descriptor.loader.java/src/org/jetbrains/kotlin/serialization/jvm/JvmProtoBuf.java @@ -15,675 +15,6 @@ public final class JvmProtoBuf { registry.add(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.index); registry.add(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.classAnnotation); } - public interface JvmTypeOrBuilder - extends com.google.protobuf.MessageLiteOrBuilder { - - // optional .org.jetbrains.kotlin.serialization.jvm.JvmType.PrimitiveType primitive_type = 1; - /** - * optional .org.jetbrains.kotlin.serialization.jvm.JvmType.PrimitiveType primitive_type = 1; - */ - boolean hasPrimitiveType(); - /** - * optional .org.jetbrains.kotlin.serialization.jvm.JvmType.PrimitiveType primitive_type = 1; - */ - org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.PrimitiveType getPrimitiveType(); - - // optional int32 class_fq_name = 2; - /** - * optional int32 class_fq_name = 2; - * - *
-     * id in QualifiedNameTable of a name in the following format: 'package.Outer$Nested'
-     * 
- */ - boolean hasClassFqName(); - /** - * optional int32 class_fq_name = 2; - * - *
-     * id in QualifiedNameTable of a name in the following format: 'package.Outer$Nested'
-     * 
- */ - int getClassFqName(); - - // optional int32 array_dimension = 3 [default = 0]; - /** - * optional int32 array_dimension = 3 [default = 0]; - */ - boolean hasArrayDimension(); - /** - * optional int32 array_dimension = 3 [default = 0]; - */ - int getArrayDimension(); - } - /** - * Protobuf type {@code org.jetbrains.kotlin.serialization.jvm.JvmType} - * - *
-   * Either a primitive type, or a class FQ name should be present
-   * 
- */ - public static final class JvmType extends - com.google.protobuf.GeneratedMessageLite - implements JvmTypeOrBuilder { - // Use JvmType.newBuilder() to construct. - private JvmType(com.google.protobuf.GeneratedMessageLite.Builder builder) { - super(builder); - - } - private JvmType(boolean noInit) {} - - private static final JvmType defaultInstance; - public static JvmType getDefaultInstance() { - return defaultInstance; - } - - public JvmType getDefaultInstanceForType() { - return defaultInstance; - } - - private JvmType( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - initFields(); - int mutable_bitField0_ = 0; - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField(input, - extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - int rawValue = input.readEnum(); - org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.PrimitiveType value = org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.PrimitiveType.valueOf(rawValue); - if (value != null) { - bitField0_ |= 0x00000001; - primitiveType_ = value; - } - break; - } - case 16: { - bitField0_ |= 0x00000002; - classFqName_ = input.readInt32(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - arrayDimension_ = input.readInt32(); - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - makeExtensionsImmutable(); - } - } - public static com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - public JvmType parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new JvmType(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - /** - * Protobuf enum {@code org.jetbrains.kotlin.serialization.jvm.JvmType.PrimitiveType} - */ - public enum PrimitiveType - implements com.google.protobuf.Internal.EnumLite { - /** - * VOID = 0; - * - *
-       * These values correspond to ASM Type sorts
-       * 
- */ - VOID(0, 0), - /** - * BOOLEAN = 1; - */ - BOOLEAN(1, 1), - /** - * CHAR = 2; - */ - CHAR(2, 2), - /** - * BYTE = 3; - */ - BYTE(3, 3), - /** - * SHORT = 4; - */ - SHORT(4, 4), - /** - * INT = 5; - */ - INT(5, 5), - /** - * FLOAT = 6; - */ - FLOAT(6, 6), - /** - * LONG = 7; - */ - LONG(7, 7), - /** - * DOUBLE = 8; - */ - DOUBLE(8, 8), - ; - - /** - * VOID = 0; - * - *
-       * These values correspond to ASM Type sorts
-       * 
- */ - public static final int VOID_VALUE = 0; - /** - * BOOLEAN = 1; - */ - public static final int BOOLEAN_VALUE = 1; - /** - * CHAR = 2; - */ - public static final int CHAR_VALUE = 2; - /** - * BYTE = 3; - */ - public static final int BYTE_VALUE = 3; - /** - * SHORT = 4; - */ - public static final int SHORT_VALUE = 4; - /** - * INT = 5; - */ - public static final int INT_VALUE = 5; - /** - * FLOAT = 6; - */ - public static final int FLOAT_VALUE = 6; - /** - * LONG = 7; - */ - public static final int LONG_VALUE = 7; - /** - * DOUBLE = 8; - */ - public static final int DOUBLE_VALUE = 8; - - - public final int getNumber() { return value; } - - public static PrimitiveType valueOf(int value) { - switch (value) { - case 0: return VOID; - case 1: return BOOLEAN; - case 2: return CHAR; - case 3: return BYTE; - case 4: return SHORT; - case 5: return INT; - case 6: return FLOAT; - case 7: return LONG; - case 8: return DOUBLE; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; - } - private static com.google.protobuf.Internal.EnumLiteMap - internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public PrimitiveType findValueByNumber(int number) { - return PrimitiveType.valueOf(number); - } - }; - - private final int value; - - private PrimitiveType(int index, int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:org.jetbrains.kotlin.serialization.jvm.JvmType.PrimitiveType) - } - - private int bitField0_; - // optional .org.jetbrains.kotlin.serialization.jvm.JvmType.PrimitiveType primitive_type = 1; - public static final int PRIMITIVE_TYPE_FIELD_NUMBER = 1; - private org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.PrimitiveType primitiveType_; - /** - * optional .org.jetbrains.kotlin.serialization.jvm.JvmType.PrimitiveType primitive_type = 1; - */ - public boolean hasPrimitiveType() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional .org.jetbrains.kotlin.serialization.jvm.JvmType.PrimitiveType primitive_type = 1; - */ - public org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.PrimitiveType getPrimitiveType() { - return primitiveType_; - } - - // optional int32 class_fq_name = 2; - public static final int CLASS_FQ_NAME_FIELD_NUMBER = 2; - private int classFqName_; - /** - * optional int32 class_fq_name = 2; - * - *
-     * id in QualifiedNameTable of a name in the following format: 'package.Outer$Nested'
-     * 
- */ - public boolean hasClassFqName() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional int32 class_fq_name = 2; - * - *
-     * id in QualifiedNameTable of a name in the following format: 'package.Outer$Nested'
-     * 
- */ - public int getClassFqName() { - return classFqName_; - } - - // optional int32 array_dimension = 3 [default = 0]; - public static final int ARRAY_DIMENSION_FIELD_NUMBER = 3; - private int arrayDimension_; - /** - * optional int32 array_dimension = 3 [default = 0]; - */ - public boolean hasArrayDimension() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int32 array_dimension = 3 [default = 0]; - */ - public int getArrayDimension() { - return arrayDimension_; - } - - private void initFields() { - primitiveType_ = org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.PrimitiveType.VOID; - classFqName_ = 0; - arrayDimension_ = 0; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeEnum(1, primitiveType_.getNumber()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeInt32(2, classFqName_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeInt32(3, arrayDimension_); - } - } - - private int memoizedSerializedSize = -1; - public int getSerializedSize() { - int size = memoizedSerializedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - size += com.google.protobuf.CodedOutputStream - .computeEnumSize(1, primitiveType_.getNumber()); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, classFqName_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, arrayDimension_); - } - 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.jvm.JvmProtoBuf.JvmType parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType 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.jvm.JvmProtoBuf.JvmType parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType 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.jvm.JvmProtoBuf.JvmType parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType 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.jvm.JvmProtoBuf.JvmType parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType 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.jvm.JvmProtoBuf.JvmType prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - /** - * Protobuf type {@code org.jetbrains.kotlin.serialization.jvm.JvmType} - * - *
-     * Either a primitive type, or a class FQ name should be present
-     * 
- */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageLite.Builder< - org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType, Builder> - implements org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmTypeOrBuilder { - // Construct using org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - primitiveType_ = org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.PrimitiveType.VOID; - bitField0_ = (bitField0_ & ~0x00000001); - classFqName_ = 0; - bitField0_ = (bitField0_ & ~0x00000002); - arrayDimension_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType getDefaultInstanceForType() { - return org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.getDefaultInstance(); - } - - public org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType build() { - org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType buildPartial() { - org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType result = new org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.primitiveType_ = primitiveType_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.classFqName_ = classFqName_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.arrayDimension_ = arrayDimension_; - result.bitField0_ = to_bitField0_; - return result; - } - - public Builder mergeFrom(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType other) { - if (other == org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.getDefaultInstance()) return this; - if (other.hasPrimitiveType()) { - setPrimitiveType(other.getPrimitiveType()); - } - if (other.hasClassFqName()) { - setClassFqName(other.getClassFqName()); - } - if (other.hasArrayDimension()) { - setArrayDimension(other.getArrayDimension()); - } - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - // optional .org.jetbrains.kotlin.serialization.jvm.JvmType.PrimitiveType primitive_type = 1; - private org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.PrimitiveType primitiveType_ = org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.PrimitiveType.VOID; - /** - * optional .org.jetbrains.kotlin.serialization.jvm.JvmType.PrimitiveType primitive_type = 1; - */ - public boolean hasPrimitiveType() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * optional .org.jetbrains.kotlin.serialization.jvm.JvmType.PrimitiveType primitive_type = 1; - */ - public org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.PrimitiveType getPrimitiveType() { - return primitiveType_; - } - /** - * optional .org.jetbrains.kotlin.serialization.jvm.JvmType.PrimitiveType primitive_type = 1; - */ - public Builder setPrimitiveType(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.PrimitiveType value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; - primitiveType_ = value; - - return this; - } - /** - * optional .org.jetbrains.kotlin.serialization.jvm.JvmType.PrimitiveType primitive_type = 1; - */ - public Builder clearPrimitiveType() { - bitField0_ = (bitField0_ & ~0x00000001); - primitiveType_ = org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.PrimitiveType.VOID; - - return this; - } - - // optional int32 class_fq_name = 2; - private int classFqName_ ; - /** - * optional int32 class_fq_name = 2; - * - *
-       * id in QualifiedNameTable of a name in the following format: 'package.Outer$Nested'
-       * 
- */ - public boolean hasClassFqName() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional int32 class_fq_name = 2; - * - *
-       * id in QualifiedNameTable of a name in the following format: 'package.Outer$Nested'
-       * 
- */ - public int getClassFqName() { - return classFqName_; - } - /** - * optional int32 class_fq_name = 2; - * - *
-       * id in QualifiedNameTable of a name in the following format: 'package.Outer$Nested'
-       * 
- */ - public Builder setClassFqName(int value) { - bitField0_ |= 0x00000002; - classFqName_ = value; - - return this; - } - /** - * optional int32 class_fq_name = 2; - * - *
-       * id in QualifiedNameTable of a name in the following format: 'package.Outer$Nested'
-       * 
- */ - public Builder clearClassFqName() { - bitField0_ = (bitField0_ & ~0x00000002); - classFqName_ = 0; - - return this; - } - - // optional int32 array_dimension = 3 [default = 0]; - private int arrayDimension_ ; - /** - * optional int32 array_dimension = 3 [default = 0]; - */ - public boolean hasArrayDimension() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int32 array_dimension = 3 [default = 0]; - */ - public int getArrayDimension() { - return arrayDimension_; - } - /** - * optional int32 array_dimension = 3 [default = 0]; - */ - public Builder setArrayDimension(int value) { - bitField0_ |= 0x00000004; - arrayDimension_ = value; - - return this; - } - /** - * optional int32 array_dimension = 3 [default = 0]; - */ - public Builder clearArrayDimension() { - bitField0_ = (bitField0_ & ~0x00000004); - arrayDimension_ = 0; - - return this; - } - - // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.jvm.JvmType) - } - - static { - defaultInstance = new JvmType(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.serialization.jvm.JvmType) - } - public interface JvmMethodSignatureOrBuilder extends com.google.protobuf.MessageLiteOrBuilder { @@ -697,30 +28,15 @@ public final class JvmProtoBuf { */ int getName(); - // required .org.jetbrains.kotlin.serialization.jvm.JvmType return_type = 2; + // required int32 desc = 2; /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType return_type = 2; + * required int32 desc = 2; */ - boolean hasReturnType(); + boolean hasDesc(); /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType return_type = 2; + * required int32 desc = 2; */ - org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType getReturnType(); - - // repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - java.util.List - getParameterTypeList(); - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType getParameterType(int index); - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - int getParameterTypeCount(); + int getDesc(); } /** * Protobuf type {@code org.jetbrains.kotlin.serialization.jvm.JvmMethodSignature} @@ -770,25 +86,9 @@ public final class JvmProtoBuf { name_ = input.readInt32(); break; } - case 18: { - org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) == 0x00000002)) { - subBuilder = returnType_.toBuilder(); - } - returnType_ = input.readMessage(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(returnType_); - returnType_ = subBuilder.buildPartial(); - } + case 16: { bitField0_ |= 0x00000002; - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - parameterType_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - parameterType_.add(input.readMessage(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.PARSER, extensionRegistry)); + desc_ = input.readInt32(); break; } } @@ -799,9 +99,6 @@ public final class JvmProtoBuf { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - parameterType_ = java.util.Collections.unmodifiableList(parameterType_); - } makeExtensionsImmutable(); } } @@ -837,62 +134,25 @@ public final class JvmProtoBuf { return name_; } - // required .org.jetbrains.kotlin.serialization.jvm.JvmType return_type = 2; - public static final int RETURN_TYPE_FIELD_NUMBER = 2; - private org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType returnType_; + // required int32 desc = 2; + public static final int DESC_FIELD_NUMBER = 2; + private int desc_; /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType return_type = 2; + * required int32 desc = 2; */ - public boolean hasReturnType() { + public boolean hasDesc() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType return_type = 2; + * required int32 desc = 2; */ - public org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType getReturnType() { - return returnType_; - } - - // repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - public static final int PARAMETER_TYPE_FIELD_NUMBER = 3; - private java.util.List parameterType_; - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - public java.util.List getParameterTypeList() { - return parameterType_; - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - public java.util.List - getParameterTypeOrBuilderList() { - return parameterType_; - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - public int getParameterTypeCount() { - return parameterType_.size(); - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - public org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType getParameterType(int index) { - return parameterType_.get(index); - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - public org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmTypeOrBuilder getParameterTypeOrBuilder( - int index) { - return parameterType_.get(index); + public int getDesc() { + return desc_; } private void initFields() { name_ = 0; - returnType_ = org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.getDefaultInstance(); - parameterType_ = java.util.Collections.emptyList(); + desc_ = 0; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -903,7 +163,7 @@ public final class JvmProtoBuf { memoizedIsInitialized = 0; return false; } - if (!hasReturnType()) { + if (!hasDesc()) { memoizedIsInitialized = 0; return false; } @@ -918,10 +178,7 @@ public final class JvmProtoBuf { output.writeInt32(1, name_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeMessage(2, returnType_); - } - for (int i = 0; i < parameterType_.size(); i++) { - output.writeMessage(3, parameterType_.get(i)); + output.writeInt32(2, desc_); } } @@ -937,11 +194,7 @@ public final class JvmProtoBuf { } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, returnType_); - } - for (int i = 0; i < parameterType_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, parameterType_.get(i)); + .computeInt32Size(2, desc_); } memoizedSerializedSize = size; return size; @@ -1036,10 +289,8 @@ public final class JvmProtoBuf { super.clear(); name_ = 0; bitField0_ = (bitField0_ & ~0x00000001); - returnType_ = org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.getDefaultInstance(); + desc_ = 0; bitField0_ = (bitField0_ & ~0x00000002); - parameterType_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -1070,12 +321,7 @@ public final class JvmProtoBuf { if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.returnType_ = returnType_; - if (((bitField0_ & 0x00000004) == 0x00000004)) { - parameterType_ = java.util.Collections.unmodifiableList(parameterType_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.parameterType_ = parameterType_; + result.desc_ = desc_; result.bitField0_ = to_bitField0_; return result; } @@ -1085,18 +331,8 @@ public final class JvmProtoBuf { if (other.hasName()) { setName(other.getName()); } - if (other.hasReturnType()) { - mergeReturnType(other.getReturnType()); - } - if (!other.parameterType_.isEmpty()) { - if (parameterType_.isEmpty()) { - parameterType_ = other.parameterType_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureParameterTypeIsMutable(); - parameterType_.addAll(other.parameterType_); - } - + if (other.hasDesc()) { + setDesc(other.getDesc()); } return this; } @@ -1106,7 +342,7 @@ public final class JvmProtoBuf { return false; } - if (!hasReturnType()) { + if (!hasDesc()) { return false; } @@ -1165,189 +401,36 @@ public final class JvmProtoBuf { return this; } - // required .org.jetbrains.kotlin.serialization.jvm.JvmType return_type = 2; - private org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType returnType_ = org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.getDefaultInstance(); + // required int32 desc = 2; + private int desc_ ; /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType return_type = 2; + * required int32 desc = 2; */ - public boolean hasReturnType() { + public boolean hasDesc() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType return_type = 2; + * required int32 desc = 2; */ - public org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType getReturnType() { - return returnType_; + public int getDesc() { + return desc_; } /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType return_type = 2; + * required int32 desc = 2; */ - public Builder setReturnType(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType value) { - if (value == null) { - throw new NullPointerException(); - } - returnType_ = value; - + public Builder setDesc(int value) { bitField0_ |= 0x00000002; + desc_ = value; + return this; } /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType return_type = 2; + * required int32 desc = 2; */ - public Builder setReturnType( - org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.Builder builderForValue) { - returnType_ = builderForValue.build(); - - bitField0_ |= 0x00000002; - return this; - } - /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType return_type = 2; - */ - public Builder mergeReturnType(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType value) { - if (((bitField0_ & 0x00000002) == 0x00000002) && - returnType_ != org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.getDefaultInstance()) { - returnType_ = - org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.newBuilder(returnType_).mergeFrom(value).buildPartial(); - } else { - returnType_ = value; - } - - bitField0_ |= 0x00000002; - return this; - } - /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType return_type = 2; - */ - public Builder clearReturnType() { - returnType_ = org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.getDefaultInstance(); - + public Builder clearDesc() { bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - // repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - private java.util.List parameterType_ = - java.util.Collections.emptyList(); - private void ensureParameterTypeIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { - parameterType_ = new java.util.ArrayList(parameterType_); - bitField0_ |= 0x00000004; - } - } - - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - public java.util.List getParameterTypeList() { - return java.util.Collections.unmodifiableList(parameterType_); - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - public int getParameterTypeCount() { - return parameterType_.size(); - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - public org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType getParameterType(int index) { - return parameterType_.get(index); - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - public Builder setParameterType( - int index, org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType value) { - if (value == null) { - throw new NullPointerException(); - } - ensureParameterTypeIsMutable(); - parameterType_.set(index, value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - public Builder setParameterType( - int index, org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.Builder builderForValue) { - ensureParameterTypeIsMutable(); - parameterType_.set(index, builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - public Builder addParameterType(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType value) { - if (value == null) { - throw new NullPointerException(); - } - ensureParameterTypeIsMutable(); - parameterType_.add(value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - public Builder addParameterType( - int index, org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType value) { - if (value == null) { - throw new NullPointerException(); - } - ensureParameterTypeIsMutable(); - parameterType_.add(index, value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - public Builder addParameterType( - org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.Builder builderForValue) { - ensureParameterTypeIsMutable(); - parameterType_.add(builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - public Builder addParameterType( - int index, org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.Builder builderForValue) { - ensureParameterTypeIsMutable(); - parameterType_.add(index, builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - public Builder addAllParameterType( - java.lang.Iterable values) { - ensureParameterTypeIsMutable(); - super.addAll(values, parameterType_); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - public Builder clearParameterType() { - parameterType_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.serialization.jvm.JvmType parameter_type = 3; - */ - public Builder removeParameterType(int index) { - ensureParameterTypeIsMutable(); - parameterType_.remove(index); - + desc_ = 0; + return this; } @@ -1375,15 +458,15 @@ public final class JvmProtoBuf { */ int getName(); - // required .org.jetbrains.kotlin.serialization.jvm.JvmType type = 2; + // required int32 desc = 2; /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType type = 2; + * required int32 desc = 2; */ - boolean hasType(); + boolean hasDesc(); /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType type = 2; + * required int32 desc = 2; */ - org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType getType(); + int getDesc(); // optional bool is_static_in_outer = 3 [default = false]; /** @@ -1453,17 +536,9 @@ public final class JvmProtoBuf { name_ = input.readInt32(); break; } - case 18: { - org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) == 0x00000002)) { - subBuilder = type_.toBuilder(); - } - type_ = input.readMessage(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(type_); - type_ = subBuilder.buildPartial(); - } + case 16: { bitField0_ |= 0x00000002; + desc_ = input.readInt32(); break; } case 24: { @@ -1514,20 +589,20 @@ public final class JvmProtoBuf { return name_; } - // required .org.jetbrains.kotlin.serialization.jvm.JvmType type = 2; - public static final int TYPE_FIELD_NUMBER = 2; - private org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType type_; + // required int32 desc = 2; + public static final int DESC_FIELD_NUMBER = 2; + private int desc_; /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType type = 2; + * required int32 desc = 2; */ - public boolean hasType() { + public boolean hasDesc() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType type = 2; + * required int32 desc = 2; */ - public org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType getType() { - return type_; + public int getDesc() { + return desc_; } // optional bool is_static_in_outer = 3 [default = false]; @@ -1558,7 +633,7 @@ public final class JvmProtoBuf { private void initFields() { name_ = 0; - type_ = org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.getDefaultInstance(); + desc_ = 0; isStaticInOuter_ = false; } private byte memoizedIsInitialized = -1; @@ -1570,7 +645,7 @@ public final class JvmProtoBuf { memoizedIsInitialized = 0; return false; } - if (!hasType()) { + if (!hasDesc()) { memoizedIsInitialized = 0; return false; } @@ -1585,7 +660,7 @@ public final class JvmProtoBuf { output.writeInt32(1, name_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeMessage(2, type_); + output.writeInt32(2, desc_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBool(3, isStaticInOuter_); @@ -1604,7 +679,7 @@ public final class JvmProtoBuf { } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, type_); + .computeInt32Size(2, desc_); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream @@ -1703,7 +778,7 @@ public final class JvmProtoBuf { super.clear(); name_ = 0; bitField0_ = (bitField0_ & ~0x00000001); - type_ = org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.getDefaultInstance(); + desc_ = 0; bitField0_ = (bitField0_ & ~0x00000002); isStaticInOuter_ = false; bitField0_ = (bitField0_ & ~0x00000004); @@ -1737,7 +812,7 @@ public final class JvmProtoBuf { if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } - result.type_ = type_; + result.desc_ = desc_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } @@ -1751,8 +826,8 @@ public final class JvmProtoBuf { if (other.hasName()) { setName(other.getName()); } - if (other.hasType()) { - mergeType(other.getType()); + if (other.hasDesc()) { + setDesc(other.getDesc()); } if (other.hasIsStaticInOuter()) { setIsStaticInOuter(other.getIsStaticInOuter()); @@ -1765,7 +840,7 @@ public final class JvmProtoBuf { return false; } - if (!hasType()) { + if (!hasDesc()) { return false; } @@ -1824,64 +899,36 @@ public final class JvmProtoBuf { return this; } - // required .org.jetbrains.kotlin.serialization.jvm.JvmType type = 2; - private org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType type_ = org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.getDefaultInstance(); + // required int32 desc = 2; + private int desc_ ; /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType type = 2; + * required int32 desc = 2; */ - public boolean hasType() { + public boolean hasDesc() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType type = 2; + * required int32 desc = 2; */ - public org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType getType() { - return type_; + public int getDesc() { + return desc_; } /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType type = 2; + * required int32 desc = 2; */ - public Builder setType(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType value) { - if (value == null) { - throw new NullPointerException(); - } - type_ = value; - + public Builder setDesc(int value) { bitField0_ |= 0x00000002; + desc_ = value; + return this; } /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType type = 2; + * required int32 desc = 2; */ - public Builder setType( - org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.Builder builderForValue) { - type_ = builderForValue.build(); - - bitField0_ |= 0x00000002; - return this; - } - /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType type = 2; - */ - public Builder mergeType(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType value) { - if (((bitField0_ & 0x00000002) == 0x00000002) && - type_ != org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.getDefaultInstance()) { - type_ = - org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.newBuilder(type_).mergeFrom(value).buildPartial(); - } else { - type_ = value; - } - - bitField0_ |= 0x00000002; - return this; - } - /** - * required .org.jetbrains.kotlin.serialization.jvm.JvmType type = 2; - */ - public Builder clearType() { - type_ = org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.getDefaultInstance(); - + public Builder clearDesc() { bitField0_ = (bitField0_ & ~0x00000002); + desc_ = 0; + return this; } @@ -1955,20 +1002,10 @@ public final class JvmProtoBuf { // optional .org.jetbrains.kotlin.serialization.jvm.JvmFieldSignature field = 1; /** * optional .org.jetbrains.kotlin.serialization.jvm.JvmFieldSignature field = 1; - * - *
-     * A property itself is identified either by the field, or by the synthetic method.
-     * If the property is annotated, then either field or synthetic_method should be present
-     * 
*/ boolean hasField(); /** * optional .org.jetbrains.kotlin.serialization.jvm.JvmFieldSignature field = 1; - * - *
-     * A property itself is identified either by the field, or by the synthetic method.
-     * If the property is annotated, then either field or synthetic_method should be present
-     * 
*/ org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmFieldSignature getField(); @@ -1977,7 +1014,7 @@ public final class JvmProtoBuf { * optional .org.jetbrains.kotlin.serialization.jvm.JvmMethodSignature synthetic_method = 2; * *
-     * Annotations on properties without backing fields are written on a synthetic method with this signature
+     * Annotations on properties are written on a synthetic method with this signature
      * 
*/ boolean hasSyntheticMethod(); @@ -1985,7 +1022,7 @@ public final class JvmProtoBuf { * optional .org.jetbrains.kotlin.serialization.jvm.JvmMethodSignature synthetic_method = 2; * *
-     * Annotations on properties without backing fields are written on a synthetic method with this signature
+     * Annotations on properties are written on a synthetic method with this signature
      * 
*/ org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmMethodSignature getSyntheticMethod(); @@ -2137,22 +1174,12 @@ public final class JvmProtoBuf { private org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmFieldSignature field_; /** * optional .org.jetbrains.kotlin.serialization.jvm.JvmFieldSignature field = 1; - * - *
-     * A property itself is identified either by the field, or by the synthetic method.
-     * If the property is annotated, then either field or synthetic_method should be present
-     * 
*/ public boolean hasField() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * optional .org.jetbrains.kotlin.serialization.jvm.JvmFieldSignature field = 1; - * - *
-     * A property itself is identified either by the field, or by the synthetic method.
-     * If the property is annotated, then either field or synthetic_method should be present
-     * 
*/ public org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmFieldSignature getField() { return field_; @@ -2165,7 +1192,7 @@ public final class JvmProtoBuf { * optional .org.jetbrains.kotlin.serialization.jvm.JvmMethodSignature synthetic_method = 2; * *
-     * Annotations on properties without backing fields are written on a synthetic method with this signature
+     * Annotations on properties are written on a synthetic method with this signature
      * 
*/ public boolean hasSyntheticMethod() { @@ -2175,7 +1202,7 @@ public final class JvmProtoBuf { * optional .org.jetbrains.kotlin.serialization.jvm.JvmMethodSignature synthetic_method = 2; * *
-     * Annotations on properties without backing fields are written on a synthetic method with this signature
+     * Annotations on properties are written on a synthetic method with this signature
      * 
*/ public org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmMethodSignature getSyntheticMethod() { @@ -2502,33 +1529,18 @@ public final class JvmProtoBuf { private org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmFieldSignature field_ = org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmFieldSignature.getDefaultInstance(); /** * optional .org.jetbrains.kotlin.serialization.jvm.JvmFieldSignature field = 1; - * - *
-       * A property itself is identified either by the field, or by the synthetic method.
-       * If the property is annotated, then either field or synthetic_method should be present
-       * 
*/ public boolean hasField() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * optional .org.jetbrains.kotlin.serialization.jvm.JvmFieldSignature field = 1; - * - *
-       * A property itself is identified either by the field, or by the synthetic method.
-       * If the property is annotated, then either field or synthetic_method should be present
-       * 
*/ public org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmFieldSignature getField() { return field_; } /** * optional .org.jetbrains.kotlin.serialization.jvm.JvmFieldSignature field = 1; - * - *
-       * A property itself is identified either by the field, or by the synthetic method.
-       * If the property is annotated, then either field or synthetic_method should be present
-       * 
*/ public Builder setField(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmFieldSignature value) { if (value == null) { @@ -2541,11 +1553,6 @@ public final class JvmProtoBuf { } /** * optional .org.jetbrains.kotlin.serialization.jvm.JvmFieldSignature field = 1; - * - *
-       * A property itself is identified either by the field, or by the synthetic method.
-       * If the property is annotated, then either field or synthetic_method should be present
-       * 
*/ public Builder setField( org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmFieldSignature.Builder builderForValue) { @@ -2556,11 +1563,6 @@ public final class JvmProtoBuf { } /** * optional .org.jetbrains.kotlin.serialization.jvm.JvmFieldSignature field = 1; - * - *
-       * A property itself is identified either by the field, or by the synthetic method.
-       * If the property is annotated, then either field or synthetic_method should be present
-       * 
*/ public Builder mergeField(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmFieldSignature value) { if (((bitField0_ & 0x00000001) == 0x00000001) && @@ -2576,11 +1578,6 @@ public final class JvmProtoBuf { } /** * optional .org.jetbrains.kotlin.serialization.jvm.JvmFieldSignature field = 1; - * - *
-       * A property itself is identified either by the field, or by the synthetic method.
-       * If the property is annotated, then either field or synthetic_method should be present
-       * 
*/ public Builder clearField() { field_ = org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmFieldSignature.getDefaultInstance(); @@ -2595,7 +1592,7 @@ public final class JvmProtoBuf { * optional .org.jetbrains.kotlin.serialization.jvm.JvmMethodSignature synthetic_method = 2; * *
-       * Annotations on properties without backing fields are written on a synthetic method with this signature
+       * Annotations on properties are written on a synthetic method with this signature
        * 
*/ public boolean hasSyntheticMethod() { @@ -2605,7 +1602,7 @@ public final class JvmProtoBuf { * optional .org.jetbrains.kotlin.serialization.jvm.JvmMethodSignature synthetic_method = 2; * *
-       * Annotations on properties without backing fields are written on a synthetic method with this signature
+       * Annotations on properties are written on a synthetic method with this signature
        * 
*/ public org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmMethodSignature getSyntheticMethod() { @@ -2615,7 +1612,7 @@ public final class JvmProtoBuf { * optional .org.jetbrains.kotlin.serialization.jvm.JvmMethodSignature synthetic_method = 2; * *
-       * Annotations on properties without backing fields are written on a synthetic method with this signature
+       * Annotations on properties are written on a synthetic method with this signature
        * 
*/ public Builder setSyntheticMethod(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmMethodSignature value) { @@ -2631,7 +1628,7 @@ public final class JvmProtoBuf { * optional .org.jetbrains.kotlin.serialization.jvm.JvmMethodSignature synthetic_method = 2; * *
-       * Annotations on properties without backing fields are written on a synthetic method with this signature
+       * Annotations on properties are written on a synthetic method with this signature
        * 
*/ public Builder setSyntheticMethod( @@ -2645,7 +1642,7 @@ public final class JvmProtoBuf { * optional .org.jetbrains.kotlin.serialization.jvm.JvmMethodSignature synthetic_method = 2; * *
-       * Annotations on properties without backing fields are written on a synthetic method with this signature
+       * Annotations on properties are written on a synthetic method with this signature
        * 
*/ public Builder mergeSyntheticMethod(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmMethodSignature value) { @@ -2664,7 +1661,7 @@ public final class JvmProtoBuf { * optional .org.jetbrains.kotlin.serialization.jvm.JvmMethodSignature synthetic_method = 2; * *
-       * Annotations on properties without backing fields are written on a synthetic method with this signature
+       * Annotations on properties are written on a synthetic method with this signature
        * 
*/ public Builder clearSyntheticMethod() { diff --git a/core/reflection.jvm/src/kotlin/reflect/jvm/internal/KDeclarationContainerImpl.kt b/core/reflection.jvm/src/kotlin/reflect/jvm/internal/KDeclarationContainerImpl.kt index adc1729a847..4c1a1b7cce3 100644 --- a/core/reflection.jvm/src/kotlin/reflect/jvm/internal/KDeclarationContainerImpl.kt +++ b/core/reflection.jvm/src/kotlin/reflect/jvm/internal/KDeclarationContainerImpl.kt @@ -28,7 +28,6 @@ import org.jetbrains.kotlin.resolve.scopes.JetScope import org.jetbrains.kotlin.serialization.ProtoBuf import org.jetbrains.kotlin.serialization.deserialization.NameResolver import org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf -import org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmType.PrimitiveType.* import java.lang.reflect.Constructor import java.lang.reflect.Field import java.lang.reflect.Method @@ -229,9 +228,44 @@ internal abstract class KDeclarationContainerImpl : ClassBasedDeclarationContain private fun loadParameterTypes(nameResolver: NameResolver, signature: JvmProtoBuf.JvmMethodSignature): List> { val classLoader = jClass.safeClassLoader - return signature.parameterTypeList.map { jvmType -> - loadJvmType(jvmType, nameResolver, classLoader) + val result = arrayListOf>() + val desc = nameResolver.getString(signature.desc) + + var i = 1 + while (desc[i] != ')') { + var arrayDimension = 0 + while (desc[i] == '[') { + arrayDimension++ + i++ + } + + var type = when (desc[i++]) { + 'L' -> { + val semicolon = desc.indexOf(';', i) + val internalName = desc.substring(i, semicolon) + i = semicolon + 1 + classLoader.loadClass(internalName.replace('/', '.')) + } + 'V' -> Void.TYPE + 'Z' -> java.lang.Boolean.TYPE + 'C' -> java.lang.Character.TYPE + 'B' -> java.lang.Byte.TYPE + 'S' -> java.lang.Short.TYPE + 'I' -> java.lang.Integer.TYPE + 'F' -> java.lang.Float.TYPE + 'J' -> java.lang.Long.TYPE + 'D' -> java.lang.Double.TYPE + else -> throw KotlinReflectionInternalError("Unknown type prefix in the method signature: $desc") + } + + repeat(arrayDimension) { + type = type.createArrayType() + } + + result.add(type) } + + return result } // TODO: check resulting field's type @@ -268,42 +302,7 @@ internal abstract class KDeclarationContainerImpl : ClassBasedDeclarationContain return jClass.safeClassLoader.loadClass(classId.asSingleFqName().asString()) } - private fun loadJvmType( - type: JvmProtoBuf.JvmType, - nameResolver: NameResolver, - classLoader: ClassLoader, - arrayDimension: Int = type.getArrayDimension() - ): Class<*> { - if (arrayDimension > 0) { - return loadJvmType(type, nameResolver, classLoader, arrayDimension - 1).createArrayType() - } - - if (type.hasPrimitiveType()) { - return PRIMITIVE_TYPES[type.getPrimitiveType()] - ?: throw KotlinReflectionInternalError("Unknown primitive type: ${type.getPrimitiveType()}") - } - - if (type.hasClassFqName()) { - val fqName = nameResolver.getFqName(type.getClassFqName()) - return classLoader.loadClass(fqName.asString()) - } - - throw KotlinReflectionInternalError("Inconsistent metadata for JVM type") - } - companion object { - private val PRIMITIVE_TYPES = mapOf( - VOID to Void.TYPE, - BOOLEAN to java.lang.Boolean.TYPE, - CHAR to java.lang.Character.TYPE, - BYTE to java.lang.Byte.TYPE, - SHORT to java.lang.Short.TYPE, - INT to java.lang.Integer.TYPE, - FLOAT to java.lang.Float.TYPE, - LONG to java.lang.Long.TYPE, - DOUBLE to java.lang.Double.TYPE - ) - private val DEFAULT_CONSTRUCTOR_MARKER = Class.forName("kotlin.jvm.internal.DefaultConstructorMarker") } } 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 d7c4a4641e8..0a27ac0d39a 100644 --- a/core/reflection.jvm/src/kotlin/reflect/jvm/internal/RuntimeTypeMapper.kt +++ b/core/reflection.jvm/src/kotlin/reflect/jvm/internal/RuntimeTypeMapper.kt @@ -26,7 +26,6 @@ import org.jetbrains.kotlin.load.java.descriptors.JavaMethodDescriptor import org.jetbrains.kotlin.load.java.descriptors.JavaPropertyDescriptor import org.jetbrains.kotlin.load.java.sources.JavaSourceElement import org.jetbrains.kotlin.load.java.structure.reflect.* -import org.jetbrains.kotlin.load.kotlin.SignatureDeserializer import org.jetbrains.kotlin.name.ClassId import org.jetbrains.kotlin.platform.JavaToKotlinClassMap import org.jetbrains.kotlin.resolve.DescriptorUtils @@ -52,7 +51,7 @@ internal sealed class JvmFunctionSignature { val nameResolver: NameResolver ) : JvmFunctionSignature() { override fun asString(): String = - SignatureDeserializer(nameResolver).methodSignatureString(signature) + nameResolver.getString(signature.name) + nameResolver.getString(signature.desc) } class JavaMethod(val method: Method) : JvmFunctionSignature() { @@ -96,12 +95,12 @@ internal sealed class JvmPropertySignature { init { if (signature.hasGetter()) { - string = SignatureDeserializer(nameResolver).methodSignatureString(signature.getter) + string = nameResolver.getString(signature.getter.name) + nameResolver.getString(signature.getter.desc) } else { string = JvmAbi.getterName(nameResolver.getString(signature.field.name)) + "()" + - SignatureDeserializer(nameResolver).typeDescriptor(signature.field.type) + nameResolver.getString(signature.field.desc) } } @@ -174,15 +173,15 @@ internal object RuntimeTypeMapper { when (function.name.asString()) { "equals" -> if (parameters.size() == 1 && KotlinBuiltIns.isNullableAny(parameters.single().type)) { return JvmFunctionSignature.BuiltInFunction.Predefined("equals(Ljava/lang/Object;)Z", - javaClass().getDeclaredMethod("equals", javaClass())) + Any::class.java.getDeclaredMethod("equals", Any::class.java)) } "hashCode" -> if (parameters.isEmpty()) { return JvmFunctionSignature.BuiltInFunction.Predefined("hashCode()I", - javaClass().getDeclaredMethod("hashCode")) + Any::class.java.getDeclaredMethod("hashCode")) } "toString" -> if (parameters.isEmpty()) { return JvmFunctionSignature.BuiltInFunction.Predefined("toString()Ljava/lang/String;", - javaClass().getDeclaredMethod("toString")) + Any::class.java.getDeclaredMethod("toString")) } // TODO: generalize and support other functions from built-ins } 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 cfe371184a4..e067cae4397 100644 --- a/jps-plugin/src/org/jetbrains/kotlin/jps/incremental/ProtoCompareGenerated.kt +++ b/jps-plugin/src/org/jetbrains/kotlin/jps/incremental/ProtoCompareGenerated.kt @@ -299,9 +299,7 @@ open class ProtoCompareGenerated(public val oldNameResolver: NameResolver, publi open fun checkEquals(old: JvmProtoBuf.JvmMethodSignature, new: JvmProtoBuf.JvmMethodSignature): Boolean { if (!checkStringEquals(old.name, new.name)) return false - if (!checkEquals(old.returnType, new.returnType)) return false - - if (!checkEqualsJvmMethodSignatureParameterType(old, new)) return false + if (!checkStringEquals(old.desc, new.desc)) return false return true } @@ -352,29 +350,10 @@ open class ProtoCompareGenerated(public val oldNameResolver: NameResolver, publi return true } - open fun checkEquals(old: JvmProtoBuf.JvmType, new: JvmProtoBuf.JvmType): Boolean { - if (old.hasPrimitiveType() != new.hasPrimitiveType()) return false - if (old.hasPrimitiveType()) { - if (old.primitiveType != new.primitiveType) return false - } - - if (old.hasClassFqName() != new.hasClassFqName()) return false - if (old.hasClassFqName()) { - if (!checkClassIdEquals(old.classFqName, new.classFqName)) return false - } - - if (old.hasArrayDimension() != new.hasArrayDimension()) return false - if (old.hasArrayDimension()) { - if (old.arrayDimension != new.arrayDimension) return false - } - - return true - } - open fun checkEquals(old: JvmProtoBuf.JvmFieldSignature, new: JvmProtoBuf.JvmFieldSignature): Boolean { if (!checkStringEquals(old.name, new.name)) return false - if (!checkEquals(old.type, new.type)) return false + if (!checkStringEquals(old.desc, new.desc)) return false if (old.hasIsStaticInOuter() != new.hasIsStaticInOuter()) return false if (old.hasIsStaticInOuter()) { @@ -550,16 +529,6 @@ open class ProtoCompareGenerated(public val oldNameResolver: NameResolver, publi return true } - open fun checkEqualsJvmMethodSignatureParameterType(old: JvmProtoBuf.JvmMethodSignature, new: JvmProtoBuf.JvmMethodSignature): Boolean { - if (old.parameterTypeCount != new.parameterTypeCount) return false - - for(i in 0..old.parameterTypeCount - 1) { - if (!checkEquals(old.getParameterType(i), new.getParameterType(i))) return false - } - - return true - } - open fun checkEqualsAnnotationArgumentValueArrayElement(old: ProtoBuf.Annotation.Argument.Value, new: ProtoBuf.Annotation.Argument.Value): Boolean { if (old.arrayElementCount != new.arrayElementCount) return false @@ -814,11 +783,7 @@ public fun JvmProtoBuf.JvmMethodSignature.hashCode(stringIndexes: (Int) -> Int, hashCode = 31 * hashCode + stringIndexes(name) - hashCode = 31 * hashCode + returnType.hashCode(stringIndexes, fqNameIndexes) - - for(i in 0..parameterTypeCount - 1) { - hashCode = 31 * hashCode + getParameterType(i).hashCode(stringIndexes, fqNameIndexes) - } + hashCode = 31 * hashCode + stringIndexes(desc) return hashCode } @@ -869,30 +834,12 @@ public fun ProtoBuf.Annotation.Argument.hashCode(stringIndexes: (Int) -> Int, fq return hashCode } -public fun JvmProtoBuf.JvmType.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (Int) -> Int): Int { - var hashCode = 1 - - if (hasPrimitiveType()) { - hashCode = 31 * hashCode + primitiveType.hashCode() - } - - if (hasClassFqName()) { - hashCode = 31 * hashCode + fqNameIndexes(classFqName) - } - - if (hasArrayDimension()) { - hashCode = 31 * hashCode + arrayDimension - } - - return hashCode -} - public fun JvmProtoBuf.JvmFieldSignature.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes: (Int) -> Int): Int { var hashCode = 1 hashCode = 31 * hashCode + stringIndexes(name) - hashCode = 31 * hashCode + type.hashCode(stringIndexes, fqNameIndexes) + hashCode = 31 * hashCode + stringIndexes(desc) if (hasIsStaticInOuter()) { hashCode = 31 * hashCode + isStaticInOuter.hashCode()