[IR SERIALIZATION] Get rid of FqName

This commit is contained in:
Roman Artemev
2019-09-03 18:23:00 +03:00
committed by romanart
parent 9fa89bf7e2
commit 105fc4b0ca
15 changed files with 643 additions and 825 deletions
@@ -6,8 +6,8 @@ option java_outer_classname = "KotlinIr";
option optimize_for = LITE_RUNTIME; option optimize_for = LITE_RUNTIME;
message DescriptorReference { message DescriptorReference {
required FqName package_fq_name = 1; repeated int32 package_fq_name = 1;
required FqName class_fq_name = 2; repeated int32 class_fq_name = 2;
required int32 name = 3; required int32 name = 3;
optional UniqId uniq_id = 4; optional UniqId uniq_id = 4;
optional bool is_getter = 5 [default = false]; optional bool is_getter = 5 [default = false];
@@ -76,10 +76,6 @@ message IrDeclarationOrigin {
} }
} }
message FqName {
repeated int32 segment = 1;
}
/* ------ Top Level---------------------------------------------- */ /* ------ Top Level---------------------------------------------- */
message IrDeclarationContainer { message IrDeclarationContainer {
@@ -94,7 +90,7 @@ message FileEntry {
message IrFile { message IrFile {
repeated UniqId declaration_id = 1; repeated UniqId declaration_id = 1;
required FileEntry file_entry = 2; required FileEntry file_entry = 2;
required FqName fq_name = 3; repeated int32 fq_name = 3;
required Annotations annotations = 4; required Annotations annotations = 4;
repeated int32 explicitly_exported_to_compiler = 5; repeated int32 explicitly_exported_to_compiler = 5;
} }
@@ -123,7 +119,7 @@ message IrSymbolData {
required IrSymbolKind kind = 1; required IrSymbolKind kind = 1;
required UniqId uniq_id = 2; required UniqId uniq_id = 2;
required UniqId top_level_uniq_id = 3; required UniqId top_level_uniq_id = 3;
optional FqName fqname = 4; repeated int32 fq_name = 4;
optional DescriptorReference descriptor_reference = 5; optional DescriptorReference descriptor_reference = 5;
} }
@@ -109,8 +109,8 @@ abstract class DescriptorReferenceDeserializer(
} }
// TODO: This is still native specific. Eliminate. // TODO: This is still native specific. Eliminate.
val rootSegment = packageFqName.pathSegments().firstOrNull()?.identifier ?: "" val fqnString = packageFqName.asString()
if (rootSegment == "cnames" || rootSegment == "objcnames") { if (fqnString.startsWith("cnames.") || fqnString.startsWith("objcnames.")) {
val descriptor = val descriptor =
currentModule.findClassAcrossModuleDependencies(ClassId(packageFqName, FqName(name), false))!! currentModule.findClassAcrossModuleDependencies(ClassId(packageFqName, FqName(name), false))!!
if (!descriptor.fqNameUnsafe.asString().startsWith("cnames") && !descriptor.fqNameUnsafe.asString().startsWith( if (!descriptor.fqNameUnsafe.asString().startsWith("cnames") && !descriptor.fqNameUnsafe.asString().startsWith(
@@ -119,7 +119,7 @@ import org.jetbrains.kotlin.backend.common.serialization.proto.ModalityKind as P
//import org.jetbrains.kotlin.backend.common.serialization.proto.IrDataIndex as ProtoStringIndex //import org.jetbrains.kotlin.backend.common.serialization.proto.IrDataIndex as ProtoStringIndex
import org.jetbrains.kotlin.backend.common.serialization.proto.TypeArguments as ProtoTypeArguments import org.jetbrains.kotlin.backend.common.serialization.proto.TypeArguments as ProtoTypeArguments
import org.jetbrains.kotlin.backend.common.serialization.proto.Visibility as ProtoVisibility import org.jetbrains.kotlin.backend.common.serialization.proto.Visibility as ProtoVisibility
import org.jetbrains.kotlin.backend.common.serialization.proto.FqName as ProtoFqName //import org.jetbrains.kotlin.backend.common.serialization.proto.FqName as ProtoFqName
// TODO: This code still has some uses of descriptors: // TODO: This code still has some uses of descriptors:
// 1. We use descriptors as keys for symbolTable -- probably symbol table related code should be refactored out from // 1. We use descriptors as keys for symbolTable -- probably symbol table related code should be refactored out from
@@ -143,8 +143,8 @@ abstract class IrFileDeserializer(
private val parentsStack = mutableListOf<IrDeclarationParent>() private val parentsStack = mutableListOf<IrDeclarationParent>()
fun deserializeFqName(proto: ProtoFqName): FqName { fun deserializeFqName(fqn: List<Int>): FqName {
return proto.segmentList.run { return fqn.run {
if (isEmpty()) FqName.ROOT else FqName.fromSegments(map { deserializeString(it) }) if (isEmpty()) FqName.ROOT else FqName.fromSegments(map { deserializeString(it) })
} }
} }
@@ -35,7 +35,6 @@ import org.jetbrains.kotlin.backend.common.serialization.proto.ClassKind as Prot
import org.jetbrains.kotlin.backend.common.serialization.proto.Coordinates as ProtoCoordinates import org.jetbrains.kotlin.backend.common.serialization.proto.Coordinates as ProtoCoordinates
import org.jetbrains.kotlin.backend.common.serialization.proto.FieldAccessCommon as ProtoFieldAccessCommon import org.jetbrains.kotlin.backend.common.serialization.proto.FieldAccessCommon as ProtoFieldAccessCommon
import org.jetbrains.kotlin.backend.common.serialization.proto.FileEntry as ProtoFileEntry import org.jetbrains.kotlin.backend.common.serialization.proto.FileEntry as ProtoFileEntry
import org.jetbrains.kotlin.backend.common.serialization.proto.FqName as ProtoFqName
import org.jetbrains.kotlin.backend.common.serialization.proto.IrAnonymousInit as ProtoAnonymousInit import org.jetbrains.kotlin.backend.common.serialization.proto.IrAnonymousInit as ProtoAnonymousInit
import org.jetbrains.kotlin.backend.common.serialization.proto.IrBlock as ProtoBlock import org.jetbrains.kotlin.backend.common.serialization.proto.IrBlock as ProtoBlock
import org.jetbrains.kotlin.backend.common.serialization.proto.IrBlockBody as ProtoBlockBody import org.jetbrains.kotlin.backend.common.serialization.proto.IrBlockBody as ProtoBlockBody
@@ -303,14 +302,13 @@ open class IrFileSerializer(
return proto.build() return proto.build()
} }
private fun serializeFqName(fqName: FqName): ProtoFqName { private fun serializeFqName(fqName: FqName): List<Int> {
val proto = ProtoFqName.newBuilder() // val proto = ProtoFqName.newBuilder()
fqName.pathSegments().forEach { // fqName.pathSegments().forEach {
proto.addSegment(serializeString(it.identifier)) // proto.addSegment(serializeString(it.identifier))
} // }
return proto.build() private fun serializeFqName(fqName: FqName) = fqName.pathSegments().map { serializeString(it.identifier) }
}
private fun serializeIrTypeProjection(argument: IrTypeProjection): ProtoTypeProjection = ProtoTypeProjection.newBuilder() private fun serializeIrTypeProjection(argument: IrTypeProjection): ProtoTypeProjection = ProtoTypeProjection.newBuilder()
.setVariance(serializeIrTypeVariance(argument.variance)) .setVariance(serializeIrTypeVariance(argument.variance))
@@ -1279,7 +1277,7 @@ open class IrFileSerializer(
val proto = ProtoFile.newBuilder() val proto = ProtoFile.newBuilder()
.setFileEntry(serializeFileEntry(file.fileEntry)) .setFileEntry(serializeFileEntry(file.fileEntry))
.setFqName(serializeFqName(file.fqName)) .addAllFqName(serializeFqName(file.fqName))
.setAnnotations(serializeAnnotations(file.annotations)) .setAnnotations(serializeAnnotations(file.annotations))
file.declarations.forEach { file.declarations.forEach {
@@ -329,8 +329,8 @@ abstract class KotlinIrLinker(
override fun deserializeDescriptorReference(proto: ProtoDescriptorReference) = override fun deserializeDescriptorReference(proto: ProtoDescriptorReference) =
descriptorReferenceDeserializer.deserializeDescriptorReference( descriptorReferenceDeserializer.deserializeDescriptorReference(
deserializeFqName(proto.packageFqName), deserializeFqName(proto.packageFqNameList),
deserializeFqName(proto.classFqName), deserializeFqName(proto.classFqNameList),
deserializeString(proto.name), deserializeString(proto.name),
if (proto.hasUniqId()) proto.uniqId.index else null, if (proto.hasUniqId()) proto.uniqId.index else null,
isEnumEntry = proto.isEnumEntry, isEnumEntry = proto.isEnumEntry,
@@ -404,7 +404,7 @@ abstract class KotlinIrLinker(
val fileDeserializer = IrDeserializerForFile(fileProto.annotations, fileIndex, !deserializationStrategy.needBodies) val fileDeserializer = IrDeserializerForFile(fileProto.annotations, fileIndex, !deserializationStrategy.needBodies)
val fqName = fileDeserializer.deserializeFqName(fileProto.fqName) val fqName = fileDeserializer.deserializeFqName(fileProto.fqNameList)
val packageFragmentDescriptor = EmptyPackageFragmentDescriptor(moduleDescriptor, fqName) val packageFragmentDescriptor = EmptyPackageFragmentDescriptor(moduleDescriptor, fqName)
@@ -6,7 +6,6 @@
package org.jetbrains.kotlin.backend.common.serialization package org.jetbrains.kotlin.backend.common.serialization
import org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference as ProtoDescriptorReference import org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference as ProtoDescriptorReference
import org.jetbrains.kotlin.backend.common.serialization.proto.FqName as ProtoFqName
import org.jetbrains.kotlin.descriptors.* import org.jetbrains.kotlin.descriptors.*
import org.jetbrains.kotlin.ir.declarations.* import org.jetbrains.kotlin.ir.declarations.*
@@ -21,7 +20,7 @@ import org.jetbrains.kotlin.resolve.descriptorUtil.classId
open class DescriptorReferenceSerializer( open class DescriptorReferenceSerializer(
val declarationTable: DeclarationTable, val declarationTable: DeclarationTable,
val serializeString: (String) -> Int, val serializeString: (String) -> Int,
val serializeFqName: (FqName) -> ProtoFqName val serializeFqName: (FqName) -> List<Int>
) { ) {
private fun isEnumSpecialMember(descriptor: DeclarationDescriptor): Boolean { private fun isEnumSpecialMember(descriptor: DeclarationDescriptor): Boolean {
@@ -112,8 +111,8 @@ open class DescriptorReferenceSerializer(
val uniqId = discoverableDescriptorsDeclaration?.let { declarationTable.uniqIdByDeclaration(it) } val uniqId = discoverableDescriptorsDeclaration?.let { declarationTable.uniqIdByDeclaration(it) }
val proto = ProtoDescriptorReference.newBuilder() val proto = ProtoDescriptorReference.newBuilder()
.setPackageFqName(serializeFqName(packageFqName)) .addAllPackageFqName(serializeFqName(packageFqName))
.setClassFqName(serializeFqName(classFqName)) .addAllClassFqName(serializeFqName(classFqName))
.setName(serializeString(nameString)) .setName(serializeString(nameString))
if (uniqId != null) proto.setUniqId(protoUniqId(uniqId)) if (uniqId != null) proto.setUniqId(protoUniqId(uniqId))
@@ -53,40 +53,56 @@ public final class DescriptorReference extends
} }
break; break;
} }
case 8: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
packageFqName_ = new java.util.ArrayList<java.lang.Integer>();
mutable_bitField0_ |= 0x00000001;
}
packageFqName_.add(input.readInt32());
break;
}
case 10: { case 10: {
org.jetbrains.kotlin.backend.common.serialization.proto.FqName.Builder subBuilder = null; int length = input.readRawVarint32();
if (((bitField0_ & 0x00000001) == 0x00000001)) { int limit = input.pushLimit(length);
subBuilder = packageFqName_.toBuilder(); if (!((mutable_bitField0_ & 0x00000001) == 0x00000001) && input.getBytesUntilLimit() > 0) {
packageFqName_ = new java.util.ArrayList<java.lang.Integer>();
mutable_bitField0_ |= 0x00000001;
} }
packageFqName_ = input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.FqName.PARSER, extensionRegistry); while (input.getBytesUntilLimit() > 0) {
if (subBuilder != null) { packageFqName_.add(input.readInt32());
subBuilder.mergeFrom(packageFqName_);
packageFqName_ = subBuilder.buildPartial();
} }
bitField0_ |= 0x00000001; input.popLimit(limit);
break;
}
case 16: {
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
classFqName_ = new java.util.ArrayList<java.lang.Integer>();
mutable_bitField0_ |= 0x00000002;
}
classFqName_.add(input.readInt32());
break; break;
} }
case 18: { case 18: {
org.jetbrains.kotlin.backend.common.serialization.proto.FqName.Builder subBuilder = null; int length = input.readRawVarint32();
if (((bitField0_ & 0x00000002) == 0x00000002)) { int limit = input.pushLimit(length);
subBuilder = classFqName_.toBuilder(); if (!((mutable_bitField0_ & 0x00000002) == 0x00000002) && input.getBytesUntilLimit() > 0) {
classFqName_ = new java.util.ArrayList<java.lang.Integer>();
mutable_bitField0_ |= 0x00000002;
} }
classFqName_ = input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.FqName.PARSER, extensionRegistry); while (input.getBytesUntilLimit() > 0) {
if (subBuilder != null) { classFqName_.add(input.readInt32());
subBuilder.mergeFrom(classFqName_);
classFqName_ = subBuilder.buildPartial();
} }
bitField0_ |= 0x00000002; input.popLimit(limit);
break; break;
} }
case 24: { case 24: {
bitField0_ |= 0x00000004; bitField0_ |= 0x00000001;
name_ = input.readInt32(); name_ = input.readInt32();
break; break;
} }
case 34: { case 34: {
org.jetbrains.kotlin.backend.common.serialization.proto.UniqId.Builder subBuilder = null; org.jetbrains.kotlin.backend.common.serialization.proto.UniqId.Builder subBuilder = null;
if (((bitField0_ & 0x00000008) == 0x00000008)) { if (((bitField0_ & 0x00000002) == 0x00000002)) {
subBuilder = uniqId_.toBuilder(); subBuilder = uniqId_.toBuilder();
} }
uniqId_ = input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.UniqId.PARSER, extensionRegistry); uniqId_ = input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.UniqId.PARSER, extensionRegistry);
@@ -94,46 +110,46 @@ public final class DescriptorReference extends
subBuilder.mergeFrom(uniqId_); subBuilder.mergeFrom(uniqId_);
uniqId_ = subBuilder.buildPartial(); uniqId_ = subBuilder.buildPartial();
} }
bitField0_ |= 0x00000008; bitField0_ |= 0x00000002;
break; break;
} }
case 40: { case 40: {
bitField0_ |= 0x00000010; bitField0_ |= 0x00000004;
isGetter_ = input.readBool(); isGetter_ = input.readBool();
break; break;
} }
case 48: { case 48: {
bitField0_ |= 0x00000020; bitField0_ |= 0x00000008;
isSetter_ = input.readBool(); isSetter_ = input.readBool();
break; break;
} }
case 56: { case 56: {
bitField0_ |= 0x00000040; bitField0_ |= 0x00000010;
isBackingField_ = input.readBool(); isBackingField_ = input.readBool();
break; break;
} }
case 64: { case 64: {
bitField0_ |= 0x00000080; bitField0_ |= 0x00000020;
isFakeOverride_ = input.readBool(); isFakeOverride_ = input.readBool();
break; break;
} }
case 72: { case 72: {
bitField0_ |= 0x00000100; bitField0_ |= 0x00000040;
isDefaultConstructor_ = input.readBool(); isDefaultConstructor_ = input.readBool();
break; break;
} }
case 80: { case 80: {
bitField0_ |= 0x00000200; bitField0_ |= 0x00000080;
isEnumEntry_ = input.readBool(); isEnumEntry_ = input.readBool();
break; break;
} }
case 88: { case 88: {
bitField0_ |= 0x00000400; bitField0_ |= 0x00000100;
isEnumSpecial_ = input.readBool(); isEnumSpecial_ = input.readBool();
break; break;
} }
case 96: { case 96: {
bitField0_ |= 0x00000800; bitField0_ |= 0x00000200;
isTypeParameter_ = input.readBool(); isTypeParameter_ = input.readBool();
break; break;
} }
@@ -145,6 +161,12 @@ public final class DescriptorReference extends
throw new org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException( throw new org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this); e.getMessage()).setUnfinishedMessage(this);
} finally { } finally {
if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
packageFqName_ = java.util.Collections.unmodifiableList(packageFqName_);
}
if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
classFqName_ = java.util.Collections.unmodifiableList(classFqName_);
}
try { try {
unknownFieldsCodedOutput.flush(); unknownFieldsCodedOutput.flush();
} catch (java.io.IOException e) { } catch (java.io.IOException e) {
@@ -172,45 +194,69 @@ public final class DescriptorReference extends
private int bitField0_; private int bitField0_;
public static final int PACKAGE_FQ_NAME_FIELD_NUMBER = 1; public static final int PACKAGE_FQ_NAME_FIELD_NUMBER = 1;
private org.jetbrains.kotlin.backend.common.serialization.proto.FqName packageFqName_; private java.util.List<java.lang.Integer> packageFqName_;
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.FqName package_fq_name = 1;</code> * <code>repeated int32 package_fq_name = 1;</code>
*/ */
public boolean hasPackageFqName() { public java.util.List<java.lang.Integer>
return ((bitField0_ & 0x00000001) == 0x00000001); getPackageFqNameList() {
return packageFqName_;
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.FqName package_fq_name = 1;</code> * <code>repeated int32 package_fq_name = 1;</code>
*/ */
public org.jetbrains.kotlin.backend.common.serialization.proto.FqName getPackageFqName() { public int getPackageFqNameCount() {
return packageFqName_; return packageFqName_.size();
}
/**
* <code>repeated int32 package_fq_name = 1;</code>
*/
public int getPackageFqName(int index) {
return packageFqName_.get(index);
} }
public static final int CLASS_FQ_NAME_FIELD_NUMBER = 2; public static final int CLASS_FQ_NAME_FIELD_NUMBER = 2;
private org.jetbrains.kotlin.backend.common.serialization.proto.FqName classFqName_; private java.util.List<java.lang.Integer> classFqName_;
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.FqName class_fq_name = 2;</code> * <code>repeated int32 class_fq_name = 2;</code>
*/ */
public boolean hasClassFqName() { public java.util.List<java.lang.Integer>
return ((bitField0_ & 0x00000002) == 0x00000002); getClassFqNameList() {
return classFqName_;
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.FqName class_fq_name = 2;</code> * <code>repeated int32 class_fq_name = 2;</code>
*/ */
public org.jetbrains.kotlin.backend.common.serialization.proto.FqName getClassFqName() { public int getClassFqNameCount() {
return classFqName_; return classFqName_.size();
}
/**
* <code>repeated int32 class_fq_name = 2;</code>
*/
public int getClassFqName(int index) {
return classFqName_.get(index);
} }
public static final int NAME_FIELD_NUMBER = 3; public static final int NAME_FIELD_NUMBER = 3;
private int name_; private int name_;
/** /**
* <code>required int32 name = 3;</code> * <code>required int32 name = 3;</code>
*
* <pre>
* required FqName package_fq_name = 1;
* required FqName class_fq_name = 2;
* </pre>
*/ */
public boolean hasName() { public boolean hasName() {
return ((bitField0_ & 0x00000004) == 0x00000004); return ((bitField0_ & 0x00000001) == 0x00000001);
} }
/** /**
* <code>required int32 name = 3;</code> * <code>required int32 name = 3;</code>
*
* <pre>
* required FqName package_fq_name = 1;
* required FqName class_fq_name = 2;
* </pre>
*/ */
public int getName() { public int getName() {
return name_; return name_;
@@ -222,7 +268,7 @@ public final class DescriptorReference extends
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.UniqId uniq_id = 4;</code> * <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.UniqId uniq_id = 4;</code>
*/ */
public boolean hasUniqId() { public boolean hasUniqId() {
return ((bitField0_ & 0x00000008) == 0x00000008); return ((bitField0_ & 0x00000002) == 0x00000002);
} }
/** /**
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.UniqId uniq_id = 4;</code> * <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.UniqId uniq_id = 4;</code>
@@ -237,7 +283,7 @@ public final class DescriptorReference extends
* <code>optional bool is_getter = 5 [default = false];</code> * <code>optional bool is_getter = 5 [default = false];</code>
*/ */
public boolean hasIsGetter() { public boolean hasIsGetter() {
return ((bitField0_ & 0x00000010) == 0x00000010); return ((bitField0_ & 0x00000004) == 0x00000004);
} }
/** /**
* <code>optional bool is_getter = 5 [default = false];</code> * <code>optional bool is_getter = 5 [default = false];</code>
@@ -252,7 +298,7 @@ public final class DescriptorReference extends
* <code>optional bool is_setter = 6 [default = false];</code> * <code>optional bool is_setter = 6 [default = false];</code>
*/ */
public boolean hasIsSetter() { public boolean hasIsSetter() {
return ((bitField0_ & 0x00000020) == 0x00000020); return ((bitField0_ & 0x00000008) == 0x00000008);
} }
/** /**
* <code>optional bool is_setter = 6 [default = false];</code> * <code>optional bool is_setter = 6 [default = false];</code>
@@ -267,7 +313,7 @@ public final class DescriptorReference extends
* <code>optional bool is_backing_field = 7 [default = false];</code> * <code>optional bool is_backing_field = 7 [default = false];</code>
*/ */
public boolean hasIsBackingField() { public boolean hasIsBackingField() {
return ((bitField0_ & 0x00000040) == 0x00000040); return ((bitField0_ & 0x00000010) == 0x00000010);
} }
/** /**
* <code>optional bool is_backing_field = 7 [default = false];</code> * <code>optional bool is_backing_field = 7 [default = false];</code>
@@ -282,7 +328,7 @@ public final class DescriptorReference extends
* <code>optional bool is_fake_override = 8 [default = false];</code> * <code>optional bool is_fake_override = 8 [default = false];</code>
*/ */
public boolean hasIsFakeOverride() { public boolean hasIsFakeOverride() {
return ((bitField0_ & 0x00000080) == 0x00000080); return ((bitField0_ & 0x00000020) == 0x00000020);
} }
/** /**
* <code>optional bool is_fake_override = 8 [default = false];</code> * <code>optional bool is_fake_override = 8 [default = false];</code>
@@ -297,7 +343,7 @@ public final class DescriptorReference extends
* <code>optional bool is_default_constructor = 9 [default = false];</code> * <code>optional bool is_default_constructor = 9 [default = false];</code>
*/ */
public boolean hasIsDefaultConstructor() { public boolean hasIsDefaultConstructor() {
return ((bitField0_ & 0x00000100) == 0x00000100); return ((bitField0_ & 0x00000040) == 0x00000040);
} }
/** /**
* <code>optional bool is_default_constructor = 9 [default = false];</code> * <code>optional bool is_default_constructor = 9 [default = false];</code>
@@ -312,7 +358,7 @@ public final class DescriptorReference extends
* <code>optional bool is_enum_entry = 10 [default = false];</code> * <code>optional bool is_enum_entry = 10 [default = false];</code>
*/ */
public boolean hasIsEnumEntry() { public boolean hasIsEnumEntry() {
return ((bitField0_ & 0x00000200) == 0x00000200); return ((bitField0_ & 0x00000080) == 0x00000080);
} }
/** /**
* <code>optional bool is_enum_entry = 10 [default = false];</code> * <code>optional bool is_enum_entry = 10 [default = false];</code>
@@ -327,7 +373,7 @@ public final class DescriptorReference extends
* <code>optional bool is_enum_special = 11 [default = false];</code> * <code>optional bool is_enum_special = 11 [default = false];</code>
*/ */
public boolean hasIsEnumSpecial() { public boolean hasIsEnumSpecial() {
return ((bitField0_ & 0x00000400) == 0x00000400); return ((bitField0_ & 0x00000100) == 0x00000100);
} }
/** /**
* <code>optional bool is_enum_special = 11 [default = false];</code> * <code>optional bool is_enum_special = 11 [default = false];</code>
@@ -342,7 +388,7 @@ public final class DescriptorReference extends
* <code>optional bool is_type_parameter = 12 [default = false];</code> * <code>optional bool is_type_parameter = 12 [default = false];</code>
*/ */
public boolean hasIsTypeParameter() { public boolean hasIsTypeParameter() {
return ((bitField0_ & 0x00000800) == 0x00000800); return ((bitField0_ & 0x00000200) == 0x00000200);
} }
/** /**
* <code>optional bool is_type_parameter = 12 [default = false];</code> * <code>optional bool is_type_parameter = 12 [default = false];</code>
@@ -352,8 +398,8 @@ public final class DescriptorReference extends
} }
private void initFields() { private void initFields() {
packageFqName_ = org.jetbrains.kotlin.backend.common.serialization.proto.FqName.getDefaultInstance(); packageFqName_ = java.util.Collections.emptyList();
classFqName_ = org.jetbrains.kotlin.backend.common.serialization.proto.FqName.getDefaultInstance(); classFqName_ = java.util.Collections.emptyList();
name_ = 0; name_ = 0;
uniqId_ = org.jetbrains.kotlin.backend.common.serialization.proto.UniqId.getDefaultInstance(); uniqId_ = org.jetbrains.kotlin.backend.common.serialization.proto.UniqId.getDefaultInstance();
isGetter_ = false; isGetter_ = false;
@@ -371,14 +417,6 @@ public final class DescriptorReference extends
if (isInitialized == 1) return true; if (isInitialized == 1) return true;
if (isInitialized == 0) return false; if (isInitialized == 0) return false;
if (!hasPackageFqName()) {
memoizedIsInitialized = 0;
return false;
}
if (!hasClassFqName()) {
memoizedIsInitialized = 0;
return false;
}
if (!hasName()) { if (!hasName()) {
memoizedIsInitialized = 0; memoizedIsInitialized = 0;
return false; return false;
@@ -396,40 +434,40 @@ public final class DescriptorReference extends
public void writeTo(org.jetbrains.kotlin.protobuf.CodedOutputStream output) public void writeTo(org.jetbrains.kotlin.protobuf.CodedOutputStream output)
throws java.io.IOException { throws java.io.IOException {
getSerializedSize(); getSerializedSize();
for (int i = 0; i < packageFqName_.size(); i++) {
output.writeInt32(1, packageFqName_.get(i));
}
for (int i = 0; i < classFqName_.size(); i++) {
output.writeInt32(2, classFqName_.get(i));
}
if (((bitField0_ & 0x00000001) == 0x00000001)) { if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeMessage(1, packageFqName_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeMessage(2, classFqName_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeInt32(3, name_); output.writeInt32(3, name_);
} }
if (((bitField0_ & 0x00000008) == 0x00000008)) { if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeMessage(4, uniqId_); output.writeMessage(4, uniqId_);
} }
if (((bitField0_ & 0x00000010) == 0x00000010)) { if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeBool(5, isGetter_); output.writeBool(5, isGetter_);
} }
if (((bitField0_ & 0x00000020) == 0x00000020)) { if (((bitField0_ & 0x00000008) == 0x00000008)) {
output.writeBool(6, isSetter_); output.writeBool(6, isSetter_);
} }
if (((bitField0_ & 0x00000040) == 0x00000040)) { if (((bitField0_ & 0x00000010) == 0x00000010)) {
output.writeBool(7, isBackingField_); output.writeBool(7, isBackingField_);
} }
if (((bitField0_ & 0x00000080) == 0x00000080)) { if (((bitField0_ & 0x00000020) == 0x00000020)) {
output.writeBool(8, isFakeOverride_); output.writeBool(8, isFakeOverride_);
} }
if (((bitField0_ & 0x00000100) == 0x00000100)) { if (((bitField0_ & 0x00000040) == 0x00000040)) {
output.writeBool(9, isDefaultConstructor_); output.writeBool(9, isDefaultConstructor_);
} }
if (((bitField0_ & 0x00000200) == 0x00000200)) { if (((bitField0_ & 0x00000080) == 0x00000080)) {
output.writeBool(10, isEnumEntry_); output.writeBool(10, isEnumEntry_);
} }
if (((bitField0_ & 0x00000400) == 0x00000400)) { if (((bitField0_ & 0x00000100) == 0x00000100)) {
output.writeBool(11, isEnumSpecial_); output.writeBool(11, isEnumSpecial_);
} }
if (((bitField0_ & 0x00000800) == 0x00000800)) { if (((bitField0_ & 0x00000200) == 0x00000200)) {
output.writeBool(12, isTypeParameter_); output.writeBool(12, isTypeParameter_);
} }
output.writeRawBytes(unknownFields); output.writeRawBytes(unknownFields);
@@ -441,51 +479,61 @@ public final class DescriptorReference extends
if (size != -1) return size; if (size != -1) return size;
size = 0; size = 0;
{
int dataSize = 0;
for (int i = 0; i < packageFqName_.size(); i++) {
dataSize += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeInt32SizeNoTag(packageFqName_.get(i));
}
size += dataSize;
size += 1 * getPackageFqNameList().size();
}
{
int dataSize = 0;
for (int i = 0; i < classFqName_.size(); i++) {
dataSize += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeInt32SizeNoTag(classFqName_.get(i));
}
size += dataSize;
size += 1 * getClassFqNameList().size();
}
if (((bitField0_ & 0x00000001) == 0x00000001)) { if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeMessageSize(1, packageFqName_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeMessageSize(2, classFqName_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += org.jetbrains.kotlin.protobuf.CodedOutputStream size += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeInt32Size(3, name_); .computeInt32Size(3, name_);
} }
if (((bitField0_ & 0x00000008) == 0x00000008)) { if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += org.jetbrains.kotlin.protobuf.CodedOutputStream size += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeMessageSize(4, uniqId_); .computeMessageSize(4, uniqId_);
} }
if (((bitField0_ & 0x00000010) == 0x00000010)) { if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += org.jetbrains.kotlin.protobuf.CodedOutputStream size += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeBoolSize(5, isGetter_); .computeBoolSize(5, isGetter_);
} }
if (((bitField0_ & 0x00000020) == 0x00000020)) { if (((bitField0_ & 0x00000008) == 0x00000008)) {
size += org.jetbrains.kotlin.protobuf.CodedOutputStream size += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeBoolSize(6, isSetter_); .computeBoolSize(6, isSetter_);
} }
if (((bitField0_ & 0x00000040) == 0x00000040)) { if (((bitField0_ & 0x00000010) == 0x00000010)) {
size += org.jetbrains.kotlin.protobuf.CodedOutputStream size += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeBoolSize(7, isBackingField_); .computeBoolSize(7, isBackingField_);
} }
if (((bitField0_ & 0x00000080) == 0x00000080)) { if (((bitField0_ & 0x00000020) == 0x00000020)) {
size += org.jetbrains.kotlin.protobuf.CodedOutputStream size += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeBoolSize(8, isFakeOverride_); .computeBoolSize(8, isFakeOverride_);
} }
if (((bitField0_ & 0x00000100) == 0x00000100)) { if (((bitField0_ & 0x00000040) == 0x00000040)) {
size += org.jetbrains.kotlin.protobuf.CodedOutputStream size += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeBoolSize(9, isDefaultConstructor_); .computeBoolSize(9, isDefaultConstructor_);
} }
if (((bitField0_ & 0x00000200) == 0x00000200)) { if (((bitField0_ & 0x00000080) == 0x00000080)) {
size += org.jetbrains.kotlin.protobuf.CodedOutputStream size += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeBoolSize(10, isEnumEntry_); .computeBoolSize(10, isEnumEntry_);
} }
if (((bitField0_ & 0x00000400) == 0x00000400)) { if (((bitField0_ & 0x00000100) == 0x00000100)) {
size += org.jetbrains.kotlin.protobuf.CodedOutputStream size += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeBoolSize(11, isEnumSpecial_); .computeBoolSize(11, isEnumSpecial_);
} }
if (((bitField0_ & 0x00000800) == 0x00000800)) { if (((bitField0_ & 0x00000200) == 0x00000200)) {
size += org.jetbrains.kotlin.protobuf.CodedOutputStream size += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeBoolSize(12, isTypeParameter_); .computeBoolSize(12, isTypeParameter_);
} }
@@ -583,9 +631,9 @@ public final class DescriptorReference extends
public Builder clear() { public Builder clear() {
super.clear(); super.clear();
packageFqName_ = org.jetbrains.kotlin.backend.common.serialization.proto.FqName.getDefaultInstance(); packageFqName_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001); bitField0_ = (bitField0_ & ~0x00000001);
classFqName_ = org.jetbrains.kotlin.backend.common.serialization.proto.FqName.getDefaultInstance(); classFqName_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002); bitField0_ = (bitField0_ & ~0x00000002);
name_ = 0; name_ = 0;
bitField0_ = (bitField0_ & ~0x00000004); bitField0_ = (bitField0_ & ~0x00000004);
@@ -630,52 +678,54 @@ public final class DescriptorReference extends
org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference result = new org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference(this); org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference result = new org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference(this);
int from_bitField0_ = bitField0_; int from_bitField0_ = bitField0_;
int to_bitField0_ = 0; int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) { if (((bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001; packageFqName_ = java.util.Collections.unmodifiableList(packageFqName_);
bitField0_ = (bitField0_ & ~0x00000001);
} }
result.packageFqName_ = packageFqName_; result.packageFqName_ = packageFqName_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) { if (((bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002; classFqName_ = java.util.Collections.unmodifiableList(classFqName_);
bitField0_ = (bitField0_ & ~0x00000002);
} }
result.classFqName_ = classFqName_; result.classFqName_ = classFqName_;
if (((from_bitField0_ & 0x00000004) == 0x00000004)) { if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004; to_bitField0_ |= 0x00000001;
} }
result.name_ = name_; result.name_ = name_;
if (((from_bitField0_ & 0x00000008) == 0x00000008)) { if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
to_bitField0_ |= 0x00000008; to_bitField0_ |= 0x00000002;
} }
result.uniqId_ = uniqId_; result.uniqId_ = uniqId_;
if (((from_bitField0_ & 0x00000010) == 0x00000010)) { if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
to_bitField0_ |= 0x00000010; to_bitField0_ |= 0x00000004;
} }
result.isGetter_ = isGetter_; result.isGetter_ = isGetter_;
if (((from_bitField0_ & 0x00000020) == 0x00000020)) { if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
to_bitField0_ |= 0x00000020; to_bitField0_ |= 0x00000008;
} }
result.isSetter_ = isSetter_; result.isSetter_ = isSetter_;
if (((from_bitField0_ & 0x00000040) == 0x00000040)) { if (((from_bitField0_ & 0x00000040) == 0x00000040)) {
to_bitField0_ |= 0x00000040; to_bitField0_ |= 0x00000010;
} }
result.isBackingField_ = isBackingField_; result.isBackingField_ = isBackingField_;
if (((from_bitField0_ & 0x00000080) == 0x00000080)) { if (((from_bitField0_ & 0x00000080) == 0x00000080)) {
to_bitField0_ |= 0x00000080; to_bitField0_ |= 0x00000020;
} }
result.isFakeOverride_ = isFakeOverride_; result.isFakeOverride_ = isFakeOverride_;
if (((from_bitField0_ & 0x00000100) == 0x00000100)) { if (((from_bitField0_ & 0x00000100) == 0x00000100)) {
to_bitField0_ |= 0x00000100; to_bitField0_ |= 0x00000040;
} }
result.isDefaultConstructor_ = isDefaultConstructor_; result.isDefaultConstructor_ = isDefaultConstructor_;
if (((from_bitField0_ & 0x00000200) == 0x00000200)) { if (((from_bitField0_ & 0x00000200) == 0x00000200)) {
to_bitField0_ |= 0x00000200; to_bitField0_ |= 0x00000080;
} }
result.isEnumEntry_ = isEnumEntry_; result.isEnumEntry_ = isEnumEntry_;
if (((from_bitField0_ & 0x00000400) == 0x00000400)) { if (((from_bitField0_ & 0x00000400) == 0x00000400)) {
to_bitField0_ |= 0x00000400; to_bitField0_ |= 0x00000100;
} }
result.isEnumSpecial_ = isEnumSpecial_; result.isEnumSpecial_ = isEnumSpecial_;
if (((from_bitField0_ & 0x00000800) == 0x00000800)) { if (((from_bitField0_ & 0x00000800) == 0x00000800)) {
to_bitField0_ |= 0x00000800; to_bitField0_ |= 0x00000200;
} }
result.isTypeParameter_ = isTypeParameter_; result.isTypeParameter_ = isTypeParameter_;
result.bitField0_ = to_bitField0_; result.bitField0_ = to_bitField0_;
@@ -684,11 +734,25 @@ public final class DescriptorReference extends
public Builder mergeFrom(org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference other) { public Builder mergeFrom(org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference other) {
if (other == org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference.getDefaultInstance()) return this; if (other == org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference.getDefaultInstance()) return this;
if (other.hasPackageFqName()) { if (!other.packageFqName_.isEmpty()) {
mergePackageFqName(other.getPackageFqName()); if (packageFqName_.isEmpty()) {
packageFqName_ = other.packageFqName_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensurePackageFqNameIsMutable();
packageFqName_.addAll(other.packageFqName_);
}
} }
if (other.hasClassFqName()) { if (!other.classFqName_.isEmpty()) {
mergeClassFqName(other.getClassFqName()); if (classFqName_.isEmpty()) {
classFqName_ = other.classFqName_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureClassFqNameIsMutable();
classFqName_.addAll(other.classFqName_);
}
} }
if (other.hasName()) { if (other.hasName()) {
setName(other.getName()); setName(other.getName());
@@ -726,14 +790,6 @@ public final class DescriptorReference extends
} }
public final boolean isInitialized() { public final boolean isInitialized() {
if (!hasPackageFqName()) {
return false;
}
if (!hasClassFqName()) {
return false;
}
if (!hasName()) { if (!hasName()) {
return false; return false;
@@ -766,141 +822,168 @@ public final class DescriptorReference extends
} }
private int bitField0_; private int bitField0_;
private org.jetbrains.kotlin.backend.common.serialization.proto.FqName packageFqName_ = org.jetbrains.kotlin.backend.common.serialization.proto.FqName.getDefaultInstance(); private java.util.List<java.lang.Integer> packageFqName_ = java.util.Collections.emptyList();
/** private void ensurePackageFqNameIsMutable() {
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.FqName package_fq_name = 1;</code> if (!((bitField0_ & 0x00000001) == 0x00000001)) {
*/ packageFqName_ = new java.util.ArrayList<java.lang.Integer>(packageFqName_);
public boolean hasPackageFqName() { bitField0_ |= 0x00000001;
return ((bitField0_ & 0x00000001) == 0x00000001); }
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.FqName package_fq_name = 1;</code> * <code>repeated int32 package_fq_name = 1;</code>
*/ */
public org.jetbrains.kotlin.backend.common.serialization.proto.FqName getPackageFqName() { public java.util.List<java.lang.Integer>
return packageFqName_; getPackageFqNameList() {
return java.util.Collections.unmodifiableList(packageFqName_);
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.FqName package_fq_name = 1;</code> * <code>repeated int32 package_fq_name = 1;</code>
*/ */
public Builder setPackageFqName(org.jetbrains.kotlin.backend.common.serialization.proto.FqName value) { public int getPackageFqNameCount() {
if (value == null) { return packageFqName_.size();
throw new NullPointerException();
}
packageFqName_ = value;
bitField0_ |= 0x00000001;
return this;
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.FqName package_fq_name = 1;</code> * <code>repeated int32 package_fq_name = 1;</code>
*/
public int getPackageFqName(int index) {
return packageFqName_.get(index);
}
/**
* <code>repeated int32 package_fq_name = 1;</code>
*/ */
public Builder setPackageFqName( public Builder setPackageFqName(
org.jetbrains.kotlin.backend.common.serialization.proto.FqName.Builder builderForValue) { int index, int value) {
packageFqName_ = builderForValue.build(); ensurePackageFqNameIsMutable();
packageFqName_.set(index, value);
bitField0_ |= 0x00000001;
return this; return this;
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.FqName package_fq_name = 1;</code> * <code>repeated int32 package_fq_name = 1;</code>
*/ */
public Builder mergePackageFqName(org.jetbrains.kotlin.backend.common.serialization.proto.FqName value) { public Builder addPackageFqName(int value) {
if (((bitField0_ & 0x00000001) == 0x00000001) && ensurePackageFqNameIsMutable();
packageFqName_ != org.jetbrains.kotlin.backend.common.serialization.proto.FqName.getDefaultInstance()) { packageFqName_.add(value);
packageFqName_ =
org.jetbrains.kotlin.backend.common.serialization.proto.FqName.newBuilder(packageFqName_).mergeFrom(value).buildPartial();
} else {
packageFqName_ = value;
}
bitField0_ |= 0x00000001;
return this; return this;
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.FqName package_fq_name = 1;</code> * <code>repeated int32 package_fq_name = 1;</code>
*/
public Builder addAllPackageFqName(
java.lang.Iterable<? extends java.lang.Integer> values) {
ensurePackageFqNameIsMutable();
org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll(
values, packageFqName_);
return this;
}
/**
* <code>repeated int32 package_fq_name = 1;</code>
*/ */
public Builder clearPackageFqName() { public Builder clearPackageFqName() {
packageFqName_ = org.jetbrains.kotlin.backend.common.serialization.proto.FqName.getDefaultInstance(); packageFqName_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001); bitField0_ = (bitField0_ & ~0x00000001);
return this; return this;
} }
private org.jetbrains.kotlin.backend.common.serialization.proto.FqName classFqName_ = org.jetbrains.kotlin.backend.common.serialization.proto.FqName.getDefaultInstance(); private java.util.List<java.lang.Integer> classFqName_ = java.util.Collections.emptyList();
/** private void ensureClassFqNameIsMutable() {
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.FqName class_fq_name = 2;</code> if (!((bitField0_ & 0x00000002) == 0x00000002)) {
*/ classFqName_ = new java.util.ArrayList<java.lang.Integer>(classFqName_);
public boolean hasClassFqName() { bitField0_ |= 0x00000002;
return ((bitField0_ & 0x00000002) == 0x00000002); }
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.FqName class_fq_name = 2;</code> * <code>repeated int32 class_fq_name = 2;</code>
*/ */
public org.jetbrains.kotlin.backend.common.serialization.proto.FqName getClassFqName() { public java.util.List<java.lang.Integer>
return classFqName_; getClassFqNameList() {
return java.util.Collections.unmodifiableList(classFqName_);
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.FqName class_fq_name = 2;</code> * <code>repeated int32 class_fq_name = 2;</code>
*/ */
public Builder setClassFqName(org.jetbrains.kotlin.backend.common.serialization.proto.FqName value) { public int getClassFqNameCount() {
if (value == null) { return classFqName_.size();
throw new NullPointerException();
}
classFqName_ = value;
bitField0_ |= 0x00000002;
return this;
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.FqName class_fq_name = 2;</code> * <code>repeated int32 class_fq_name = 2;</code>
*/
public int getClassFqName(int index) {
return classFqName_.get(index);
}
/**
* <code>repeated int32 class_fq_name = 2;</code>
*/ */
public Builder setClassFqName( public Builder setClassFqName(
org.jetbrains.kotlin.backend.common.serialization.proto.FqName.Builder builderForValue) { int index, int value) {
classFqName_ = builderForValue.build(); ensureClassFqNameIsMutable();
classFqName_.set(index, value);
bitField0_ |= 0x00000002;
return this; return this;
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.FqName class_fq_name = 2;</code> * <code>repeated int32 class_fq_name = 2;</code>
*/ */
public Builder mergeClassFqName(org.jetbrains.kotlin.backend.common.serialization.proto.FqName value) { public Builder addClassFqName(int value) {
if (((bitField0_ & 0x00000002) == 0x00000002) && ensureClassFqNameIsMutable();
classFqName_ != org.jetbrains.kotlin.backend.common.serialization.proto.FqName.getDefaultInstance()) { classFqName_.add(value);
classFqName_ =
org.jetbrains.kotlin.backend.common.serialization.proto.FqName.newBuilder(classFqName_).mergeFrom(value).buildPartial();
} else {
classFqName_ = value;
}
bitField0_ |= 0x00000002;
return this; return this;
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.FqName class_fq_name = 2;</code> * <code>repeated int32 class_fq_name = 2;</code>
*/
public Builder addAllClassFqName(
java.lang.Iterable<? extends java.lang.Integer> values) {
ensureClassFqNameIsMutable();
org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll(
values, classFqName_);
return this;
}
/**
* <code>repeated int32 class_fq_name = 2;</code>
*/ */
public Builder clearClassFqName() { public Builder clearClassFqName() {
classFqName_ = org.jetbrains.kotlin.backend.common.serialization.proto.FqName.getDefaultInstance(); classFqName_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002); bitField0_ = (bitField0_ & ~0x00000002);
return this; return this;
} }
private int name_ ; private int name_ ;
/** /**
* <code>required int32 name = 3;</code> * <code>required int32 name = 3;</code>
*
* <pre>
* required FqName package_fq_name = 1;
* required FqName class_fq_name = 2;
* </pre>
*/ */
public boolean hasName() { public boolean hasName() {
return ((bitField0_ & 0x00000004) == 0x00000004); return ((bitField0_ & 0x00000004) == 0x00000004);
} }
/** /**
* <code>required int32 name = 3;</code> * <code>required int32 name = 3;</code>
*
* <pre>
* required FqName package_fq_name = 1;
* required FqName class_fq_name = 2;
* </pre>
*/ */
public int getName() { public int getName() {
return name_; return name_;
} }
/** /**
* <code>required int32 name = 3;</code> * <code>required int32 name = 3;</code>
*
* <pre>
* required FqName package_fq_name = 1;
* required FqName class_fq_name = 2;
* </pre>
*/ */
public Builder setName(int value) { public Builder setName(int value) {
bitField0_ |= 0x00000004; bitField0_ |= 0x00000004;
@@ -910,6 +993,11 @@ public final class DescriptorReference extends
} }
/** /**
* <code>required int32 name = 3;</code> * <code>required int32 name = 3;</code>
*
* <pre>
* required FqName package_fq_name = 1;
* required FqName class_fq_name = 2;
* </pre>
*/ */
public Builder clearName() { public Builder clearName() {
bitField0_ = (bitField0_ & ~0x00000004); bitField0_ = (bitField0_ & ~0x00000004);
@@ -8,29 +8,47 @@ public interface DescriptorReferenceOrBuilder extends
org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder { org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder {
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.FqName package_fq_name = 1;</code> * <code>repeated int32 package_fq_name = 1;</code>
*/ */
boolean hasPackageFqName(); java.util.List<java.lang.Integer> getPackageFqNameList();
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.FqName package_fq_name = 1;</code> * <code>repeated int32 package_fq_name = 1;</code>
*/ */
org.jetbrains.kotlin.backend.common.serialization.proto.FqName getPackageFqName(); int getPackageFqNameCount();
/**
* <code>repeated int32 package_fq_name = 1;</code>
*/
int getPackageFqName(int index);
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.FqName class_fq_name = 2;</code> * <code>repeated int32 class_fq_name = 2;</code>
*/ */
boolean hasClassFqName(); java.util.List<java.lang.Integer> getClassFqNameList();
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.FqName class_fq_name = 2;</code> * <code>repeated int32 class_fq_name = 2;</code>
*/ */
org.jetbrains.kotlin.backend.common.serialization.proto.FqName getClassFqName(); int getClassFqNameCount();
/**
* <code>repeated int32 class_fq_name = 2;</code>
*/
int getClassFqName(int index);
/** /**
* <code>required int32 name = 3;</code> * <code>required int32 name = 3;</code>
*
* <pre>
* required FqName package_fq_name = 1;
* required FqName class_fq_name = 2;
* </pre>
*/ */
boolean hasName(); boolean hasName();
/** /**
* <code>required int32 name = 3;</code> * <code>required int32 name = 3;</code>
*
* <pre>
* required FqName package_fq_name = 1;
* required FqName class_fq_name = 2;
* </pre>
*/ */
int getName(); int getName();
@@ -1,413 +0,0 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: compiler/ir/serialization.common/src/KotlinIr.proto
package org.jetbrains.kotlin.backend.common.serialization.proto;
/**
* Protobuf type {@code org.jetbrains.kotlin.backend.common.serialization.proto.FqName}
*/
public final class FqName extends
org.jetbrains.kotlin.protobuf.GeneratedMessageLite implements
// @@protoc_insertion_point(message_implements:org.jetbrains.kotlin.backend.common.serialization.proto.FqName)
FqNameOrBuilder {
// Use FqName.newBuilder() to construct.
private FqName(org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private FqName(boolean noInit) { this.unknownFields = org.jetbrains.kotlin.protobuf.ByteString.EMPTY;}
private static final FqName defaultInstance;
public static FqName getDefaultInstance() {
return defaultInstance;
}
public FqName getDefaultInstanceForType() {
return defaultInstance;
}
private final org.jetbrains.kotlin.protobuf.ByteString unknownFields;
private FqName(
org.jetbrains.kotlin.protobuf.CodedInputStream input,
org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
org.jetbrains.kotlin.protobuf.ByteString.Output unknownFieldsOutput =
org.jetbrains.kotlin.protobuf.ByteString.newOutput();
org.jetbrains.kotlin.protobuf.CodedOutputStream unknownFieldsCodedOutput =
org.jetbrains.kotlin.protobuf.CodedOutputStream.newInstance(
unknownFieldsOutput);
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFieldsCodedOutput,
extensionRegistry, tag)) {
done = true;
}
break;
}
case 8: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
segment_ = new java.util.ArrayList<java.lang.Integer>();
mutable_bitField0_ |= 0x00000001;
}
segment_.add(input.readInt32());
break;
}
case 10: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001) && input.getBytesUntilLimit() > 0) {
segment_ = new java.util.ArrayList<java.lang.Integer>();
mutable_bitField0_ |= 0x00000001;
}
while (input.getBytesUntilLimit() > 0) {
segment_.add(input.readInt32());
}
input.popLimit(limit);
break;
}
}
}
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
segment_ = java.util.Collections.unmodifiableList(segment_);
}
try {
unknownFieldsCodedOutput.flush();
} catch (java.io.IOException e) {
// Should not happen
} finally {
unknownFields = unknownFieldsOutput.toByteString();
}
makeExtensionsImmutable();
}
}
public static org.jetbrains.kotlin.protobuf.Parser<FqName> PARSER =
new org.jetbrains.kotlin.protobuf.AbstractParser<FqName>() {
public FqName parsePartialFrom(
org.jetbrains.kotlin.protobuf.CodedInputStream input,
org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
return new FqName(input, extensionRegistry);
}
};
@java.lang.Override
public org.jetbrains.kotlin.protobuf.Parser<FqName> getParserForType() {
return PARSER;
}
public static final int SEGMENT_FIELD_NUMBER = 1;
private java.util.List<java.lang.Integer> segment_;
/**
* <code>repeated int32 segment = 1;</code>
*/
public java.util.List<java.lang.Integer>
getSegmentList() {
return segment_;
}
/**
* <code>repeated int32 segment = 1;</code>
*/
public int getSegmentCount() {
return segment_.size();
}
/**
* <code>repeated int32 segment = 1;</code>
*/
public int getSegment(int index) {
return segment_.get(index);
}
private void initFields() {
segment_ = java.util.Collections.emptyList();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(org.jetbrains.kotlin.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
for (int i = 0; i < segment_.size(); i++) {
output.writeInt32(1, segment_.get(i));
}
output.writeRawBytes(unknownFields);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
for (int i = 0; i < segment_.size(); i++) {
dataSize += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeInt32SizeNoTag(segment_.get(i));
}
size += dataSize;
size += 1 * getSegmentList().size();
}
size += unknownFields.size();
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.backend.common.serialization.proto.FqName parseFrom(
org.jetbrains.kotlin.protobuf.ByteString data)
throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.jetbrains.kotlin.backend.common.serialization.proto.FqName parseFrom(
org.jetbrains.kotlin.protobuf.ByteString data,
org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.jetbrains.kotlin.backend.common.serialization.proto.FqName parseFrom(byte[] data)
throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.jetbrains.kotlin.backend.common.serialization.proto.FqName parseFrom(
byte[] data,
org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.jetbrains.kotlin.backend.common.serialization.proto.FqName parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static org.jetbrains.kotlin.backend.common.serialization.proto.FqName parseFrom(
java.io.InputStream input,
org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry);
}
public static org.jetbrains.kotlin.backend.common.serialization.proto.FqName parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static org.jetbrains.kotlin.backend.common.serialization.proto.FqName parseDelimitedFrom(
java.io.InputStream input,
org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry);
}
public static org.jetbrains.kotlin.backend.common.serialization.proto.FqName parseFrom(
org.jetbrains.kotlin.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static org.jetbrains.kotlin.backend.common.serialization.proto.FqName parseFrom(
org.jetbrains.kotlin.protobuf.CodedInputStream input,
org.jetbrains.kotlin.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.backend.common.serialization.proto.FqName prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
/**
* Protobuf type {@code org.jetbrains.kotlin.backend.common.serialization.proto.FqName}
*/
public static final class Builder extends
org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder<
org.jetbrains.kotlin.backend.common.serialization.proto.FqName, Builder>
implements
// @@protoc_insertion_point(builder_implements:org.jetbrains.kotlin.backend.common.serialization.proto.FqName)
org.jetbrains.kotlin.backend.common.serialization.proto.FqNameOrBuilder {
// Construct using org.jetbrains.kotlin.backend.common.serialization.proto.FqName.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
segment_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public org.jetbrains.kotlin.backend.common.serialization.proto.FqName getDefaultInstanceForType() {
return org.jetbrains.kotlin.backend.common.serialization.proto.FqName.getDefaultInstance();
}
public org.jetbrains.kotlin.backend.common.serialization.proto.FqName build() {
org.jetbrains.kotlin.backend.common.serialization.proto.FqName result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.jetbrains.kotlin.backend.common.serialization.proto.FqName buildPartial() {
org.jetbrains.kotlin.backend.common.serialization.proto.FqName result = new org.jetbrains.kotlin.backend.common.serialization.proto.FqName(this);
int from_bitField0_ = bitField0_;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
segment_ = java.util.Collections.unmodifiableList(segment_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.segment_ = segment_;
return result;
}
public Builder mergeFrom(org.jetbrains.kotlin.backend.common.serialization.proto.FqName other) {
if (other == org.jetbrains.kotlin.backend.common.serialization.proto.FqName.getDefaultInstance()) return this;
if (!other.segment_.isEmpty()) {
if (segment_.isEmpty()) {
segment_ = other.segment_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureSegmentIsMutable();
segment_.addAll(other.segment_);
}
}
setUnknownFields(
getUnknownFields().concat(other.unknownFields));
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
org.jetbrains.kotlin.protobuf.CodedInputStream input,
org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.jetbrains.kotlin.backend.common.serialization.proto.FqName parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.jetbrains.kotlin.backend.common.serialization.proto.FqName) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List<java.lang.Integer> segment_ = java.util.Collections.emptyList();
private void ensureSegmentIsMutable() {
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
segment_ = new java.util.ArrayList<java.lang.Integer>(segment_);
bitField0_ |= 0x00000001;
}
}
/**
* <code>repeated int32 segment = 1;</code>
*/
public java.util.List<java.lang.Integer>
getSegmentList() {
return java.util.Collections.unmodifiableList(segment_);
}
/**
* <code>repeated int32 segment = 1;</code>
*/
public int getSegmentCount() {
return segment_.size();
}
/**
* <code>repeated int32 segment = 1;</code>
*/
public int getSegment(int index) {
return segment_.get(index);
}
/**
* <code>repeated int32 segment = 1;</code>
*/
public Builder setSegment(
int index, int value) {
ensureSegmentIsMutable();
segment_.set(index, value);
return this;
}
/**
* <code>repeated int32 segment = 1;</code>
*/
public Builder addSegment(int value) {
ensureSegmentIsMutable();
segment_.add(value);
return this;
}
/**
* <code>repeated int32 segment = 1;</code>
*/
public Builder addAllSegment(
java.lang.Iterable<? extends java.lang.Integer> values) {
ensureSegmentIsMutable();
org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll(
values, segment_);
return this;
}
/**
* <code>repeated int32 segment = 1;</code>
*/
public Builder clearSegment() {
segment_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
// @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.backend.common.serialization.proto.FqName)
}
static {
defaultInstance = new FqName(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.FqName)
}
@@ -1,22 +0,0 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: compiler/ir/serialization.common/src/KotlinIr.proto
package org.jetbrains.kotlin.backend.common.serialization.proto;
public interface FqNameOrBuilder extends
// @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.backend.common.serialization.proto.FqName)
org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder {
/**
* <code>repeated int32 segment = 1;</code>
*/
java.util.List<java.lang.Integer> getSegmentList();
/**
* <code>repeated int32 segment = 1;</code>
*/
int getSegmentCount();
/**
* <code>repeated int32 segment = 1;</code>
*/
int getSegment(int index);
}
@@ -74,22 +74,30 @@ public final class IrFile extends
bitField0_ |= 0x00000001; bitField0_ |= 0x00000001;
break; break;
} }
case 24: {
if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
fqName_ = new java.util.ArrayList<java.lang.Integer>();
mutable_bitField0_ |= 0x00000004;
}
fqName_.add(input.readInt32());
break;
}
case 26: { case 26: {
org.jetbrains.kotlin.backend.common.serialization.proto.FqName.Builder subBuilder = null; int length = input.readRawVarint32();
if (((bitField0_ & 0x00000002) == 0x00000002)) { int limit = input.pushLimit(length);
subBuilder = fqName_.toBuilder(); if (!((mutable_bitField0_ & 0x00000004) == 0x00000004) && input.getBytesUntilLimit() > 0) {
fqName_ = new java.util.ArrayList<java.lang.Integer>();
mutable_bitField0_ |= 0x00000004;
} }
fqName_ = input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.FqName.PARSER, extensionRegistry); while (input.getBytesUntilLimit() > 0) {
if (subBuilder != null) { fqName_.add(input.readInt32());
subBuilder.mergeFrom(fqName_);
fqName_ = subBuilder.buildPartial();
} }
bitField0_ |= 0x00000002; input.popLimit(limit);
break; break;
} }
case 34: { case 34: {
org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.Builder subBuilder = null; org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.Builder subBuilder = null;
if (((bitField0_ & 0x00000004) == 0x00000004)) { if (((bitField0_ & 0x00000002) == 0x00000002)) {
subBuilder = annotations_.toBuilder(); subBuilder = annotations_.toBuilder();
} }
annotations_ = input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.PARSER, extensionRegistry); annotations_ = input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.PARSER, extensionRegistry);
@@ -97,7 +105,7 @@ public final class IrFile extends
subBuilder.mergeFrom(annotations_); subBuilder.mergeFrom(annotations_);
annotations_ = subBuilder.buildPartial(); annotations_ = subBuilder.buildPartial();
} }
bitField0_ |= 0x00000004; bitField0_ |= 0x00000002;
break; break;
} }
case 40: { case 40: {
@@ -132,6 +140,9 @@ public final class IrFile extends
if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
declarationId_ = java.util.Collections.unmodifiableList(declarationId_); declarationId_ = java.util.Collections.unmodifiableList(declarationId_);
} }
if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
fqName_ = java.util.Collections.unmodifiableList(fqName_);
}
if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
explicitlyExportedToCompiler_ = java.util.Collections.unmodifiableList(explicitlyExportedToCompiler_); explicitlyExportedToCompiler_ = java.util.Collections.unmodifiableList(explicitlyExportedToCompiler_);
} }
@@ -212,30 +223,45 @@ public final class IrFile extends
} }
public static final int FQ_NAME_FIELD_NUMBER = 3; public static final int FQ_NAME_FIELD_NUMBER = 3;
private org.jetbrains.kotlin.backend.common.serialization.proto.FqName fqName_; private java.util.List<java.lang.Integer> fqName_;
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.FqName fq_name = 3;</code> * <code>repeated int32 fq_name = 3;</code>
*/ */
public boolean hasFqName() { public java.util.List<java.lang.Integer>
return ((bitField0_ & 0x00000002) == 0x00000002); getFqNameList() {
return fqName_;
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.FqName fq_name = 3;</code> * <code>repeated int32 fq_name = 3;</code>
*/ */
public org.jetbrains.kotlin.backend.common.serialization.proto.FqName getFqName() { public int getFqNameCount() {
return fqName_; return fqName_.size();
}
/**
* <code>repeated int32 fq_name = 3;</code>
*/
public int getFqName(int index) {
return fqName_.get(index);
} }
public static final int ANNOTATIONS_FIELD_NUMBER = 4; public static final int ANNOTATIONS_FIELD_NUMBER = 4;
private org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations_; private org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations_;
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 4;</code> * <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 4;</code>
*
* <pre>
* required FqName fq_name = 3;
* </pre>
*/ */
public boolean hasAnnotations() { public boolean hasAnnotations() {
return ((bitField0_ & 0x00000004) == 0x00000004); return ((bitField0_ & 0x00000002) == 0x00000002);
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 4;</code> * <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 4;</code>
*
* <pre>
* required FqName fq_name = 3;
* </pre>
*/ */
public org.jetbrains.kotlin.backend.common.serialization.proto.Annotations getAnnotations() { public org.jetbrains.kotlin.backend.common.serialization.proto.Annotations getAnnotations() {
return annotations_; return annotations_;
@@ -266,7 +292,7 @@ public final class IrFile extends
private void initFields() { private void initFields() {
declarationId_ = java.util.Collections.emptyList(); declarationId_ = java.util.Collections.emptyList();
fileEntry_ = org.jetbrains.kotlin.backend.common.serialization.proto.FileEntry.getDefaultInstance(); fileEntry_ = org.jetbrains.kotlin.backend.common.serialization.proto.FileEntry.getDefaultInstance();
fqName_ = org.jetbrains.kotlin.backend.common.serialization.proto.FqName.getDefaultInstance(); fqName_ = java.util.Collections.emptyList();
annotations_ = org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.getDefaultInstance(); annotations_ = org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.getDefaultInstance();
explicitlyExportedToCompiler_ = java.util.Collections.emptyList(); explicitlyExportedToCompiler_ = java.util.Collections.emptyList();
} }
@@ -280,10 +306,6 @@ public final class IrFile extends
memoizedIsInitialized = 0; memoizedIsInitialized = 0;
return false; return false;
} }
if (!hasFqName()) {
memoizedIsInitialized = 0;
return false;
}
if (!hasAnnotations()) { if (!hasAnnotations()) {
memoizedIsInitialized = 0; memoizedIsInitialized = 0;
return false; return false;
@@ -315,10 +337,10 @@ public final class IrFile extends
if (((bitField0_ & 0x00000001) == 0x00000001)) { if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeMessage(2, fileEntry_); output.writeMessage(2, fileEntry_);
} }
if (((bitField0_ & 0x00000002) == 0x00000002)) { for (int i = 0; i < fqName_.size(); i++) {
output.writeMessage(3, fqName_); output.writeInt32(3, fqName_.get(i));
} }
if (((bitField0_ & 0x00000004) == 0x00000004)) { if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeMessage(4, annotations_); output.writeMessage(4, annotations_);
} }
for (int i = 0; i < explicitlyExportedToCompiler_.size(); i++) { for (int i = 0; i < explicitlyExportedToCompiler_.size(); i++) {
@@ -341,11 +363,16 @@ public final class IrFile extends
size += org.jetbrains.kotlin.protobuf.CodedOutputStream size += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeMessageSize(2, fileEntry_); .computeMessageSize(2, fileEntry_);
} }
if (((bitField0_ & 0x00000002) == 0x00000002)) { {
size += org.jetbrains.kotlin.protobuf.CodedOutputStream int dataSize = 0;
.computeMessageSize(3, fqName_); for (int i = 0; i < fqName_.size(); i++) {
dataSize += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeInt32SizeNoTag(fqName_.get(i));
}
size += dataSize;
size += 1 * getFqNameList().size();
} }
if (((bitField0_ & 0x00000004) == 0x00000004)) { if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += org.jetbrains.kotlin.protobuf.CodedOutputStream size += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeMessageSize(4, annotations_); .computeMessageSize(4, annotations_);
} }
@@ -456,7 +483,7 @@ public final class IrFile extends
bitField0_ = (bitField0_ & ~0x00000001); bitField0_ = (bitField0_ & ~0x00000001);
fileEntry_ = org.jetbrains.kotlin.backend.common.serialization.proto.FileEntry.getDefaultInstance(); fileEntry_ = org.jetbrains.kotlin.backend.common.serialization.proto.FileEntry.getDefaultInstance();
bitField0_ = (bitField0_ & ~0x00000002); bitField0_ = (bitField0_ & ~0x00000002);
fqName_ = org.jetbrains.kotlin.backend.common.serialization.proto.FqName.getDefaultInstance(); fqName_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004); bitField0_ = (bitField0_ & ~0x00000004);
annotations_ = org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.getDefaultInstance(); annotations_ = org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.getDefaultInstance();
bitField0_ = (bitField0_ & ~0x00000008); bitField0_ = (bitField0_ & ~0x00000008);
@@ -494,12 +521,13 @@ public final class IrFile extends
to_bitField0_ |= 0x00000001; to_bitField0_ |= 0x00000001;
} }
result.fileEntry_ = fileEntry_; result.fileEntry_ = fileEntry_;
if (((from_bitField0_ & 0x00000004) == 0x00000004)) { if (((bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000002; fqName_ = java.util.Collections.unmodifiableList(fqName_);
bitField0_ = (bitField0_ & ~0x00000004);
} }
result.fqName_ = fqName_; result.fqName_ = fqName_;
if (((from_bitField0_ & 0x00000008) == 0x00000008)) { if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
to_bitField0_ |= 0x00000004; to_bitField0_ |= 0x00000002;
} }
result.annotations_ = annotations_; result.annotations_ = annotations_;
if (((bitField0_ & 0x00000010) == 0x00000010)) { if (((bitField0_ & 0x00000010) == 0x00000010)) {
@@ -526,8 +554,15 @@ public final class IrFile extends
if (other.hasFileEntry()) { if (other.hasFileEntry()) {
mergeFileEntry(other.getFileEntry()); mergeFileEntry(other.getFileEntry());
} }
if (other.hasFqName()) { if (!other.fqName_.isEmpty()) {
mergeFqName(other.getFqName()); if (fqName_.isEmpty()) {
fqName_ = other.fqName_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureFqNameIsMutable();
fqName_.addAll(other.fqName_);
}
} }
if (other.hasAnnotations()) { if (other.hasAnnotations()) {
mergeAnnotations(other.getAnnotations()); mergeAnnotations(other.getAnnotations());
@@ -552,10 +587,6 @@ public final class IrFile extends
return false; return false;
} }
if (!hasFqName()) {
return false;
}
if (!hasAnnotations()) { if (!hasAnnotations()) {
return false; return false;
@@ -781,81 +812,99 @@ public final class IrFile extends
return this; return this;
} }
private org.jetbrains.kotlin.backend.common.serialization.proto.FqName fqName_ = org.jetbrains.kotlin.backend.common.serialization.proto.FqName.getDefaultInstance(); private java.util.List<java.lang.Integer> fqName_ = java.util.Collections.emptyList();
/** private void ensureFqNameIsMutable() {
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.FqName fq_name = 3;</code> if (!((bitField0_ & 0x00000004) == 0x00000004)) {
*/ fqName_ = new java.util.ArrayList<java.lang.Integer>(fqName_);
public boolean hasFqName() { bitField0_ |= 0x00000004;
return ((bitField0_ & 0x00000004) == 0x00000004); }
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.FqName fq_name = 3;</code> * <code>repeated int32 fq_name = 3;</code>
*/ */
public org.jetbrains.kotlin.backend.common.serialization.proto.FqName getFqName() { public java.util.List<java.lang.Integer>
return fqName_; getFqNameList() {
return java.util.Collections.unmodifiableList(fqName_);
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.FqName fq_name = 3;</code> * <code>repeated int32 fq_name = 3;</code>
*/ */
public Builder setFqName(org.jetbrains.kotlin.backend.common.serialization.proto.FqName value) { public int getFqNameCount() {
if (value == null) { return fqName_.size();
throw new NullPointerException();
}
fqName_ = value;
bitField0_ |= 0x00000004;
return this;
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.FqName fq_name = 3;</code> * <code>repeated int32 fq_name = 3;</code>
*/
public int getFqName(int index) {
return fqName_.get(index);
}
/**
* <code>repeated int32 fq_name = 3;</code>
*/ */
public Builder setFqName( public Builder setFqName(
org.jetbrains.kotlin.backend.common.serialization.proto.FqName.Builder builderForValue) { int index, int value) {
fqName_ = builderForValue.build(); ensureFqNameIsMutable();
fqName_.set(index, value);
bitField0_ |= 0x00000004;
return this; return this;
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.FqName fq_name = 3;</code> * <code>repeated int32 fq_name = 3;</code>
*/ */
public Builder mergeFqName(org.jetbrains.kotlin.backend.common.serialization.proto.FqName value) { public Builder addFqName(int value) {
if (((bitField0_ & 0x00000004) == 0x00000004) && ensureFqNameIsMutable();
fqName_ != org.jetbrains.kotlin.backend.common.serialization.proto.FqName.getDefaultInstance()) { fqName_.add(value);
fqName_ =
org.jetbrains.kotlin.backend.common.serialization.proto.FqName.newBuilder(fqName_).mergeFrom(value).buildPartial();
} else {
fqName_ = value;
}
bitField0_ |= 0x00000004;
return this; return this;
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.FqName fq_name = 3;</code> * <code>repeated int32 fq_name = 3;</code>
*/
public Builder addAllFqName(
java.lang.Iterable<? extends java.lang.Integer> values) {
ensureFqNameIsMutable();
org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll(
values, fqName_);
return this;
}
/**
* <code>repeated int32 fq_name = 3;</code>
*/ */
public Builder clearFqName() { public Builder clearFqName() {
fqName_ = org.jetbrains.kotlin.backend.common.serialization.proto.FqName.getDefaultInstance(); fqName_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004); bitField0_ = (bitField0_ & ~0x00000004);
return this; return this;
} }
private org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations_ = org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.getDefaultInstance(); private org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations_ = org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.getDefaultInstance();
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 4;</code> * <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 4;</code>
*
* <pre>
* required FqName fq_name = 3;
* </pre>
*/ */
public boolean hasAnnotations() { public boolean hasAnnotations() {
return ((bitField0_ & 0x00000008) == 0x00000008); return ((bitField0_ & 0x00000008) == 0x00000008);
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 4;</code> * <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 4;</code>
*
* <pre>
* required FqName fq_name = 3;
* </pre>
*/ */
public org.jetbrains.kotlin.backend.common.serialization.proto.Annotations getAnnotations() { public org.jetbrains.kotlin.backend.common.serialization.proto.Annotations getAnnotations() {
return annotations_; return annotations_;
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 4;</code> * <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 4;</code>
*
* <pre>
* required FqName fq_name = 3;
* </pre>
*/ */
public Builder setAnnotations(org.jetbrains.kotlin.backend.common.serialization.proto.Annotations value) { public Builder setAnnotations(org.jetbrains.kotlin.backend.common.serialization.proto.Annotations value) {
if (value == null) { if (value == null) {
@@ -868,6 +917,10 @@ public final class IrFile extends
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 4;</code> * <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 4;</code>
*
* <pre>
* required FqName fq_name = 3;
* </pre>
*/ */
public Builder setAnnotations( public Builder setAnnotations(
org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.Builder builderForValue) { org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.Builder builderForValue) {
@@ -878,6 +931,10 @@ public final class IrFile extends
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 4;</code> * <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 4;</code>
*
* <pre>
* required FqName fq_name = 3;
* </pre>
*/ */
public Builder mergeAnnotations(org.jetbrains.kotlin.backend.common.serialization.proto.Annotations value) { public Builder mergeAnnotations(org.jetbrains.kotlin.backend.common.serialization.proto.Annotations value) {
if (((bitField0_ & 0x00000008) == 0x00000008) && if (((bitField0_ & 0x00000008) == 0x00000008) &&
@@ -893,6 +950,10 @@ public final class IrFile extends
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 4;</code> * <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 4;</code>
*
* <pre>
* required FqName fq_name = 3;
* </pre>
*/ */
public Builder clearAnnotations() { public Builder clearAnnotations() {
annotations_ = org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.getDefaultInstance(); annotations_ = org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.getDefaultInstance();
@@ -31,20 +31,32 @@ public interface IrFileOrBuilder extends
org.jetbrains.kotlin.backend.common.serialization.proto.FileEntry getFileEntry(); org.jetbrains.kotlin.backend.common.serialization.proto.FileEntry getFileEntry();
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.FqName fq_name = 3;</code> * <code>repeated int32 fq_name = 3;</code>
*/ */
boolean hasFqName(); java.util.List<java.lang.Integer> getFqNameList();
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.FqName fq_name = 3;</code> * <code>repeated int32 fq_name = 3;</code>
*/ */
org.jetbrains.kotlin.backend.common.serialization.proto.FqName getFqName(); int getFqNameCount();
/**
* <code>repeated int32 fq_name = 3;</code>
*/
int getFqName(int index);
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 4;</code> * <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 4;</code>
*
* <pre>
* required FqName fq_name = 3;
* </pre>
*/ */
boolean hasAnnotations(); boolean hasAnnotations();
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 4;</code> * <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 4;</code>
*
* <pre>
* required FqName fq_name = 3;
* </pre>
*/ */
org.jetbrains.kotlin.backend.common.serialization.proto.Annotations getAnnotations(); org.jetbrains.kotlin.backend.common.serialization.proto.Annotations getAnnotations();
@@ -91,22 +91,30 @@ public final class IrSymbolData extends
bitField0_ |= 0x00000004; bitField0_ |= 0x00000004;
break; break;
} }
case 32: {
if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
fqName_ = new java.util.ArrayList<java.lang.Integer>();
mutable_bitField0_ |= 0x00000008;
}
fqName_.add(input.readInt32());
break;
}
case 34: { case 34: {
org.jetbrains.kotlin.backend.common.serialization.proto.FqName.Builder subBuilder = null; int length = input.readRawVarint32();
if (((bitField0_ & 0x00000008) == 0x00000008)) { int limit = input.pushLimit(length);
subBuilder = fqname_.toBuilder(); if (!((mutable_bitField0_ & 0x00000008) == 0x00000008) && input.getBytesUntilLimit() > 0) {
fqName_ = new java.util.ArrayList<java.lang.Integer>();
mutable_bitField0_ |= 0x00000008;
} }
fqname_ = input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.FqName.PARSER, extensionRegistry); while (input.getBytesUntilLimit() > 0) {
if (subBuilder != null) { fqName_.add(input.readInt32());
subBuilder.mergeFrom(fqname_);
fqname_ = subBuilder.buildPartial();
} }
bitField0_ |= 0x00000008; input.popLimit(limit);
break; break;
} }
case 42: { case 42: {
org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference.Builder subBuilder = null; org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference.Builder subBuilder = null;
if (((bitField0_ & 0x00000010) == 0x00000010)) { if (((bitField0_ & 0x00000008) == 0x00000008)) {
subBuilder = descriptorReference_.toBuilder(); subBuilder = descriptorReference_.toBuilder();
} }
descriptorReference_ = input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference.PARSER, extensionRegistry); descriptorReference_ = input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference.PARSER, extensionRegistry);
@@ -114,7 +122,7 @@ public final class IrSymbolData extends
subBuilder.mergeFrom(descriptorReference_); subBuilder.mergeFrom(descriptorReference_);
descriptorReference_ = subBuilder.buildPartial(); descriptorReference_ = subBuilder.buildPartial();
} }
bitField0_ |= 0x00000010; bitField0_ |= 0x00000008;
break; break;
} }
} }
@@ -125,6 +133,9 @@ public final class IrSymbolData extends
throw new org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException( throw new org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException(
e.getMessage()).setUnfinishedMessage(this); e.getMessage()).setUnfinishedMessage(this);
} finally { } finally {
if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
fqName_ = java.util.Collections.unmodifiableList(fqName_);
}
try { try {
unknownFieldsCodedOutput.flush(); unknownFieldsCodedOutput.flush();
} catch (java.io.IOException e) { } catch (java.io.IOException e) {
@@ -196,31 +207,46 @@ public final class IrSymbolData extends
return topLevelUniqId_; return topLevelUniqId_;
} }
public static final int FQNAME_FIELD_NUMBER = 4; public static final int FQ_NAME_FIELD_NUMBER = 4;
private org.jetbrains.kotlin.backend.common.serialization.proto.FqName fqname_; private java.util.List<java.lang.Integer> fqName_;
/** /**
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.FqName fqname = 4;</code> * <code>repeated int32 fq_name = 4;</code>
*/ */
public boolean hasFqname() { public java.util.List<java.lang.Integer>
return ((bitField0_ & 0x00000008) == 0x00000008); getFqNameList() {
return fqName_;
} }
/** /**
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.FqName fqname = 4;</code> * <code>repeated int32 fq_name = 4;</code>
*/ */
public org.jetbrains.kotlin.backend.common.serialization.proto.FqName getFqname() { public int getFqNameCount() {
return fqname_; return fqName_.size();
}
/**
* <code>repeated int32 fq_name = 4;</code>
*/
public int getFqName(int index) {
return fqName_.get(index);
} }
public static final int DESCRIPTOR_REFERENCE_FIELD_NUMBER = 5; public static final int DESCRIPTOR_REFERENCE_FIELD_NUMBER = 5;
private org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference descriptorReference_; private org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference descriptorReference_;
/** /**
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference descriptor_reference = 5;</code> * <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference descriptor_reference = 5;</code>
*
* <pre>
* optional FqName fqname = 4;
* </pre>
*/ */
public boolean hasDescriptorReference() { public boolean hasDescriptorReference() {
return ((bitField0_ & 0x00000010) == 0x00000010); return ((bitField0_ & 0x00000008) == 0x00000008);
} }
/** /**
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference descriptor_reference = 5;</code> * <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference descriptor_reference = 5;</code>
*
* <pre>
* optional FqName fqname = 4;
* </pre>
*/ */
public org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference getDescriptorReference() { public org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference getDescriptorReference() {
return descriptorReference_; return descriptorReference_;
@@ -230,7 +256,7 @@ public final class IrSymbolData extends
kind_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrSymbolKind.FUNCTION_SYMBOL; kind_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrSymbolKind.FUNCTION_SYMBOL;
uniqId_ = org.jetbrains.kotlin.backend.common.serialization.proto.UniqId.getDefaultInstance(); uniqId_ = org.jetbrains.kotlin.backend.common.serialization.proto.UniqId.getDefaultInstance();
topLevelUniqId_ = org.jetbrains.kotlin.backend.common.serialization.proto.UniqId.getDefaultInstance(); topLevelUniqId_ = org.jetbrains.kotlin.backend.common.serialization.proto.UniqId.getDefaultInstance();
fqname_ = org.jetbrains.kotlin.backend.common.serialization.proto.FqName.getDefaultInstance(); fqName_ = java.util.Collections.emptyList();
descriptorReference_ = org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference.getDefaultInstance(); descriptorReference_ = org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference.getDefaultInstance();
} }
private byte memoizedIsInitialized = -1; private byte memoizedIsInitialized = -1;
@@ -281,10 +307,10 @@ public final class IrSymbolData extends
if (((bitField0_ & 0x00000004) == 0x00000004)) { if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeMessage(3, topLevelUniqId_); output.writeMessage(3, topLevelUniqId_);
} }
if (((bitField0_ & 0x00000008) == 0x00000008)) { for (int i = 0; i < fqName_.size(); i++) {
output.writeMessage(4, fqname_); output.writeInt32(4, fqName_.get(i));
} }
if (((bitField0_ & 0x00000010) == 0x00000010)) { if (((bitField0_ & 0x00000008) == 0x00000008)) {
output.writeMessage(5, descriptorReference_); output.writeMessage(5, descriptorReference_);
} }
output.writeRawBytes(unknownFields); output.writeRawBytes(unknownFields);
@@ -308,11 +334,16 @@ public final class IrSymbolData extends
size += org.jetbrains.kotlin.protobuf.CodedOutputStream size += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeMessageSize(3, topLevelUniqId_); .computeMessageSize(3, topLevelUniqId_);
} }
if (((bitField0_ & 0x00000008) == 0x00000008)) { {
size += org.jetbrains.kotlin.protobuf.CodedOutputStream int dataSize = 0;
.computeMessageSize(4, fqname_); for (int i = 0; i < fqName_.size(); i++) {
dataSize += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeInt32SizeNoTag(fqName_.get(i));
}
size += dataSize;
size += 1 * getFqNameList().size();
} }
if (((bitField0_ & 0x00000010) == 0x00000010)) { if (((bitField0_ & 0x00000008) == 0x00000008)) {
size += org.jetbrains.kotlin.protobuf.CodedOutputStream size += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeMessageSize(5, descriptorReference_); .computeMessageSize(5, descriptorReference_);
} }
@@ -416,7 +447,7 @@ public final class IrSymbolData extends
bitField0_ = (bitField0_ & ~0x00000002); bitField0_ = (bitField0_ & ~0x00000002);
topLevelUniqId_ = org.jetbrains.kotlin.backend.common.serialization.proto.UniqId.getDefaultInstance(); topLevelUniqId_ = org.jetbrains.kotlin.backend.common.serialization.proto.UniqId.getDefaultInstance();
bitField0_ = (bitField0_ & ~0x00000004); bitField0_ = (bitField0_ & ~0x00000004);
fqname_ = org.jetbrains.kotlin.backend.common.serialization.proto.FqName.getDefaultInstance(); fqName_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008); bitField0_ = (bitField0_ & ~0x00000008);
descriptorReference_ = org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference.getDefaultInstance(); descriptorReference_ = org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference.getDefaultInstance();
bitField0_ = (bitField0_ & ~0x00000010); bitField0_ = (bitField0_ & ~0x00000010);
@@ -455,12 +486,13 @@ public final class IrSymbolData extends
to_bitField0_ |= 0x00000004; to_bitField0_ |= 0x00000004;
} }
result.topLevelUniqId_ = topLevelUniqId_; result.topLevelUniqId_ = topLevelUniqId_;
if (((from_bitField0_ & 0x00000008) == 0x00000008)) { if (((bitField0_ & 0x00000008) == 0x00000008)) {
to_bitField0_ |= 0x00000008; fqName_ = java.util.Collections.unmodifiableList(fqName_);
bitField0_ = (bitField0_ & ~0x00000008);
} }
result.fqname_ = fqname_; result.fqName_ = fqName_;
if (((from_bitField0_ & 0x00000010) == 0x00000010)) { if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
to_bitField0_ |= 0x00000010; to_bitField0_ |= 0x00000008;
} }
result.descriptorReference_ = descriptorReference_; result.descriptorReference_ = descriptorReference_;
result.bitField0_ = to_bitField0_; result.bitField0_ = to_bitField0_;
@@ -478,8 +510,15 @@ public final class IrSymbolData extends
if (other.hasTopLevelUniqId()) { if (other.hasTopLevelUniqId()) {
mergeTopLevelUniqId(other.getTopLevelUniqId()); mergeTopLevelUniqId(other.getTopLevelUniqId());
} }
if (other.hasFqname()) { if (!other.fqName_.isEmpty()) {
mergeFqname(other.getFqname()); if (fqName_.isEmpty()) {
fqName_ = other.fqName_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureFqNameIsMutable();
fqName_.addAll(other.fqName_);
}
} }
if (other.hasDescriptorReference()) { if (other.hasDescriptorReference()) {
mergeDescriptorReference(other.getDescriptorReference()); mergeDescriptorReference(other.getDescriptorReference());
@@ -693,81 +732,99 @@ public final class IrSymbolData extends
return this; return this;
} }
private org.jetbrains.kotlin.backend.common.serialization.proto.FqName fqname_ = org.jetbrains.kotlin.backend.common.serialization.proto.FqName.getDefaultInstance(); private java.util.List<java.lang.Integer> fqName_ = java.util.Collections.emptyList();
/** private void ensureFqNameIsMutable() {
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.FqName fqname = 4;</code> if (!((bitField0_ & 0x00000008) == 0x00000008)) {
*/ fqName_ = new java.util.ArrayList<java.lang.Integer>(fqName_);
public boolean hasFqname() { bitField0_ |= 0x00000008;
return ((bitField0_ & 0x00000008) == 0x00000008); }
} }
/** /**
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.FqName fqname = 4;</code> * <code>repeated int32 fq_name = 4;</code>
*/ */
public org.jetbrains.kotlin.backend.common.serialization.proto.FqName getFqname() { public java.util.List<java.lang.Integer>
return fqname_; getFqNameList() {
return java.util.Collections.unmodifiableList(fqName_);
} }
/** /**
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.FqName fqname = 4;</code> * <code>repeated int32 fq_name = 4;</code>
*/ */
public Builder setFqname(org.jetbrains.kotlin.backend.common.serialization.proto.FqName value) { public int getFqNameCount() {
if (value == null) { return fqName_.size();
throw new NullPointerException(); }
} /**
fqname_ = value; * <code>repeated int32 fq_name = 4;</code>
*/
bitField0_ |= 0x00000008; public int getFqName(int index) {
return fqName_.get(index);
}
/**
* <code>repeated int32 fq_name = 4;</code>
*/
public Builder setFqName(
int index, int value) {
ensureFqNameIsMutable();
fqName_.set(index, value);
return this; return this;
} }
/** /**
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.FqName fqname = 4;</code> * <code>repeated int32 fq_name = 4;</code>
*/ */
public Builder setFqname( public Builder addFqName(int value) {
org.jetbrains.kotlin.backend.common.serialization.proto.FqName.Builder builderForValue) { ensureFqNameIsMutable();
fqname_ = builderForValue.build(); fqName_.add(value);
bitField0_ |= 0x00000008;
return this; return this;
} }
/** /**
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.FqName fqname = 4;</code> * <code>repeated int32 fq_name = 4;</code>
*/ */
public Builder mergeFqname(org.jetbrains.kotlin.backend.common.serialization.proto.FqName value) { public Builder addAllFqName(
if (((bitField0_ & 0x00000008) == 0x00000008) && java.lang.Iterable<? extends java.lang.Integer> values) {
fqname_ != org.jetbrains.kotlin.backend.common.serialization.proto.FqName.getDefaultInstance()) { ensureFqNameIsMutable();
fqname_ = org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll(
org.jetbrains.kotlin.backend.common.serialization.proto.FqName.newBuilder(fqname_).mergeFrom(value).buildPartial(); values, fqName_);
} else {
fqname_ = value;
}
bitField0_ |= 0x00000008;
return this; return this;
} }
/** /**
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.FqName fqname = 4;</code> * <code>repeated int32 fq_name = 4;</code>
*/ */
public Builder clearFqname() { public Builder clearFqName() {
fqname_ = org.jetbrains.kotlin.backend.common.serialization.proto.FqName.getDefaultInstance(); fqName_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008); bitField0_ = (bitField0_ & ~0x00000008);
return this; return this;
} }
private org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference descriptorReference_ = org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference.getDefaultInstance(); private org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference descriptorReference_ = org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference.getDefaultInstance();
/** /**
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference descriptor_reference = 5;</code> * <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference descriptor_reference = 5;</code>
*
* <pre>
* optional FqName fqname = 4;
* </pre>
*/ */
public boolean hasDescriptorReference() { public boolean hasDescriptorReference() {
return ((bitField0_ & 0x00000010) == 0x00000010); return ((bitField0_ & 0x00000010) == 0x00000010);
} }
/** /**
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference descriptor_reference = 5;</code> * <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference descriptor_reference = 5;</code>
*
* <pre>
* optional FqName fqname = 4;
* </pre>
*/ */
public org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference getDescriptorReference() { public org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference getDescriptorReference() {
return descriptorReference_; return descriptorReference_;
} }
/** /**
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference descriptor_reference = 5;</code> * <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference descriptor_reference = 5;</code>
*
* <pre>
* optional FqName fqname = 4;
* </pre>
*/ */
public Builder setDescriptorReference(org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference value) { public Builder setDescriptorReference(org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference value) {
if (value == null) { if (value == null) {
@@ -780,6 +837,10 @@ public final class IrSymbolData extends
} }
/** /**
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference descriptor_reference = 5;</code> * <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference descriptor_reference = 5;</code>
*
* <pre>
* optional FqName fqname = 4;
* </pre>
*/ */
public Builder setDescriptorReference( public Builder setDescriptorReference(
org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference.Builder builderForValue) { org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference.Builder builderForValue) {
@@ -790,6 +851,10 @@ public final class IrSymbolData extends
} }
/** /**
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference descriptor_reference = 5;</code> * <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference descriptor_reference = 5;</code>
*
* <pre>
* optional FqName fqname = 4;
* </pre>
*/ */
public Builder mergeDescriptorReference(org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference value) { public Builder mergeDescriptorReference(org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference value) {
if (((bitField0_ & 0x00000010) == 0x00000010) && if (((bitField0_ & 0x00000010) == 0x00000010) &&
@@ -805,6 +870,10 @@ public final class IrSymbolData extends
} }
/** /**
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference descriptor_reference = 5;</code> * <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference descriptor_reference = 5;</code>
*
* <pre>
* optional FqName fqname = 4;
* </pre>
*/ */
public Builder clearDescriptorReference() { public Builder clearDescriptorReference() {
descriptorReference_ = org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference.getDefaultInstance(); descriptorReference_ = org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference.getDefaultInstance();
@@ -35,20 +35,32 @@ public interface IrSymbolDataOrBuilder extends
org.jetbrains.kotlin.backend.common.serialization.proto.UniqId getTopLevelUniqId(); org.jetbrains.kotlin.backend.common.serialization.proto.UniqId getTopLevelUniqId();
/** /**
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.FqName fqname = 4;</code> * <code>repeated int32 fq_name = 4;</code>
*/ */
boolean hasFqname(); java.util.List<java.lang.Integer> getFqNameList();
/** /**
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.FqName fqname = 4;</code> * <code>repeated int32 fq_name = 4;</code>
*/ */
org.jetbrains.kotlin.backend.common.serialization.proto.FqName getFqname(); int getFqNameCount();
/**
* <code>repeated int32 fq_name = 4;</code>
*/
int getFqName(int index);
/** /**
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference descriptor_reference = 5;</code> * <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference descriptor_reference = 5;</code>
*
* <pre>
* optional FqName fqname = 4;
* </pre>
*/ */
boolean hasDescriptorReference(); boolean hasDescriptorReference();
/** /**
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference descriptor_reference = 5;</code> * <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference descriptor_reference = 5;</code>
*
* <pre>
* optional FqName fqname = 4;
* </pre>
*/ */
org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference getDescriptorReference(); org.jetbrains.kotlin.backend.common.serialization.proto.DescriptorReference getDescriptorReference();
} }
@@ -432,4 +432,4 @@ public final class StringTable extends
} }
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.StringTable) // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.StringTable)
} }