[IR SERIALIZATION] Get rid of Annotations message

This commit is contained in:
Roman Artemev
2019-09-12 15:15:05 +03:00
committed by romanart
parent aeafaf78f1
commit fcae5873d0
18 changed files with 1073 additions and 1080 deletions
@@ -79,7 +79,7 @@ message IrFile {
repeated UniqId declaration_id = 1; repeated UniqId declaration_id = 1;
required FileEntry file_entry = 2; required FileEntry file_entry = 2;
repeated int32 fq_name = 3; repeated int32 fq_name = 3;
required Annotations annotations = 4; repeated IrConstructorCall annotation = 4;
repeated int32 explicitly_exported_to_compiler = 5; repeated int32 explicitly_exported_to_compiler = 5;
} }
@@ -123,10 +123,6 @@ enum IrTypeVariance { // Should we import metadata variance, or better stay sepa
INV = 2; INV = 2;
} }
message Annotations {
repeated IrConstructorCall annotation = 1;
}
message TypeArguments { message TypeArguments {
repeated int32 type_argument = 1; repeated int32 type_argument = 1;
} }
@@ -148,7 +144,7 @@ message IrTypeArgument {
} }
message IrSimpleType { message IrSimpleType {
required Annotations annotations = 1; repeated IrConstructorCall annotation = 1;
required int32 classifier = 2; required int32 classifier = 2;
required bool has_question_mark = 3; required bool has_question_mark = 3;
repeated IrTypeArgument argument = 4; repeated IrTypeArgument argument = 4;
@@ -156,18 +152,18 @@ message IrSimpleType {
} }
message IrTypeAbbreviation { message IrTypeAbbreviation {
required Annotations annotations = 1; repeated IrConstructorCall annotation = 1;
required int32 type_alias = 2; required int32 type_alias = 2;
required bool has_question_mark = 3; required bool has_question_mark = 3;
repeated IrTypeArgument argument = 4; repeated IrTypeArgument argument = 4;
} }
message IrDynamicType { message IrDynamicType {
required Annotations annotations = 1; repeated IrConstructorCall annotation = 1;
} }
message IrErrorType { message IrErrorType {
required Annotations annotations = 1; repeated IrConstructorCall annotation = 1;
} }
message IrType { message IrType {
@@ -508,7 +504,7 @@ message IrDeclarationBase {
required int32 symbol = 1; required int32 symbol = 1;
required IrDeclarationOrigin origin = 2; required IrDeclarationOrigin origin = 2;
required Coordinates coordinates = 3; required Coordinates coordinates = 3;
required Annotations annotations = 4; repeated IrConstructorCall annotation = 4;
} }
message IrFunctionBase { message IrFunctionBase {
@@ -39,7 +39,6 @@ import org.jetbrains.kotlin.name.FqName
import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.name.Name
import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedTypeParameterDescriptor import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedTypeParameterDescriptor
import org.jetbrains.kotlin.types.Variance import org.jetbrains.kotlin.types.Variance
import org.jetbrains.kotlin.backend.common.serialization.proto.Annotations as ProtoAnnotations
import org.jetbrains.kotlin.backend.common.serialization.proto.ClassKind as ProtoClassKind import org.jetbrains.kotlin.backend.common.serialization.proto.ClassKind as ProtoClassKind
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.IrAnonymousInit as ProtoAnonymousInit import org.jetbrains.kotlin.backend.common.serialization.proto.IrAnonymousInit as ProtoAnonymousInit
@@ -180,8 +179,8 @@ abstract class IrFileDeserializer(
} }
fun deserializeAnnotations(annotations: ProtoAnnotations): List<IrConstructorCall> { fun deserializeAnnotations(annotations: List<ProtoConstructorCall>): List<IrConstructorCall> {
return annotations.annotationList.map { return annotations.map {
deserializeConstructorCall(it, 0, 0, builtIns.unitType) // TODO: need a proper deserialization here deserializeConstructorCall(it, 0, 0, builtIns.unitType) // TODO: need a proper deserialization here
} }
} }
@@ -192,7 +191,7 @@ abstract class IrFileDeserializer(
logger.log { "deserializeSimpleType: symbol=$symbol" } logger.log { "deserializeSimpleType: symbol=$symbol" }
val arguments = proto.argumentList.map { deserializeIrTypeArgument(it) } val arguments = proto.argumentList.map { deserializeIrTypeArgument(it) }
val annotations = deserializeAnnotations(proto.annotations) val annotations = deserializeAnnotations(proto.annotationList)
val result: IrSimpleType = IrSimpleTypeImpl( val result: IrSimpleType = IrSimpleTypeImpl(
null, null,
@@ -215,16 +214,16 @@ abstract class IrFileDeserializer(
}, },
proto.hasQuestionMark, proto.hasQuestionMark,
proto.argumentList.map { deserializeIrTypeArgument(it) }, proto.argumentList.map { deserializeIrTypeArgument(it) },
deserializeAnnotations(proto.annotations) deserializeAnnotations(proto.annotationList)
) )
private fun deserializeDynamicType(proto: ProtoDynamicType): IrDynamicType { private fun deserializeDynamicType(proto: ProtoDynamicType): IrDynamicType {
val annotations = deserializeAnnotations(proto.annotations) val annotations = deserializeAnnotations(proto.annotationList)
return IrDynamicTypeImpl(null, annotations, Variance.INVARIANT) return IrDynamicTypeImpl(null, annotations, Variance.INVARIANT)
} }
private fun deserializeErrorType(proto: ProtoErrorType): IrErrorType { private fun deserializeErrorType(proto: ProtoErrorType): IrErrorType {
val annotations = deserializeAnnotations(proto.annotations) val annotations = deserializeAnnotations(proto.annotationList)
return IrErrorTypeImpl(null, annotations, Variance.INVARIANT) return IrErrorTypeImpl(null, annotations, Variance.INVARIANT)
} }
@@ -912,7 +911,7 @@ abstract class IrFileDeserializer(
proto.coordinates.startOffset, proto.coordinates.endOffset, proto.coordinates.startOffset, proto.coordinates.endOffset,
deserializeIrDeclarationOrigin(proto.origin) deserializeIrDeclarationOrigin(proto.origin)
) )
result.annotations.addAll(deserializeAnnotations(proto.annotations)) result.annotations.addAll(deserializeAnnotations(proto.annotationList))
result.parent = parentsStack.peek()!! result.parent = parentsStack.peek()!!
return result return result
} }
@@ -30,7 +30,6 @@ import org.jetbrains.kotlin.library.impl.IrMemoryDeclarationWriter
import org.jetbrains.kotlin.name.FqName import org.jetbrains.kotlin.name.FqName
import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.name.Name
import org.jetbrains.kotlin.types.Variance import org.jetbrains.kotlin.types.Variance
import org.jetbrains.kotlin.backend.common.serialization.proto.Annotations as ProtoAnnotations
import org.jetbrains.kotlin.backend.common.serialization.proto.ClassKind as ProtoClassKind import org.jetbrains.kotlin.backend.common.serialization.proto.ClassKind as ProtoClassKind
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
@@ -294,19 +293,8 @@ open class IrFileSerializer(
Variance.INVARIANT -> ProtoTypeVariance.INV Variance.INVARIANT -> ProtoTypeVariance.INV
} }
private fun serializeAnnotations(annotations: List<IrConstructorCall>): ProtoAnnotations { private fun serializeAnnotations(annotations: List<IrConstructorCall>) =
val proto = ProtoAnnotations.newBuilder() annotations.map { serializeConstructorCall(it) }
annotations.forEach {
proto.addAnnotation(serializeConstructorCall(it))
}
return proto.build()
}
private fun serializeFqName(fqName: FqName): List<Int> {
// val proto = ProtoFqName.newBuilder()
// fqName.pathSegments().forEach {
// proto.addSegment(serializeString(it.identifier))
// }
private fun serializeFqName(fqName: FqName) = fqName.pathSegments().map { serializeString(it.identifier) } private fun serializeFqName(fqName: FqName) = fqName.pathSegments().map { serializeString(it.identifier) }
@@ -330,7 +318,7 @@ open class IrFileSerializer(
private fun serializeSimpleType(type: IrSimpleType): ProtoSimpleType { private fun serializeSimpleType(type: IrSimpleType): ProtoSimpleType {
val proto = ProtoSimpleType.newBuilder() val proto = ProtoSimpleType.newBuilder()
.setAnnotations(serializeAnnotations(type.annotations)) .addAllAnnotation(serializeAnnotations(type.annotations))
.setClassifier(serializeIrSymbol(type.classifier)) .setClassifier(serializeIrSymbol(type.classifier))
.setHasQuestionMark(type.hasQuestionMark) .setHasQuestionMark(type.hasQuestionMark)
type.abbreviation?.let { type.abbreviation?.let {
@@ -344,7 +332,7 @@ open class IrFileSerializer(
private fun serializeIrTypeAbbreviation(typeAbbreviation: IrTypeAbbreviation): ProtoTypeAbbreviation { private fun serializeIrTypeAbbreviation(typeAbbreviation: IrTypeAbbreviation): ProtoTypeAbbreviation {
val proto = ProtoTypeAbbreviation.newBuilder() val proto = ProtoTypeAbbreviation.newBuilder()
.setAnnotations(serializeAnnotations(typeAbbreviation.annotations)) .addAllAnnotation(serializeAnnotations(typeAbbreviation.annotations))
.setTypeAlias(serializeIrSymbol(typeAbbreviation.typeAlias)) .setTypeAlias(serializeIrSymbol(typeAbbreviation.typeAlias))
.setHasQuestionMark(typeAbbreviation.hasQuestionMark) .setHasQuestionMark(typeAbbreviation.hasQuestionMark)
typeAbbreviation.arguments.forEach { typeAbbreviation.arguments.forEach {
@@ -354,11 +342,11 @@ open class IrFileSerializer(
} }
private fun serializeDynamicType(type: IrDynamicType): ProtoDynamicType = ProtoDynamicType.newBuilder() private fun serializeDynamicType(type: IrDynamicType): ProtoDynamicType = ProtoDynamicType.newBuilder()
.setAnnotations(serializeAnnotations(type.annotations)) .addAllAnnotation(serializeAnnotations(type.annotations))
.build() .build()
private fun serializeErrorType(type: IrErrorType): ProtoErrorType = ProtoErrorType.newBuilder() private fun serializeErrorType(type: IrErrorType): ProtoErrorType = ProtoErrorType.newBuilder()
.setAnnotations(serializeAnnotations(type.annotations)) .addAllAnnotation(serializeAnnotations(type.annotations))
.build() .build()
private fun serializeIrTypeData(type: IrType): ProtoType { private fun serializeIrTypeData(type: IrType): ProtoType {
@@ -997,7 +985,7 @@ open class IrFileSerializer(
ProtoDeclarationBase.newBuilder() ProtoDeclarationBase.newBuilder()
.setSymbol(serializeIrSymbol((declaration as IrSymbolOwner).symbol)) .setSymbol(serializeIrSymbol((declaration as IrSymbolOwner).symbol))
.setCoordinates(serializeCoordinates(declaration.startOffset, declaration.endOffset)) .setCoordinates(serializeCoordinates(declaration.startOffset, declaration.endOffset))
.setAnnotations(serializeAnnotations(declaration.annotations)) .addAllAnnotation(serializeAnnotations(declaration.annotations))
.setOrigin(serializeIrDeclarationOrigin(declaration.origin)) .setOrigin(serializeIrDeclarationOrigin(declaration.origin))
.build() .build()
@@ -1278,7 +1266,7 @@ open class IrFileSerializer(
val proto = ProtoFile.newBuilder() val proto = ProtoFile.newBuilder()
.setFileEntry(serializeFileEntry(file.fileEntry)) .setFileEntry(serializeFileEntry(file.fileEntry))
.addAllFqName(serializeFqName(file.fqName)) .addAllFqName(serializeFqName(file.fqName))
.setAnnotations(serializeAnnotations(file.annotations)) .addAllAnnotation(serializeAnnotations(file.annotations))
file.declarations.forEach { file.declarations.forEach {
if (it.descriptor.isExpectMember && !it.descriptor.isSerializableExpectClass) { if (it.descriptor.isExpectMember && !it.descriptor.isSerializableExpectClass) {
@@ -1290,7 +1278,7 @@ open class IrFileSerializer(
val uniqId = declarationTable.uniqIdByDeclaration(it) val uniqId = declarationTable.uniqIdByDeclaration(it)
topLevelDeclarations.add(TopLevelDeclaration(uniqId.index, uniqId.isLocal, it.descriptor.toString(), byteArray)) topLevelDeclarations.add(TopLevelDeclaration(uniqId.index, uniqId.isLocal, it.descriptor.toString(), byteArray))
if (uniqId.isPublic) { if (uniqId.isPublic) {
proto.addDeclarationId(protoUniqId(uniqId)) proto.addDeclarationId(uniqId.index)
} }
} }
@@ -132,7 +132,7 @@ abstract class KotlinIrLinker(
// This is a heavy initializer // This is a heavy initializer
val module = deserializeIrModuleHeader() val module = deserializeIrModuleHeader()
inner class IrDeserializerForFile(private var annotationsProto: ProtoAnnotations?, private val fileIndex: Int, onlyHeaders: Boolean) : inner class IrDeserializerForFile(private var annotations: List<ProtoConstructorCall>?, private val fileIndex: Int, onlyHeaders: Boolean) :
IrFileDeserializer(logger, builtIns, symbolTable) { IrFileDeserializer(logger, builtIns, symbolTable) {
private var fileLoops = mutableMapOf<Int, IrLoopBase>() private var fileLoops = mutableMapOf<Int, IrLoopBase>()
@@ -373,9 +373,9 @@ abstract class KotlinIrLinker(
} }
fun deserializeFileAnnotationsIfFirstUse() { fun deserializeFileAnnotationsIfFirstUse() {
annotationsProto?.let { annotations?.let {
file.annotations.addAll(deserializeAnnotations(it)) file.annotations.addAll(deserializeAnnotations(it))
annotationsProto = null annotations = null
} }
} }
@@ -396,7 +396,7 @@ abstract class KotlinIrLinker(
val fileEntry = NaiveSourceBasedFileEntryImpl(fileName, fileProto.fileEntry.lineStartOffsetsList.toIntArray()) val fileEntry = NaiveSourceBasedFileEntryImpl(fileName, fileProto.fileEntry.lineStartOffsetsList.toIntArray())
val fileDeserializer = IrDeserializerForFile(fileProto.annotations, fileIndex, !deserializationStrategy.needBodies) val fileDeserializer = IrDeserializerForFile(fileProto.annotationList, fileIndex, !deserializationStrategy.needBodies)
val fqName = fileDeserializer.deserializeFqName(fileProto.fqNameList) val fqName = fileDeserializer.deserializeFqName(fileProto.fqNameList)
@@ -1,479 +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.Annotations}
*/
public final class Annotations extends
org.jetbrains.kotlin.protobuf.GeneratedMessageLite implements
// @@protoc_insertion_point(message_implements:org.jetbrains.kotlin.backend.common.serialization.proto.Annotations)
AnnotationsOrBuilder {
// Use Annotations.newBuilder() to construct.
private Annotations(org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private Annotations(boolean noInit) { this.unknownFields = org.jetbrains.kotlin.protobuf.ByteString.EMPTY;}
private static final Annotations defaultInstance;
public static Annotations getDefaultInstance() {
return defaultInstance;
}
public Annotations getDefaultInstanceForType() {
return defaultInstance;
}
private final org.jetbrains.kotlin.protobuf.ByteString unknownFields;
private Annotations(
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 10: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
annotation_ = new java.util.ArrayList<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall>();
mutable_bitField0_ |= 0x00000001;
}
annotation_.add(input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.PARSER, extensionRegistry));
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)) {
annotation_ = java.util.Collections.unmodifiableList(annotation_);
}
try {
unknownFieldsCodedOutput.flush();
} catch (java.io.IOException e) {
// Should not happen
} finally {
unknownFields = unknownFieldsOutput.toByteString();
}
makeExtensionsImmutable();
}
}
public static org.jetbrains.kotlin.protobuf.Parser<Annotations> PARSER =
new org.jetbrains.kotlin.protobuf.AbstractParser<Annotations>() {
public Annotations parsePartialFrom(
org.jetbrains.kotlin.protobuf.CodedInputStream input,
org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
return new Annotations(input, extensionRegistry);
}
};
@java.lang.Override
public org.jetbrains.kotlin.protobuf.Parser<Annotations> getParserForType() {
return PARSER;
}
public static final int ANNOTATION_FIELD_NUMBER = 1;
private java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall> annotation_;
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall> getAnnotationList() {
return annotation_;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public java.util.List<? extends org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCallOrBuilder>
getAnnotationOrBuilderList() {
return annotation_;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public int getAnnotationCount() {
return annotation_.size();
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index) {
return annotation_.get(index);
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCallOrBuilder getAnnotationOrBuilder(
int index) {
return annotation_.get(index);
}
private void initFields() {
annotation_ = 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;
for (int i = 0; i < getAnnotationCount(); i++) {
if (!getAnnotation(i).isInitialized()) {
memoizedIsInitialized = 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 < annotation_.size(); i++) {
output.writeMessage(1, annotation_.get(i));
}
output.writeRawBytes(unknownFields);
}
private int memoizedSerializedSize = -1;
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < annotation_.size(); i++) {
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeMessageSize(1, annotation_.get(i));
}
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.Annotations 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.Annotations 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.Annotations parseFrom(byte[] data)
throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.jetbrains.kotlin.backend.common.serialization.proto.Annotations 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.Annotations parseFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static org.jetbrains.kotlin.backend.common.serialization.proto.Annotations 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.Annotations parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return PARSER.parseDelimitedFrom(input);
}
public static org.jetbrains.kotlin.backend.common.serialization.proto.Annotations 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.Annotations parseFrom(
org.jetbrains.kotlin.protobuf.CodedInputStream input)
throws java.io.IOException {
return PARSER.parseFrom(input);
}
public static org.jetbrains.kotlin.backend.common.serialization.proto.Annotations 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.Annotations prototype) {
return newBuilder().mergeFrom(prototype);
}
public Builder toBuilder() { return newBuilder(this); }
/**
* Protobuf type {@code org.jetbrains.kotlin.backend.common.serialization.proto.Annotations}
*/
public static final class Builder extends
org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder<
org.jetbrains.kotlin.backend.common.serialization.proto.Annotations, Builder>
implements
// @@protoc_insertion_point(builder_implements:org.jetbrains.kotlin.backend.common.serialization.proto.Annotations)
org.jetbrains.kotlin.backend.common.serialization.proto.AnnotationsOrBuilder {
// Construct using org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
}
private static Builder create() {
return new Builder();
}
public Builder clear() {
super.clear();
annotation_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
public Builder clone() {
return create().mergeFrom(buildPartial());
}
public org.jetbrains.kotlin.backend.common.serialization.proto.Annotations getDefaultInstanceForType() {
return org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.getDefaultInstance();
}
public org.jetbrains.kotlin.backend.common.serialization.proto.Annotations build() {
org.jetbrains.kotlin.backend.common.serialization.proto.Annotations result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.jetbrains.kotlin.backend.common.serialization.proto.Annotations buildPartial() {
org.jetbrains.kotlin.backend.common.serialization.proto.Annotations result = new org.jetbrains.kotlin.backend.common.serialization.proto.Annotations(this);
int from_bitField0_ = bitField0_;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
annotation_ = java.util.Collections.unmodifiableList(annotation_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.annotation_ = annotation_;
return result;
}
public Builder mergeFrom(org.jetbrains.kotlin.backend.common.serialization.proto.Annotations other) {
if (other == org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.getDefaultInstance()) return this;
if (!other.annotation_.isEmpty()) {
if (annotation_.isEmpty()) {
annotation_ = other.annotation_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureAnnotationIsMutable();
annotation_.addAll(other.annotation_);
}
}
setUnknownFields(
getUnknownFields().concat(other.unknownFields));
return this;
}
public final boolean isInitialized() {
for (int i = 0; i < getAnnotationCount(); i++) {
if (!getAnnotation(i).isInitialized()) {
return false;
}
}
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.Annotations parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.jetbrains.kotlin.backend.common.serialization.proto.Annotations) e.getUnfinishedMessage();
throw e;
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall> annotation_ =
java.util.Collections.emptyList();
private void ensureAnnotationIsMutable() {
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
annotation_ = new java.util.ArrayList<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall>(annotation_);
bitField0_ |= 0x00000001;
}
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall> getAnnotationList() {
return java.util.Collections.unmodifiableList(annotation_);
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public int getAnnotationCount() {
return annotation_.size();
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index) {
return annotation_.get(index);
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public Builder setAnnotation(
int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) {
if (value == null) {
throw new NullPointerException();
}
ensureAnnotationIsMutable();
annotation_.set(index, value);
return this;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public Builder setAnnotation(
int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) {
ensureAnnotationIsMutable();
annotation_.set(index, builderForValue.build());
return this;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public Builder addAnnotation(org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) {
if (value == null) {
throw new NullPointerException();
}
ensureAnnotationIsMutable();
annotation_.add(value);
return this;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public Builder addAnnotation(
int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) {
if (value == null) {
throw new NullPointerException();
}
ensureAnnotationIsMutable();
annotation_.add(index, value);
return this;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public Builder addAnnotation(
org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) {
ensureAnnotationIsMutable();
annotation_.add(builderForValue.build());
return this;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public Builder addAnnotation(
int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) {
ensureAnnotationIsMutable();
annotation_.add(index, builderForValue.build());
return this;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public Builder addAllAnnotation(
java.lang.Iterable<? extends org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall> values) {
ensureAnnotationIsMutable();
org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll(
values, annotation_);
return this;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public Builder clearAnnotation() {
annotation_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public Builder removeAnnotation(int index) {
ensureAnnotationIsMutable();
annotation_.remove(index);
return this;
}
// @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.backend.common.serialization.proto.Annotations)
}
static {
defaultInstance = new Annotations(true);
defaultInstance.initFields();
}
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.Annotations)
}
@@ -1,23 +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 AnnotationsOrBuilder extends
// @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.backend.common.serialization.proto.Annotations)
org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder {
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall>
getAnnotationList();
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index);
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
int getAnnotationCount();
}
@@ -85,16 +85,11 @@ public final class IrDeclarationBase extends
break; break;
} }
case 34: { case 34: {
org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.Builder subBuilder = null; if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
if (((bitField0_ & 0x00000008) == 0x00000008)) { annotation_ = new java.util.ArrayList<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall>();
subBuilder = annotations_.toBuilder(); mutable_bitField0_ |= 0x00000008;
} }
annotations_ = input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.PARSER, extensionRegistry); annotation_.add(input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.PARSER, extensionRegistry));
if (subBuilder != null) {
subBuilder.mergeFrom(annotations_);
annotations_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000008;
break; break;
} }
} }
@@ -105,6 +100,9 @@ public final class IrDeclarationBase 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)) {
annotation_ = java.util.Collections.unmodifiableList(annotation_);
}
try { try {
unknownFieldsCodedOutput.flush(); unknownFieldsCodedOutput.flush();
} catch (java.io.IOException e) { } catch (java.io.IOException e) {
@@ -176,26 +174,46 @@ public final class IrDeclarationBase extends
return coordinates_; return coordinates_;
} }
public static final int ANNOTATIONS_FIELD_NUMBER = 4; public static final int ANNOTATION_FIELD_NUMBER = 4;
private org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations_; private java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall> annotation_;
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 4;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4;</code>
*/ */
public boolean hasAnnotations() { public java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall> getAnnotationList() {
return ((bitField0_ & 0x00000008) == 0x00000008); return annotation_;
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 4;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4;</code>
*/ */
public org.jetbrains.kotlin.backend.common.serialization.proto.Annotations getAnnotations() { public java.util.List<? extends org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCallOrBuilder>
return annotations_; getAnnotationOrBuilderList() {
return annotation_;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4;</code>
*/
public int getAnnotationCount() {
return annotation_.size();
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4;</code>
*/
public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index) {
return annotation_.get(index);
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4;</code>
*/
public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCallOrBuilder getAnnotationOrBuilder(
int index) {
return annotation_.get(index);
} }
private void initFields() { private void initFields() {
symbol_ = 0; symbol_ = 0;
origin_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclarationOrigin.getDefaultInstance(); origin_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclarationOrigin.getDefaultInstance();
coordinates_ = org.jetbrains.kotlin.backend.common.serialization.proto.Coordinates.getDefaultInstance(); coordinates_ = org.jetbrains.kotlin.backend.common.serialization.proto.Coordinates.getDefaultInstance();
annotations_ = org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.getDefaultInstance(); annotation_ = java.util.Collections.emptyList();
} }
private byte memoizedIsInitialized = -1; private byte memoizedIsInitialized = -1;
public final boolean isInitialized() { public final boolean isInitialized() {
@@ -215,17 +233,15 @@ public final class IrDeclarationBase extends
memoizedIsInitialized = 0; memoizedIsInitialized = 0;
return false; return false;
} }
if (!hasAnnotations()) {
memoizedIsInitialized = 0;
return false;
}
if (!getCoordinates().isInitialized()) { if (!getCoordinates().isInitialized()) {
memoizedIsInitialized = 0; memoizedIsInitialized = 0;
return false; return false;
} }
if (!getAnnotations().isInitialized()) { for (int i = 0; i < getAnnotationCount(); i++) {
memoizedIsInitialized = 0; if (!getAnnotation(i).isInitialized()) {
return false; memoizedIsInitialized = 0;
return false;
}
} }
memoizedIsInitialized = 1; memoizedIsInitialized = 1;
return true; return true;
@@ -243,8 +259,8 @@ public final class IrDeclarationBase extends
if (((bitField0_ & 0x00000004) == 0x00000004)) { if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeMessage(3, coordinates_); output.writeMessage(3, coordinates_);
} }
if (((bitField0_ & 0x00000008) == 0x00000008)) { for (int i = 0; i < annotation_.size(); i++) {
output.writeMessage(4, annotations_); output.writeMessage(4, annotation_.get(i));
} }
output.writeRawBytes(unknownFields); output.writeRawBytes(unknownFields);
} }
@@ -267,9 +283,9 @@ public final class IrDeclarationBase extends
size += org.jetbrains.kotlin.protobuf.CodedOutputStream size += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeMessageSize(3, coordinates_); .computeMessageSize(3, coordinates_);
} }
if (((bitField0_ & 0x00000008) == 0x00000008)) { for (int i = 0; i < annotation_.size(); i++) {
size += org.jetbrains.kotlin.protobuf.CodedOutputStream size += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeMessageSize(4, annotations_); .computeMessageSize(4, annotation_.get(i));
} }
size += unknownFields.size(); size += unknownFields.size();
memoizedSerializedSize = size; memoizedSerializedSize = size;
@@ -371,7 +387,7 @@ public final class IrDeclarationBase extends
bitField0_ = (bitField0_ & ~0x00000002); bitField0_ = (bitField0_ & ~0x00000002);
coordinates_ = org.jetbrains.kotlin.backend.common.serialization.proto.Coordinates.getDefaultInstance(); coordinates_ = org.jetbrains.kotlin.backend.common.serialization.proto.Coordinates.getDefaultInstance();
bitField0_ = (bitField0_ & ~0x00000004); bitField0_ = (bitField0_ & ~0x00000004);
annotations_ = org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.getDefaultInstance(); annotation_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008); bitField0_ = (bitField0_ & ~0x00000008);
return this; return this;
} }
@@ -408,10 +424,11 @@ public final class IrDeclarationBase extends
to_bitField0_ |= 0x00000004; to_bitField0_ |= 0x00000004;
} }
result.coordinates_ = coordinates_; result.coordinates_ = coordinates_;
if (((from_bitField0_ & 0x00000008) == 0x00000008)) { if (((bitField0_ & 0x00000008) == 0x00000008)) {
to_bitField0_ |= 0x00000008; annotation_ = java.util.Collections.unmodifiableList(annotation_);
bitField0_ = (bitField0_ & ~0x00000008);
} }
result.annotations_ = annotations_; result.annotation_ = annotation_;
result.bitField0_ = to_bitField0_; result.bitField0_ = to_bitField0_;
return result; return result;
} }
@@ -427,8 +444,15 @@ public final class IrDeclarationBase extends
if (other.hasCoordinates()) { if (other.hasCoordinates()) {
mergeCoordinates(other.getCoordinates()); mergeCoordinates(other.getCoordinates());
} }
if (other.hasAnnotations()) { if (!other.annotation_.isEmpty()) {
mergeAnnotations(other.getAnnotations()); if (annotation_.isEmpty()) {
annotation_ = other.annotation_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureAnnotationIsMutable();
annotation_.addAll(other.annotation_);
}
} }
setUnknownFields( setUnknownFields(
getUnknownFields().concat(other.unknownFields)); getUnknownFields().concat(other.unknownFields));
@@ -448,17 +472,15 @@ public final class IrDeclarationBase extends
return false; return false;
} }
if (!hasAnnotations()) {
return false;
}
if (!getCoordinates().isInitialized()) { if (!getCoordinates().isInitialized()) {
return false; return false;
} }
if (!getAnnotations().isInitialized()) { for (int i = 0; i < getAnnotationCount(); i++) {
if (!getAnnotation(i).isInitialized()) {
return false;
return false;
}
} }
return true; return true;
} }
@@ -634,63 +656,128 @@ public final class IrDeclarationBase extends
return this; return this;
} }
private org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations_ = org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.getDefaultInstance(); private java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall> annotation_ =
java.util.Collections.emptyList();
private void ensureAnnotationIsMutable() {
if (!((bitField0_ & 0x00000008) == 0x00000008)) {
annotation_ = new java.util.ArrayList<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall>(annotation_);
bitField0_ |= 0x00000008;
}
}
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 4;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4;</code>
*/ */
public boolean hasAnnotations() { public java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall> getAnnotationList() {
return ((bitField0_ & 0x00000008) == 0x00000008); return java.util.Collections.unmodifiableList(annotation_);
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 4;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4;</code>
*/ */
public org.jetbrains.kotlin.backend.common.serialization.proto.Annotations getAnnotations() { public int getAnnotationCount() {
return annotations_; return annotation_.size();
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 4;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4;</code>
*/ */
public Builder setAnnotations(org.jetbrains.kotlin.backend.common.serialization.proto.Annotations value) { public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index) {
return annotation_.get(index);
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4;</code>
*/
public Builder setAnnotation(
int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) {
if (value == null) { if (value == null) {
throw new NullPointerException(); throw new NullPointerException();
} }
annotations_ = value; ensureAnnotationIsMutable();
annotation_.set(index, value);
bitField0_ |= 0x00000008;
return this; return this;
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 4;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4;</code>
*/ */
public Builder setAnnotations( public Builder setAnnotation(
org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.Builder builderForValue) { int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) {
annotations_ = builderForValue.build(); ensureAnnotationIsMutable();
annotation_.set(index, builderForValue.build());
bitField0_ |= 0x00000008;
return this; return this;
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 4;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4;</code>
*/ */
public Builder mergeAnnotations(org.jetbrains.kotlin.backend.common.serialization.proto.Annotations value) { public Builder addAnnotation(org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) {
if (((bitField0_ & 0x00000008) == 0x00000008) && if (value == null) {
annotations_ != org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.getDefaultInstance()) { throw new NullPointerException();
annotations_ =
org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.newBuilder(annotations_).mergeFrom(value).buildPartial();
} else {
annotations_ = value;
} }
ensureAnnotationIsMutable();
annotation_.add(value);
bitField0_ |= 0x00000008;
return this; return this;
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 4;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4;</code>
*/ */
public Builder clearAnnotations() { public Builder addAnnotation(
annotations_ = org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.getDefaultInstance(); int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) {
if (value == null) {
throw new NullPointerException();
}
ensureAnnotationIsMutable();
annotation_.add(index, value);
return this;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4;</code>
*/
public Builder addAnnotation(
org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) {
ensureAnnotationIsMutable();
annotation_.add(builderForValue.build());
return this;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4;</code>
*/
public Builder addAnnotation(
int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) {
ensureAnnotationIsMutable();
annotation_.add(index, builderForValue.build());
return this;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4;</code>
*/
public Builder addAllAnnotation(
java.lang.Iterable<? extends org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall> values) {
ensureAnnotationIsMutable();
org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll(
values, annotation_);
return this;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4;</code>
*/
public Builder clearAnnotation() {
annotation_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008); bitField0_ = (bitField0_ & ~0x00000008);
return this;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4;</code>
*/
public Builder removeAnnotation(int index) {
ensureAnnotationIsMutable();
annotation_.remove(index);
return this; return this;
} }
@@ -35,11 +35,16 @@ public interface IrDeclarationBaseOrBuilder extends
org.jetbrains.kotlin.backend.common.serialization.proto.Coordinates getCoordinates(); org.jetbrains.kotlin.backend.common.serialization.proto.Coordinates getCoordinates();
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 4;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4;</code>
*/ */
boolean hasAnnotations(); java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall>
getAnnotationList();
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 4;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4;</code>
*/ */
org.jetbrains.kotlin.backend.common.serialization.proto.Annotations getAnnotations(); org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index);
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4;</code>
*/
int getAnnotationCount();
} }
@@ -54,16 +54,11 @@ public final class IrDynamicType extends
break; break;
} }
case 10: { case 10: {
org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.Builder subBuilder = null; if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
if (((bitField0_ & 0x00000001) == 0x00000001)) { annotation_ = new java.util.ArrayList<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall>();
subBuilder = annotations_.toBuilder(); mutable_bitField0_ |= 0x00000001;
} }
annotations_ = input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.PARSER, extensionRegistry); annotation_.add(input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.PARSER, extensionRegistry));
if (subBuilder != null) {
subBuilder.mergeFrom(annotations_);
annotations_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000001;
break; break;
} }
} }
@@ -74,6 +69,9 @@ public final class IrDynamicType 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)) {
annotation_ = java.util.Collections.unmodifiableList(annotation_);
}
try { try {
unknownFieldsCodedOutput.flush(); unknownFieldsCodedOutput.flush();
} catch (java.io.IOException e) { } catch (java.io.IOException e) {
@@ -99,24 +97,43 @@ public final class IrDynamicType extends
return PARSER; return PARSER;
} }
private int bitField0_; public static final int ANNOTATION_FIELD_NUMBER = 1;
public static final int ANNOTATIONS_FIELD_NUMBER = 1; private java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall> annotation_;
private org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations_;
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 1;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/ */
public boolean hasAnnotations() { public java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall> getAnnotationList() {
return ((bitField0_ & 0x00000001) == 0x00000001); return annotation_;
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 1;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/ */
public org.jetbrains.kotlin.backend.common.serialization.proto.Annotations getAnnotations() { public java.util.List<? extends org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCallOrBuilder>
return annotations_; getAnnotationOrBuilderList() {
return annotation_;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public int getAnnotationCount() {
return annotation_.size();
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index) {
return annotation_.get(index);
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCallOrBuilder getAnnotationOrBuilder(
int index) {
return annotation_.get(index);
} }
private void initFields() { private void initFields() {
annotations_ = org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.getDefaultInstance(); annotation_ = java.util.Collections.emptyList();
} }
private byte memoizedIsInitialized = -1; private byte memoizedIsInitialized = -1;
public final boolean isInitialized() { public final boolean isInitialized() {
@@ -124,13 +141,11 @@ public final class IrDynamicType extends
if (isInitialized == 1) return true; if (isInitialized == 1) return true;
if (isInitialized == 0) return false; if (isInitialized == 0) return false;
if (!hasAnnotations()) { for (int i = 0; i < getAnnotationCount(); i++) {
memoizedIsInitialized = 0; if (!getAnnotation(i).isInitialized()) {
return false; memoizedIsInitialized = 0;
} return false;
if (!getAnnotations().isInitialized()) { }
memoizedIsInitialized = 0;
return false;
} }
memoizedIsInitialized = 1; memoizedIsInitialized = 1;
return true; return true;
@@ -139,8 +154,8 @@ public final class IrDynamicType 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();
if (((bitField0_ & 0x00000001) == 0x00000001)) { for (int i = 0; i < annotation_.size(); i++) {
output.writeMessage(1, annotations_); output.writeMessage(1, annotation_.get(i));
} }
output.writeRawBytes(unknownFields); output.writeRawBytes(unknownFields);
} }
@@ -151,9 +166,9 @@ public final class IrDynamicType extends
if (size != -1) return size; if (size != -1) return size;
size = 0; size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) { for (int i = 0; i < annotation_.size(); i++) {
size += org.jetbrains.kotlin.protobuf.CodedOutputStream size += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeMessageSize(1, annotations_); .computeMessageSize(1, annotation_.get(i));
} }
size += unknownFields.size(); size += unknownFields.size();
memoizedSerializedSize = size; memoizedSerializedSize = size;
@@ -249,7 +264,7 @@ public final class IrDynamicType extends
public Builder clear() { public Builder clear() {
super.clear(); super.clear();
annotations_ = org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.getDefaultInstance(); annotation_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001); bitField0_ = (bitField0_ & ~0x00000001);
return this; return this;
} }
@@ -273,19 +288,25 @@ public final class IrDynamicType extends
public org.jetbrains.kotlin.backend.common.serialization.proto.IrDynamicType buildPartial() { public org.jetbrains.kotlin.backend.common.serialization.proto.IrDynamicType buildPartial() {
org.jetbrains.kotlin.backend.common.serialization.proto.IrDynamicType result = new org.jetbrains.kotlin.backend.common.serialization.proto.IrDynamicType(this); org.jetbrains.kotlin.backend.common.serialization.proto.IrDynamicType result = new org.jetbrains.kotlin.backend.common.serialization.proto.IrDynamicType(this);
int from_bitField0_ = bitField0_; int from_bitField0_ = bitField0_;
int to_bitField0_ = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) {
if (((from_bitField0_ & 0x00000001) == 0x00000001)) { annotation_ = java.util.Collections.unmodifiableList(annotation_);
to_bitField0_ |= 0x00000001; bitField0_ = (bitField0_ & ~0x00000001);
} }
result.annotations_ = annotations_; result.annotation_ = annotation_;
result.bitField0_ = to_bitField0_;
return result; return result;
} }
public Builder mergeFrom(org.jetbrains.kotlin.backend.common.serialization.proto.IrDynamicType other) { public Builder mergeFrom(org.jetbrains.kotlin.backend.common.serialization.proto.IrDynamicType other) {
if (other == org.jetbrains.kotlin.backend.common.serialization.proto.IrDynamicType.getDefaultInstance()) return this; if (other == org.jetbrains.kotlin.backend.common.serialization.proto.IrDynamicType.getDefaultInstance()) return this;
if (other.hasAnnotations()) { if (!other.annotation_.isEmpty()) {
mergeAnnotations(other.getAnnotations()); if (annotation_.isEmpty()) {
annotation_ = other.annotation_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureAnnotationIsMutable();
annotation_.addAll(other.annotation_);
}
} }
setUnknownFields( setUnknownFields(
getUnknownFields().concat(other.unknownFields)); getUnknownFields().concat(other.unknownFields));
@@ -293,13 +314,11 @@ public final class IrDynamicType extends
} }
public final boolean isInitialized() { public final boolean isInitialized() {
if (!hasAnnotations()) { for (int i = 0; i < getAnnotationCount(); i++) {
if (!getAnnotation(i).isInitialized()) {
return false;
} return false;
if (!getAnnotations().isInitialized()) { }
return false;
} }
return true; return true;
} }
@@ -323,63 +342,128 @@ public final class IrDynamicType extends
} }
private int bitField0_; private int bitField0_;
private org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations_ = org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.getDefaultInstance(); private java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall> annotation_ =
java.util.Collections.emptyList();
private void ensureAnnotationIsMutable() {
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
annotation_ = new java.util.ArrayList<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall>(annotation_);
bitField0_ |= 0x00000001;
}
}
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 1;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/ */
public boolean hasAnnotations() { public java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall> getAnnotationList() {
return ((bitField0_ & 0x00000001) == 0x00000001); return java.util.Collections.unmodifiableList(annotation_);
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 1;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/ */
public org.jetbrains.kotlin.backend.common.serialization.proto.Annotations getAnnotations() { public int getAnnotationCount() {
return annotations_; return annotation_.size();
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 1;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/ */
public Builder setAnnotations(org.jetbrains.kotlin.backend.common.serialization.proto.Annotations value) { public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index) {
return annotation_.get(index);
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public Builder setAnnotation(
int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) {
if (value == null) { if (value == null) {
throw new NullPointerException(); throw new NullPointerException();
} }
annotations_ = value; ensureAnnotationIsMutable();
annotation_.set(index, value);
bitField0_ |= 0x00000001;
return this; return this;
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 1;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/ */
public Builder setAnnotations( public Builder setAnnotation(
org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.Builder builderForValue) { int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) {
annotations_ = builderForValue.build(); ensureAnnotationIsMutable();
annotation_.set(index, builderForValue.build());
bitField0_ |= 0x00000001;
return this; return this;
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 1;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/ */
public Builder mergeAnnotations(org.jetbrains.kotlin.backend.common.serialization.proto.Annotations value) { public Builder addAnnotation(org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) {
if (((bitField0_ & 0x00000001) == 0x00000001) && if (value == null) {
annotations_ != org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.getDefaultInstance()) { throw new NullPointerException();
annotations_ =
org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.newBuilder(annotations_).mergeFrom(value).buildPartial();
} else {
annotations_ = value;
} }
ensureAnnotationIsMutable();
annotation_.add(value);
bitField0_ |= 0x00000001;
return this; return this;
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 1;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/ */
public Builder clearAnnotations() { public Builder addAnnotation(
annotations_ = org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.getDefaultInstance(); int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) {
if (value == null) {
throw new NullPointerException();
}
ensureAnnotationIsMutable();
annotation_.add(index, value);
return this;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public Builder addAnnotation(
org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) {
ensureAnnotationIsMutable();
annotation_.add(builderForValue.build());
return this;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public Builder addAnnotation(
int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) {
ensureAnnotationIsMutable();
annotation_.add(index, builderForValue.build());
return this;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public Builder addAllAnnotation(
java.lang.Iterable<? extends org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall> values) {
ensureAnnotationIsMutable();
org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll(
values, annotation_);
return this;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public Builder clearAnnotation() {
annotation_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001); bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public Builder removeAnnotation(int index) {
ensureAnnotationIsMutable();
annotation_.remove(index);
return this; return this;
} }
@@ -8,11 +8,16 @@ public interface IrDynamicTypeOrBuilder extends
org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder { org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder {
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 1;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/ */
boolean hasAnnotations(); java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall>
getAnnotationList();
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 1;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/ */
org.jetbrains.kotlin.backend.common.serialization.proto.Annotations getAnnotations(); org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index);
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
int getAnnotationCount();
} }
@@ -54,16 +54,11 @@ public final class IrErrorType extends
break; break;
} }
case 10: { case 10: {
org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.Builder subBuilder = null; if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
if (((bitField0_ & 0x00000001) == 0x00000001)) { annotation_ = new java.util.ArrayList<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall>();
subBuilder = annotations_.toBuilder(); mutable_bitField0_ |= 0x00000001;
} }
annotations_ = input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.PARSER, extensionRegistry); annotation_.add(input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.PARSER, extensionRegistry));
if (subBuilder != null) {
subBuilder.mergeFrom(annotations_);
annotations_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000001;
break; break;
} }
} }
@@ -74,6 +69,9 @@ public final class IrErrorType 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)) {
annotation_ = java.util.Collections.unmodifiableList(annotation_);
}
try { try {
unknownFieldsCodedOutput.flush(); unknownFieldsCodedOutput.flush();
} catch (java.io.IOException e) { } catch (java.io.IOException e) {
@@ -99,24 +97,43 @@ public final class IrErrorType extends
return PARSER; return PARSER;
} }
private int bitField0_; public static final int ANNOTATION_FIELD_NUMBER = 1;
public static final int ANNOTATIONS_FIELD_NUMBER = 1; private java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall> annotation_;
private org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations_;
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 1;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/ */
public boolean hasAnnotations() { public java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall> getAnnotationList() {
return ((bitField0_ & 0x00000001) == 0x00000001); return annotation_;
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 1;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/ */
public org.jetbrains.kotlin.backend.common.serialization.proto.Annotations getAnnotations() { public java.util.List<? extends org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCallOrBuilder>
return annotations_; getAnnotationOrBuilderList() {
return annotation_;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public int getAnnotationCount() {
return annotation_.size();
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index) {
return annotation_.get(index);
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCallOrBuilder getAnnotationOrBuilder(
int index) {
return annotation_.get(index);
} }
private void initFields() { private void initFields() {
annotations_ = org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.getDefaultInstance(); annotation_ = java.util.Collections.emptyList();
} }
private byte memoizedIsInitialized = -1; private byte memoizedIsInitialized = -1;
public final boolean isInitialized() { public final boolean isInitialized() {
@@ -124,13 +141,11 @@ public final class IrErrorType extends
if (isInitialized == 1) return true; if (isInitialized == 1) return true;
if (isInitialized == 0) return false; if (isInitialized == 0) return false;
if (!hasAnnotations()) { for (int i = 0; i < getAnnotationCount(); i++) {
memoizedIsInitialized = 0; if (!getAnnotation(i).isInitialized()) {
return false; memoizedIsInitialized = 0;
} return false;
if (!getAnnotations().isInitialized()) { }
memoizedIsInitialized = 0;
return false;
} }
memoizedIsInitialized = 1; memoizedIsInitialized = 1;
return true; return true;
@@ -139,8 +154,8 @@ public final class IrErrorType 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();
if (((bitField0_ & 0x00000001) == 0x00000001)) { for (int i = 0; i < annotation_.size(); i++) {
output.writeMessage(1, annotations_); output.writeMessage(1, annotation_.get(i));
} }
output.writeRawBytes(unknownFields); output.writeRawBytes(unknownFields);
} }
@@ -151,9 +166,9 @@ public final class IrErrorType extends
if (size != -1) return size; if (size != -1) return size;
size = 0; size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) { for (int i = 0; i < annotation_.size(); i++) {
size += org.jetbrains.kotlin.protobuf.CodedOutputStream size += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeMessageSize(1, annotations_); .computeMessageSize(1, annotation_.get(i));
} }
size += unknownFields.size(); size += unknownFields.size();
memoizedSerializedSize = size; memoizedSerializedSize = size;
@@ -249,7 +264,7 @@ public final class IrErrorType extends
public Builder clear() { public Builder clear() {
super.clear(); super.clear();
annotations_ = org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.getDefaultInstance(); annotation_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001); bitField0_ = (bitField0_ & ~0x00000001);
return this; return this;
} }
@@ -273,19 +288,25 @@ public final class IrErrorType extends
public org.jetbrains.kotlin.backend.common.serialization.proto.IrErrorType buildPartial() { public org.jetbrains.kotlin.backend.common.serialization.proto.IrErrorType buildPartial() {
org.jetbrains.kotlin.backend.common.serialization.proto.IrErrorType result = new org.jetbrains.kotlin.backend.common.serialization.proto.IrErrorType(this); org.jetbrains.kotlin.backend.common.serialization.proto.IrErrorType result = new org.jetbrains.kotlin.backend.common.serialization.proto.IrErrorType(this);
int from_bitField0_ = bitField0_; int from_bitField0_ = bitField0_;
int to_bitField0_ = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) {
if (((from_bitField0_ & 0x00000001) == 0x00000001)) { annotation_ = java.util.Collections.unmodifiableList(annotation_);
to_bitField0_ |= 0x00000001; bitField0_ = (bitField0_ & ~0x00000001);
} }
result.annotations_ = annotations_; result.annotation_ = annotation_;
result.bitField0_ = to_bitField0_;
return result; return result;
} }
public Builder mergeFrom(org.jetbrains.kotlin.backend.common.serialization.proto.IrErrorType other) { public Builder mergeFrom(org.jetbrains.kotlin.backend.common.serialization.proto.IrErrorType other) {
if (other == org.jetbrains.kotlin.backend.common.serialization.proto.IrErrorType.getDefaultInstance()) return this; if (other == org.jetbrains.kotlin.backend.common.serialization.proto.IrErrorType.getDefaultInstance()) return this;
if (other.hasAnnotations()) { if (!other.annotation_.isEmpty()) {
mergeAnnotations(other.getAnnotations()); if (annotation_.isEmpty()) {
annotation_ = other.annotation_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureAnnotationIsMutable();
annotation_.addAll(other.annotation_);
}
} }
setUnknownFields( setUnknownFields(
getUnknownFields().concat(other.unknownFields)); getUnknownFields().concat(other.unknownFields));
@@ -293,13 +314,11 @@ public final class IrErrorType extends
} }
public final boolean isInitialized() { public final boolean isInitialized() {
if (!hasAnnotations()) { for (int i = 0; i < getAnnotationCount(); i++) {
if (!getAnnotation(i).isInitialized()) {
return false;
} return false;
if (!getAnnotations().isInitialized()) { }
return false;
} }
return true; return true;
} }
@@ -323,63 +342,128 @@ public final class IrErrorType extends
} }
private int bitField0_; private int bitField0_;
private org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations_ = org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.getDefaultInstance(); private java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall> annotation_ =
java.util.Collections.emptyList();
private void ensureAnnotationIsMutable() {
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
annotation_ = new java.util.ArrayList<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall>(annotation_);
bitField0_ |= 0x00000001;
}
}
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 1;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/ */
public boolean hasAnnotations() { public java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall> getAnnotationList() {
return ((bitField0_ & 0x00000001) == 0x00000001); return java.util.Collections.unmodifiableList(annotation_);
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 1;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/ */
public org.jetbrains.kotlin.backend.common.serialization.proto.Annotations getAnnotations() { public int getAnnotationCount() {
return annotations_; return annotation_.size();
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 1;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/ */
public Builder setAnnotations(org.jetbrains.kotlin.backend.common.serialization.proto.Annotations value) { public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index) {
return annotation_.get(index);
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public Builder setAnnotation(
int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) {
if (value == null) { if (value == null) {
throw new NullPointerException(); throw new NullPointerException();
} }
annotations_ = value; ensureAnnotationIsMutable();
annotation_.set(index, value);
bitField0_ |= 0x00000001;
return this; return this;
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 1;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/ */
public Builder setAnnotations( public Builder setAnnotation(
org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.Builder builderForValue) { int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) {
annotations_ = builderForValue.build(); ensureAnnotationIsMutable();
annotation_.set(index, builderForValue.build());
bitField0_ |= 0x00000001;
return this; return this;
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 1;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/ */
public Builder mergeAnnotations(org.jetbrains.kotlin.backend.common.serialization.proto.Annotations value) { public Builder addAnnotation(org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) {
if (((bitField0_ & 0x00000001) == 0x00000001) && if (value == null) {
annotations_ != org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.getDefaultInstance()) { throw new NullPointerException();
annotations_ =
org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.newBuilder(annotations_).mergeFrom(value).buildPartial();
} else {
annotations_ = value;
} }
ensureAnnotationIsMutable();
annotation_.add(value);
bitField0_ |= 0x00000001;
return this; return this;
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 1;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/ */
public Builder clearAnnotations() { public Builder addAnnotation(
annotations_ = org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.getDefaultInstance(); int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) {
if (value == null) {
throw new NullPointerException();
}
ensureAnnotationIsMutable();
annotation_.add(index, value);
return this;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public Builder addAnnotation(
org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) {
ensureAnnotationIsMutable();
annotation_.add(builderForValue.build());
return this;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public Builder addAnnotation(
int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) {
ensureAnnotationIsMutable();
annotation_.add(index, builderForValue.build());
return this;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public Builder addAllAnnotation(
java.lang.Iterable<? extends org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall> values) {
ensureAnnotationIsMutable();
org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll(
values, annotation_);
return this;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public Builder clearAnnotation() {
annotation_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001); bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public Builder removeAnnotation(int index) {
ensureAnnotationIsMutable();
annotation_.remove(index);
return this; return this;
} }
@@ -8,11 +8,16 @@ public interface IrErrorTypeOrBuilder extends
org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder { org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder {
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 1;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/ */
boolean hasAnnotations(); java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall>
getAnnotationList();
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 1;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/ */
org.jetbrains.kotlin.backend.common.serialization.proto.Annotations getAnnotations(); org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index);
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
int getAnnotationCount();
} }
@@ -53,12 +53,25 @@ public final class IrFile extends
} }
break; break;
} }
case 10: { case 8: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
declarationId_ = new java.util.ArrayList<org.jetbrains.kotlin.backend.common.serialization.proto.UniqId>(); declarationId_ = new java.util.ArrayList<java.lang.Long>();
mutable_bitField0_ |= 0x00000001; mutable_bitField0_ |= 0x00000001;
} }
declarationId_.add(input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.UniqId.PARSER, extensionRegistry)); declarationId_.add(input.readInt64());
break;
}
case 10: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001) && input.getBytesUntilLimit() > 0) {
declarationId_ = new java.util.ArrayList<java.lang.Long>();
mutable_bitField0_ |= 0x00000001;
}
while (input.getBytesUntilLimit() > 0) {
declarationId_.add(input.readInt64());
}
input.popLimit(limit);
break; break;
} }
case 18: { case 18: {
@@ -96,16 +109,11 @@ public final class IrFile extends
break; break;
} }
case 34: { case 34: {
org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.Builder subBuilder = null; if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
if (((bitField0_ & 0x00000002) == 0x00000002)) { annotation_ = new java.util.ArrayList<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall>();
subBuilder = annotations_.toBuilder(); mutable_bitField0_ |= 0x00000008;
} }
annotations_ = input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.PARSER, extensionRegistry); annotation_.add(input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.PARSER, extensionRegistry));
if (subBuilder != null) {
subBuilder.mergeFrom(annotations_);
annotations_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000002;
break; break;
} }
case 40: { case 40: {
@@ -143,6 +151,9 @@ public final class IrFile extends
if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
fqName_ = java.util.Collections.unmodifiableList(fqName_); fqName_ = java.util.Collections.unmodifiableList(fqName_);
} }
if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
annotation_ = java.util.Collections.unmodifiableList(annotation_);
}
if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
explicitlyExportedToCompiler_ = java.util.Collections.unmodifiableList(explicitlyExportedToCompiler_); explicitlyExportedToCompiler_ = java.util.Collections.unmodifiableList(explicitlyExportedToCompiler_);
} }
@@ -244,27 +255,39 @@ public final class IrFile extends
return fqName_.get(index); return fqName_.get(index);
} }
public static final int ANNOTATIONS_FIELD_NUMBER = 4; public static final int ANNOTATION_FIELD_NUMBER = 4;
private org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations_; private java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall> annotation_;
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 4;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4;</code>
*
* <pre>
* required FqName fq_name = 3;
* </pre>
*/ */
public boolean hasAnnotations() { public java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall> getAnnotationList() {
return ((bitField0_ & 0x00000002) == 0x00000002); return annotation_;
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 4;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4;</code>
*
* <pre>
* required FqName fq_name = 3;
* </pre>
*/ */
public org.jetbrains.kotlin.backend.common.serialization.proto.Annotations getAnnotations() { public java.util.List<? extends org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCallOrBuilder>
return annotations_; getAnnotationOrBuilderList() {
return annotation_;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4;</code>
*/
public int getAnnotationCount() {
return annotation_.size();
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4;</code>
*/
public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index) {
return annotation_.get(index);
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4;</code>
*/
public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCallOrBuilder getAnnotationOrBuilder(
int index) {
return annotation_.get(index);
} }
public static final int EXPLICITLY_EXPORTED_TO_COMPILER_FIELD_NUMBER = 5; public static final int EXPLICITLY_EXPORTED_TO_COMPILER_FIELD_NUMBER = 5;
@@ -293,7 +316,7 @@ public final class IrFile extends
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_ = java.util.Collections.emptyList(); fqName_ = java.util.Collections.emptyList();
annotations_ = org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.getDefaultInstance(); annotation_ = java.util.Collections.emptyList();
explicitlyExportedToCompiler_ = java.util.Collections.emptyList(); explicitlyExportedToCompiler_ = java.util.Collections.emptyList();
} }
private byte memoizedIsInitialized = -1; private byte memoizedIsInitialized = -1;
@@ -306,23 +329,15 @@ public final class IrFile extends
memoizedIsInitialized = 0; memoizedIsInitialized = 0;
return false; return false;
} }
if (!hasAnnotations()) {
memoizedIsInitialized = 0;
return false;
}
for (int i = 0; i < getDeclarationIdCount(); i++) {
if (!getDeclarationId(i).isInitialized()) {
memoizedIsInitialized = 0;
return false;
}
}
if (!getFileEntry().isInitialized()) { if (!getFileEntry().isInitialized()) {
memoizedIsInitialized = 0; memoizedIsInitialized = 0;
return false; return false;
} }
if (!getAnnotations().isInitialized()) { for (int i = 0; i < getAnnotationCount(); i++) {
memoizedIsInitialized = 0; if (!getAnnotation(i).isInitialized()) {
return false; memoizedIsInitialized = 0;
return false;
}
} }
memoizedIsInitialized = 1; memoizedIsInitialized = 1;
return true; return true;
@@ -332,7 +347,7 @@ public final class IrFile extends
throws java.io.IOException { throws java.io.IOException {
getSerializedSize(); getSerializedSize();
for (int i = 0; i < declarationId_.size(); i++) { for (int i = 0; i < declarationId_.size(); i++) {
output.writeMessage(1, declarationId_.get(i)); output.writeInt64(1, declarationId_.get(i));
} }
if (((bitField0_ & 0x00000001) == 0x00000001)) { if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeMessage(2, fileEntry_); output.writeMessage(2, fileEntry_);
@@ -340,8 +355,8 @@ public final class IrFile extends
for (int i = 0; i < fqName_.size(); i++) { for (int i = 0; i < fqName_.size(); i++) {
output.writeInt32(3, fqName_.get(i)); output.writeInt32(3, fqName_.get(i));
} }
if (((bitField0_ & 0x00000002) == 0x00000002)) { for (int i = 0; i < annotation_.size(); i++) {
output.writeMessage(4, annotations_); output.writeMessage(4, annotation_.get(i));
} }
for (int i = 0; i < explicitlyExportedToCompiler_.size(); i++) { for (int i = 0; i < explicitlyExportedToCompiler_.size(); i++) {
output.writeInt32(5, explicitlyExportedToCompiler_.get(i)); output.writeInt32(5, explicitlyExportedToCompiler_.get(i));
@@ -355,9 +370,14 @@ public final class IrFile extends
if (size != -1) return size; if (size != -1) return size;
size = 0; size = 0;
for (int i = 0; i < declarationId_.size(); i++) { {
size += org.jetbrains.kotlin.protobuf.CodedOutputStream int dataSize = 0;
.computeMessageSize(1, declarationId_.get(i)); for (int i = 0; i < declarationId_.size(); i++) {
dataSize += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeInt64SizeNoTag(declarationId_.get(i));
}
size += dataSize;
size += 1 * getDeclarationIdList().size();
} }
if (((bitField0_ & 0x00000001) == 0x00000001)) { if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += org.jetbrains.kotlin.protobuf.CodedOutputStream size += org.jetbrains.kotlin.protobuf.CodedOutputStream
@@ -372,9 +392,9 @@ public final class IrFile extends
size += dataSize; size += dataSize;
size += 1 * getFqNameList().size(); size += 1 * getFqNameList().size();
} }
if (((bitField0_ & 0x00000002) == 0x00000002)) { for (int i = 0; i < annotation_.size(); i++) {
size += org.jetbrains.kotlin.protobuf.CodedOutputStream size += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeMessageSize(4, annotations_); .computeMessageSize(4, annotation_.get(i));
} }
{ {
int dataSize = 0; int dataSize = 0;
@@ -485,7 +505,7 @@ public final class IrFile extends
bitField0_ = (bitField0_ & ~0x00000002); bitField0_ = (bitField0_ & ~0x00000002);
fqName_ = java.util.Collections.emptyList(); fqName_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004); bitField0_ = (bitField0_ & ~0x00000004);
annotations_ = org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.getDefaultInstance(); annotation_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008); bitField0_ = (bitField0_ & ~0x00000008);
explicitlyExportedToCompiler_ = java.util.Collections.emptyList(); explicitlyExportedToCompiler_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000010); bitField0_ = (bitField0_ & ~0x00000010);
@@ -526,10 +546,11 @@ public final class IrFile extends
bitField0_ = (bitField0_ & ~0x00000004); bitField0_ = (bitField0_ & ~0x00000004);
} }
result.fqName_ = fqName_; result.fqName_ = fqName_;
if (((from_bitField0_ & 0x00000008) == 0x00000008)) { if (((bitField0_ & 0x00000008) == 0x00000008)) {
to_bitField0_ |= 0x00000002; annotation_ = java.util.Collections.unmodifiableList(annotation_);
bitField0_ = (bitField0_ & ~0x00000008);
} }
result.annotations_ = annotations_; result.annotation_ = annotation_;
if (((bitField0_ & 0x00000010) == 0x00000010)) { if (((bitField0_ & 0x00000010) == 0x00000010)) {
explicitlyExportedToCompiler_ = java.util.Collections.unmodifiableList(explicitlyExportedToCompiler_); explicitlyExportedToCompiler_ = java.util.Collections.unmodifiableList(explicitlyExportedToCompiler_);
bitField0_ = (bitField0_ & ~0x00000010); bitField0_ = (bitField0_ & ~0x00000010);
@@ -564,8 +585,15 @@ public final class IrFile extends
} }
} }
if (other.hasAnnotations()) { if (!other.annotation_.isEmpty()) {
mergeAnnotations(other.getAnnotations()); if (annotation_.isEmpty()) {
annotation_ = other.annotation_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureAnnotationIsMutable();
annotation_.addAll(other.annotation_);
}
} }
if (!other.explicitlyExportedToCompiler_.isEmpty()) { if (!other.explicitlyExportedToCompiler_.isEmpty()) {
if (explicitlyExportedToCompiler_.isEmpty()) { if (explicitlyExportedToCompiler_.isEmpty()) {
@@ -587,23 +615,15 @@ public final class IrFile extends
return false; return false;
} }
if (!hasAnnotations()) {
return false;
}
for (int i = 0; i < getDeclarationIdCount(); i++) {
if (!getDeclarationId(i).isInitialized()) {
return false;
}
}
if (!getFileEntry().isInitialized()) { if (!getFileEntry().isInitialized()) {
return false; return false;
} }
if (!getAnnotations().isInitialized()) { for (int i = 0; i < getAnnotationCount(); i++) {
if (!getAnnotation(i).isInitialized()) {
return false;
return false;
}
} }
return true; return true;
} }
@@ -878,87 +898,128 @@ public final class IrFile extends
return this; return this;
} }
private org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations_ = org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.getDefaultInstance(); private java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall> annotation_ =
java.util.Collections.emptyList();
private void ensureAnnotationIsMutable() {
if (!((bitField0_ & 0x00000008) == 0x00000008)) {
annotation_ = new java.util.ArrayList<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall>(annotation_);
bitField0_ |= 0x00000008;
}
}
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 4;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4;</code>
*
* <pre>
* required FqName fq_name = 3;
* </pre>
*/ */
public boolean hasAnnotations() { public java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall> getAnnotationList() {
return ((bitField0_ & 0x00000008) == 0x00000008); return java.util.Collections.unmodifiableList(annotation_);
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 4;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4;</code>
*
* <pre>
* required FqName fq_name = 3;
* </pre>
*/ */
public org.jetbrains.kotlin.backend.common.serialization.proto.Annotations getAnnotations() { public int getAnnotationCount() {
return annotations_; return annotation_.size();
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 4;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4;</code>
*
* <pre>
* required FqName fq_name = 3;
* </pre>
*/ */
public Builder setAnnotations(org.jetbrains.kotlin.backend.common.serialization.proto.Annotations value) { public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index) {
return annotation_.get(index);
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4;</code>
*/
public Builder setAnnotation(
int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) {
if (value == null) { if (value == null) {
throw new NullPointerException(); throw new NullPointerException();
} }
annotations_ = value; ensureAnnotationIsMutable();
annotation_.set(index, value);
bitField0_ |= 0x00000008;
return this; return this;
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 4;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4;</code>
*
* <pre>
* required FqName fq_name = 3;
* </pre>
*/ */
public Builder setAnnotations( public Builder setAnnotation(
org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.Builder builderForValue) { int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) {
annotations_ = builderForValue.build(); ensureAnnotationIsMutable();
annotation_.set(index, builderForValue.build());
bitField0_ |= 0x00000008;
return this; return this;
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 4;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4;</code>
*
* <pre>
* required FqName fq_name = 3;
* </pre>
*/ */
public Builder mergeAnnotations(org.jetbrains.kotlin.backend.common.serialization.proto.Annotations value) { public Builder addAnnotation(org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) {
if (((bitField0_ & 0x00000008) == 0x00000008) && if (value == null) {
annotations_ != org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.getDefaultInstance()) { throw new NullPointerException();
annotations_ =
org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.newBuilder(annotations_).mergeFrom(value).buildPartial();
} else {
annotations_ = value;
} }
ensureAnnotationIsMutable();
annotation_.add(value);
bitField0_ |= 0x00000008;
return this; return this;
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 4;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4;</code>
*
* <pre>
* required FqName fq_name = 3;
* </pre>
*/ */
public Builder clearAnnotations() { public Builder addAnnotation(
annotations_ = org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.getDefaultInstance(); int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) {
if (value == null) {
throw new NullPointerException();
}
ensureAnnotationIsMutable();
annotation_.add(index, value);
return this;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4;</code>
*/
public Builder addAnnotation(
org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) {
ensureAnnotationIsMutable();
annotation_.add(builderForValue.build());
return this;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4;</code>
*/
public Builder addAnnotation(
int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) {
ensureAnnotationIsMutable();
annotation_.add(index, builderForValue.build());
return this;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4;</code>
*/
public Builder addAllAnnotation(
java.lang.Iterable<? extends org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall> values) {
ensureAnnotationIsMutable();
org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll(
values, annotation_);
return this;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4;</code>
*/
public Builder clearAnnotation() {
annotation_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008); bitField0_ = (bitField0_ & ~0x00000008);
return this;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4;</code>
*/
public Builder removeAnnotation(int index) {
ensureAnnotationIsMutable();
annotation_.remove(index);
return this; return this;
} }
@@ -44,21 +44,18 @@ public interface IrFileOrBuilder extends
int getFqName(int index); int getFqName(int index);
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 4;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4;</code>
*
* <pre>
* required FqName fq_name = 3;
* </pre>
*/ */
boolean hasAnnotations(); java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall>
getAnnotationList();
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 4;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 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.IrConstructorCall getAnnotation(int index);
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4;</code>
*/
int getAnnotationCount();
/** /**
* <code>repeated int32 explicitly_exported_to_compiler = 5;</code> * <code>repeated int32 explicitly_exported_to_compiler = 5;</code>
@@ -54,25 +54,20 @@ public final class IrSimpleType extends
break; break;
} }
case 10: { case 10: {
org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.Builder subBuilder = null; if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
if (((bitField0_ & 0x00000001) == 0x00000001)) { annotation_ = new java.util.ArrayList<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall>();
subBuilder = annotations_.toBuilder(); mutable_bitField0_ |= 0x00000001;
} }
annotations_ = input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.PARSER, extensionRegistry); annotation_.add(input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.PARSER, extensionRegistry));
if (subBuilder != null) {
subBuilder.mergeFrom(annotations_);
annotations_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000001;
break; break;
} }
case 16: { case 16: {
bitField0_ |= 0x00000002; bitField0_ |= 0x00000001;
classifier_ = input.readInt32(); classifier_ = input.readInt32();
break; break;
} }
case 24: { case 24: {
bitField0_ |= 0x00000004; bitField0_ |= 0x00000002;
hasQuestionMark_ = input.readBool(); hasQuestionMark_ = input.readBool();
break; break;
} }
@@ -86,7 +81,7 @@ public final class IrSimpleType extends
} }
case 42: { case 42: {
org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation.Builder subBuilder = null; org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation.Builder subBuilder = null;
if (((bitField0_ & 0x00000008) == 0x00000008)) { if (((bitField0_ & 0x00000004) == 0x00000004)) {
subBuilder = abbreviation_.toBuilder(); subBuilder = abbreviation_.toBuilder();
} }
abbreviation_ = input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation.PARSER, extensionRegistry); abbreviation_ = input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation.PARSER, extensionRegistry);
@@ -94,7 +89,7 @@ public final class IrSimpleType extends
subBuilder.mergeFrom(abbreviation_); subBuilder.mergeFrom(abbreviation_);
abbreviation_ = subBuilder.buildPartial(); abbreviation_ = subBuilder.buildPartial();
} }
bitField0_ |= 0x00000008; bitField0_ |= 0x00000004;
break; break;
} }
} }
@@ -105,6 +100,9 @@ public final class IrSimpleType 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)) {
annotation_ = java.util.Collections.unmodifiableList(annotation_);
}
if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
argument_ = java.util.Collections.unmodifiableList(argument_); argument_ = java.util.Collections.unmodifiableList(argument_);
} }
@@ -134,19 +132,39 @@ public final class IrSimpleType extends
} }
private int bitField0_; private int bitField0_;
public static final int ANNOTATIONS_FIELD_NUMBER = 1; public static final int ANNOTATION_FIELD_NUMBER = 1;
private org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations_; private java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall> annotation_;
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 1;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/ */
public boolean hasAnnotations() { public java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall> getAnnotationList() {
return ((bitField0_ & 0x00000001) == 0x00000001); return annotation_;
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 1;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/ */
public org.jetbrains.kotlin.backend.common.serialization.proto.Annotations getAnnotations() { public java.util.List<? extends org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCallOrBuilder>
return annotations_; getAnnotationOrBuilderList() {
return annotation_;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public int getAnnotationCount() {
return annotation_.size();
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index) {
return annotation_.get(index);
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCallOrBuilder getAnnotationOrBuilder(
int index) {
return annotation_.get(index);
} }
public static final int CLASSIFIER_FIELD_NUMBER = 2; public static final int CLASSIFIER_FIELD_NUMBER = 2;
@@ -155,7 +173,7 @@ public final class IrSimpleType extends
* <code>required int32 classifier = 2;</code> * <code>required int32 classifier = 2;</code>
*/ */
public boolean hasClassifier() { public boolean hasClassifier() {
return ((bitField0_ & 0x00000002) == 0x00000002); return ((bitField0_ & 0x00000001) == 0x00000001);
} }
/** /**
* <code>required int32 classifier = 2;</code> * <code>required int32 classifier = 2;</code>
@@ -170,7 +188,7 @@ public final class IrSimpleType extends
* <code>required bool has_question_mark = 3;</code> * <code>required bool has_question_mark = 3;</code>
*/ */
public boolean hasHasQuestionMark() { public boolean hasHasQuestionMark() {
return ((bitField0_ & 0x00000004) == 0x00000004); return ((bitField0_ & 0x00000002) == 0x00000002);
} }
/** /**
* <code>required bool has_question_mark = 3;</code> * <code>required bool has_question_mark = 3;</code>
@@ -220,7 +238,7 @@ public final class IrSimpleType extends
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation abbreviation = 5;</code> * <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation abbreviation = 5;</code>
*/ */
public boolean hasAbbreviation() { public boolean hasAbbreviation() {
return ((bitField0_ & 0x00000008) == 0x00000008); return ((bitField0_ & 0x00000004) == 0x00000004);
} }
/** /**
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation abbreviation = 5;</code> * <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation abbreviation = 5;</code>
@@ -230,7 +248,7 @@ public final class IrSimpleType extends
} }
private void initFields() { private void initFields() {
annotations_ = org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.getDefaultInstance(); annotation_ = java.util.Collections.emptyList();
classifier_ = 0; classifier_ = 0;
hasQuestionMark_ = false; hasQuestionMark_ = false;
argument_ = java.util.Collections.emptyList(); argument_ = java.util.Collections.emptyList();
@@ -242,10 +260,6 @@ public final class IrSimpleType extends
if (isInitialized == 1) return true; if (isInitialized == 1) return true;
if (isInitialized == 0) return false; if (isInitialized == 0) return false;
if (!hasAnnotations()) {
memoizedIsInitialized = 0;
return false;
}
if (!hasClassifier()) { if (!hasClassifier()) {
memoizedIsInitialized = 0; memoizedIsInitialized = 0;
return false; return false;
@@ -254,9 +268,11 @@ public final class IrSimpleType extends
memoizedIsInitialized = 0; memoizedIsInitialized = 0;
return false; return false;
} }
if (!getAnnotations().isInitialized()) { for (int i = 0; i < getAnnotationCount(); i++) {
memoizedIsInitialized = 0; if (!getAnnotation(i).isInitialized()) {
return false; memoizedIsInitialized = 0;
return false;
}
} }
for (int i = 0; i < getArgumentCount(); i++) { for (int i = 0; i < getArgumentCount(); i++) {
if (!getArgument(i).isInitialized()) { if (!getArgument(i).isInitialized()) {
@@ -277,19 +293,19 @@ public final class IrSimpleType 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();
if (((bitField0_ & 0x00000001) == 0x00000001)) { for (int i = 0; i < annotation_.size(); i++) {
output.writeMessage(1, annotations_); output.writeMessage(1, annotation_.get(i));
} }
if (((bitField0_ & 0x00000002) == 0x00000002)) { if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeInt32(2, classifier_); output.writeInt32(2, classifier_);
} }
if (((bitField0_ & 0x00000004) == 0x00000004)) { if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeBool(3, hasQuestionMark_); output.writeBool(3, hasQuestionMark_);
} }
for (int i = 0; i < argument_.size(); i++) { for (int i = 0; i < argument_.size(); i++) {
output.writeMessage(4, argument_.get(i)); output.writeMessage(4, argument_.get(i));
} }
if (((bitField0_ & 0x00000008) == 0x00000008)) { if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeMessage(5, abbreviation_); output.writeMessage(5, abbreviation_);
} }
output.writeRawBytes(unknownFields); output.writeRawBytes(unknownFields);
@@ -301,15 +317,15 @@ public final class IrSimpleType extends
if (size != -1) return size; if (size != -1) return size;
size = 0; size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) { for (int i = 0; i < annotation_.size(); i++) {
size += org.jetbrains.kotlin.protobuf.CodedOutputStream size += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeMessageSize(1, annotations_); .computeMessageSize(1, annotation_.get(i));
} }
if (((bitField0_ & 0x00000002) == 0x00000002)) { if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += org.jetbrains.kotlin.protobuf.CodedOutputStream size += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeInt32Size(2, classifier_); .computeInt32Size(2, classifier_);
} }
if (((bitField0_ & 0x00000004) == 0x00000004)) { if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += org.jetbrains.kotlin.protobuf.CodedOutputStream size += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeBoolSize(3, hasQuestionMark_); .computeBoolSize(3, hasQuestionMark_);
} }
@@ -317,7 +333,7 @@ public final class IrSimpleType extends
size += org.jetbrains.kotlin.protobuf.CodedOutputStream size += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeMessageSize(4, argument_.get(i)); .computeMessageSize(4, argument_.get(i));
} }
if (((bitField0_ & 0x00000008) == 0x00000008)) { if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += org.jetbrains.kotlin.protobuf.CodedOutputStream size += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeMessageSize(5, abbreviation_); .computeMessageSize(5, abbreviation_);
} }
@@ -415,7 +431,7 @@ public final class IrSimpleType extends
public Builder clear() { public Builder clear() {
super.clear(); super.clear();
annotations_ = org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.getDefaultInstance(); annotation_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001); bitField0_ = (bitField0_ & ~0x00000001);
classifier_ = 0; classifier_ = 0;
bitField0_ = (bitField0_ & ~0x00000002); bitField0_ = (bitField0_ & ~0x00000002);
@@ -448,16 +464,17 @@ public final class IrSimpleType extends
org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType result = new org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType(this); org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType result = new org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType(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; annotation_ = java.util.Collections.unmodifiableList(annotation_);
bitField0_ = (bitField0_ & ~0x00000001);
} }
result.annotations_ = annotations_; result.annotation_ = annotation_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) { if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002; to_bitField0_ |= 0x00000001;
} }
result.classifier_ = classifier_; result.classifier_ = classifier_;
if (((from_bitField0_ & 0x00000004) == 0x00000004)) { if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004; to_bitField0_ |= 0x00000002;
} }
result.hasQuestionMark_ = hasQuestionMark_; result.hasQuestionMark_ = hasQuestionMark_;
if (((bitField0_ & 0x00000008) == 0x00000008)) { if (((bitField0_ & 0x00000008) == 0x00000008)) {
@@ -466,7 +483,7 @@ public final class IrSimpleType extends
} }
result.argument_ = argument_; result.argument_ = argument_;
if (((from_bitField0_ & 0x00000010) == 0x00000010)) { if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
to_bitField0_ |= 0x00000008; to_bitField0_ |= 0x00000004;
} }
result.abbreviation_ = abbreviation_; result.abbreviation_ = abbreviation_;
result.bitField0_ = to_bitField0_; result.bitField0_ = to_bitField0_;
@@ -475,8 +492,15 @@ public final class IrSimpleType extends
public Builder mergeFrom(org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType other) { public Builder mergeFrom(org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType other) {
if (other == org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType.getDefaultInstance()) return this; if (other == org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType.getDefaultInstance()) return this;
if (other.hasAnnotations()) { if (!other.annotation_.isEmpty()) {
mergeAnnotations(other.getAnnotations()); if (annotation_.isEmpty()) {
annotation_ = other.annotation_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureAnnotationIsMutable();
annotation_.addAll(other.annotation_);
}
} }
if (other.hasClassifier()) { if (other.hasClassifier()) {
setClassifier(other.getClassifier()); setClassifier(other.getClassifier());
@@ -503,10 +527,6 @@ public final class IrSimpleType extends
} }
public final boolean isInitialized() { public final boolean isInitialized() {
if (!hasAnnotations()) {
return false;
}
if (!hasClassifier()) { if (!hasClassifier()) {
return false; return false;
@@ -515,9 +535,11 @@ public final class IrSimpleType extends
return false; return false;
} }
if (!getAnnotations().isInitialized()) { for (int i = 0; i < getAnnotationCount(); i++) {
if (!getAnnotation(i).isInitialized()) {
return false;
return false;
}
} }
for (int i = 0; i < getArgumentCount(); i++) { for (int i = 0; i < getArgumentCount(); i++) {
if (!getArgument(i).isInitialized()) { if (!getArgument(i).isInitialized()) {
@@ -553,63 +575,128 @@ public final class IrSimpleType extends
} }
private int bitField0_; private int bitField0_;
private org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations_ = org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.getDefaultInstance(); private java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall> annotation_ =
java.util.Collections.emptyList();
private void ensureAnnotationIsMutable() {
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
annotation_ = new java.util.ArrayList<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall>(annotation_);
bitField0_ |= 0x00000001;
}
}
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 1;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/ */
public boolean hasAnnotations() { public java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall> getAnnotationList() {
return ((bitField0_ & 0x00000001) == 0x00000001); return java.util.Collections.unmodifiableList(annotation_);
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 1;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/ */
public org.jetbrains.kotlin.backend.common.serialization.proto.Annotations getAnnotations() { public int getAnnotationCount() {
return annotations_; return annotation_.size();
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 1;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/ */
public Builder setAnnotations(org.jetbrains.kotlin.backend.common.serialization.proto.Annotations value) { public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index) {
return annotation_.get(index);
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public Builder setAnnotation(
int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) {
if (value == null) { if (value == null) {
throw new NullPointerException(); throw new NullPointerException();
} }
annotations_ = value; ensureAnnotationIsMutable();
annotation_.set(index, value);
bitField0_ |= 0x00000001;
return this; return this;
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 1;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/ */
public Builder setAnnotations( public Builder setAnnotation(
org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.Builder builderForValue) { int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) {
annotations_ = builderForValue.build(); ensureAnnotationIsMutable();
annotation_.set(index, builderForValue.build());
bitField0_ |= 0x00000001;
return this; return this;
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 1;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/ */
public Builder mergeAnnotations(org.jetbrains.kotlin.backend.common.serialization.proto.Annotations value) { public Builder addAnnotation(org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) {
if (((bitField0_ & 0x00000001) == 0x00000001) && if (value == null) {
annotations_ != org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.getDefaultInstance()) { throw new NullPointerException();
annotations_ =
org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.newBuilder(annotations_).mergeFrom(value).buildPartial();
} else {
annotations_ = value;
} }
ensureAnnotationIsMutable();
annotation_.add(value);
bitField0_ |= 0x00000001;
return this; return this;
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 1;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/ */
public Builder clearAnnotations() { public Builder addAnnotation(
annotations_ = org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.getDefaultInstance(); int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) {
if (value == null) {
throw new NullPointerException();
}
ensureAnnotationIsMutable();
annotation_.add(index, value);
return this;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public Builder addAnnotation(
org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) {
ensureAnnotationIsMutable();
annotation_.add(builderForValue.build());
return this;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public Builder addAnnotation(
int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) {
ensureAnnotationIsMutable();
annotation_.add(index, builderForValue.build());
return this;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public Builder addAllAnnotation(
java.lang.Iterable<? extends org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall> values) {
ensureAnnotationIsMutable();
org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll(
values, annotation_);
return this;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public Builder clearAnnotation() {
annotation_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001); bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public Builder removeAnnotation(int index) {
ensureAnnotationIsMutable();
annotation_.remove(index);
return this; return this;
} }
@@ -8,13 +8,18 @@ public interface IrSimpleTypeOrBuilder extends
org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder { org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder {
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 1;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/ */
boolean hasAnnotations(); java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall>
getAnnotationList();
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 1;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/ */
org.jetbrains.kotlin.backend.common.serialization.proto.Annotations getAnnotations(); org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index);
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
int getAnnotationCount();
/** /**
* <code>required int32 classifier = 2;</code> * <code>required int32 classifier = 2;</code>
@@ -54,25 +54,20 @@ public final class IrTypeAbbreviation extends
break; break;
} }
case 10: { case 10: {
org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.Builder subBuilder = null; if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
if (((bitField0_ & 0x00000001) == 0x00000001)) { annotation_ = new java.util.ArrayList<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall>();
subBuilder = annotations_.toBuilder(); mutable_bitField0_ |= 0x00000001;
} }
annotations_ = input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.PARSER, extensionRegistry); annotation_.add(input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.PARSER, extensionRegistry));
if (subBuilder != null) {
subBuilder.mergeFrom(annotations_);
annotations_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000001;
break; break;
} }
case 16: { case 16: {
bitField0_ |= 0x00000002; bitField0_ |= 0x00000001;
typeAlias_ = input.readInt32(); typeAlias_ = input.readInt32();
break; break;
} }
case 24: { case 24: {
bitField0_ |= 0x00000004; bitField0_ |= 0x00000002;
hasQuestionMark_ = input.readBool(); hasQuestionMark_ = input.readBool();
break; break;
} }
@@ -92,6 +87,9 @@ public final class IrTypeAbbreviation 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)) {
annotation_ = java.util.Collections.unmodifiableList(annotation_);
}
if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
argument_ = java.util.Collections.unmodifiableList(argument_); argument_ = java.util.Collections.unmodifiableList(argument_);
} }
@@ -121,19 +119,39 @@ public final class IrTypeAbbreviation extends
} }
private int bitField0_; private int bitField0_;
public static final int ANNOTATIONS_FIELD_NUMBER = 1; public static final int ANNOTATION_FIELD_NUMBER = 1;
private org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations_; private java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall> annotation_;
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 1;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/ */
public boolean hasAnnotations() { public java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall> getAnnotationList() {
return ((bitField0_ & 0x00000001) == 0x00000001); return annotation_;
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 1;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/ */
public org.jetbrains.kotlin.backend.common.serialization.proto.Annotations getAnnotations() { public java.util.List<? extends org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCallOrBuilder>
return annotations_; getAnnotationOrBuilderList() {
return annotation_;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public int getAnnotationCount() {
return annotation_.size();
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index) {
return annotation_.get(index);
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCallOrBuilder getAnnotationOrBuilder(
int index) {
return annotation_.get(index);
} }
public static final int TYPE_ALIAS_FIELD_NUMBER = 2; public static final int TYPE_ALIAS_FIELD_NUMBER = 2;
@@ -142,7 +160,7 @@ public final class IrTypeAbbreviation extends
* <code>required int32 type_alias = 2;</code> * <code>required int32 type_alias = 2;</code>
*/ */
public boolean hasTypeAlias() { public boolean hasTypeAlias() {
return ((bitField0_ & 0x00000002) == 0x00000002); return ((bitField0_ & 0x00000001) == 0x00000001);
} }
/** /**
* <code>required int32 type_alias = 2;</code> * <code>required int32 type_alias = 2;</code>
@@ -157,7 +175,7 @@ public final class IrTypeAbbreviation extends
* <code>required bool has_question_mark = 3;</code> * <code>required bool has_question_mark = 3;</code>
*/ */
public boolean hasHasQuestionMark() { public boolean hasHasQuestionMark() {
return ((bitField0_ & 0x00000004) == 0x00000004); return ((bitField0_ & 0x00000002) == 0x00000002);
} }
/** /**
* <code>required bool has_question_mark = 3;</code> * <code>required bool has_question_mark = 3;</code>
@@ -202,7 +220,7 @@ public final class IrTypeAbbreviation extends
} }
private void initFields() { private void initFields() {
annotations_ = org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.getDefaultInstance(); annotation_ = java.util.Collections.emptyList();
typeAlias_ = 0; typeAlias_ = 0;
hasQuestionMark_ = false; hasQuestionMark_ = false;
argument_ = java.util.Collections.emptyList(); argument_ = java.util.Collections.emptyList();
@@ -213,10 +231,6 @@ public final class IrTypeAbbreviation extends
if (isInitialized == 1) return true; if (isInitialized == 1) return true;
if (isInitialized == 0) return false; if (isInitialized == 0) return false;
if (!hasAnnotations()) {
memoizedIsInitialized = 0;
return false;
}
if (!hasTypeAlias()) { if (!hasTypeAlias()) {
memoizedIsInitialized = 0; memoizedIsInitialized = 0;
return false; return false;
@@ -225,9 +239,11 @@ public final class IrTypeAbbreviation extends
memoizedIsInitialized = 0; memoizedIsInitialized = 0;
return false; return false;
} }
if (!getAnnotations().isInitialized()) { for (int i = 0; i < getAnnotationCount(); i++) {
memoizedIsInitialized = 0; if (!getAnnotation(i).isInitialized()) {
return false; memoizedIsInitialized = 0;
return false;
}
} }
for (int i = 0; i < getArgumentCount(); i++) { for (int i = 0; i < getArgumentCount(); i++) {
if (!getArgument(i).isInitialized()) { if (!getArgument(i).isInitialized()) {
@@ -242,13 +258,13 @@ public final class IrTypeAbbreviation 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();
if (((bitField0_ & 0x00000001) == 0x00000001)) { for (int i = 0; i < annotation_.size(); i++) {
output.writeMessage(1, annotations_); output.writeMessage(1, annotation_.get(i));
} }
if (((bitField0_ & 0x00000002) == 0x00000002)) { if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeInt32(2, typeAlias_); output.writeInt32(2, typeAlias_);
} }
if (((bitField0_ & 0x00000004) == 0x00000004)) { if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeBool(3, hasQuestionMark_); output.writeBool(3, hasQuestionMark_);
} }
for (int i = 0; i < argument_.size(); i++) { for (int i = 0; i < argument_.size(); i++) {
@@ -263,15 +279,15 @@ public final class IrTypeAbbreviation extends
if (size != -1) return size; if (size != -1) return size;
size = 0; size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) { for (int i = 0; i < annotation_.size(); i++) {
size += org.jetbrains.kotlin.protobuf.CodedOutputStream size += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeMessageSize(1, annotations_); .computeMessageSize(1, annotation_.get(i));
} }
if (((bitField0_ & 0x00000002) == 0x00000002)) { if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += org.jetbrains.kotlin.protobuf.CodedOutputStream size += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeInt32Size(2, typeAlias_); .computeInt32Size(2, typeAlias_);
} }
if (((bitField0_ & 0x00000004) == 0x00000004)) { if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += org.jetbrains.kotlin.protobuf.CodedOutputStream size += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeBoolSize(3, hasQuestionMark_); .computeBoolSize(3, hasQuestionMark_);
} }
@@ -373,7 +389,7 @@ public final class IrTypeAbbreviation extends
public Builder clear() { public Builder clear() {
super.clear(); super.clear();
annotations_ = org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.getDefaultInstance(); annotation_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001); bitField0_ = (bitField0_ & ~0x00000001);
typeAlias_ = 0; typeAlias_ = 0;
bitField0_ = (bitField0_ & ~0x00000002); bitField0_ = (bitField0_ & ~0x00000002);
@@ -404,16 +420,17 @@ public final class IrTypeAbbreviation extends
org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation result = new org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation(this); org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation result = new org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation(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; annotation_ = java.util.Collections.unmodifiableList(annotation_);
bitField0_ = (bitField0_ & ~0x00000001);
} }
result.annotations_ = annotations_; result.annotation_ = annotation_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) { if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002; to_bitField0_ |= 0x00000001;
} }
result.typeAlias_ = typeAlias_; result.typeAlias_ = typeAlias_;
if (((from_bitField0_ & 0x00000004) == 0x00000004)) { if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000004; to_bitField0_ |= 0x00000002;
} }
result.hasQuestionMark_ = hasQuestionMark_; result.hasQuestionMark_ = hasQuestionMark_;
if (((bitField0_ & 0x00000008) == 0x00000008)) { if (((bitField0_ & 0x00000008) == 0x00000008)) {
@@ -427,8 +444,15 @@ public final class IrTypeAbbreviation extends
public Builder mergeFrom(org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation other) { public Builder mergeFrom(org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation other) {
if (other == org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation.getDefaultInstance()) return this; if (other == org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation.getDefaultInstance()) return this;
if (other.hasAnnotations()) { if (!other.annotation_.isEmpty()) {
mergeAnnotations(other.getAnnotations()); if (annotation_.isEmpty()) {
annotation_ = other.annotation_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureAnnotationIsMutable();
annotation_.addAll(other.annotation_);
}
} }
if (other.hasTypeAlias()) { if (other.hasTypeAlias()) {
setTypeAlias(other.getTypeAlias()); setTypeAlias(other.getTypeAlias());
@@ -452,10 +476,6 @@ public final class IrTypeAbbreviation extends
} }
public final boolean isInitialized() { public final boolean isInitialized() {
if (!hasAnnotations()) {
return false;
}
if (!hasTypeAlias()) { if (!hasTypeAlias()) {
return false; return false;
@@ -464,9 +484,11 @@ public final class IrTypeAbbreviation extends
return false; return false;
} }
if (!getAnnotations().isInitialized()) { for (int i = 0; i < getAnnotationCount(); i++) {
if (!getAnnotation(i).isInitialized()) {
return false;
return false;
}
} }
for (int i = 0; i < getArgumentCount(); i++) { for (int i = 0; i < getArgumentCount(); i++) {
if (!getArgument(i).isInitialized()) { if (!getArgument(i).isInitialized()) {
@@ -496,63 +518,128 @@ public final class IrTypeAbbreviation extends
} }
private int bitField0_; private int bitField0_;
private org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations_ = org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.getDefaultInstance(); private java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall> annotation_ =
java.util.Collections.emptyList();
private void ensureAnnotationIsMutable() {
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
annotation_ = new java.util.ArrayList<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall>(annotation_);
bitField0_ |= 0x00000001;
}
}
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 1;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/ */
public boolean hasAnnotations() { public java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall> getAnnotationList() {
return ((bitField0_ & 0x00000001) == 0x00000001); return java.util.Collections.unmodifiableList(annotation_);
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 1;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/ */
public org.jetbrains.kotlin.backend.common.serialization.proto.Annotations getAnnotations() { public int getAnnotationCount() {
return annotations_; return annotation_.size();
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 1;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/ */
public Builder setAnnotations(org.jetbrains.kotlin.backend.common.serialization.proto.Annotations value) { public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index) {
return annotation_.get(index);
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public Builder setAnnotation(
int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) {
if (value == null) { if (value == null) {
throw new NullPointerException(); throw new NullPointerException();
} }
annotations_ = value; ensureAnnotationIsMutable();
annotation_.set(index, value);
bitField0_ |= 0x00000001;
return this; return this;
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 1;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/ */
public Builder setAnnotations( public Builder setAnnotation(
org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.Builder builderForValue) { int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) {
annotations_ = builderForValue.build(); ensureAnnotationIsMutable();
annotation_.set(index, builderForValue.build());
bitField0_ |= 0x00000001;
return this; return this;
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 1;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/ */
public Builder mergeAnnotations(org.jetbrains.kotlin.backend.common.serialization.proto.Annotations value) { public Builder addAnnotation(org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) {
if (((bitField0_ & 0x00000001) == 0x00000001) && if (value == null) {
annotations_ != org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.getDefaultInstance()) { throw new NullPointerException();
annotations_ =
org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.newBuilder(annotations_).mergeFrom(value).buildPartial();
} else {
annotations_ = value;
} }
ensureAnnotationIsMutable();
annotation_.add(value);
bitField0_ |= 0x00000001;
return this; return this;
} }
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 1;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/ */
public Builder clearAnnotations() { public Builder addAnnotation(
annotations_ = org.jetbrains.kotlin.backend.common.serialization.proto.Annotations.getDefaultInstance(); int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) {
if (value == null) {
throw new NullPointerException();
}
ensureAnnotationIsMutable();
annotation_.add(index, value);
return this;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public Builder addAnnotation(
org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) {
ensureAnnotationIsMutable();
annotation_.add(builderForValue.build());
return this;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public Builder addAnnotation(
int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) {
ensureAnnotationIsMutable();
annotation_.add(index, builderForValue.build());
return this;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public Builder addAllAnnotation(
java.lang.Iterable<? extends org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall> values) {
ensureAnnotationIsMutable();
org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll(
values, annotation_);
return this;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public Builder clearAnnotation() {
annotation_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001); bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
public Builder removeAnnotation(int index) {
ensureAnnotationIsMutable();
annotation_.remove(index);
return this; return this;
} }
@@ -8,13 +8,18 @@ public interface IrTypeAbbreviationOrBuilder extends
org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder { org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder {
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 1;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/ */
boolean hasAnnotations(); java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall>
getAnnotationList();
/** /**
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.Annotations annotations = 1;</code> * <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/ */
org.jetbrains.kotlin.backend.common.serialization.proto.Annotations getAnnotations(); org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index);
/**
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 1;</code>
*/
int getAnnotationCount();
/** /**
* <code>required int32 type_alias = 2;</code> * <code>required int32 type_alias = 2;</code>