From 9efd0d7589d7073677da9b481087bd4b063aecaa Mon Sep 17 00:00:00 2001 From: Georgy Bronnikov Date: Sat, 20 Feb 2021 10:49:32 +0300 Subject: [PATCH] JVM_IR: JvmIrSerializer --- .../common/serialization/IrFileSerializer.kt | 14 +- compiler/ir/serialization.jvm/src/JvmIr.proto | 82 + .../jvm/serialization/JvmIrSerializer.kt | 63 + .../jvm/serialization/proto/JvmIr.java | 3258 +++++++++++++++++ generators/protobuf/GenerateProtoBuf.kt | 1 + 5 files changed, 3411 insertions(+), 7 deletions(-) create mode 100644 compiler/ir/serialization.jvm/src/JvmIr.proto create mode 100644 compiler/ir/serialization.jvm/src/org/jetbrains/kotlin/backend/jvm/serialization/JvmIrSerializer.kt create mode 100644 compiler/ir/serialization.jvm/src/org/jetbrains/kotlin/backend/jvm/serialization/proto/JvmIr.java diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/IrFileSerializer.kt b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/IrFileSerializer.kt index 8582453b47e..b686bb34adb 100644 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/IrFileSerializer.kt +++ b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/IrFileSerializer.kt @@ -139,17 +139,17 @@ open class IrFileSerializer( // The same type can be used multiple times in a file // so use this index to store type data only once. private val protoTypeMap = mutableMapOf() - private val protoTypeArray = arrayListOf() + protected val protoTypeArray = arrayListOf() private val protoStringMap = mutableMapOf() - private val protoStringArray = arrayListOf() + protected val protoStringArray = arrayListOf() // The same signature could be used multiple times in a file // so use this index to store signature only once. private val protoIdSignatureMap = mutableMapOf() - private val protoIdSignatureArray = arrayListOf() + protected val protoIdSignatureArray = arrayListOf() - private val protoBodyArray = mutableListOf() + protected val protoBodyArray = mutableListOf() private val protoDebugInfoArray = arrayListOf() @@ -394,10 +394,10 @@ open class IrFileSerializer( /* ------- IrTypes ---------------------------------------------------------- */ - private fun serializeAnnotations(annotations: List) = + protected fun serializeAnnotations(annotations: List) = annotations.map { serializeConstructorCall(it) } - private fun serializeFqName(fqName: String): List = fqName.split(".").map(::serializeString) + protected fun serializeFqName(fqName: String): List = fqName.split(".").map(::serializeString) private fun serializeIrStarProjection() = BinaryTypeProjection.STAR_CODE @@ -1307,7 +1307,7 @@ open class IrFileSerializer( return proto.build() } - private fun serializeIrClass(clazz: IrClass): ProtoClass { + protected fun serializeIrClass(clazz: IrClass): ProtoClass { val proto = ProtoClass.newBuilder() .setBase(serializeIrDeclarationBase(clazz, ClassFlags.encode(clazz))) .setName(serializeName(clazz.name)) diff --git a/compiler/ir/serialization.jvm/src/JvmIr.proto b/compiler/ir/serialization.jvm/src/JvmIr.proto new file mode 100644 index 00000000000..45db2ec1966 --- /dev/null +++ b/compiler/ir/serialization.jvm/src/JvmIr.proto @@ -0,0 +1,82 @@ +syntax = "proto2"; +package org.jetbrains.kotlin.backend.jvm.serialization.proto; +import "compiler/ir/serialization.common/src/KotlinIr.proto"; + +option java_outer_classname = "JvmIr"; +option optimize_for = LITE_RUNTIME; + +/* Stored in JVM .class annotations */ + +//message UniqIdInfo { +// required fixed64 id = 1; +// repeated int32 toplevel_fq_name = 2; +//} + +//message SignatureTable { +// repeated common.serialization.proto.IrSignature signature = 1; +//} +// +//message TypeTable { +// repeated common.serialization.proto.IrType type = 1; +//} + +//message UniqIdTable { +// repeated UniqIdInfo infos = 1; +//} + +//message StringTable { +// repeated string string = 1; +//} + +message XStatementOrExpression { + oneof kind { + common.serialization.proto.IrStatement statement = 1; + common.serialization.proto.IrExpression expression = 2; + } +} + +//message StatementsAndExpressionsTable { +// repeated XStatementOrExpression statement_or_expression = 1; +//} + +//message ExternalReference { +// required fixed64 id = 1; +// required int32 index = 2; /* index into the table of packages in ExternalRefs */ +//} +// +//message JvmExternalPackage { +// repeated int32 fq_name = 1; +// required common.serialization.proto.IrDeclarationContainer declaration_container = 2; +//} + +//message ExternalRefs { +// repeated JvmExternalPackage package = 1; +// repeated ExternalReference reference = 2; +//} + +message AuxTables { + repeated common.serialization.proto.IrType type = 1; + repeated common.serialization.proto.IdSignature signature = 2; + repeated string string = 3; + repeated XStatementOrExpression body = 4; + +// required TypeTable type_table = 2; +// required SignatureTable signature_table = 1; +// required StringTable string_table = 3; +// required StatementsAndExpressionsTable statements_and_expressions_table = 4; + +// required ExternalRefs external_refs = 5; +// required UniqIdTable uniq_id_table = 6; +} + +message JvmIrFile { + repeated common.serialization.proto.IrDeclaration declaration = 1; + repeated common.serialization.proto.IrConstructorCall annotation = 2; + repeated int32 facade_fq_name = 3; + required AuxTables aux_tables = 4; +} + +message JvmIrClass { + required common.serialization.proto.IrClass ir_class = 1; + required AuxTables aux_tables = 2; +} diff --git a/compiler/ir/serialization.jvm/src/org/jetbrains/kotlin/backend/jvm/serialization/JvmIrSerializer.kt b/compiler/ir/serialization.jvm/src/org/jetbrains/kotlin/backend/jvm/serialization/JvmIrSerializer.kt new file mode 100644 index 00000000000..f8803452310 --- /dev/null +++ b/compiler/ir/serialization.jvm/src/org/jetbrains/kotlin/backend/jvm/serialization/JvmIrSerializer.kt @@ -0,0 +1,63 @@ +/* + * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package org.jetbrains.kotlin.backend.jvm.serialization + +import org.jetbrains.kotlin.backend.common.serialization.DeclarationTable +import org.jetbrains.kotlin.backend.common.serialization.IrFileSerializer +import org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr +import org.jetbrains.kotlin.descriptors.DeclarationDescriptor +import org.jetbrains.kotlin.ir.declarations.IrClass +import org.jetbrains.kotlin.ir.declarations.IrFile +import org.jetbrains.kotlin.ir.symbols.IrSymbol +import org.jetbrains.kotlin.ir.util.IrMessageLogger +import org.jetbrains.kotlin.protobuf.ByteString + +class JvmIrSerializer( + messageLogger: IrMessageLogger, + declarationTable: DeclarationTable, + expectDescriptorToSymbol: MutableMap, + externallyVisibleOnly: Boolean = true, + skipExpects: Boolean = false, +) : IrFileSerializer(messageLogger, declarationTable, expectDescriptorToSymbol, externallyVisibleOnly, skipExpects) { + + // Usage protocol: construct an instance, call only one of `serializeIrFile()` and `serializeTopLevelClass()` only once. + + fun serializeJvmIrFile(irFile: IrFile): JvmIr.JvmIrFile { + val proto = JvmIr.JvmIrFile.newBuilder() + + irFile.declarations.filter { it !is IrClass }.forEach { declaration -> + proto.addDeclaration(serializeDeclaration(declaration)) + } + proto.addAllAnnotation(serializeAnnotations(irFile.annotations)) + + proto.auxTables = serializeAuxTables() + + return proto.build() + } + + fun serializeTopLevelClass(irClass: IrClass): JvmIr.JvmIrClass { + val proto = JvmIr.JvmIrClass.newBuilder() + proto.irClass = serializeIrClass(irClass) + proto.auxTables = serializeAuxTables() + return proto.build() + } + + private fun serializeAuxTables(): JvmIr.AuxTables { + val proto = JvmIr.AuxTables.newBuilder() + proto.addAllType(protoTypeArray) + proto.addAllSignature(protoIdSignatureArray) + proto.addAllString(protoStringArray) + for (body in protoBodyArray) { + val bodyProto = JvmIr.XStatementOrExpression.newBuilder() + when (body) { + is XStatementOrExpression.XStatement -> bodyProto.statement = body.toProtoStatement() + is XStatementOrExpression.XExpression -> bodyProto.expression = body.toProtoExpression() + } + proto.addBody(bodyProto.build()) + } + return proto.build() + } +} \ No newline at end of file diff --git a/compiler/ir/serialization.jvm/src/org/jetbrains/kotlin/backend/jvm/serialization/proto/JvmIr.java b/compiler/ir/serialization.jvm/src/org/jetbrains/kotlin/backend/jvm/serialization/proto/JvmIr.java new file mode 100644 index 00000000000..a0664c5872e --- /dev/null +++ b/compiler/ir/serialization.jvm/src/org/jetbrains/kotlin/backend/jvm/serialization/proto/JvmIr.java @@ -0,0 +1,3258 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: compiler/ir/serialization.jvm/src/JvmIr.proto + +package org.jetbrains.kotlin.backend.jvm.serialization.proto; + +public final class JvmIr { + private JvmIr() {} + public static void registerAllExtensions( + org.jetbrains.kotlin.protobuf.ExtensionRegistryLite registry) { + } + public interface XStatementOrExpressionOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression) + org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder { + + /** + * optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement statement = 1; + */ + boolean hasStatement(); + /** + * optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement statement = 1; + */ + org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement getStatement(); + + /** + * optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression expression = 2; + */ + boolean hasExpression(); + /** + * optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression expression = 2; + */ + org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression getExpression(); + } + /** + * Protobuf type {@code org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression} + */ + public static final class XStatementOrExpression extends + org.jetbrains.kotlin.protobuf.GeneratedMessageLite implements + // @@protoc_insertion_point(message_implements:org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression) + XStatementOrExpressionOrBuilder { + // Use XStatementOrExpression.newBuilder() to construct. + private XStatementOrExpression(org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private XStatementOrExpression(boolean noInit) { this.unknownFields = org.jetbrains.kotlin.protobuf.ByteString.EMPTY;} + + private static final XStatementOrExpression defaultInstance; + public static XStatementOrExpression getDefaultInstance() { + return defaultInstance; + } + + public XStatementOrExpression getDefaultInstanceForType() { + return defaultInstance; + } + + private final org.jetbrains.kotlin.protobuf.ByteString unknownFields; + private XStatementOrExpression( + 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, 1); + 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: { + org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement.Builder subBuilder = null; + if (kindCase_ == 1) { + subBuilder = ((org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement) kind_).toBuilder(); + } + kind_ = input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement) kind_); + kind_ = subBuilder.buildPartial(); + } + kindCase_ = 1; + break; + } + case 18: { + org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression.Builder subBuilder = null; + if (kindCase_ == 2) { + subBuilder = ((org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression) kind_).toBuilder(); + } + kind_ = input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression) kind_); + kind_ = subBuilder.buildPartial(); + } + kindCase_ = 2; + 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 { + try { + unknownFieldsCodedOutput.flush(); + } catch (java.io.IOException e) { + // Should not happen + } finally { + unknownFields = unknownFieldsOutput.toByteString(); + } + makeExtensionsImmutable(); + } + } + public static org.jetbrains.kotlin.protobuf.Parser PARSER = + new org.jetbrains.kotlin.protobuf.AbstractParser() { + public XStatementOrExpression parsePartialFrom( + org.jetbrains.kotlin.protobuf.CodedInputStream input, + org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) + throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { + return new XStatementOrExpression(input, extensionRegistry); + } + }; + + @java.lang.Override + public org.jetbrains.kotlin.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + private int kindCase_ = 0; + private java.lang.Object kind_; + public enum KindCase + implements org.jetbrains.kotlin.protobuf.Internal.EnumLite { + STATEMENT(1), + EXPRESSION(2), + KIND_NOT_SET(0); + private int value = 0; + private KindCase(int value) { + this.value = value; + } + public static KindCase valueOf(int value) { + switch (value) { + case 1: return STATEMENT; + case 2: return EXPRESSION; + case 0: return KIND_NOT_SET; + default: throw new java.lang.IllegalArgumentException( + "Value is undefined for this oneof enum."); + } + } + public int getNumber() { + return this.value; + } + }; + + public KindCase + getKindCase() { + return KindCase.valueOf( + kindCase_); + } + + public static final int STATEMENT_FIELD_NUMBER = 1; + /** + * optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement statement = 1; + */ + public boolean hasStatement() { + return kindCase_ == 1; + } + /** + * optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement statement = 1; + */ + public org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement getStatement() { + if (kindCase_ == 1) { + return (org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement) kind_; + } + return org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement.getDefaultInstance(); + } + + public static final int EXPRESSION_FIELD_NUMBER = 2; + /** + * optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression expression = 2; + */ + public boolean hasExpression() { + return kindCase_ == 2; + } + /** + * optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression expression = 2; + */ + public org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression getExpression() { + if (kindCase_ == 2) { + return (org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression) kind_; + } + return org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression.getDefaultInstance(); + } + + private void initFields() { + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + if (hasStatement()) { + if (!getStatement().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + if (hasExpression()) { + if (!getExpression().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(org.jetbrains.kotlin.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (kindCase_ == 1) { + output.writeMessage(1, (org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement) kind_); + } + if (kindCase_ == 2) { + output.writeMessage(2, (org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression) kind_); + } + output.writeRawBytes(unknownFields); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (kindCase_ == 1) { + size += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeMessageSize(1, (org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement) kind_); + } + if (kindCase_ == 2) { + size += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeMessageSize(2, (org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression) kind_); + } + 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.jvm.serialization.proto.JvmIr.XStatementOrExpression parseFrom( + org.jetbrains.kotlin.protobuf.ByteString data) + throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpression 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.jvm.serialization.proto.JvmIr.XStatementOrExpression parseFrom(byte[] data) + throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpression 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.jvm.serialization.proto.JvmIr.XStatementOrExpression parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpression 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.jvm.serialization.proto.JvmIr.XStatementOrExpression parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpression 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.jvm.serialization.proto.JvmIr.XStatementOrExpression parseFrom( + org.jetbrains.kotlin.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpression 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.jvm.serialization.proto.JvmIr.XStatementOrExpression prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + /** + * Protobuf type {@code org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression} + */ + public static final class Builder extends + org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder< + org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpression, Builder> + implements + // @@protoc_insertion_point(builder_implements:org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression) + org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpressionOrBuilder { + // Construct using org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpression.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + kindCase_ = 0; + kind_ = null; + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpression getDefaultInstanceForType() { + return org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpression.getDefaultInstance(); + } + + public org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpression build() { + org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpression result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpression buildPartial() { + org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpression result = new org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpression(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (kindCase_ == 1) { + result.kind_ = kind_; + } + if (kindCase_ == 2) { + result.kind_ = kind_; + } + result.bitField0_ = to_bitField0_; + result.kindCase_ = kindCase_; + return result; + } + + public Builder mergeFrom(org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpression other) { + if (other == org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpression.getDefaultInstance()) return this; + switch (other.getKindCase()) { + case STATEMENT: { + mergeStatement(other.getStatement()); + break; + } + case EXPRESSION: { + mergeExpression(other.getExpression()); + break; + } + case KIND_NOT_SET: { + break; + } + } + setUnknownFields( + getUnknownFields().concat(other.unknownFields)); + return this; + } + + public final boolean isInitialized() { + if (hasStatement()) { + if (!getStatement().isInitialized()) { + + return false; + } + } + if (hasExpression()) { + if (!getExpression().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.jvm.serialization.proto.JvmIr.XStatementOrExpression parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpression) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int kindCase_ = 0; + private java.lang.Object kind_; + public KindCase + getKindCase() { + return KindCase.valueOf( + kindCase_); + } + + public Builder clearKind() { + kindCase_ = 0; + kind_ = null; + return this; + } + + private int bitField0_; + + /** + * optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement statement = 1; + */ + public boolean hasStatement() { + return kindCase_ == 1; + } + /** + * optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement statement = 1; + */ + public org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement getStatement() { + if (kindCase_ == 1) { + return (org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement) kind_; + } + return org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement.getDefaultInstance(); + } + /** + * optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement statement = 1; + */ + public Builder setStatement(org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement value) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + + kindCase_ = 1; + return this; + } + /** + * optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement statement = 1; + */ + public Builder setStatement( + org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement.Builder builderForValue) { + kind_ = builderForValue.build(); + + kindCase_ = 1; + return this; + } + /** + * optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement statement = 1; + */ + public Builder mergeStatement(org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement value) { + if (kindCase_ == 1 && + kind_ != org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement.getDefaultInstance()) { + kind_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement.newBuilder((org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement) kind_) + .mergeFrom(value).buildPartial(); + } else { + kind_ = value; + } + + kindCase_ = 1; + return this; + } + /** + * optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement statement = 1; + */ + public Builder clearStatement() { + if (kindCase_ == 1) { + kindCase_ = 0; + kind_ = null; + + } + return this; + } + + /** + * optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression expression = 2; + */ + public boolean hasExpression() { + return kindCase_ == 2; + } + /** + * optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression expression = 2; + */ + public org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression getExpression() { + if (kindCase_ == 2) { + return (org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression) kind_; + } + return org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression.getDefaultInstance(); + } + /** + * optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression expression = 2; + */ + public Builder setExpression(org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression value) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + + kindCase_ = 2; + return this; + } + /** + * optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression expression = 2; + */ + public Builder setExpression( + org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression.Builder builderForValue) { + kind_ = builderForValue.build(); + + kindCase_ = 2; + return this; + } + /** + * optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression expression = 2; + */ + public Builder mergeExpression(org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression value) { + if (kindCase_ == 2 && + kind_ != org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression.getDefaultInstance()) { + kind_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression.newBuilder((org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression) kind_) + .mergeFrom(value).buildPartial(); + } else { + kind_ = value; + } + + kindCase_ = 2; + return this; + } + /** + * optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression expression = 2; + */ + public Builder clearExpression() { + if (kindCase_ == 2) { + kindCase_ = 0; + kind_ = null; + + } + return this; + } + + // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression) + } + + static { + defaultInstance = new XStatementOrExpression(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression) + } + + public interface AuxTablesOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.backend.jvm.serialization.proto.AuxTables) + org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder { + + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; + */ + java.util.List + getTypeList(); + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; + */ + org.jetbrains.kotlin.backend.common.serialization.proto.IrType getType(int index); + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; + */ + int getTypeCount(); + + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 2; + */ + java.util.List + getSignatureList(); + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 2; + */ + org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature getSignature(int index); + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 2; + */ + int getSignatureCount(); + + /** + * repeated string string = 3; + */ + org.jetbrains.kotlin.protobuf.ProtocolStringList + getStringList(); + /** + * repeated string string = 3; + */ + int getStringCount(); + /** + * repeated string string = 3; + */ + java.lang.String getString(int index); + /** + * repeated string string = 3; + */ + org.jetbrains.kotlin.protobuf.ByteString + getStringBytes(int index); + + /** + * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 4; + */ + java.util.List + getBodyList(); + /** + * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 4; + */ + org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpression getBody(int index); + /** + * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 4; + */ + int getBodyCount(); + } + /** + * Protobuf type {@code org.jetbrains.kotlin.backend.jvm.serialization.proto.AuxTables} + */ + public static final class AuxTables extends + org.jetbrains.kotlin.protobuf.GeneratedMessageLite implements + // @@protoc_insertion_point(message_implements:org.jetbrains.kotlin.backend.jvm.serialization.proto.AuxTables) + AuxTablesOrBuilder { + // Use AuxTables.newBuilder() to construct. + private AuxTables(org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private AuxTables(boolean noInit) { this.unknownFields = org.jetbrains.kotlin.protobuf.ByteString.EMPTY;} + + private static final AuxTables defaultInstance; + public static AuxTables getDefaultInstance() { + return defaultInstance; + } + + public AuxTables getDefaultInstanceForType() { + return defaultInstance; + } + + private final org.jetbrains.kotlin.protobuf.ByteString unknownFields; + private AuxTables( + 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, 1); + 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)) { + type_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + type_.add(input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IrType.PARSER, extensionRegistry)); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + signature_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + signature_.add(input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature.PARSER, extensionRegistry)); + break; + } + case 26: { + org.jetbrains.kotlin.protobuf.ByteString bs = input.readBytes(); + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + string_ = new org.jetbrains.kotlin.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000004; + } + string_.add(bs); + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + body_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + body_.add(input.readMessage(org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpression.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)) { + type_ = java.util.Collections.unmodifiableList(type_); + } + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + signature_ = java.util.Collections.unmodifiableList(signature_); + } + if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + string_ = string_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + body_ = java.util.Collections.unmodifiableList(body_); + } + try { + unknownFieldsCodedOutput.flush(); + } catch (java.io.IOException e) { + // Should not happen + } finally { + unknownFields = unknownFieldsOutput.toByteString(); + } + makeExtensionsImmutable(); + } + } + public static org.jetbrains.kotlin.protobuf.Parser PARSER = + new org.jetbrains.kotlin.protobuf.AbstractParser() { + public AuxTables parsePartialFrom( + org.jetbrains.kotlin.protobuf.CodedInputStream input, + org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) + throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { + return new AuxTables(input, extensionRegistry); + } + }; + + @java.lang.Override + public org.jetbrains.kotlin.protobuf.Parser getParserForType() { + return PARSER; + } + + public static final int TYPE_FIELD_NUMBER = 1; + private java.util.List type_; + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; + */ + public java.util.List getTypeList() { + return type_; + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; + */ + public java.util.List + getTypeOrBuilderList() { + return type_; + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; + */ + public int getTypeCount() { + return type_.size(); + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; + */ + public org.jetbrains.kotlin.backend.common.serialization.proto.IrType getType(int index) { + return type_.get(index); + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; + */ + public org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeOrBuilder getTypeOrBuilder( + int index) { + return type_.get(index); + } + + public static final int SIGNATURE_FIELD_NUMBER = 2; + private java.util.List signature_; + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 2; + */ + public java.util.List getSignatureList() { + return signature_; + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 2; + */ + public java.util.List + getSignatureOrBuilderList() { + return signature_; + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 2; + */ + public int getSignatureCount() { + return signature_.size(); + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 2; + */ + public org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature getSignature(int index) { + return signature_.get(index); + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 2; + */ + public org.jetbrains.kotlin.backend.common.serialization.proto.IdSignatureOrBuilder getSignatureOrBuilder( + int index) { + return signature_.get(index); + } + + public static final int STRING_FIELD_NUMBER = 3; + private org.jetbrains.kotlin.protobuf.LazyStringList string_; + /** + * repeated string string = 3; + */ + public org.jetbrains.kotlin.protobuf.ProtocolStringList + getStringList() { + return string_; + } + /** + * repeated string string = 3; + */ + public int getStringCount() { + return string_.size(); + } + /** + * repeated string string = 3; + */ + public java.lang.String getString(int index) { + return string_.get(index); + } + /** + * repeated string string = 3; + */ + public org.jetbrains.kotlin.protobuf.ByteString + getStringBytes(int index) { + return string_.getByteString(index); + } + + public static final int BODY_FIELD_NUMBER = 4; + private java.util.List body_; + /** + * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 4; + */ + public java.util.List getBodyList() { + return body_; + } + /** + * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 4; + */ + public java.util.List + getBodyOrBuilderList() { + return body_; + } + /** + * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 4; + */ + public int getBodyCount() { + return body_.size(); + } + /** + * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 4; + */ + public org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpression getBody(int index) { + return body_.get(index); + } + /** + * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 4; + */ + public org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpressionOrBuilder getBodyOrBuilder( + int index) { + return body_.get(index); + } + + private void initFields() { + type_ = java.util.Collections.emptyList(); + signature_ = java.util.Collections.emptyList(); + string_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY; + body_ = 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 < getTypeCount(); i++) { + if (!getType(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + for (int i = 0; i < getSignatureCount(); i++) { + if (!getSignature(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + for (int i = 0; i < getBodyCount(); i++) { + if (!getBody(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 < type_.size(); i++) { + output.writeMessage(1, type_.get(i)); + } + for (int i = 0; i < signature_.size(); i++) { + output.writeMessage(2, signature_.get(i)); + } + for (int i = 0; i < string_.size(); i++) { + output.writeBytes(3, string_.getByteString(i)); + } + for (int i = 0; i < body_.size(); i++) { + output.writeMessage(4, body_.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 < type_.size(); i++) { + size += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeMessageSize(1, type_.get(i)); + } + for (int i = 0; i < signature_.size(); i++) { + size += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeMessageSize(2, signature_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < string_.size(); i++) { + dataSize += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeBytesSizeNoTag(string_.getByteString(i)); + } + size += dataSize; + size += 1 * getStringList().size(); + } + for (int i = 0; i < body_.size(); i++) { + size += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeMessageSize(4, body_.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.jvm.serialization.proto.JvmIr.AuxTables parseFrom( + org.jetbrains.kotlin.protobuf.ByteString data) + throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables 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.jvm.serialization.proto.JvmIr.AuxTables parseFrom(byte[] data) + throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables 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.jvm.serialization.proto.JvmIr.AuxTables parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables 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.jvm.serialization.proto.JvmIr.AuxTables parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables 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.jvm.serialization.proto.JvmIr.AuxTables parseFrom( + org.jetbrains.kotlin.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables 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.jvm.serialization.proto.JvmIr.AuxTables prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + /** + * Protobuf type {@code org.jetbrains.kotlin.backend.jvm.serialization.proto.AuxTables} + */ + public static final class Builder extends + org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder< + org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables, Builder> + implements + // @@protoc_insertion_point(builder_implements:org.jetbrains.kotlin.backend.jvm.serialization.proto.AuxTables) + org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTablesOrBuilder { + // Construct using org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + type_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + signature_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + string_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + body_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables getDefaultInstanceForType() { + return org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables.getDefaultInstance(); + } + + public org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables build() { + org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables buildPartial() { + org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables result = new org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + type_ = java.util.Collections.unmodifiableList(type_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.type_ = type_; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + signature_ = java.util.Collections.unmodifiableList(signature_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.signature_ = signature_; + if (((bitField0_ & 0x00000004) == 0x00000004)) { + string_ = string_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.string_ = string_; + if (((bitField0_ & 0x00000008) == 0x00000008)) { + body_ = java.util.Collections.unmodifiableList(body_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.body_ = body_; + return result; + } + + public Builder mergeFrom(org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables other) { + if (other == org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables.getDefaultInstance()) return this; + if (!other.type_.isEmpty()) { + if (type_.isEmpty()) { + type_ = other.type_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTypeIsMutable(); + type_.addAll(other.type_); + } + + } + if (!other.signature_.isEmpty()) { + if (signature_.isEmpty()) { + signature_ = other.signature_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureSignatureIsMutable(); + signature_.addAll(other.signature_); + } + + } + if (!other.string_.isEmpty()) { + if (string_.isEmpty()) { + string_ = other.string_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureStringIsMutable(); + string_.addAll(other.string_); + } + + } + if (!other.body_.isEmpty()) { + if (body_.isEmpty()) { + body_ = other.body_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureBodyIsMutable(); + body_.addAll(other.body_); + } + + } + setUnknownFields( + getUnknownFields().concat(other.unknownFields)); + return this; + } + + public final boolean isInitialized() { + for (int i = 0; i < getTypeCount(); i++) { + if (!getType(i).isInitialized()) { + + return false; + } + } + for (int i = 0; i < getSignatureCount(); i++) { + if (!getSignature(i).isInitialized()) { + + return false; + } + } + for (int i = 0; i < getBodyCount(); i++) { + if (!getBody(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.jvm.serialization.proto.JvmIr.AuxTables parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List type_ = + java.util.Collections.emptyList(); + private void ensureTypeIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + type_ = new java.util.ArrayList(type_); + bitField0_ |= 0x00000001; + } + } + + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; + */ + public java.util.List getTypeList() { + return java.util.Collections.unmodifiableList(type_); + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; + */ + public int getTypeCount() { + return type_.size(); + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; + */ + public org.jetbrains.kotlin.backend.common.serialization.proto.IrType getType(int index) { + return type_.get(index); + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; + */ + public Builder setType( + int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypeIsMutable(); + type_.set(index, value); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; + */ + public Builder setType( + int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrType.Builder builderForValue) { + ensureTypeIsMutable(); + type_.set(index, builderForValue.build()); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; + */ + public Builder addType(org.jetbrains.kotlin.backend.common.serialization.proto.IrType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypeIsMutable(); + type_.add(value); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; + */ + public Builder addType( + int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTypeIsMutable(); + type_.add(index, value); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; + */ + public Builder addType( + org.jetbrains.kotlin.backend.common.serialization.proto.IrType.Builder builderForValue) { + ensureTypeIsMutable(); + type_.add(builderForValue.build()); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; + */ + public Builder addType( + int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrType.Builder builderForValue) { + ensureTypeIsMutable(); + type_.add(index, builderForValue.build()); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; + */ + public Builder addAllType( + java.lang.Iterable values) { + ensureTypeIsMutable(); + org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( + values, type_); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; + */ + public Builder clearType() { + type_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; + */ + public Builder removeType(int index) { + ensureTypeIsMutable(); + type_.remove(index); + + return this; + } + + private java.util.List signature_ = + java.util.Collections.emptyList(); + private void ensureSignatureIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + signature_ = new java.util.ArrayList(signature_); + bitField0_ |= 0x00000002; + } + } + + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 2; + */ + public java.util.List getSignatureList() { + return java.util.Collections.unmodifiableList(signature_); + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 2; + */ + public int getSignatureCount() { + return signature_.size(); + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 2; + */ + public org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature getSignature(int index) { + return signature_.get(index); + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 2; + */ + public Builder setSignature( + int index, org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSignatureIsMutable(); + signature_.set(index, value); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 2; + */ + public Builder setSignature( + int index, org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature.Builder builderForValue) { + ensureSignatureIsMutable(); + signature_.set(index, builderForValue.build()); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 2; + */ + public Builder addSignature(org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSignatureIsMutable(); + signature_.add(value); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 2; + */ + public Builder addSignature( + int index, org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSignatureIsMutable(); + signature_.add(index, value); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 2; + */ + public Builder addSignature( + org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature.Builder builderForValue) { + ensureSignatureIsMutable(); + signature_.add(builderForValue.build()); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 2; + */ + public Builder addSignature( + int index, org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature.Builder builderForValue) { + ensureSignatureIsMutable(); + signature_.add(index, builderForValue.build()); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 2; + */ + public Builder addAllSignature( + java.lang.Iterable values) { + ensureSignatureIsMutable(); + org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( + values, signature_); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 2; + */ + public Builder clearSignature() { + signature_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 2; + */ + public Builder removeSignature(int index) { + ensureSignatureIsMutable(); + signature_.remove(index); + + return this; + } + + private org.jetbrains.kotlin.protobuf.LazyStringList string_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY; + private void ensureStringIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + string_ = new org.jetbrains.kotlin.protobuf.LazyStringArrayList(string_); + bitField0_ |= 0x00000004; + } + } + /** + * repeated string string = 3; + */ + public org.jetbrains.kotlin.protobuf.ProtocolStringList + getStringList() { + return string_.getUnmodifiableView(); + } + /** + * repeated string string = 3; + */ + public int getStringCount() { + return string_.size(); + } + /** + * repeated string string = 3; + */ + public java.lang.String getString(int index) { + return string_.get(index); + } + /** + * repeated string string = 3; + */ + public org.jetbrains.kotlin.protobuf.ByteString + getStringBytes(int index) { + return string_.getByteString(index); + } + /** + * repeated string string = 3; + */ + public Builder setString( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureStringIsMutable(); + string_.set(index, value); + + return this; + } + /** + * repeated string string = 3; + */ + public Builder addString( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureStringIsMutable(); + string_.add(value); + + return this; + } + /** + * repeated string string = 3; + */ + public Builder addAllString( + java.lang.Iterable values) { + ensureStringIsMutable(); + org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( + values, string_); + + return this; + } + /** + * repeated string string = 3; + */ + public Builder clearString() { + string_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + + return this; + } + /** + * repeated string string = 3; + */ + public Builder addStringBytes( + org.jetbrains.kotlin.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureStringIsMutable(); + string_.add(value); + + return this; + } + + private java.util.List body_ = + java.util.Collections.emptyList(); + private void ensureBodyIsMutable() { + if (!((bitField0_ & 0x00000008) == 0x00000008)) { + body_ = new java.util.ArrayList(body_); + bitField0_ |= 0x00000008; + } + } + + /** + * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 4; + */ + public java.util.List getBodyList() { + return java.util.Collections.unmodifiableList(body_); + } + /** + * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 4; + */ + public int getBodyCount() { + return body_.size(); + } + /** + * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 4; + */ + public org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpression getBody(int index) { + return body_.get(index); + } + /** + * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 4; + */ + public Builder setBody( + int index, org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpression value) { + if (value == null) { + throw new NullPointerException(); + } + ensureBodyIsMutable(); + body_.set(index, value); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 4; + */ + public Builder setBody( + int index, org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpression.Builder builderForValue) { + ensureBodyIsMutable(); + body_.set(index, builderForValue.build()); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 4; + */ + public Builder addBody(org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpression value) { + if (value == null) { + throw new NullPointerException(); + } + ensureBodyIsMutable(); + body_.add(value); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 4; + */ + public Builder addBody( + int index, org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpression value) { + if (value == null) { + throw new NullPointerException(); + } + ensureBodyIsMutable(); + body_.add(index, value); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 4; + */ + public Builder addBody( + org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpression.Builder builderForValue) { + ensureBodyIsMutable(); + body_.add(builderForValue.build()); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 4; + */ + public Builder addBody( + int index, org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpression.Builder builderForValue) { + ensureBodyIsMutable(); + body_.add(index, builderForValue.build()); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 4; + */ + public Builder addAllBody( + java.lang.Iterable values) { + ensureBodyIsMutable(); + org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( + values, body_); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 4; + */ + public Builder clearBody() { + body_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 4; + */ + public Builder removeBody(int index) { + ensureBodyIsMutable(); + body_.remove(index); + + return this; + } + + // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.backend.jvm.serialization.proto.AuxTables) + } + + static { + defaultInstance = new AuxTables(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.jvm.serialization.proto.AuxTables) + } + + public interface JvmIrFileOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIrFile) + org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder { + + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclaration declaration = 1; + */ + java.util.List + getDeclarationList(); + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclaration declaration = 1; + */ + org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclaration getDeclaration(int index); + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclaration declaration = 1; + */ + int getDeclarationCount(); + + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 2; + */ + java.util.List + getAnnotationList(); + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 2; + */ + org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index); + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 2; + */ + int getAnnotationCount(); + + /** + * repeated int32 facade_fq_name = 3; + */ + java.util.List getFacadeFqNameList(); + /** + * repeated int32 facade_fq_name = 3; + */ + int getFacadeFqNameCount(); + /** + * repeated int32 facade_fq_name = 3; + */ + int getFacadeFqName(int index); + + /** + * required .org.jetbrains.kotlin.backend.jvm.serialization.proto.AuxTables aux_tables = 4; + */ + boolean hasAuxTables(); + /** + * required .org.jetbrains.kotlin.backend.jvm.serialization.proto.AuxTables aux_tables = 4; + */ + org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables getAuxTables(); + } + /** + * Protobuf type {@code org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIrFile} + */ + public static final class JvmIrFile extends + org.jetbrains.kotlin.protobuf.GeneratedMessageLite implements + // @@protoc_insertion_point(message_implements:org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIrFile) + JvmIrFileOrBuilder { + // Use JvmIrFile.newBuilder() to construct. + private JvmIrFile(org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private JvmIrFile(boolean noInit) { this.unknownFields = org.jetbrains.kotlin.protobuf.ByteString.EMPTY;} + + private static final JvmIrFile defaultInstance; + public static JvmIrFile getDefaultInstance() { + return defaultInstance; + } + + public JvmIrFile getDefaultInstanceForType() { + return defaultInstance; + } + + private final org.jetbrains.kotlin.protobuf.ByteString unknownFields; + private JvmIrFile( + 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, 1); + 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)) { + declaration_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + declaration_.add(input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclaration.PARSER, extensionRegistry)); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + annotation_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + annotation_.add(input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.PARSER, extensionRegistry)); + break; + } + case 24: { + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + facadeFqName_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + facadeFqName_.add(input.readInt32()); + break; + } + case 26: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004) && input.getBytesUntilLimit() > 0) { + facadeFqName_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + while (input.getBytesUntilLimit() > 0) { + facadeFqName_.add(input.readInt32()); + } + input.popLimit(limit); + break; + } + case 34: { + org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables.Builder subBuilder = null; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + subBuilder = auxTables_.toBuilder(); + } + auxTables_ = input.readMessage(org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(auxTables_); + auxTables_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000001; + 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)) { + declaration_ = java.util.Collections.unmodifiableList(declaration_); + } + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + annotation_ = java.util.Collections.unmodifiableList(annotation_); + } + if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + facadeFqName_ = java.util.Collections.unmodifiableList(facadeFqName_); + } + try { + unknownFieldsCodedOutput.flush(); + } catch (java.io.IOException e) { + // Should not happen + } finally { + unknownFields = unknownFieldsOutput.toByteString(); + } + makeExtensionsImmutable(); + } + } + public static org.jetbrains.kotlin.protobuf.Parser PARSER = + new org.jetbrains.kotlin.protobuf.AbstractParser() { + public JvmIrFile parsePartialFrom( + org.jetbrains.kotlin.protobuf.CodedInputStream input, + org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) + throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { + return new JvmIrFile(input, extensionRegistry); + } + }; + + @java.lang.Override + public org.jetbrains.kotlin.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + public static final int DECLARATION_FIELD_NUMBER = 1; + private java.util.List declaration_; + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclaration declaration = 1; + */ + public java.util.List getDeclarationList() { + return declaration_; + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclaration declaration = 1; + */ + public java.util.List + getDeclarationOrBuilderList() { + return declaration_; + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclaration declaration = 1; + */ + public int getDeclarationCount() { + return declaration_.size(); + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclaration declaration = 1; + */ + public org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclaration getDeclaration(int index) { + return declaration_.get(index); + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclaration declaration = 1; + */ + public org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclarationOrBuilder getDeclarationOrBuilder( + int index) { + return declaration_.get(index); + } + + public static final int ANNOTATION_FIELD_NUMBER = 2; + private java.util.List annotation_; + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 2; + */ + public java.util.List getAnnotationList() { + return annotation_; + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 2; + */ + public java.util.List + getAnnotationOrBuilderList() { + return annotation_; + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 2; + */ + public int getAnnotationCount() { + return annotation_.size(); + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 2; + */ + public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index) { + return annotation_.get(index); + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 2; + */ + public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCallOrBuilder getAnnotationOrBuilder( + int index) { + return annotation_.get(index); + } + + public static final int FACADE_FQ_NAME_FIELD_NUMBER = 3; + private java.util.List facadeFqName_; + /** + * repeated int32 facade_fq_name = 3; + */ + public java.util.List + getFacadeFqNameList() { + return facadeFqName_; + } + /** + * repeated int32 facade_fq_name = 3; + */ + public int getFacadeFqNameCount() { + return facadeFqName_.size(); + } + /** + * repeated int32 facade_fq_name = 3; + */ + public int getFacadeFqName(int index) { + return facadeFqName_.get(index); + } + + public static final int AUX_TABLES_FIELD_NUMBER = 4; + private org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables auxTables_; + /** + * required .org.jetbrains.kotlin.backend.jvm.serialization.proto.AuxTables aux_tables = 4; + */ + public boolean hasAuxTables() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required .org.jetbrains.kotlin.backend.jvm.serialization.proto.AuxTables aux_tables = 4; + */ + public org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables getAuxTables() { + return auxTables_; + } + + private void initFields() { + declaration_ = java.util.Collections.emptyList(); + annotation_ = java.util.Collections.emptyList(); + facadeFqName_ = java.util.Collections.emptyList(); + auxTables_ = org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + if (!hasAuxTables()) { + memoizedIsInitialized = 0; + return false; + } + for (int i = 0; i < getDeclarationCount(); i++) { + if (!getDeclaration(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + for (int i = 0; i < getAnnotationCount(); i++) { + if (!getAnnotation(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + if (!getAuxTables().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 < declaration_.size(); i++) { + output.writeMessage(1, declaration_.get(i)); + } + for (int i = 0; i < annotation_.size(); i++) { + output.writeMessage(2, annotation_.get(i)); + } + for (int i = 0; i < facadeFqName_.size(); i++) { + output.writeInt32(3, facadeFqName_.get(i)); + } + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(4, auxTables_); + } + 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 < declaration_.size(); i++) { + size += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeMessageSize(1, declaration_.get(i)); + } + for (int i = 0; i < annotation_.size(); i++) { + size += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeMessageSize(2, annotation_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < facadeFqName_.size(); i++) { + dataSize += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeInt32SizeNoTag(facadeFqName_.get(i)); + } + size += dataSize; + size += 1 * getFacadeFqNameList().size(); + } + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeMessageSize(4, auxTables_); + } + 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.jvm.serialization.proto.JvmIr.JvmIrFile parseFrom( + org.jetbrains.kotlin.protobuf.ByteString data) + throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.JvmIrFile 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.jvm.serialization.proto.JvmIr.JvmIrFile parseFrom(byte[] data) + throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.JvmIrFile 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.jvm.serialization.proto.JvmIr.JvmIrFile parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.JvmIrFile 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.jvm.serialization.proto.JvmIr.JvmIrFile parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.JvmIrFile 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.jvm.serialization.proto.JvmIr.JvmIrFile parseFrom( + org.jetbrains.kotlin.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.JvmIrFile 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.jvm.serialization.proto.JvmIr.JvmIrFile prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + /** + * Protobuf type {@code org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIrFile} + */ + public static final class Builder extends + org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder< + org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.JvmIrFile, Builder> + implements + // @@protoc_insertion_point(builder_implements:org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIrFile) + org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.JvmIrFileOrBuilder { + // Construct using org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.JvmIrFile.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + declaration_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + annotation_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + facadeFqName_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + auxTables_ = org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables.getDefaultInstance(); + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.JvmIrFile getDefaultInstanceForType() { + return org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.JvmIrFile.getDefaultInstance(); + } + + public org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.JvmIrFile build() { + org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.JvmIrFile result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.JvmIrFile buildPartial() { + org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.JvmIrFile result = new org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.JvmIrFile(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + declaration_ = java.util.Collections.unmodifiableList(declaration_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.declaration_ = declaration_; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + annotation_ = java.util.Collections.unmodifiableList(annotation_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.annotation_ = annotation_; + if (((bitField0_ & 0x00000004) == 0x00000004)) { + facadeFqName_ = java.util.Collections.unmodifiableList(facadeFqName_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.facadeFqName_ = facadeFqName_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000001; + } + result.auxTables_ = auxTables_; + result.bitField0_ = to_bitField0_; + return result; + } + + public Builder mergeFrom(org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.JvmIrFile other) { + if (other == org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.JvmIrFile.getDefaultInstance()) return this; + if (!other.declaration_.isEmpty()) { + if (declaration_.isEmpty()) { + declaration_ = other.declaration_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDeclarationIsMutable(); + declaration_.addAll(other.declaration_); + } + + } + if (!other.annotation_.isEmpty()) { + if (annotation_.isEmpty()) { + annotation_ = other.annotation_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureAnnotationIsMutable(); + annotation_.addAll(other.annotation_); + } + + } + if (!other.facadeFqName_.isEmpty()) { + if (facadeFqName_.isEmpty()) { + facadeFqName_ = other.facadeFqName_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureFacadeFqNameIsMutable(); + facadeFqName_.addAll(other.facadeFqName_); + } + + } + if (other.hasAuxTables()) { + mergeAuxTables(other.getAuxTables()); + } + setUnknownFields( + getUnknownFields().concat(other.unknownFields)); + return this; + } + + public final boolean isInitialized() { + if (!hasAuxTables()) { + + return false; + } + for (int i = 0; i < getDeclarationCount(); i++) { + if (!getDeclaration(i).isInitialized()) { + + return false; + } + } + for (int i = 0; i < getAnnotationCount(); i++) { + if (!getAnnotation(i).isInitialized()) { + + return false; + } + } + if (!getAuxTables().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.jvm.serialization.proto.JvmIr.JvmIrFile parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.JvmIrFile) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List declaration_ = + java.util.Collections.emptyList(); + private void ensureDeclarationIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + declaration_ = new java.util.ArrayList(declaration_); + bitField0_ |= 0x00000001; + } + } + + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclaration declaration = 1; + */ + public java.util.List getDeclarationList() { + return java.util.Collections.unmodifiableList(declaration_); + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclaration declaration = 1; + */ + public int getDeclarationCount() { + return declaration_.size(); + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclaration declaration = 1; + */ + public org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclaration getDeclaration(int index) { + return declaration_.get(index); + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclaration declaration = 1; + */ + public Builder setDeclaration( + int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclaration value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeclarationIsMutable(); + declaration_.set(index, value); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclaration declaration = 1; + */ + public Builder setDeclaration( + int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclaration.Builder builderForValue) { + ensureDeclarationIsMutable(); + declaration_.set(index, builderForValue.build()); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclaration declaration = 1; + */ + public Builder addDeclaration(org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclaration value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeclarationIsMutable(); + declaration_.add(value); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclaration declaration = 1; + */ + public Builder addDeclaration( + int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclaration value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeclarationIsMutable(); + declaration_.add(index, value); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclaration declaration = 1; + */ + public Builder addDeclaration( + org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclaration.Builder builderForValue) { + ensureDeclarationIsMutable(); + declaration_.add(builderForValue.build()); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclaration declaration = 1; + */ + public Builder addDeclaration( + int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclaration.Builder builderForValue) { + ensureDeclarationIsMutable(); + declaration_.add(index, builderForValue.build()); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclaration declaration = 1; + */ + public Builder addAllDeclaration( + java.lang.Iterable values) { + ensureDeclarationIsMutable(); + org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( + values, declaration_); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclaration declaration = 1; + */ + public Builder clearDeclaration() { + declaration_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclaration declaration = 1; + */ + public Builder removeDeclaration(int index) { + ensureDeclarationIsMutable(); + declaration_.remove(index); + + return this; + } + + private java.util.List annotation_ = + java.util.Collections.emptyList(); + private void ensureAnnotationIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + annotation_ = new java.util.ArrayList(annotation_); + bitField0_ |= 0x00000002; + } + } + + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 2; + */ + public java.util.List getAnnotationList() { + return java.util.Collections.unmodifiableList(annotation_); + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 2; + */ + public int getAnnotationCount() { + return annotation_.size(); + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 2; + */ + public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index) { + return annotation_.get(index); + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 2; + */ + 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; + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 2; + */ + public Builder setAnnotation( + int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) { + ensureAnnotationIsMutable(); + annotation_.set(index, builderForValue.build()); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 2; + */ + public Builder addAnnotation(org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAnnotationIsMutable(); + annotation_.add(value); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 2; + */ + 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; + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 2; + */ + public Builder addAnnotation( + org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) { + ensureAnnotationIsMutable(); + annotation_.add(builderForValue.build()); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 2; + */ + public Builder addAnnotation( + int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) { + ensureAnnotationIsMutable(); + annotation_.add(index, builderForValue.build()); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 2; + */ + public Builder addAllAnnotation( + java.lang.Iterable values) { + ensureAnnotationIsMutable(); + org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( + values, annotation_); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 2; + */ + public Builder clearAnnotation() { + annotation_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 2; + */ + public Builder removeAnnotation(int index) { + ensureAnnotationIsMutable(); + annotation_.remove(index); + + return this; + } + + private java.util.List facadeFqName_ = java.util.Collections.emptyList(); + private void ensureFacadeFqNameIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + facadeFqName_ = new java.util.ArrayList(facadeFqName_); + bitField0_ |= 0x00000004; + } + } + /** + * repeated int32 facade_fq_name = 3; + */ + public java.util.List + getFacadeFqNameList() { + return java.util.Collections.unmodifiableList(facadeFqName_); + } + /** + * repeated int32 facade_fq_name = 3; + */ + public int getFacadeFqNameCount() { + return facadeFqName_.size(); + } + /** + * repeated int32 facade_fq_name = 3; + */ + public int getFacadeFqName(int index) { + return facadeFqName_.get(index); + } + /** + * repeated int32 facade_fq_name = 3; + */ + public Builder setFacadeFqName( + int index, int value) { + ensureFacadeFqNameIsMutable(); + facadeFqName_.set(index, value); + + return this; + } + /** + * repeated int32 facade_fq_name = 3; + */ + public Builder addFacadeFqName(int value) { + ensureFacadeFqNameIsMutable(); + facadeFqName_.add(value); + + return this; + } + /** + * repeated int32 facade_fq_name = 3; + */ + public Builder addAllFacadeFqName( + java.lang.Iterable values) { + ensureFacadeFqNameIsMutable(); + org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( + values, facadeFqName_); + + return this; + } + /** + * repeated int32 facade_fq_name = 3; + */ + public Builder clearFacadeFqName() { + facadeFqName_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + + return this; + } + + private org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables auxTables_ = org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables.getDefaultInstance(); + /** + * required .org.jetbrains.kotlin.backend.jvm.serialization.proto.AuxTables aux_tables = 4; + */ + public boolean hasAuxTables() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * required .org.jetbrains.kotlin.backend.jvm.serialization.proto.AuxTables aux_tables = 4; + */ + public org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables getAuxTables() { + return auxTables_; + } + /** + * required .org.jetbrains.kotlin.backend.jvm.serialization.proto.AuxTables aux_tables = 4; + */ + public Builder setAuxTables(org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables value) { + if (value == null) { + throw new NullPointerException(); + } + auxTables_ = value; + + bitField0_ |= 0x00000008; + return this; + } + /** + * required .org.jetbrains.kotlin.backend.jvm.serialization.proto.AuxTables aux_tables = 4; + */ + public Builder setAuxTables( + org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables.Builder builderForValue) { + auxTables_ = builderForValue.build(); + + bitField0_ |= 0x00000008; + return this; + } + /** + * required .org.jetbrains.kotlin.backend.jvm.serialization.proto.AuxTables aux_tables = 4; + */ + public Builder mergeAuxTables(org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables value) { + if (((bitField0_ & 0x00000008) == 0x00000008) && + auxTables_ != org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables.getDefaultInstance()) { + auxTables_ = + org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables.newBuilder(auxTables_).mergeFrom(value).buildPartial(); + } else { + auxTables_ = value; + } + + bitField0_ |= 0x00000008; + return this; + } + /** + * required .org.jetbrains.kotlin.backend.jvm.serialization.proto.AuxTables aux_tables = 4; + */ + public Builder clearAuxTables() { + auxTables_ = org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables.getDefaultInstance(); + + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIrFile) + } + + static { + defaultInstance = new JvmIrFile(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIrFile) + } + + public interface JvmIrClassOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIrClass) + org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder { + + /** + * required .org.jetbrains.kotlin.backend.common.serialization.proto.IrClass ir_class = 1; + */ + boolean hasIrClass(); + /** + * required .org.jetbrains.kotlin.backend.common.serialization.proto.IrClass ir_class = 1; + */ + org.jetbrains.kotlin.backend.common.serialization.proto.IrClass getIrClass(); + + /** + * required .org.jetbrains.kotlin.backend.jvm.serialization.proto.AuxTables aux_tables = 2; + */ + boolean hasAuxTables(); + /** + * required .org.jetbrains.kotlin.backend.jvm.serialization.proto.AuxTables aux_tables = 2; + */ + org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables getAuxTables(); + } + /** + * Protobuf type {@code org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIrClass} + */ + public static final class JvmIrClass extends + org.jetbrains.kotlin.protobuf.GeneratedMessageLite implements + // @@protoc_insertion_point(message_implements:org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIrClass) + JvmIrClassOrBuilder { + // Use JvmIrClass.newBuilder() to construct. + private JvmIrClass(org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private JvmIrClass(boolean noInit) { this.unknownFields = org.jetbrains.kotlin.protobuf.ByteString.EMPTY;} + + private static final JvmIrClass defaultInstance; + public static JvmIrClass getDefaultInstance() { + return defaultInstance; + } + + public JvmIrClass getDefaultInstanceForType() { + return defaultInstance; + } + + private final org.jetbrains.kotlin.protobuf.ByteString unknownFields; + private JvmIrClass( + 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, 1); + 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: { + org.jetbrains.kotlin.backend.common.serialization.proto.IrClass.Builder subBuilder = null; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + subBuilder = irClass_.toBuilder(); + } + irClass_ = input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IrClass.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(irClass_); + irClass_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000001; + break; + } + case 18: { + org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables.Builder subBuilder = null; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + subBuilder = auxTables_.toBuilder(); + } + auxTables_ = input.readMessage(org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(auxTables_); + auxTables_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000002; + 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 { + try { + unknownFieldsCodedOutput.flush(); + } catch (java.io.IOException e) { + // Should not happen + } finally { + unknownFields = unknownFieldsOutput.toByteString(); + } + makeExtensionsImmutable(); + } + } + public static org.jetbrains.kotlin.protobuf.Parser PARSER = + new org.jetbrains.kotlin.protobuf.AbstractParser() { + public JvmIrClass parsePartialFrom( + org.jetbrains.kotlin.protobuf.CodedInputStream input, + org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) + throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { + return new JvmIrClass(input, extensionRegistry); + } + }; + + @java.lang.Override + public org.jetbrains.kotlin.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + public static final int IR_CLASS_FIELD_NUMBER = 1; + private org.jetbrains.kotlin.backend.common.serialization.proto.IrClass irClass_; + /** + * required .org.jetbrains.kotlin.backend.common.serialization.proto.IrClass ir_class = 1; + */ + public boolean hasIrClass() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required .org.jetbrains.kotlin.backend.common.serialization.proto.IrClass ir_class = 1; + */ + public org.jetbrains.kotlin.backend.common.serialization.proto.IrClass getIrClass() { + return irClass_; + } + + public static final int AUX_TABLES_FIELD_NUMBER = 2; + private org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables auxTables_; + /** + * required .org.jetbrains.kotlin.backend.jvm.serialization.proto.AuxTables aux_tables = 2; + */ + public boolean hasAuxTables() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * required .org.jetbrains.kotlin.backend.jvm.serialization.proto.AuxTables aux_tables = 2; + */ + public org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables getAuxTables() { + return auxTables_; + } + + private void initFields() { + irClass_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrClass.getDefaultInstance(); + auxTables_ = org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + if (!hasIrClass()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasAuxTables()) { + memoizedIsInitialized = 0; + return false; + } + if (!getIrClass().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + if (!getAuxTables().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(org.jetbrains.kotlin.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(1, irClass_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeMessage(2, auxTables_); + } + output.writeRawBytes(unknownFields); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeMessageSize(1, irClass_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeMessageSize(2, auxTables_); + } + 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.jvm.serialization.proto.JvmIr.JvmIrClass parseFrom( + org.jetbrains.kotlin.protobuf.ByteString data) + throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.JvmIrClass 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.jvm.serialization.proto.JvmIr.JvmIrClass parseFrom(byte[] data) + throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.JvmIrClass 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.jvm.serialization.proto.JvmIr.JvmIrClass parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.JvmIrClass 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.jvm.serialization.proto.JvmIr.JvmIrClass parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.JvmIrClass 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.jvm.serialization.proto.JvmIr.JvmIrClass parseFrom( + org.jetbrains.kotlin.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.JvmIrClass 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.jvm.serialization.proto.JvmIr.JvmIrClass prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + /** + * Protobuf type {@code org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIrClass} + */ + public static final class Builder extends + org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder< + org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.JvmIrClass, Builder> + implements + // @@protoc_insertion_point(builder_implements:org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIrClass) + org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.JvmIrClassOrBuilder { + // Construct using org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.JvmIrClass.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + irClass_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrClass.getDefaultInstance(); + bitField0_ = (bitField0_ & ~0x00000001); + auxTables_ = org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables.getDefaultInstance(); + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.JvmIrClass getDefaultInstanceForType() { + return org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.JvmIrClass.getDefaultInstance(); + } + + public org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.JvmIrClass build() { + org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.JvmIrClass result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.JvmIrClass buildPartial() { + org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.JvmIrClass result = new org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.JvmIrClass(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.irClass_ = irClass_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.auxTables_ = auxTables_; + result.bitField0_ = to_bitField0_; + return result; + } + + public Builder mergeFrom(org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.JvmIrClass other) { + if (other == org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.JvmIrClass.getDefaultInstance()) return this; + if (other.hasIrClass()) { + mergeIrClass(other.getIrClass()); + } + if (other.hasAuxTables()) { + mergeAuxTables(other.getAuxTables()); + } + setUnknownFields( + getUnknownFields().concat(other.unknownFields)); + return this; + } + + public final boolean isInitialized() { + if (!hasIrClass()) { + + return false; + } + if (!hasAuxTables()) { + + return false; + } + if (!getIrClass().isInitialized()) { + + return false; + } + if (!getAuxTables().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.jvm.serialization.proto.JvmIr.JvmIrClass parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.JvmIrClass) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private org.jetbrains.kotlin.backend.common.serialization.proto.IrClass irClass_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrClass.getDefaultInstance(); + /** + * required .org.jetbrains.kotlin.backend.common.serialization.proto.IrClass ir_class = 1; + */ + public boolean hasIrClass() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required .org.jetbrains.kotlin.backend.common.serialization.proto.IrClass ir_class = 1; + */ + public org.jetbrains.kotlin.backend.common.serialization.proto.IrClass getIrClass() { + return irClass_; + } + /** + * required .org.jetbrains.kotlin.backend.common.serialization.proto.IrClass ir_class = 1; + */ + public Builder setIrClass(org.jetbrains.kotlin.backend.common.serialization.proto.IrClass value) { + if (value == null) { + throw new NullPointerException(); + } + irClass_ = value; + + bitField0_ |= 0x00000001; + return this; + } + /** + * required .org.jetbrains.kotlin.backend.common.serialization.proto.IrClass ir_class = 1; + */ + public Builder setIrClass( + org.jetbrains.kotlin.backend.common.serialization.proto.IrClass.Builder builderForValue) { + irClass_ = builderForValue.build(); + + bitField0_ |= 0x00000001; + return this; + } + /** + * required .org.jetbrains.kotlin.backend.common.serialization.proto.IrClass ir_class = 1; + */ + public Builder mergeIrClass(org.jetbrains.kotlin.backend.common.serialization.proto.IrClass value) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + irClass_ != org.jetbrains.kotlin.backend.common.serialization.proto.IrClass.getDefaultInstance()) { + irClass_ = + org.jetbrains.kotlin.backend.common.serialization.proto.IrClass.newBuilder(irClass_).mergeFrom(value).buildPartial(); + } else { + irClass_ = value; + } + + bitField0_ |= 0x00000001; + return this; + } + /** + * required .org.jetbrains.kotlin.backend.common.serialization.proto.IrClass ir_class = 1; + */ + public Builder clearIrClass() { + irClass_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrClass.getDefaultInstance(); + + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + private org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables auxTables_ = org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables.getDefaultInstance(); + /** + * required .org.jetbrains.kotlin.backend.jvm.serialization.proto.AuxTables aux_tables = 2; + */ + public boolean hasAuxTables() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * required .org.jetbrains.kotlin.backend.jvm.serialization.proto.AuxTables aux_tables = 2; + */ + public org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables getAuxTables() { + return auxTables_; + } + /** + * required .org.jetbrains.kotlin.backend.jvm.serialization.proto.AuxTables aux_tables = 2; + */ + public Builder setAuxTables(org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables value) { + if (value == null) { + throw new NullPointerException(); + } + auxTables_ = value; + + bitField0_ |= 0x00000002; + return this; + } + /** + * required .org.jetbrains.kotlin.backend.jvm.serialization.proto.AuxTables aux_tables = 2; + */ + public Builder setAuxTables( + org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables.Builder builderForValue) { + auxTables_ = builderForValue.build(); + + bitField0_ |= 0x00000002; + return this; + } + /** + * required .org.jetbrains.kotlin.backend.jvm.serialization.proto.AuxTables aux_tables = 2; + */ + public Builder mergeAuxTables(org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables value) { + if (((bitField0_ & 0x00000002) == 0x00000002) && + auxTables_ != org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables.getDefaultInstance()) { + auxTables_ = + org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables.newBuilder(auxTables_).mergeFrom(value).buildPartial(); + } else { + auxTables_ = value; + } + + bitField0_ |= 0x00000002; + return this; + } + /** + * required .org.jetbrains.kotlin.backend.jvm.serialization.proto.AuxTables aux_tables = 2; + */ + public Builder clearAuxTables() { + auxTables_ = org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables.getDefaultInstance(); + + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIrClass) + } + + static { + defaultInstance = new JvmIrClass(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIrClass) + } + + + static { + } + + // @@protoc_insertion_point(outer_class_scope) +} \ No newline at end of file diff --git a/generators/protobuf/GenerateProtoBuf.kt b/generators/protobuf/GenerateProtoBuf.kt index 4573b945b3a..a352a5a5311 100644 --- a/generators/protobuf/GenerateProtoBuf.kt +++ b/generators/protobuf/GenerateProtoBuf.kt @@ -53,6 +53,7 @@ val PROTO_PATHS: List = listOf( ProtoPath("compiler/util-klib-metadata/src/KlibMetadataProtoBuf.proto"), ProtoPath("compiler/ir/serialization.common/src/KotlinIr.proto", false), ProtoPath("compiler/ir/serialization.common/src/KotlinPirCarriers.proto", false), + ProtoPath("compiler/ir/serialization.jvm/src/JvmIr.proto", false), ProtoPath("plugins/kotlin-serialization/kotlin-serialization-compiler/src/class_extensions.proto", generateDebug = false) )