From a9ce25cf33c7ab1f6d833ef7ced5094d4f7bfab9 Mon Sep 17 00:00:00 2001 From: Georgy Bronnikov Date: Wed, 15 Sep 2021 21:34:56 +0300 Subject: [PATCH] JVM_IR: only serialize inline functions themselves with -Xserialize-ir=inline --- .../backend/jvm/JvmGeneratorExtensionsImpl.kt | 28 +- .../kotlin/backend/jvm/JvmIrSerializerImpl.kt | 8 +- .../kotlin/backend/jvm/JvmFileFacadeClass.kt | 5 +- .../kotlin/backend/jvm/JvmIrSerializer.kt | 4 +- .../ir/declarations/lazy/IrLazyClass.kt | 6 +- .../lazy/IrLazyDeclarationBase.kt | 6 +- .../kotlin/ir/util/StubGeneratorExtensions.kt | 9 +- .../common/serialization/IrFileSerializer.kt | 2 +- compiler/ir/serialization.jvm/src/JvmIr.proto | 24 +- .../serialization/JvmIrSerializerSession.kt | 95 +- .../deserializeLazyDeclarations.kt | 96 +- .../jvm/serialization/proto/JvmIr.java | 3047 +++++------------ 12 files changed, 951 insertions(+), 2379 deletions(-) diff --git a/compiler/ir/backend.jvm/entrypoint/src/org/jetbrains/kotlin/backend/jvm/JvmGeneratorExtensionsImpl.kt b/compiler/ir/backend.jvm/entrypoint/src/org/jetbrains/kotlin/backend/jvm/JvmGeneratorExtensionsImpl.kt index 23aa3be884f..c24d95bf673 100644 --- a/compiler/ir/backend.jvm/entrypoint/src/org/jetbrains/kotlin/backend/jvm/JvmGeneratorExtensionsImpl.kt +++ b/compiler/ir/backend.jvm/entrypoint/src/org/jetbrains/kotlin/backend/jvm/JvmGeneratorExtensionsImpl.kt @@ -9,8 +9,7 @@ import org.jetbrains.kotlin.backend.common.ir.createImplicitParameterDeclaration import org.jetbrains.kotlin.backend.common.ir.createParameterDeclarations import org.jetbrains.kotlin.backend.common.serialization.signature.PublicIdSignatureComputer import org.jetbrains.kotlin.backend.jvm.lower.SingletonObjectJvmStaticTransformer -import org.jetbrains.kotlin.backend.jvm.serialization.deserializeClassFromByteArray -import org.jetbrains.kotlin.backend.jvm.serialization.deserializeIrFileFromByteArray +import org.jetbrains.kotlin.backend.jvm.serialization.deserializeFromByteArray import org.jetbrains.kotlin.config.CompilerConfiguration import org.jetbrains.kotlin.config.JVMConfigurationKeys import org.jetbrains.kotlin.config.JvmSerializeIrMode @@ -25,7 +24,6 @@ import org.jetbrains.kotlin.ir.builders.declarations.buildClass import org.jetbrains.kotlin.ir.declarations.* import org.jetbrains.kotlin.ir.declarations.impl.IrExternalPackageFragmentImpl import org.jetbrains.kotlin.ir.declarations.impl.IrFactoryImpl -import org.jetbrains.kotlin.ir.declarations.lazy.IrLazyClass import org.jetbrains.kotlin.ir.IrBuiltIns import org.jetbrains.kotlin.ir.expressions.IrDelegatingConstructorCall import org.jetbrains.kotlin.ir.expressions.impl.IrDelegatingConstructorCallImpl @@ -119,28 +117,18 @@ open class JvmGeneratorExtensionsImpl( } } - override fun deserializeLazyClass( - irClass: IrLazyClass, - stubGenerator: DeclarationStubGenerator, - parent: IrDeclarationParent, - allowErrorNodes: Boolean - ): Boolean { - val serializedIr = (irClass.source as? KotlinJvmBinarySourceElement)?.binaryClass?.classHeader?.serializedIr ?: return false - deserializeClassFromByteArray( - serializedIr, stubGenerator, irClass, JvmIrTypeSystemContext(stubGenerator.irBuiltIns), allowErrorNodes - ) - irClass.transform(SingletonObjectJvmStaticTransformer(stubGenerator.irBuiltIns, cachedFields), null) - return true - } - - override fun deserializeFacadeClass( + override fun deserializeClass( irClass: IrClass, stubGenerator: DeclarationStubGenerator, parent: IrDeclarationParent, allowErrorNodes: Boolean ): Boolean { - val serializedIr = (irClass.source as? JvmPackagePartSource)?.knownJvmBinaryClass?.classHeader?.serializedIr ?: return false - deserializeIrFileFromByteArray( + val serializedIr = when (val source = irClass.source) { + is KotlinJvmBinarySourceElement -> source.binaryClass.classHeader.serializedIr + is JvmPackagePartSource -> source.knownJvmBinaryClass?.classHeader?.serializedIr + else -> null + } ?: return false + deserializeFromByteArray( serializedIr, stubGenerator, irClass, JvmIrTypeSystemContext(stubGenerator.irBuiltIns), allowErrorNodes ) irClass.transform(SingletonObjectJvmStaticTransformer(stubGenerator.irBuiltIns, cachedFields), null) diff --git a/compiler/ir/backend.jvm/entrypoint/src/org/jetbrains/kotlin/backend/jvm/JvmIrSerializerImpl.kt b/compiler/ir/backend.jvm/entrypoint/src/org/jetbrains/kotlin/backend/jvm/JvmIrSerializerImpl.kt index 76441df64fe..1e78174f2b9 100644 --- a/compiler/ir/backend.jvm/entrypoint/src/org/jetbrains/kotlin/backend/jvm/JvmIrSerializerImpl.kt +++ b/compiler/ir/backend.jvm/entrypoint/src/org/jetbrains/kotlin/backend/jvm/JvmIrSerializerImpl.kt @@ -19,13 +19,13 @@ class JvmIrSerializerImpl(private val configuration: CompilerConfiguration) : Jv private val declarationTable = DeclarationTable(JvmGlobalDeclarationTable()) - override fun serializeIrFile(irFile: IrFile): ByteArray { - return makeSerializerSession().serializeJvmIrFile(irFile).toByteArray() + override fun serializeIrFile(irFile: IrFile): ByteArray? { + return makeSerializerSession().serializeJvmIrFile(irFile)?.toByteArray() } - override fun serializeTopLevelIrClass(irClass: IrClass): ByteArray { + override fun serializeTopLevelIrClass(irClass: IrClass): ByteArray? { assert(irClass.parent is IrFile) - return makeSerializerSession().serializeTopLevelClass(irClass).toByteArray() + return makeSerializerSession().serializeTopLevelClass(irClass)?.toByteArray() } private fun makeSerializerSession() = diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/JvmFileFacadeClass.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/JvmFileFacadeClass.kt index b7c6f42f869..8f3def3da73 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/JvmFileFacadeClass.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/JvmFileFacadeClass.kt @@ -28,8 +28,7 @@ class JvmFileFacadeClass( private var irLoaded: Boolean? = null override fun loadIr(): Boolean { - irLoaded?.let { return it } - irLoaded = stubGenerator.extensions.deserializeFacadeClass(this, stubGenerator, parent, allowErrorNodes = false) - return irLoaded!! + return irLoaded ?: + stubGenerator.extensions.deserializeClass(this, stubGenerator, parent, allowErrorNodes = false).also { irLoaded = it } } } \ No newline at end of file diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/JvmIrSerializer.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/JvmIrSerializer.kt index dcc2bf5b555..5143eeaa7fc 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/JvmIrSerializer.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/JvmIrSerializer.kt @@ -9,6 +9,6 @@ import org.jetbrains.kotlin.ir.declarations.IrClass import org.jetbrains.kotlin.ir.declarations.IrFile interface JvmIrSerializer { - fun serializeTopLevelIrClass(irClass: IrClass): ByteArray - fun serializeIrFile(irFile: IrFile): ByteArray + fun serializeTopLevelIrClass(irClass: IrClass): ByteArray? + fun serializeIrFile(irFile: IrFile): ByteArray? } \ No newline at end of file diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/lazy/IrLazyClass.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/lazy/IrLazyClass.kt index 118466da694..861a12f219c 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/lazy/IrLazyClass.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/lazy/IrLazyClass.kt @@ -119,9 +119,7 @@ class IrLazyClass( override fun loadIr(): Boolean { assert(parent is IrPackageFragment) - irLoaded?.let { return it } - return stubGenerator.extensions.deserializeLazyClass( - this, stubGenerator, parent, allowErrorNodes = false - ).also { irLoaded = it } + return irLoaded ?: + stubGenerator.extensions.deserializeClass(this, stubGenerator, parent, allowErrorNodes = false).also { irLoaded = it } } } diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/lazy/IrLazyDeclarationBase.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/lazy/IrLazyDeclarationBase.kt index 9b81675acb5..509afacd40e 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/lazy/IrLazyDeclarationBase.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/lazy/IrLazyDeclarationBase.kt @@ -39,13 +39,15 @@ interface IrLazyDeclarationBase : IrDeclaration { descriptor.annotations.mapNotNull(typeTranslator.constantValueGenerator::generateAnnotationConstructorCall).toMutableList() } - fun createLazyParent(): ReadWriteProperty = lazyVar(stubGenerator.lock) { + fun createLazyParent(): ReadWriteProperty = lazyVar(stubGenerator.lock, ::lazyParent) + + fun lazyParent(): IrDeclarationParent { val currentDescriptor = descriptor val containingDeclaration = ((currentDescriptor as? PropertyAccessorDescriptor)?.correspondingProperty ?: currentDescriptor).containingDeclaration - when (containingDeclaration) { + return when (containingDeclaration) { is PackageFragmentDescriptor -> run { val parent = this.takeUnless { it is IrClass }?.let { stubGenerator.generateOrGetFacadeClass(descriptor) diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/StubGeneratorExtensions.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/StubGeneratorExtensions.kt index d0bf61e9810..7cfcc01c126 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/StubGeneratorExtensions.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/StubGeneratorExtensions.kt @@ -39,14 +39,7 @@ open class StubGeneratorExtensions { open fun isStaticFunction(descriptor: FunctionDescriptor): Boolean = false - open fun deserializeLazyClass( - irClass: IrLazyClass, - stubGenerator: DeclarationStubGenerator, - parent: IrDeclarationParent, - allowErrorNodes: Boolean, - ): Boolean = false - - open fun deserializeFacadeClass( + open fun deserializeClass( irClass: IrClass, stubGenerator: DeclarationStubGenerator, parent: IrDeclarationParent, 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 de422b2339f..99b32296f3c 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 @@ -1428,7 +1428,7 @@ open class IrFileSerializer( open fun keepOrderOfProperties(property: IrProperty): Boolean = !property.isConst open fun backendSpecificSerializeAllMembers(irClass: IrClass) = false - fun memberNeedsSerialization(member: IrDeclaration): Boolean { + open fun memberNeedsSerialization(member: IrDeclaration): Boolean { val parent = member.parent require(parent is IrClass) if (backendSpecificSerializeAllMembers(parent)) return true diff --git a/compiler/ir/serialization.jvm/src/JvmIr.proto b/compiler/ir/serialization.jvm/src/JvmIr.proto index 0ada03f7d3f..b407045fafb 100644 --- a/compiler/ir/serialization.jvm/src/JvmIr.proto +++ b/compiler/ir/serialization.jvm/src/JvmIr.proto @@ -14,23 +14,11 @@ message XStatementOrExpression { } } -message AuxTables { - // TODO: optimize the representation. - repeated common.serialization.proto.IrType type = 1; - repeated common.serialization.proto.IdSignature signature = 2; - repeated string string = 3; - repeated XStatementOrExpression body = 4; - repeated string debug_info = 5; -} - -message JvmIrFile { +message ClassOrFile { 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; + repeated common.serialization.proto.IrType type = 2; + repeated common.serialization.proto.IdSignature signature = 3; + repeated string string = 4; + repeated XStatementOrExpression body = 5; + repeated string debug_info = 6; } diff --git a/compiler/ir/serialization.jvm/src/org/jetbrains/kotlin/backend/jvm/serialization/JvmIrSerializerSession.kt b/compiler/ir/serialization.jvm/src/org/jetbrains/kotlin/backend/jvm/serialization/JvmIrSerializerSession.kt index 7a1c243cdc7..c639792b176 100644 --- a/compiler/ir/serialization.jvm/src/org/jetbrains/kotlin/backend/jvm/serialization/JvmIrSerializerSession.kt +++ b/compiler/ir/serialization.jvm/src/org/jetbrains/kotlin/backend/jvm/serialization/JvmIrSerializerSession.kt @@ -11,17 +11,18 @@ import org.jetbrains.kotlin.backend.common.serialization.IrFileSerializer import org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr import org.jetbrains.kotlin.config.JvmSerializeIrMode 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.IrElement +import org.jetbrains.kotlin.ir.declarations.* import org.jetbrains.kotlin.ir.symbols.IrSymbol import org.jetbrains.kotlin.ir.util.IrMessageLogger -import org.jetbrains.kotlin.protobuf.ByteString +import org.jetbrains.kotlin.ir.visitors.IrElementVisitor +import org.jetbrains.kotlin.synthetic.isVisibleOutside class JvmIrSerializerSession( messageLogger: IrMessageLogger, private val declarationTable: DeclarationTable, expectDescriptorToSymbol: MutableMap, - mode: JvmSerializeIrMode, + private val mode: JvmSerializeIrMode, skipExpects: Boolean = false, ) : IrFileSerializer( messageLogger, declarationTable, expectDescriptorToSymbol, CompatibilityMode.CURRENT, @@ -34,42 +35,88 @@ class JvmIrSerializerSession( // 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() + fun serializeJvmIrFile(irFile: IrFile): JvmIr.ClassOrFile? { + var anySaved = false + val proto = JvmIr.ClassOrFile.newBuilder() declarationTable.inFile(irFile) { - irFile.declarations.filter { it !is IrClass }.forEach { declaration -> + irFile.declarations.filter { it !is IrClass }.forEach { topDeclaration -> + forEveryDeclarationToSerialize(topDeclaration, mode) { declaration -> + proto.addDeclaration(serializeDeclaration(declaration)) + anySaved = true + } + } + } + if (!anySaved) return null + + serializeAuxTables(proto) + + return proto.build() + } + + fun serializeTopLevelClass(irClass: IrClass): JvmIr.ClassOrFile? { + val proto = JvmIr.ClassOrFile.newBuilder() + declarationTable.inFile(irClass.parent as IrFile) { + forEveryDeclarationToSerialize(irClass, mode) { declaration -> proto.addDeclaration(serializeDeclaration(declaration)) } - proto.addAllAnnotation(serializeAnnotations(irFile.annotations)) } - - proto.auxTables = serializeAuxTables() - + serializeAuxTables(proto) return proto.build() } - fun serializeTopLevelClass(irClass: IrClass): JvmIr.JvmIrClass { - val proto = JvmIr.JvmIrClass.newBuilder() - declarationTable.inFile(irClass.parent as IrFile) { - proto.irClass = serializeIrClass(irClass) - } - proto.auxTables = serializeAuxTables() - return proto.build() - } - - private fun serializeAuxTables(): JvmIr.AuxTables { - val proto = JvmIr.AuxTables.newBuilder() + private fun serializeAuxTables(proto: JvmIr.ClassOrFile.Builder) { protoTypeArray.forEach(proto::addType) protoIdSignatureArray.forEach(proto::addSignature) protoStringArray.forEach(proto::addString) protoBodyArray.forEach { proto.addBody(it.toProto()) } protoDebugInfoArray.forEach(proto::addDebugInfo) - return proto.build() } fun XStatementOrExpression.toProto(): JvmIr.XStatementOrExpression = when (this) { is XStatementOrExpression.XStatement -> JvmIr.XStatementOrExpression.newBuilder().setStatement(toProtoStatement()).build() is XStatementOrExpression.XExpression -> JvmIr.XStatementOrExpression.newBuilder().setExpression(toProtoExpression()).build() } -} \ No newline at end of file +} + +private fun forEveryDeclarationToSerialize(topDeclaration: IrDeclaration, mode: JvmSerializeIrMode, action: (IrDeclaration) -> Unit) { + when (mode) { + JvmSerializeIrMode.NONE -> error("should not even be called with serialization mode NONE") + JvmSerializeIrMode.ALL -> action(topDeclaration) + JvmSerializeIrMode.INLINE -> + topDeclaration.accept(ForVisibleInlineFunctionsVisitor, action) + } +} + +private object ForVisibleInlineFunctionsVisitor : IrElementVisitor Unit> { + override fun visitElement(element: IrElement, data: (IrDeclaration) -> Unit) { + error("Visitor only for nonlocal declarations") + } + + override fun visitDeclaration(declaration: IrDeclarationBase, data: (IrDeclaration) -> Unit) { + return + } + + override fun visitClass(declaration: IrClass, data: (IrDeclaration) -> Unit) { + if (!declaration.visibility.isVisibleOutside()) return + for (child in declaration.declarations) { + child.accept(this, data) + } + } + + override fun visitProperty(declaration: IrProperty, data: (IrDeclaration) -> Unit) { + if (!declaration.visibility.isVisibleOutside()) return + declaration.getter?.accept(this, data) + declaration.setter?.accept(this, data) + } + + override fun visitSimpleFunction(declaration: IrSimpleFunction, data: (IrDeclaration) -> Unit) { + val action = data + if (declaration.visibility.isVisibleOutside() && + declaration.isInline && + !declaration.isFakeOverride + ) { + action(declaration) + } + } +} diff --git a/compiler/ir/serialization.jvm/src/org/jetbrains/kotlin/backend/jvm/serialization/deserializeLazyDeclarations.kt b/compiler/ir/serialization.jvm/src/org/jetbrains/kotlin/backend/jvm/serialization/deserializeLazyDeclarations.kt index a979ff6ce68..b9c44a8f292 100644 --- a/compiler/ir/serialization.jvm/src/org/jetbrains/kotlin/backend/jvm/serialization/deserializeLazyDeclarations.kt +++ b/compiler/ir/serialization.jvm/src/org/jetbrains/kotlin/backend/jvm/serialization/deserializeLazyDeclarations.kt @@ -20,6 +20,7 @@ import org.jetbrains.kotlin.ir.backend.jvm.serialization.JvmIrMangler import org.jetbrains.kotlin.ir.declarations.IrClass import org.jetbrains.kotlin.ir.declarations.IrDeclaration import org.jetbrains.kotlin.ir.declarations.impl.IrFileImpl +import org.jetbrains.kotlin.ir.declarations.lazy.IrLazyDeclarationBase import org.jetbrains.kotlin.ir.declarations.lazy.LazyIrFactory import org.jetbrains.kotlin.ir.symbols.IrPropertySymbol import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol @@ -35,22 +36,22 @@ import org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression as P import org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement as ProtoStatement import org.jetbrains.kotlin.backend.common.serialization.proto.IrType as ProtoType -fun deserializeClassFromByteArray( +fun deserializeFromByteArray( byteArray: ByteArray, stubGenerator: DeclarationStubGenerator, - irClass: IrClass, + toplevelParent: IrClass, typeSystemContext: IrTypeSystemContext, allowErrorNodes: Boolean, ) { val irBuiltIns = stubGenerator.irBuiltIns val symbolTable = stubGenerator.symbolTable - val irProto = JvmIr.JvmIrClass.parseFrom(byteArray.codedInputStream) + val irProto = JvmIr.ClassOrFile.parseFrom(byteArray.codedInputStream) val irLibraryFile = IrLibraryFileFromAnnotation( - irProto.auxTables.typeList, - irProto.auxTables.signatureList, - irProto.auxTables.stringList, - irProto.auxTables.bodyList, - irProto.auxTables.debugInfoList + irProto.typeList, + irProto.signatureList, + irProto.stringList, + irProto.bodyList, + irProto.debugInfoList ) val descriptorFinder = DescriptorByIdSignatureFinder( @@ -60,65 +61,7 @@ fun deserializeClassFromByteArray( ) // Only needed for local signature computation. - val dummyIrFile = IrFileImpl(NaiveSourceBasedFileEntryImpl(""), IrFileSymbolImpl(), irClass.packageFqName!!) - - val symbolDeserializer = IrSymbolDeserializer( - symbolTable, - irLibraryFile, - fileSymbol = dummyIrFile.symbol, - /* TODO */ actuals = emptyList(), - enqueueLocalTopLevelDeclaration = {}, // just link to it in symbolTable - handleExpectActualMapping = { _, _ -> TODO() }, - deserializePublicSymbol = { idSignature, symbolKind -> - referencePublicSymbol(symbolTable, descriptorFinder, idSignature, symbolKind) - } - ) - - val lazyIrFactory = LazyIrFactory(irBuiltIns.irFactory) - - val deserializer = IrDeclarationDeserializer( - irBuiltIns, symbolTable, lazyIrFactory, irLibraryFile, irClass.parent, - allowErrorNodes = allowErrorNodes, - deserializeInlineFunctions = true, - deserializeBodies = true, - symbolDeserializer, - DefaultFakeOverrideClassFilter, - makeSimpleFakeOverrideBuilder(symbolTable, typeSystemContext, symbolDeserializer), - compatibilityMode = CompatibilityMode.CURRENT, - ) - - deserializer.deserializeIrClass(irProto.irClass) - - ExternalDependenciesGenerator(stubGenerator.symbolTable, listOf(stubGenerator)).generateUnboundSymbolsAsDependencies() - buildFakeOverridesForLocalClasses(stubGenerator.symbolTable, typeSystemContext, symbolDeserializer, irClass) -} - -fun deserializeIrFileFromByteArray( - byteArray: ByteArray, - stubGenerator: DeclarationStubGenerator, - facadeClass: IrClass, - typeSystemContext: IrTypeSystemContext, - allowErrorNodes: Boolean, -) { - val irBuiltIns = stubGenerator.irBuiltIns - val symbolTable = stubGenerator.symbolTable - val irProto = JvmIr.JvmIrFile.parseFrom(byteArray.codedInputStream) - val irLibraryFile = IrLibraryFileFromAnnotation( - irProto.auxTables.typeList, - irProto.auxTables.signatureList, - irProto.auxTables.stringList, - irProto.auxTables.bodyList, - irProto.auxTables.debugInfoList - ) - val descriptorFinder = - DescriptorByIdSignatureFinder( - stubGenerator.moduleDescriptor, - JvmDescriptorMangler(null), - DescriptorByIdSignatureFinder.LookupMode.MODULE_WITH_DEPENDENCIES - ) - - // Only needed for local signature computation. - val dummyIrFile = IrFileImpl(NaiveSourceBasedFileEntryImpl(""), IrFileSymbolImpl(), facadeClass.packageFqName!!) + val dummyIrFile = IrFileImpl(NaiveSourceBasedFileEntryImpl(""), IrFileSymbolImpl(), toplevelParent.packageFqName!!) val symbolDeserializer = IrSymbolDeserializer( symbolTable, @@ -136,8 +79,10 @@ fun deserializeIrFileFromByteArray( val fakeOverrideBuilder = makeSimpleFakeOverrideBuilder(symbolTable, typeSystemContext, symbolDeserializer) + // We have to supply topLevelParent here, but this results in wrong values for parent fields in deeply embedded declarations. + // Patching will be needed. val deserializer = IrDeclarationDeserializer( - irBuiltIns, symbolTable, lazyIrFactory, irLibraryFile, facadeClass, + irBuiltIns, symbolTable, lazyIrFactory, irLibraryFile, toplevelParent, allowErrorNodes = allowErrorNodes, deserializeInlineFunctions = true, deserializeBodies = true, @@ -147,11 +92,17 @@ fun deserializeIrFileFromByteArray( compatibilityMode = CompatibilityMode.CURRENT, ) for (declarationProto in irProto.declarationList) { - deserializer.deserializeDeclaration(declarationProto) + val declaration = deserializer.deserializeDeclaration(declarationProto) + // Either declaration is lazy, supplied by LazyIrFactory, + // or, if it is newly created, there must have been no references to it from the current module. + // These newly created declarations will never be used, so it does not matter if we patch their parent or not. + if (declaration is IrLazyDeclarationBase) { + declaration.parent = declaration.lazyParent() + } } ExternalDependenciesGenerator(stubGenerator.symbolTable, listOf(stubGenerator)).generateUnboundSymbolsAsDependencies() - buildFakeOverridesForLocalClasses(stubGenerator.symbolTable, typeSystemContext, symbolDeserializer, facadeClass) + buildFakeOverridesForLocalClasses(stubGenerator.symbolTable, typeSystemContext, symbolDeserializer, toplevelParent) } private class IrLibraryFileFromAnnotation( @@ -245,7 +196,8 @@ private fun buildFakeOverridesForLocalClasses( toplevel: IrClass ) { val builder = makeSimpleFakeOverrideBuilder(symbolTable, typeSystemContext, symbolDeserializer) - toplevel.acceptChildrenVoid(object : IrElementVisitorVoid { + toplevel.acceptChildrenVoid( + object : IrElementVisitorVoid { override fun visitElement(element: IrElement) { element.acceptChildrenVoid(this) } @@ -268,4 +220,4 @@ class PrePopulatedDeclarationTable( symbol2Sig[declaration.symbol]?.let { return it } return super.tryComputeBackendSpecificSignature(declaration) } -} \ 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 index d35d74cef56..8a1dca4c2c8 100644 --- 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 @@ -593,1391 +593,8 @@ public final class JvmIr { // @@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; - * - *
-     * TODO: optimize the representation.
-     * 
- */ - java.util.List - getTypeList(); - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; - * - *
-     * TODO: optimize the representation.
-     * 
- */ - org.jetbrains.kotlin.backend.common.serialization.proto.IrType getType(int index); - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; - * - *
-     * TODO: optimize the representation.
-     * 
- */ - 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(); - - /** - * repeated string debug_info = 5; - */ - org.jetbrains.kotlin.protobuf.ProtocolStringList - getDebugInfoList(); - /** - * repeated string debug_info = 5; - */ - int getDebugInfoCount(); - /** - * repeated string debug_info = 5; - */ - java.lang.String getDebugInfo(int index); - /** - * repeated string debug_info = 5; - */ - org.jetbrains.kotlin.protobuf.ByteString - getDebugInfoBytes(int index); - } - /** - * 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; - } - case 42: { - org.jetbrains.kotlin.protobuf.ByteString bs = input.readBytes(); - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { - debugInfo_ = new org.jetbrains.kotlin.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000010; - } - debugInfo_.add(bs); - 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_); - } - if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { - debugInfo_ = debugInfo_.getUnmodifiableView(); - } - 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; - * - *
-     * TODO: optimize the representation.
-     * 
- */ - public java.util.List getTypeList() { - return type_; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; - * - *
-     * TODO: optimize the representation.
-     * 
- */ - public java.util.List - getTypeOrBuilderList() { - return type_; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; - * - *
-     * TODO: optimize the representation.
-     * 
- */ - public int getTypeCount() { - return type_.size(); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; - * - *
-     * TODO: optimize the representation.
-     * 
- */ - 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; - * - *
-     * TODO: optimize the representation.
-     * 
- */ - 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); - } - - public static final int DEBUG_INFO_FIELD_NUMBER = 5; - private org.jetbrains.kotlin.protobuf.LazyStringList debugInfo_; - /** - * repeated string debug_info = 5; - */ - public org.jetbrains.kotlin.protobuf.ProtocolStringList - getDebugInfoList() { - return debugInfo_; - } - /** - * repeated string debug_info = 5; - */ - public int getDebugInfoCount() { - return debugInfo_.size(); - } - /** - * repeated string debug_info = 5; - */ - public java.lang.String getDebugInfo(int index) { - return debugInfo_.get(index); - } - /** - * repeated string debug_info = 5; - */ - public org.jetbrains.kotlin.protobuf.ByteString - getDebugInfoBytes(int index) { - return debugInfo_.getByteString(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(); - debugInfo_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY; - } - 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)); - } - for (int i = 0; i < debugInfo_.size(); i++) { - output.writeBytes(5, debugInfo_.getByteString(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)); - } - { - int dataSize = 0; - for (int i = 0; i < debugInfo_.size(); i++) { - dataSize += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeBytesSizeNoTag(debugInfo_.getByteString(i)); - } - size += dataSize; - size += 1 * getDebugInfoList().size(); - } - size += unknownFields.size(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.jetbrains.kotlin.backend.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); - debugInfo_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000010); - 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_; - if (((bitField0_ & 0x00000010) == 0x00000010)) { - debugInfo_ = debugInfo_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.debugInfo_ = debugInfo_; - 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_); - } - - } - if (!other.debugInfo_.isEmpty()) { - if (debugInfo_.isEmpty()) { - debugInfo_ = other.debugInfo_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureDebugInfoIsMutable(); - debugInfo_.addAll(other.debugInfo_); - } - - } - 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; - * - *
-       * TODO: optimize the representation.
-       * 
- */ - public java.util.List getTypeList() { - return java.util.Collections.unmodifiableList(type_); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; - * - *
-       * TODO: optimize the representation.
-       * 
- */ - public int getTypeCount() { - return type_.size(); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; - * - *
-       * TODO: optimize the representation.
-       * 
- */ - 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; - * - *
-       * TODO: optimize the representation.
-       * 
- */ - 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; - * - *
-       * TODO: optimize the representation.
-       * 
- */ - 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; - * - *
-       * TODO: optimize the representation.
-       * 
- */ - 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; - * - *
-       * TODO: optimize the representation.
-       * 
- */ - 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; - * - *
-       * TODO: optimize the representation.
-       * 
- */ - 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; - * - *
-       * TODO: optimize the representation.
-       * 
- */ - 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; - * - *
-       * TODO: optimize the representation.
-       * 
- */ - 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; - * - *
-       * TODO: optimize the representation.
-       * 
- */ - public Builder clearType() { - type_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 1; - * - *
-       * TODO: optimize the representation.
-       * 
- */ - 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; - } - - private org.jetbrains.kotlin.protobuf.LazyStringList debugInfo_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY; - private void ensureDebugInfoIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { - debugInfo_ = new org.jetbrains.kotlin.protobuf.LazyStringArrayList(debugInfo_); - bitField0_ |= 0x00000010; - } - } - /** - * repeated string debug_info = 5; - */ - public org.jetbrains.kotlin.protobuf.ProtocolStringList - getDebugInfoList() { - return debugInfo_.getUnmodifiableView(); - } - /** - * repeated string debug_info = 5; - */ - public int getDebugInfoCount() { - return debugInfo_.size(); - } - /** - * repeated string debug_info = 5; - */ - public java.lang.String getDebugInfo(int index) { - return debugInfo_.get(index); - } - /** - * repeated string debug_info = 5; - */ - public org.jetbrains.kotlin.protobuf.ByteString - getDebugInfoBytes(int index) { - return debugInfo_.getByteString(index); - } - /** - * repeated string debug_info = 5; - */ - public Builder setDebugInfo( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureDebugInfoIsMutable(); - debugInfo_.set(index, value); - - return this; - } - /** - * repeated string debug_info = 5; - */ - public Builder addDebugInfo( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureDebugInfoIsMutable(); - debugInfo_.add(value); - - return this; - } - /** - * repeated string debug_info = 5; - */ - public Builder addAllDebugInfo( - java.lang.Iterable values) { - ensureDebugInfoIsMutable(); - org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( - values, debugInfo_); - - return this; - } - /** - * repeated string debug_info = 5; - */ - public Builder clearDebugInfo() { - debugInfo_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000010); - - return this; - } - /** - * repeated string debug_info = 5; - */ - public Builder addDebugInfoBytes( - org.jetbrains.kotlin.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - ensureDebugInfoIsMutable(); - debugInfo_.add(value); - - 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) + public interface ClassOrFileOrBuilder extends + // @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.backend.jvm.serialization.proto.ClassOrFile) org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder { /** @@ -1995,66 +612,110 @@ public final class JvmIr { int getDeclarationCount(); /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 2; + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 2; */ - java.util.List - getAnnotationList(); + java.util.List + getTypeList(); /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 2; + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 2; */ - org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index); + org.jetbrains.kotlin.backend.common.serialization.proto.IrType getType(int index); /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 2; + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 2; */ - int getAnnotationCount(); + int getTypeCount(); /** - * repeated int32 facade_fq_name = 3; + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 3; */ - java.util.List getFacadeFqNameList(); + java.util.List + getSignatureList(); /** - * repeated int32 facade_fq_name = 3; + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 3; */ - int getFacadeFqNameCount(); + org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature getSignature(int index); /** - * repeated int32 facade_fq_name = 3; + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 3; */ - int getFacadeFqName(int index); + int getSignatureCount(); /** - * required .org.jetbrains.kotlin.backend.jvm.serialization.proto.AuxTables aux_tables = 4; + * repeated string string = 4; */ - boolean hasAuxTables(); + org.jetbrains.kotlin.protobuf.ProtocolStringList + getStringList(); /** - * required .org.jetbrains.kotlin.backend.jvm.serialization.proto.AuxTables aux_tables = 4; + * repeated string string = 4; */ - org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables getAuxTables(); + int getStringCount(); + /** + * repeated string string = 4; + */ + java.lang.String getString(int index); + /** + * repeated string string = 4; + */ + org.jetbrains.kotlin.protobuf.ByteString + getStringBytes(int index); + + /** + * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 5; + */ + java.util.List + getBodyList(); + /** + * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 5; + */ + org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpression getBody(int index); + /** + * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 5; + */ + int getBodyCount(); + + /** + * repeated string debug_info = 6; + */ + org.jetbrains.kotlin.protobuf.ProtocolStringList + getDebugInfoList(); + /** + * repeated string debug_info = 6; + */ + int getDebugInfoCount(); + /** + * repeated string debug_info = 6; + */ + java.lang.String getDebugInfo(int index); + /** + * repeated string debug_info = 6; + */ + org.jetbrains.kotlin.protobuf.ByteString + getDebugInfoBytes(int index); } /** - * Protobuf type {@code org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIrFile} + * Protobuf type {@code org.jetbrains.kotlin.backend.jvm.serialization.proto.ClassOrFile} */ - public static final class JvmIrFile extends + public static final class ClassOrFile 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) { + // @@protoc_insertion_point(message_implements:org.jetbrains.kotlin.backend.jvm.serialization.proto.ClassOrFile) + ClassOrFileOrBuilder { + // Use ClassOrFile.newBuilder() to construct. + private ClassOrFile(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 ClassOrFile(boolean noInit) { this.unknownFields = org.jetbrains.kotlin.protobuf.ByteString.EMPTY;} - private static final JvmIrFile defaultInstance; - public static JvmIrFile getDefaultInstance() { + private static final ClassOrFile defaultInstance; + public static ClassOrFile getDefaultInstance() { return defaultInstance; } - public JvmIrFile getDefaultInstanceForType() { + public ClassOrFile getDefaultInstanceForType() { return defaultInstance; } private final org.jetbrains.kotlin.protobuf.ByteString unknownFields; - private JvmIrFile( + private ClassOrFile( org.jetbrains.kotlin.protobuf.CodedInputStream input, org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { @@ -2090,44 +751,44 @@ public final class JvmIr { } case 18: { if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - annotation_ = new java.util.ArrayList(); + type_ = 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()); + type_.add(input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IrType.PARSER, extensionRegistry)); 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(); + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + signature_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000004; } - while (input.getBytesUntilLimit() > 0) { - facadeFqName_.add(input.readInt32()); - } - input.popLimit(limit); + signature_.add(input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature.PARSER, extensionRegistry)); break; } case 34: { - org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - subBuilder = auxTables_.toBuilder(); + org.jetbrains.kotlin.protobuf.ByteString bs = input.readBytes(); + if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + string_ = new org.jetbrains.kotlin.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000008; } - auxTables_ = input.readMessage(org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(auxTables_); - auxTables_ = subBuilder.buildPartial(); + string_.add(bs); + break; + } + case 42: { + if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + body_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000010; } - bitField0_ |= 0x00000001; + body_.add(input.readMessage(org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpression.PARSER, extensionRegistry)); + break; + } + case 50: { + org.jetbrains.kotlin.protobuf.ByteString bs = input.readBytes(); + if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + debugInfo_ = new org.jetbrains.kotlin.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000020; + } + debugInfo_.add(bs); break; } } @@ -2142,10 +803,19 @@ public final class JvmIr { declaration_ = java.util.Collections.unmodifiableList(declaration_); } if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - annotation_ = java.util.Collections.unmodifiableList(annotation_); + type_ = java.util.Collections.unmodifiableList(type_); } if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - facadeFqName_ = java.util.Collections.unmodifiableList(facadeFqName_); + signature_ = java.util.Collections.unmodifiableList(signature_); + } + if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + string_ = string_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + body_ = java.util.Collections.unmodifiableList(body_); + } + if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + debugInfo_ = debugInfo_.getUnmodifiableView(); } try { unknownFieldsCodedOutput.flush(); @@ -2157,22 +827,21 @@ public final class JvmIr { makeExtensionsImmutable(); } } - public static org.jetbrains.kotlin.protobuf.Parser PARSER = - new org.jetbrains.kotlin.protobuf.AbstractParser() { - public JvmIrFile parsePartialFrom( + public static org.jetbrains.kotlin.protobuf.Parser PARSER = + new org.jetbrains.kotlin.protobuf.AbstractParser() { + public ClassOrFile parsePartialFrom( org.jetbrains.kotlin.protobuf.CodedInputStream input, org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return new JvmIrFile(input, extensionRegistry); + return new ClassOrFile(input, extensionRegistry); } }; @java.lang.Override - public org.jetbrains.kotlin.protobuf.Parser getParserForType() { + 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_; /** @@ -2208,83 +877,176 @@ public final class JvmIr { return declaration_.get(index); } - public static final int ANNOTATION_FIELD_NUMBER = 2; - private java.util.List annotation_; + public static final int TYPE_FIELD_NUMBER = 2; + private java.util.List type_; /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 2; + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 2; */ - public java.util.List getAnnotationList() { - return annotation_; + public java.util.List getTypeList() { + return type_; } /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 2; + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 2; */ - public java.util.List - getAnnotationOrBuilderList() { - return annotation_; + public java.util.List + getTypeOrBuilderList() { + return type_; } /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 2; + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 2; */ - public int getAnnotationCount() { - return annotation_.size(); + public int getTypeCount() { + return type_.size(); } /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 2; + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 2; */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index) { - return annotation_.get(index); + public org.jetbrains.kotlin.backend.common.serialization.proto.IrType getType(int index) { + return type_.get(index); } /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 2; + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 2; */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCallOrBuilder getAnnotationOrBuilder( + public org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeOrBuilder getTypeOrBuilder( int index) { - return annotation_.get(index); + return type_.get(index); } - public static final int FACADE_FQ_NAME_FIELD_NUMBER = 3; - private java.util.List facadeFqName_; + public static final int SIGNATURE_FIELD_NUMBER = 3; + private java.util.List signature_; /** - * repeated int32 facade_fq_name = 3; + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 3; */ - public java.util.List - getFacadeFqNameList() { - return facadeFqName_; + public java.util.List getSignatureList() { + return signature_; } /** - * repeated int32 facade_fq_name = 3; + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 3; */ - public int getFacadeFqNameCount() { - return facadeFqName_.size(); + public java.util.List + getSignatureOrBuilderList() { + return signature_; } /** - * repeated int32 facade_fq_name = 3; + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 3; */ - public int getFacadeFqName(int index) { - return facadeFqName_.get(index); + public int getSignatureCount() { + return signature_.size(); + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 3; + */ + 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 = 3; + */ + public org.jetbrains.kotlin.backend.common.serialization.proto.IdSignatureOrBuilder getSignatureOrBuilder( + int index) { + return signature_.get(index); } - public static final int AUX_TABLES_FIELD_NUMBER = 4; - private org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables auxTables_; + public static final int STRING_FIELD_NUMBER = 4; + private org.jetbrains.kotlin.protobuf.LazyStringList string_; /** - * required .org.jetbrains.kotlin.backend.jvm.serialization.proto.AuxTables aux_tables = 4; + * repeated string string = 4; */ - public boolean hasAuxTables() { - return ((bitField0_ & 0x00000001) == 0x00000001); + public org.jetbrains.kotlin.protobuf.ProtocolStringList + getStringList() { + return string_; } /** - * required .org.jetbrains.kotlin.backend.jvm.serialization.proto.AuxTables aux_tables = 4; + * repeated string string = 4; */ - public org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables getAuxTables() { - return auxTables_; + public int getStringCount() { + return string_.size(); + } + /** + * repeated string string = 4; + */ + public java.lang.String getString(int index) { + return string_.get(index); + } + /** + * repeated string string = 4; + */ + public org.jetbrains.kotlin.protobuf.ByteString + getStringBytes(int index) { + return string_.getByteString(index); + } + + public static final int BODY_FIELD_NUMBER = 5; + private java.util.List body_; + /** + * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 5; + */ + public java.util.List getBodyList() { + return body_; + } + /** + * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 5; + */ + public java.util.List + getBodyOrBuilderList() { + return body_; + } + /** + * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 5; + */ + public int getBodyCount() { + return body_.size(); + } + /** + * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 5; + */ + 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 = 5; + */ + public org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpressionOrBuilder getBodyOrBuilder( + int index) { + return body_.get(index); + } + + public static final int DEBUG_INFO_FIELD_NUMBER = 6; + private org.jetbrains.kotlin.protobuf.LazyStringList debugInfo_; + /** + * repeated string debug_info = 6; + */ + public org.jetbrains.kotlin.protobuf.ProtocolStringList + getDebugInfoList() { + return debugInfo_; + } + /** + * repeated string debug_info = 6; + */ + public int getDebugInfoCount() { + return debugInfo_.size(); + } + /** + * repeated string debug_info = 6; + */ + public java.lang.String getDebugInfo(int index) { + return debugInfo_.get(index); + } + /** + * repeated string debug_info = 6; + */ + public org.jetbrains.kotlin.protobuf.ByteString + getDebugInfoBytes(int index) { + return debugInfo_.getByteString(index); } 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(); + type_ = java.util.Collections.emptyList(); + signature_ = java.util.Collections.emptyList(); + string_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY; + body_ = java.util.Collections.emptyList(); + debugInfo_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -2292,25 +1054,29 @@ public final class JvmIr { 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()) { + for (int i = 0; i < getTypeCount(); i++) { + if (!getType(i).isInitialized()) { memoizedIsInitialized = 0; return false; } } - if (!getAuxTables().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; @@ -2322,14 +1088,20 @@ public final class JvmIr { 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 < type_.size(); i++) { + output.writeMessage(2, type_.get(i)); } - for (int i = 0; i < facadeFqName_.size(); i++) { - output.writeInt32(3, facadeFqName_.get(i)); + for (int i = 0; i < signature_.size(); i++) { + output.writeMessage(3, signature_.get(i)); } - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeMessage(4, auxTables_); + for (int i = 0; i < string_.size(); i++) { + output.writeBytes(4, string_.getByteString(i)); + } + for (int i = 0; i < body_.size(); i++) { + output.writeMessage(5, body_.get(i)); + } + for (int i = 0; i < debugInfo_.size(); i++) { + output.writeBytes(6, debugInfo_.getByteString(i)); } output.writeRawBytes(unknownFields); } @@ -2344,22 +1116,35 @@ public final class JvmIr { size += org.jetbrains.kotlin.protobuf.CodedOutputStream .computeMessageSize(1, declaration_.get(i)); } - for (int i = 0; i < annotation_.size(); i++) { + for (int i = 0; i < type_.size(); i++) { size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeMessageSize(2, annotation_.get(i)); + .computeMessageSize(2, type_.get(i)); + } + for (int i = 0; i < signature_.size(); i++) { + size += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeMessageSize(3, signature_.get(i)); } { int dataSize = 0; - for (int i = 0; i < facadeFqName_.size(); i++) { + for (int i = 0; i < string_.size(); i++) { dataSize += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt32SizeNoTag(facadeFqName_.get(i)); + .computeBytesSizeNoTag(string_.getByteString(i)); } size += dataSize; - size += 1 * getFacadeFqNameList().size(); + size += 1 * getStringList().size(); } - if (((bitField0_ & 0x00000001) == 0x00000001)) { + for (int i = 0; i < body_.size(); i++) { size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeMessageSize(4, auxTables_); + .computeMessageSize(5, body_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < debugInfo_.size(); i++) { + dataSize += org.jetbrains.kotlin.protobuf.CodedOutputStream + .computeBytesSizeNoTag(debugInfo_.getByteString(i)); + } + size += dataSize; + size += 1 * getDebugInfoList().size(); } size += unknownFields.size(); memoizedSerializedSize = size; @@ -2373,53 +1158,53 @@ public final class JvmIr { return super.writeReplace(); } - public static org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.JvmIrFile parseFrom( + public static org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.ClassOrFile 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( + public static org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.ClassOrFile 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) + public static org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.ClassOrFile 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( + public static org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.ClassOrFile 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) + public static org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.ClassOrFile 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( + public static org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.ClassOrFile 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) + public static org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.ClassOrFile 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( + public static org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.ClassOrFile 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( + public static org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.ClassOrFile 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( + public static org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.ClassOrFile parseFrom( org.jetbrains.kotlin.protobuf.CodedInputStream input, org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -2428,21 +1213,21 @@ public final class JvmIr { 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) { + public static Builder newBuilder(org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.ClassOrFile prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } /** - * Protobuf type {@code org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIrFile} + * Protobuf type {@code org.jetbrains.kotlin.backend.jvm.serialization.proto.ClassOrFile} */ public static final class Builder extends org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder< - org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.JvmIrFile, Builder> + org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.ClassOrFile, 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() + // @@protoc_insertion_point(builder_implements:org.jetbrains.kotlin.backend.jvm.serialization.proto.ClassOrFile) + org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.ClassOrFileOrBuilder { + // Construct using org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.ClassOrFile.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -2457,12 +1242,16 @@ public final class JvmIr { super.clear(); declaration_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); - annotation_ = java.util.Collections.emptyList(); + type_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); - facadeFqName_ = java.util.Collections.emptyList(); + signature_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); - auxTables_ = org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables.getDefaultInstance(); + string_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000008); + body_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + debugInfo_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000020); return this; } @@ -2470,47 +1259,56 @@ public final class JvmIr { 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.ClassOrFile getDefaultInstanceForType() { + return org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.ClassOrFile.getDefaultInstance(); } - public org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.JvmIrFile build() { - org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.JvmIrFile result = buildPartial(); + public org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.ClassOrFile build() { + org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.ClassOrFile 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); + public org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.ClassOrFile buildPartial() { + org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.ClassOrFile result = new org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.ClassOrFile(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_); + type_ = java.util.Collections.unmodifiableList(type_); bitField0_ = (bitField0_ & ~0x00000002); } - result.annotation_ = annotation_; + result.type_ = type_; if (((bitField0_ & 0x00000004) == 0x00000004)) { - facadeFqName_ = java.util.Collections.unmodifiableList(facadeFqName_); + signature_ = java.util.Collections.unmodifiableList(signature_); bitField0_ = (bitField0_ & ~0x00000004); } - result.facadeFqName_ = facadeFqName_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000001; + result.signature_ = signature_; + if (((bitField0_ & 0x00000008) == 0x00000008)) { + string_ = string_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000008); } - result.auxTables_ = auxTables_; - result.bitField0_ = to_bitField0_; + result.string_ = string_; + if (((bitField0_ & 0x00000010) == 0x00000010)) { + body_ = java.util.Collections.unmodifiableList(body_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.body_ = body_; + if (((bitField0_ & 0x00000020) == 0x00000020)) { + debugInfo_ = debugInfo_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.debugInfo_ = debugInfo_; 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; + public Builder mergeFrom(org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.ClassOrFile other) { + if (other == org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.ClassOrFile.getDefaultInstance()) return this; if (!other.declaration_.isEmpty()) { if (declaration_.isEmpty()) { declaration_ = other.declaration_; @@ -2521,28 +1319,55 @@ public final class JvmIr { } } - if (!other.annotation_.isEmpty()) { - if (annotation_.isEmpty()) { - annotation_ = other.annotation_; + if (!other.type_.isEmpty()) { + if (type_.isEmpty()) { + type_ = other.type_; bitField0_ = (bitField0_ & ~0x00000002); } else { - ensureAnnotationIsMutable(); - annotation_.addAll(other.annotation_); + ensureTypeIsMutable(); + type_.addAll(other.type_); } } - if (!other.facadeFqName_.isEmpty()) { - if (facadeFqName_.isEmpty()) { - facadeFqName_ = other.facadeFqName_; + if (!other.signature_.isEmpty()) { + if (signature_.isEmpty()) { + signature_ = other.signature_; bitField0_ = (bitField0_ & ~0x00000004); } else { - ensureFacadeFqNameIsMutable(); - facadeFqName_.addAll(other.facadeFqName_); + ensureSignatureIsMutable(); + signature_.addAll(other.signature_); } } - if (other.hasAuxTables()) { - mergeAuxTables(other.getAuxTables()); + if (!other.string_.isEmpty()) { + if (string_.isEmpty()) { + string_ = other.string_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureStringIsMutable(); + string_.addAll(other.string_); + } + + } + if (!other.body_.isEmpty()) { + if (body_.isEmpty()) { + body_ = other.body_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureBodyIsMutable(); + body_.addAll(other.body_); + } + + } + if (!other.debugInfo_.isEmpty()) { + if (debugInfo_.isEmpty()) { + debugInfo_ = other.debugInfo_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureDebugInfoIsMutable(); + debugInfo_.addAll(other.debugInfo_); + } + } setUnknownFields( getUnknownFields().concat(other.unknownFields)); @@ -2550,25 +1375,29 @@ public final class JvmIr { } 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()) { + for (int i = 0; i < getTypeCount(); i++) { + if (!getType(i).isInitialized()) { return false; } } - if (!getAuxTables().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; } @@ -2577,11 +1406,11 @@ public final class JvmIr { 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; + org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.ClassOrFile 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(); + parsedMessage = (org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.ClassOrFile) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { @@ -2717,800 +1546,576 @@ public final class JvmIr { return this; } - private java.util.List annotation_ = + private java.util.List type_ = java.util.Collections.emptyList(); - private void ensureAnnotationIsMutable() { + private void ensureTypeIsMutable() { if (!((bitField0_ & 0x00000002) == 0x00000002)) { - annotation_ = new java.util.ArrayList(annotation_); + type_ = new java.util.ArrayList(type_); bitField0_ |= 0x00000002; } } /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 2; + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 2; */ - public java.util.List getAnnotationList() { - return java.util.Collections.unmodifiableList(annotation_); + public java.util.List getTypeList() { + return java.util.Collections.unmodifiableList(type_); } /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 2; + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 2; */ - public int getAnnotationCount() { - return annotation_.size(); + public int getTypeCount() { + return type_.size(); } /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 2; + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 2; */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index) { - return annotation_.get(index); + public org.jetbrains.kotlin.backend.common.serialization.proto.IrType getType(int index) { + return type_.get(index); } /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 2; + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 2; */ - public Builder setAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) { + public Builder setType( + int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrType value) { if (value == null) { throw new NullPointerException(); } - ensureAnnotationIsMutable(); - annotation_.set(index, value); + ensureTypeIsMutable(); + type_.set(index, value); return this; } /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 2; + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 2; */ - public Builder setAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) { - ensureAnnotationIsMutable(); - annotation_.set(index, builderForValue.build()); + 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.IrConstructorCall annotation = 2; + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 2; */ - public Builder addAnnotation(org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) { + public Builder addType(org.jetbrains.kotlin.backend.common.serialization.proto.IrType value) { if (value == null) { throw new NullPointerException(); } - ensureAnnotationIsMutable(); - annotation_.add(value); + ensureTypeIsMutable(); + type_.add(value); return this; } /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 2; + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 2; */ - public Builder addAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) { + public Builder addType( + int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrType value) { if (value == null) { throw new NullPointerException(); } - ensureAnnotationIsMutable(); - annotation_.add(index, value); + ensureTypeIsMutable(); + type_.add(index, value); return this; } /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 2; + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 2; */ - public Builder addAnnotation( - org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) { - ensureAnnotationIsMutable(); - annotation_.add(builderForValue.build()); + 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.IrConstructorCall annotation = 2; + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 2; */ - public Builder addAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) { - ensureAnnotationIsMutable(); - annotation_.add(index, builderForValue.build()); + 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.IrConstructorCall annotation = 2; + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 2; */ - public Builder addAllAnnotation( - java.lang.Iterable values) { - ensureAnnotationIsMutable(); + public Builder addAllType( + java.lang.Iterable values) { + ensureTypeIsMutable(); org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( - values, annotation_); + values, type_); return this; } /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 2; + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 2; */ - public Builder clearAnnotation() { - annotation_ = java.util.Collections.emptyList(); + public Builder clearType() { + type_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); return this; } /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 2; + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrType type = 2; */ - public Builder removeAnnotation(int index) { - ensureAnnotationIsMutable(); - annotation_.remove(index); + public Builder removeType(int index) { + ensureTypeIsMutable(); + type_.remove(index); return this; } - private java.util.List facadeFqName_ = java.util.Collections.emptyList(); - private void ensureFacadeFqNameIsMutable() { + private java.util.List signature_ = + java.util.Collections.emptyList(); + private void ensureSignatureIsMutable() { if (!((bitField0_ & 0x00000004) == 0x00000004)) { - facadeFqName_ = new java.util.ArrayList(facadeFqName_); + signature_ = new java.util.ArrayList(signature_); bitField0_ |= 0x00000004; } } + /** - * repeated int32 facade_fq_name = 3; + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 3; */ - public java.util.List - getFacadeFqNameList() { - return java.util.Collections.unmodifiableList(facadeFqName_); + public java.util.List getSignatureList() { + return java.util.Collections.unmodifiableList(signature_); } /** - * repeated int32 facade_fq_name = 3; + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 3; */ - public int getFacadeFqNameCount() { - return facadeFqName_.size(); + public int getSignatureCount() { + return signature_.size(); } /** - * repeated int32 facade_fq_name = 3; + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 3; */ - public int getFacadeFqName(int index) { - return facadeFqName_.get(index); + public org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature getSignature(int index) { + return signature_.get(index); } /** - * repeated int32 facade_fq_name = 3; + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 3; */ - public Builder setFacadeFqName( - int index, int value) { - ensureFacadeFqNameIsMutable(); - facadeFqName_.set(index, value); - + 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 int32 facade_fq_name = 3; + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 3; */ - public Builder addFacadeFqName(int value) { - ensureFacadeFqNameIsMutable(); - facadeFqName_.add(value); - + public Builder setSignature( + int index, org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature.Builder builderForValue) { + ensureSignatureIsMutable(); + signature_.set(index, builderForValue.build()); + return this; } /** - * repeated int32 facade_fq_name = 3; + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 3; */ - public Builder addAllFacadeFqName( - java.lang.Iterable values) { - ensureFacadeFqNameIsMutable(); + 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 = 3; + */ + 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 = 3; + */ + 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 = 3; + */ + 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 = 3; + */ + public Builder addAllSignature( + java.lang.Iterable values) { + ensureSignatureIsMutable(); org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( - values, facadeFqName_); - + values, signature_); + return this; } /** - * repeated int32 facade_fq_name = 3; + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 3; */ - public Builder clearFacadeFqName() { - facadeFqName_ = java.util.Collections.emptyList(); + public Builder clearSignature() { + signature_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature signature = 3; + */ + 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_ & 0x00000008) == 0x00000008)) { + string_ = new org.jetbrains.kotlin.protobuf.LazyStringArrayList(string_); + bitField0_ |= 0x00000008; + } + } + /** + * repeated string string = 4; + */ + public org.jetbrains.kotlin.protobuf.ProtocolStringList + getStringList() { + return string_.getUnmodifiableView(); + } + /** + * repeated string string = 4; + */ + public int getStringCount() { + return string_.size(); + } + /** + * repeated string string = 4; + */ + public java.lang.String getString(int index) { + return string_.get(index); + } + /** + * repeated string string = 4; + */ + public org.jetbrains.kotlin.protobuf.ByteString + getStringBytes(int index) { + return string_.getByteString(index); + } + /** + * repeated string string = 4; + */ + 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 = 4; + */ + public Builder addString( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureStringIsMutable(); + string_.add(value); + + return this; + } + /** + * repeated string string = 4; + */ + public Builder addAllString( + java.lang.Iterable values) { + ensureStringIsMutable(); + org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( + values, string_); + + return this; + } + /** + * repeated string string = 4; + */ + public Builder clearString() { + string_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + + return this; + } + /** + * repeated string string = 4; + */ + public Builder addStringBytes( + org.jetbrains.kotlin.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureStringIsMutable(); + string_.add(value); return this; } - private org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables auxTables_ = org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables.getDefaultInstance(); + private java.util.List body_ = + java.util.Collections.emptyList(); + private void ensureBodyIsMutable() { + if (!((bitField0_ & 0x00000010) == 0x00000010)) { + body_ = new java.util.ArrayList(body_); + bitField0_ |= 0x00000010; + } + } + /** - * required .org.jetbrains.kotlin.backend.jvm.serialization.proto.AuxTables aux_tables = 4; + * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 5; */ - public boolean hasAuxTables() { - return ((bitField0_ & 0x00000008) == 0x00000008); + public java.util.List getBodyList() { + return java.util.Collections.unmodifiableList(body_); } /** - * required .org.jetbrains.kotlin.backend.jvm.serialization.proto.AuxTables aux_tables = 4; + * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 5; */ - public org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables getAuxTables() { - return auxTables_; + public int getBodyCount() { + return body_.size(); } /** - * required .org.jetbrains.kotlin.backend.jvm.serialization.proto.AuxTables aux_tables = 4; + * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 5; */ - public Builder setAuxTables(org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables value) { + 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 = 5; + */ + public Builder setBody( + int index, org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpression value) { if (value == null) { throw new NullPointerException(); } - auxTables_ = value; + ensureBodyIsMutable(); + body_.set(index, value); - bitField0_ |= 0x00000008; return this; } /** - * required .org.jetbrains.kotlin.backend.jvm.serialization.proto.AuxTables aux_tables = 4; + * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 5; */ - public Builder setAuxTables( - org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables.Builder builderForValue) { - auxTables_ = builderForValue.build(); + public Builder setBody( + int index, org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpression.Builder builderForValue) { + ensureBodyIsMutable(); + body_.set(index, builderForValue.build()); - bitField0_ |= 0x00000008; return this; } /** - * required .org.jetbrains.kotlin.backend.jvm.serialization.proto.AuxTables aux_tables = 4; + * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 5; */ - 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; + public Builder addBody(org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.XStatementOrExpression value) { + if (value == null) { + throw new NullPointerException(); } + ensureBodyIsMutable(); + body_.add(value); - bitField0_ |= 0x00000008; return this; } /** - * required .org.jetbrains.kotlin.backend.jvm.serialization.proto.AuxTables aux_tables = 4; + * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 5; */ - public Builder clearAuxTables() { - auxTables_ = org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIr.AuxTables.getDefaultInstance(); + 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 = 5; + */ + 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 = 5; + */ + 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 = 5; + */ + 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 = 5; + */ + public Builder clearBody() { + body_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + + return this; + } + /** + * repeated .org.jetbrains.kotlin.backend.jvm.serialization.proto.XStatementOrExpression body = 5; + */ + public Builder removeBody(int index) { + ensureBodyIsMutable(); + body_.remove(index); - bitField0_ = (bitField0_ & ~0x00000008); return this; } - // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.backend.jvm.serialization.proto.JvmIrFile) + private org.jetbrains.kotlin.protobuf.LazyStringList debugInfo_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY; + private void ensureDebugInfoIsMutable() { + if (!((bitField0_ & 0x00000020) == 0x00000020)) { + debugInfo_ = new org.jetbrains.kotlin.protobuf.LazyStringArrayList(debugInfo_); + bitField0_ |= 0x00000020; + } + } + /** + * repeated string debug_info = 6; + */ + public org.jetbrains.kotlin.protobuf.ProtocolStringList + getDebugInfoList() { + return debugInfo_.getUnmodifiableView(); + } + /** + * repeated string debug_info = 6; + */ + public int getDebugInfoCount() { + return debugInfo_.size(); + } + /** + * repeated string debug_info = 6; + */ + public java.lang.String getDebugInfo(int index) { + return debugInfo_.get(index); + } + /** + * repeated string debug_info = 6; + */ + public org.jetbrains.kotlin.protobuf.ByteString + getDebugInfoBytes(int index) { + return debugInfo_.getByteString(index); + } + /** + * repeated string debug_info = 6; + */ + public Builder setDebugInfo( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDebugInfoIsMutable(); + debugInfo_.set(index, value); + + return this; + } + /** + * repeated string debug_info = 6; + */ + public Builder addDebugInfo( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDebugInfoIsMutable(); + debugInfo_.add(value); + + return this; + } + /** + * repeated string debug_info = 6; + */ + public Builder addAllDebugInfo( + java.lang.Iterable values) { + ensureDebugInfoIsMutable(); + org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( + values, debugInfo_); + + return this; + } + /** + * repeated string debug_info = 6; + */ + public Builder clearDebugInfo() { + debugInfo_ = org.jetbrains.kotlin.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000020); + + return this; + } + /** + * repeated string debug_info = 6; + */ + public Builder addDebugInfoBytes( + org.jetbrains.kotlin.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDebugInfoIsMutable(); + debugInfo_.add(value); + + return this; + } + + // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.backend.jvm.serialization.proto.ClassOrFile) } static { - defaultInstance = new JvmIrFile(true); + defaultInstance = new ClassOrFile(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) + // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.jvm.serialization.proto.ClassOrFile) }