From 4babc30624586187b27540bba31ff15f5590246e Mon Sep 17 00:00:00 2001 From: Roman Artemev Date: Tue, 21 Dec 2021 15:08:09 +0300 Subject: [PATCH] [IR] Remove Persistent IR --- build.gradle.kts | 1 - .../common/lower/inline/FunctionInlining.kt | 7 - compiler/ir/backend.js/build.gradle.kts | 1 - .../kotlin/ir/backend/js/MutableController.kt | 188 -- .../js/lower/PropertyLazyInitLowering.kt | 12 +- .../ir/ir.tree.persistent/build.gradle.kts | 17 - .../PersistentIrAnonymousInitializer.kt | 69 - .../persistent/PersistentIrClass.kt | 191 -- .../persistent/PersistentIrConstructor.kt | 189 -- .../persistent/PersistentIrEnumEntry.kt | 89 - .../PersistentIrErrorDeclaration.kt | 44 - .../persistent/PersistentIrField.kt | 103 -- .../persistent/PersistentIrFunctionCommon.kt | 207 --- .../PersistentIrLocalDelegatedProperty.kt | 121 -- .../persistent/PersistentIrPropertyCommon.kt | 127 -- .../persistent/PersistentIrTypeAlias.kt | 90 - .../persistent/PersistentIrTypeParameter.kt | 71 - .../persistent/PersistentIrValueParameter.kt | 100 -- .../carriers/AnonymousInitializerCarrier.kt | 35 - .../persistent/carriers/ClassCarrier.kt | 70 - .../persistent/carriers/ConstructorCarrier.kt | 74 - .../persistent/carriers/EnumEntryCarrier.kt | 45 - .../carriers/ErrorDeclarationCarrier.kt | 31 - .../persistent/carriers/FieldCarrier.kt | 43 - .../persistent/carriers/FunctionCarrier.kt | 82 - .../carriers/LocalDelegatedPropertyCarrier.kt | 56 - .../persistent/carriers/PropertyCarrier.kt | 61 - .../persistent/carriers/TypeAliasCarrier.kt | 44 - .../carriers/TypeParameterCarrier.kt | 35 - .../carriers/ValueParameterCarrier.kt | 42 - .../ir/serialization/IrCarrierDeserializer.kt | 282 --- .../ir/serialization/IrCarrierSerializer.kt | 255 --- .../generator/build.gradle.kts | 15 - .../AnonymousInitializer.kt | 38 - .../kotlin/ir/persistentIrGenerator/Class.kt | 112 -- .../ir/persistentIrGenerator/Constructor.kt | 90 - .../ir/persistentIrGenerator/EnumEntry.kt | 52 - .../persistentIrGenerator/ErrorDeclaration.kt | 50 - .../kotlin/ir/persistentIrGenerator/Field.kt | 53 - .../ir/persistentIrGenerator/Function.kt | 100 -- .../LocalDelegatedProperty.kt | 75 - .../kotlin/ir/persistentIrGenerator/Main.kt | 27 - .../PersistentIrGenerator.kt | 740 -------- .../ir/persistentIrGenerator/Property.kt | 91 - .../ir/persistentIrGenerator/TypeAlias.kt | 47 - .../ir/persistentIrGenerator/TypeParameter.kt | 44 - .../persistentIrGenerator/ValueParameter.kt | 54 - .../persistent/PersistentIrDeclarationBase.kt | 193 -- .../persistent/PersistentIrFactory.kt | 356 ---- .../persistent/PersistentIrFunction.kt | 95 - .../persistent/PersistentIrProperty.kt | 93 - .../persistent/carriers/BodyCarrier.kt | 30 - .../persistent/carriers/Carrier.kt | 12 - .../persistent/carriers/DeclarationCarrier.kt | 24 - .../persistent/PersistentIrBlockBody.kt | 52 - .../persistent/PersistentIrExpressionBody.kt | 57 - .../ir/serialization/CarrierDeserializer.kt | 139 -- .../ir/serialization/CarrierSerializer.kt | 131 -- .../IrCarrierDeserializerImpl.kt | 128 -- .../serialization/IrCarrierSerializerImpl.kt | 125 -- .../kotlin/ir/declarations/IrFactory.kt | 2 - .../src/KotlinPirCarriers.proto | 136 -- .../proto/PirAnonymousInitializerCarrier.java | 766 -------- ...rAnonymousInitializerCarrierOrBuilder.java | 59 - .../serialization/proto/PirBodyCarrier.java | 420 ----- .../proto/PirBodyCarrierOrBuilder.java | 27 - .../serialization/proto/PirClassCarrier.java | 1378 --------------- .../proto/PirClassCarrierOrBuilder.java | 116 -- .../proto/PirConstructorCarrier.java | 1334 -------------- .../proto/PirConstructorCarrierOrBuilder.java | 121 -- .../proto/PirEnumEntryCarrier.java | 835 --------- .../proto/PirEnumEntryCarrierOrBuilder.java | 68 - .../proto/PirErrorDeclarationCarrier.java | 697 -------- .../PirErrorDeclarationCarrierOrBuilder.java | 50 - .../serialization/proto/PirFieldCarrier.java | 912 ---------- .../proto/PirFieldCarrierOrBuilder.java | 77 - .../proto/PirFunctionCarrier.java | 1545 ----------------- .../proto/PirFunctionCarrierOrBuilder.java | 143 -- ...PirInlineClassRepresentationOrBuilder.java | 27 - .../PirLocalDelegatedPropertyCarrier.java | 1029 ----------- ...ocalDelegatedPropertyCarrierOrBuilder.java | 86 - .../proto/PirPropertyCarrier.java | 1046 ----------- .../proto/PirPropertyCarrierOrBuilder.java | 90 - .../proto/PirTypeAliasCarrier.java | 916 ---------- .../proto/PirTypeAliasCarrierOrBuilder.java | 72 - .../proto/PirTypeParameterCarrier.java | 839 --------- .../PirTypeParameterCarrierOrBuilder.java | 63 - .../proto/PirValueParameterCarrier.java | 912 ---------- .../PirValueParameterCarrierOrBuilder.java | 77 - compiler/ir/serialization.js/build.gradle.kts | 1 - .../kotlin/benchmarks/GenerateIrRuntime.kt | 8 +- settings.gradle | 4 - 92 files changed, 5 insertions(+), 19656 deletions(-) delete mode 100644 compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/MutableController.kt delete mode 100644 compiler/ir/ir.tree.persistent/build.gradle.kts delete mode 100644 compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrAnonymousInitializer.kt delete mode 100644 compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrClass.kt delete mode 100644 compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrConstructor.kt delete mode 100644 compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrEnumEntry.kt delete mode 100644 compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrErrorDeclaration.kt delete mode 100644 compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrField.kt delete mode 100644 compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrFunctionCommon.kt delete mode 100644 compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrLocalDelegatedProperty.kt delete mode 100644 compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrPropertyCommon.kt delete mode 100644 compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrTypeAlias.kt delete mode 100644 compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrTypeParameter.kt delete mode 100644 compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrValueParameter.kt delete mode 100644 compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/AnonymousInitializerCarrier.kt delete mode 100644 compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/ClassCarrier.kt delete mode 100644 compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/ConstructorCarrier.kt delete mode 100644 compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/EnumEntryCarrier.kt delete mode 100644 compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/ErrorDeclarationCarrier.kt delete mode 100644 compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/FieldCarrier.kt delete mode 100644 compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/FunctionCarrier.kt delete mode 100644 compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/LocalDelegatedPropertyCarrier.kt delete mode 100644 compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/PropertyCarrier.kt delete mode 100644 compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/TypeAliasCarrier.kt delete mode 100644 compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/TypeParameterCarrier.kt delete mode 100644 compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/ValueParameterCarrier.kt delete mode 100644 compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/serialization/IrCarrierDeserializer.kt delete mode 100644 compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/serialization/IrCarrierSerializer.kt delete mode 100644 compiler/ir/ir.tree.persistent/generator/build.gradle.kts delete mode 100644 compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/AnonymousInitializer.kt delete mode 100644 compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Class.kt delete mode 100644 compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Constructor.kt delete mode 100644 compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/EnumEntry.kt delete mode 100644 compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/ErrorDeclaration.kt delete mode 100644 compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Field.kt delete mode 100644 compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Function.kt delete mode 100644 compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/LocalDelegatedProperty.kt delete mode 100644 compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Main.kt delete mode 100644 compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/PersistentIrGenerator.kt delete mode 100644 compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Property.kt delete mode 100644 compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/TypeAlias.kt delete mode 100644 compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/TypeParameter.kt delete mode 100644 compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/ValueParameter.kt delete mode 100644 compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrDeclarationBase.kt delete mode 100644 compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrFactory.kt delete mode 100644 compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrFunction.kt delete mode 100644 compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrProperty.kt delete mode 100644 compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/carriers/BodyCarrier.kt delete mode 100644 compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/carriers/Carrier.kt delete mode 100644 compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/carriers/DeclarationCarrier.kt delete mode 100644 compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/expressions/persistent/PersistentIrBlockBody.kt delete mode 100644 compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/expressions/persistent/PersistentIrExpressionBody.kt delete mode 100644 compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/serialization/CarrierDeserializer.kt delete mode 100644 compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/serialization/CarrierSerializer.kt delete mode 100644 compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/serialization/IrCarrierDeserializerImpl.kt delete mode 100644 compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/serialization/IrCarrierSerializerImpl.kt delete mode 100644 compiler/ir/serialization.common/src/KotlinPirCarriers.proto delete mode 100644 compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirAnonymousInitializerCarrier.java delete mode 100644 compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirAnonymousInitializerCarrierOrBuilder.java delete mode 100644 compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirBodyCarrier.java delete mode 100644 compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirBodyCarrierOrBuilder.java delete mode 100644 compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirClassCarrier.java delete mode 100644 compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirClassCarrierOrBuilder.java delete mode 100644 compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirConstructorCarrier.java delete mode 100644 compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirConstructorCarrierOrBuilder.java delete mode 100644 compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirEnumEntryCarrier.java delete mode 100644 compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirEnumEntryCarrierOrBuilder.java delete mode 100644 compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirErrorDeclarationCarrier.java delete mode 100644 compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirErrorDeclarationCarrierOrBuilder.java delete mode 100644 compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirFieldCarrier.java delete mode 100644 compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirFieldCarrierOrBuilder.java delete mode 100644 compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirFunctionCarrier.java delete mode 100644 compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirFunctionCarrierOrBuilder.java delete mode 100644 compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirInlineClassRepresentationOrBuilder.java delete mode 100644 compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirLocalDelegatedPropertyCarrier.java delete mode 100644 compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirLocalDelegatedPropertyCarrierOrBuilder.java delete mode 100644 compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirPropertyCarrier.java delete mode 100644 compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirPropertyCarrierOrBuilder.java delete mode 100644 compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirTypeAliasCarrier.java delete mode 100644 compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirTypeAliasCarrierOrBuilder.java delete mode 100644 compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirTypeParameterCarrier.java delete mode 100644 compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirTypeParameterCarrierOrBuilder.java delete mode 100644 compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirValueParameterCarrier.java delete mode 100644 compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirValueParameterCarrierOrBuilder.java diff --git a/build.gradle.kts b/build.gradle.kts index ff13c2346c0..c19faa61c25 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -129,7 +129,6 @@ val useJvmFir by extra(project.kotlinBuildProperties.useFir) val irCompilerModules = arrayOf( ":compiler:ir.tree", ":compiler:ir.tree.impl", - ":compiler:ir.tree.persistent", ":compiler:ir.serialization.common", ":compiler:ir.serialization.js", ":compiler:ir.serialization.jvm", diff --git a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/inline/FunctionInlining.kt b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/inline/FunctionInlining.kt index 7ebda1338e0..878ac8765fa 100644 --- a/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/inline/FunctionInlining.kt +++ b/compiler/ir/backend.common/src/org/jetbrains/kotlin/backend/common/lower/inline/FunctionInlining.kt @@ -161,7 +161,6 @@ class FunctionInlining( // there also get temporary declaration like this which leads to some unclear behaviour. Since I am not aware // enough about PIR internals the simplest way seemed to me is to unregister temporary function. Hope it is going // to be removed ASAP along with registering every PIR declaration. - factory.unlistFunction(this) parent = callee.parent if (performRecursiveInline) { @@ -583,12 +582,6 @@ class FunctionInlining( substituteMap[argument.parameter] = argument.argumentExpression (argument.argumentExpression as? IrFunctionReference)?.let { evaluationStatements += evaluateArguments(it) } - (argument.argumentExpression as? IrFunctionExpression)?.let { - if (deepInline) { - it.function.factory.unlistFunction(it.function) - } - } - return@forEach } diff --git a/compiler/ir/backend.js/build.gradle.kts b/compiler/ir/backend.js/build.gradle.kts index ff1bb410713..a56b8b4d7db 100644 --- a/compiler/ir/backend.js/build.gradle.kts +++ b/compiler/ir/backend.js/build.gradle.kts @@ -11,7 +11,6 @@ dependencies { api(project(":compiler:ir.backend.common")) api(project(":compiler:ir.serialization.common")) api(project(":compiler:ir.serialization.js")) - api(project(":compiler:ir.tree.persistent")) api(project(":js:js.ast")) api(project(":js:js.frontend")) api(project(":js:js.sourcemap")) diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/MutableController.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/MutableController.kt deleted file mode 100644 index 3e6f0fbd66f..00000000000 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/MutableController.kt +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.backend.js - -import org.jetbrains.kotlin.descriptors.DescriptorVisibilities -import org.jetbrains.kotlin.ir.IrElement -import org.jetbrains.kotlin.ir.declarations.* -import org.jetbrains.kotlin.ir.declarations.persistent.PersistentIrBodyBase -import org.jetbrains.kotlin.ir.declarations.persistent.PersistentIrDeclarationBase -import org.jetbrains.kotlin.ir.expressions.IrBody -import org.jetbrains.kotlin.ir.util.isLocal - -open class MutableController(val context: JsIrBackendContext, val lowerings: List) : StageController() { - - override var currentStage: Int = 0 - - override fun lazyLower(declaration: IrDeclaration) { - if (declaration is PersistentIrDeclarationBase<*>) { - while (declaration.loweredUpTo + 1 < currentStage) { - val i = declaration.loweredUpTo + 1 - withStage(i) { - // TODO a better way to skip declarations in external package fragments - if (declaration.removedOn > i && declaration !in context.externalDeclarations) { - - when (val lowering = lowerings[i - 1]) { - is DeclarationLowering -> lowering.doApplyLoweringTo(declaration) - is BodyLowering -> { - // Handle local declarations in case they leak through types - if (declaration.isLocal) { - declaration.enclosingBody()?.let { - withStage(i + 1) { lazyLower(it) } - } - } - } - is ModuleLowering -> {} - } - } - declaration.loweredUpTo = i - } - } - } - } - - override fun lazyLower(body: IrBody) { - if (body is PersistentIrBodyBase<*>) { - for (i in (body.loweredUpTo + 1) until currentStage) { - withStage(i) { - if (body.container !in context.externalDeclarations) { - val lowering = lowerings[i - 1] - - if (lowering is BodyLowering) { - bodyLowering { - lowering.bodyLowering(context).lower(body, body.container) - } - } - } - body.loweredUpTo = i - } - } - } - } - - // Launches a lowering and applies it's results - private fun DeclarationLowering.doApplyLoweringTo(declaration: PersistentIrDeclarationBase<*>) { - val parentBefore = declaration.parent - val result = restrictTo(declaration) { this.declarationTransformer(context).transformFlat(declaration) } - if (result != null) { - result.forEach { - // Some of our lowerings rely on transformDeclarationsFlat - it.parent = parentBefore - } - - if (parentBefore is IrDeclarationContainer) { - unrestrictDeclarationListsAccess { - - // Field order matters for top level property initialization - val correspondingProperty = when (declaration) { - is IrSimpleFunction -> declaration.correspondingPropertySymbol?.owner - is IrField -> declaration.correspondingPropertySymbol?.owner - else -> null - } - - var index = -1 - parentBefore.declarations.forEachIndexed { i, v -> - if (v == declaration || index == -1 && v == correspondingProperty) { - index = i - } - } - - if (index != -1 && declaration !is IrProperty) { - if (parentBefore.declarations[index] == declaration) { - parentBefore.declarations.removeAt(index) - } - parentBefore.declarations.addAll(index, result) - } else { - parentBefore.declarations.addAll(result) - } - - if (declaration.parent == parentBefore && declaration !in result) { - declaration.removedOn = currentStage - } - } - } - } - } - - // Finds outermost body, containing the declarations - // Doesn't work in case of local declarations inside default arguments - // That might be fine as those shouldn't leak - private fun IrDeclaration.enclosingBody(): IrBody? { - var lastBodyContainer: IrDeclaration? = null - var parent = this.parent - while (parent is IrDeclaration) { - if (parent !is IrClass) { - lastBodyContainer = parent - } - parent = parent.parent - } - return lastBodyContainer?.run { - when (this) { - is IrFunction -> body // TODO What about local declarations inside default arguments? - is IrField -> initializer - else -> null - } - } - } - - override fun withStage(stage: Int, fn: () -> T): T { - val prevStage = currentStage - currentStage = stage - try { - return fn() - } finally { - currentStage = prevStage - } - } - - override fun withInitialIr(block: () -> T): T = { withStage(0, block) }.withRestrictions(newRestrictedToDeclaration = null) - - override fun restrictTo(declaration: IrDeclaration, fn: () -> T): T = fn.withRestrictions(newRestrictedToDeclaration = declaration) - - override fun bodyLowering(fn: () -> T): T = fn.withRestrictions(newBodiesEnabled = true, newRestricted = true, newDeclarationListsRestricted = true) - - override fun unrestrictDeclarationListsAccess(fn: () -> T): T = fn.withRestrictions(newDeclarationListsRestricted = false) - - override fun canModify(element: IrElement): Boolean { - return true - // TODO fix and enable -// return !restricted || restrictedToDeclaration === element || element is IrPersistingElementBase<*> && element.createdOn == currentStage - } - - override fun canAccessDeclarationsOf(irClass: IrClass): Boolean { - return !declarationListsRestricted || irClass.visibility == DescriptorVisibilities.LOCAL && irClass !in context.extractedLocalClasses - } - - private var restrictedToDeclaration: IrDeclaration? = null - // TODO flags? - override var bodiesEnabled: Boolean = true - private var restricted: Boolean = false - private var declarationListsRestricted = false - - private fun (() -> T).withRestrictions( - newRestrictedToDeclaration: IrDeclaration? = null, - newBodiesEnabled: Boolean? = null, - newRestricted: Boolean? = null, - newDeclarationListsRestricted: Boolean? = null - ): T { - val prev = restrictedToDeclaration - restrictedToDeclaration = newRestrictedToDeclaration - val wereBodiesEnabled = bodiesEnabled - bodiesEnabled = newBodiesEnabled ?: bodiesEnabled - val wasRestricted = restricted - restricted = newRestricted ?: restricted - val wereDeclarationListsRestricted = declarationListsRestricted - declarationListsRestricted = newDeclarationListsRestricted ?: declarationListsRestricted - try { - return this.invoke() - } finally { - restrictedToDeclaration = prev - bodiesEnabled = wereBodiesEnabled - restricted = wasRestricted - declarationListsRestricted = wereDeclarationListsRestricted - } - } -} diff --git a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/PropertyLazyInitLowering.kt b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/PropertyLazyInitLowering.kt index 373e3a1ccb2..ee6315c62cb 100644 --- a/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/PropertyLazyInitLowering.kt +++ b/compiler/ir/backend.js/src/org/jetbrains/kotlin/ir/backend/js/lower/PropertyLazyInitLowering.kt @@ -20,7 +20,6 @@ import org.jetbrains.kotlin.ir.backend.js.utils.prependFunctionCall import org.jetbrains.kotlin.ir.builders.declarations.addFunction import org.jetbrains.kotlin.ir.builders.declarations.buildField import org.jetbrains.kotlin.ir.declarations.* -import org.jetbrains.kotlin.ir.declarations.persistent.PersistentIrElementBase import org.jetbrains.kotlin.ir.expressions.* import org.jetbrains.kotlin.ir.util.hasAnnotation import org.jetbrains.kotlin.name.Name @@ -59,8 +58,6 @@ class PropertyLazyInitLowering( val file = container.parent as? IrFile ?: return - container.assertCompatibleDeclaration() - val initFun = (when { file in fileToInitializationFuns -> fileToInitializationFuns[file] fileToInitializerPureness[file] == true -> null @@ -221,7 +218,6 @@ class RemoveInitializersForLazyProperties( ?.takeIf { it.isForLazyInit() } ?.backingField ?.let { - it.assertCompatibleDeclaration() it.initializer = null } @@ -278,19 +274,13 @@ private fun IrDeclaration.propertyWithPersistentSafe(transform: IrDeclaration.() withPersistentSafe(transform) private fun IrDeclaration.withPersistentSafe(transform: IrDeclaration.() -> T?): T? = - if (this !is PersistentIrElementBase<*> || this.createdOn <= this.factory.stageController.currentStage) { - transform() - } else null + transform() private fun IrDeclaration.isCompatibleDeclaration(context: JsIrBackendContext) = correspondingProperty?.let { it.isForLazyInit() && !it.hasAnnotation(context.intrinsics.jsEagerInitializationAnnotationSymbol) } ?: true && withPersistentSafe { origin in compatibleOrigins } == true -private fun IrDeclaration.assertCompatibleDeclaration() { - assert(this !is PersistentIrElementBase<*> || this.createdOn <= this.factory.stageController.currentStage) -} - private val compatibleOrigins = listOf( IrDeclarationOrigin.DEFINED, IrDeclarationOrigin.DELEGATED_PROPERTY_ACCESSOR, diff --git a/compiler/ir/ir.tree.persistent/build.gradle.kts b/compiler/ir/ir.tree.persistent/build.gradle.kts deleted file mode 100644 index 454ac4e0cef..00000000000 --- a/compiler/ir/ir.tree.persistent/build.gradle.kts +++ /dev/null @@ -1,17 +0,0 @@ -plugins { - kotlin("jvm") - id("jps-compatible") -} - -dependencies { - compileOnly(project(":compiler:ir.tree")) - implementation(project(":compiler:ir.serialization.common")) -} - -sourceSets { - "main" { - projectDefault() - this.java.srcDir("gen") - } - "test" {} -} diff --git a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrAnonymousInitializer.kt b/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrAnonymousInitializer.kt deleted file mode 100644 index 9335dcdc455..00000000000 --- a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrAnonymousInitializer.kt +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.declarations.persistent - -import org.jetbrains.kotlin.descriptors.ClassDescriptor -import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI -import org.jetbrains.kotlin.ir.declarations.IrAnonymousInitializer -import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin -import org.jetbrains.kotlin.ir.declarations.IrDeclarationParent -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.AnonymousInitializerCarrier -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.Carrier -import org.jetbrains.kotlin.ir.expressions.IrBlockBody -import org.jetbrains.kotlin.ir.expressions.IrConstructorCall -import org.jetbrains.kotlin.ir.symbols.IrAnonymousInitializerSymbol -import org.jetbrains.kotlin.ir.util.IdSignature - -// Auto-generated by compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Main.kt. DO NOT EDIT! - -internal class PersistentIrAnonymousInitializer( - override val startOffset: Int, - override val endOffset: Int, - origin: IrDeclarationOrigin, - override val symbol: IrAnonymousInitializerSymbol, - override val isStatic: Boolean = false, - override val factory: PersistentIrFactory -) : IrAnonymousInitializer(), - PersistentIrDeclarationBase, - AnonymousInitializerCarrier { - - init { - symbol.bind(this) - } - - override var signature: IdSignature? = factory.currentSignature(this) - - override var lastModified: Int = factory.stageController.currentStage - override var loweredUpTo: Int = factory.stageController.currentStage - override var values: Array? = null - override val createdOn: Int = factory.stageController.currentStage - - override var parentField: IrDeclarationParent? = null - override var originField: IrDeclarationOrigin = origin - override var removedOn: Int = Int.MAX_VALUE - override var annotationsField: List = emptyList() - private val hashCodeValue: Int = PersistentIrDeclarationBase.hashCodeCounter++ - override fun hashCode(): Int = hashCodeValue - override fun equals(other: Any?): Boolean = (this === other) - - @ObsoleteDescriptorBasedAPI - override val descriptor: ClassDescriptor - get() = symbol.descriptor - - override var bodyField: IrBlockBody? = null - - override var body: IrBlockBody - get() = getCarrier().bodyField!! - set(v) { - if (getCarrier().bodyField !== v) { - if (v is PersistentIrBodyBase<*>) { - v.container = this - } - setCarrier() - bodyField = v - } - } -} diff --git a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrClass.kt b/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrClass.kt deleted file mode 100644 index fe9fe826e76..00000000000 --- a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrClass.kt +++ /dev/null @@ -1,191 +0,0 @@ -/* - * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.declarations.persistent - -import java.util.ArrayList -import java.util.Collections -import org.jetbrains.kotlin.descriptors.ClassDescriptor -import org.jetbrains.kotlin.descriptors.ClassKind -import org.jetbrains.kotlin.descriptors.DescriptorVisibility -import org.jetbrains.kotlin.descriptors.InlineClassRepresentation -import org.jetbrains.kotlin.descriptors.Modality -import org.jetbrains.kotlin.descriptors.SourceElement -import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI -import org.jetbrains.kotlin.ir.declarations.IrAttributeContainer -import org.jetbrains.kotlin.ir.declarations.IrClass -import org.jetbrains.kotlin.ir.declarations.IrDeclaration -import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin -import org.jetbrains.kotlin.ir.declarations.IrDeclarationParent -import org.jetbrains.kotlin.ir.declarations.IrTypeParameter -import org.jetbrains.kotlin.ir.declarations.IrValueParameter -import org.jetbrains.kotlin.ir.declarations.MetadataSource -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.Carrier -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.ClassCarrier -import org.jetbrains.kotlin.ir.expressions.IrConstructorCall -import org.jetbrains.kotlin.ir.symbols.IrClassSymbol -import org.jetbrains.kotlin.ir.symbols.IrTypeParameterSymbol -import org.jetbrains.kotlin.ir.symbols.IrValueParameterSymbol -import org.jetbrains.kotlin.ir.types.IrSimpleType -import org.jetbrains.kotlin.ir.types.IrType -import org.jetbrains.kotlin.ir.util.IdSignature -import org.jetbrains.kotlin.name.Name - -// Auto-generated by compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Main.kt. DO NOT EDIT! - -internal class PersistentIrClass( - override val startOffset: Int, - override val endOffset: Int, - origin: IrDeclarationOrigin, - override val symbol: IrClassSymbol, - override val name: Name, - override val kind: ClassKind, - visibility: DescriptorVisibility, - modality: Modality, - override val isCompanion: Boolean = false, - override val isInner: Boolean = false, - override val isData: Boolean = false, - override val isExternal: Boolean = false, - override val isInline: Boolean = false, - override val isExpect: Boolean = false, - override val isFun: Boolean = false, - override val source: SourceElement = SourceElement.NO_SOURCE, - override val factory: PersistentIrFactory -) : IrClass(), - PersistentIrDeclarationBase, - ClassCarrier { - - init { - symbol.bind(this) - } - - override var signature: IdSignature? = factory.currentSignature(this) - - override var lastModified: Int = factory.stageController.currentStage - override var loweredUpTo: Int = factory.stageController.currentStage - override var values: Array? = null - override val createdOn: Int = factory.stageController.currentStage - - override var parentField: IrDeclarationParent? = null - override var originField: IrDeclarationOrigin = origin - override var removedOn: Int = Int.MAX_VALUE - override var annotationsField: List = emptyList() - private val hashCodeValue: Int = PersistentIrDeclarationBase.hashCodeCounter++ - override fun hashCode(): Int = hashCodeValue - override fun equals(other: Any?): Boolean = (this === other) - - @ObsoleteDescriptorBasedAPI - override val descriptor: ClassDescriptor - get() = symbol.descriptor - - override var visibilityField: DescriptorVisibility = visibility - - override var visibility: DescriptorVisibility - get() = getCarrier().visibilityField - set(v) { - if (visibility !== v) { - setCarrier() - visibilityField = v - } - } - - override var thisReceiverField: IrValueParameter? = null - - override var thisReceiverSymbolField: IrValueParameterSymbol? - get() = thisReceiverField?.symbol - set(v) { - thisReceiverField = v?.owner - } - - override var thisReceiver: IrValueParameter? - get() = getCarrier().thisReceiverField - set(v) { - if (thisReceiver !== v) { - setCarrier() - thisReceiverField = v - } - } - - private var initialDeclarations: MutableList? = null - - override val declarations: MutableList = ArrayList() - get() { - if (createdOn < factory.stageController.currentStage && initialDeclarations == null) { - initialDeclarations = Collections.unmodifiableList(ArrayList(field)) - } - - return if (factory.stageController.canAccessDeclarationsOf(this)) { - ensureLowered() - field - } else { - initialDeclarations ?: field - } - } - - override var typeParametersField: List = emptyList() - - override var typeParametersSymbolField: List - get() = typeParametersField.map { it.symbol } - set(v) { - typeParametersField = v.map { it.owner } - } - - override var typeParameters: List - get() = getCarrier().typeParametersField - set(v) { - if (typeParameters !== v) { - setCarrier() - typeParametersField = v - } - } - - override var superTypesField: List = emptyList() - - override var superTypes: List - get() = getCarrier().superTypesField - set(v) { - if (superTypes !== v) { - setCarrier() - superTypesField = v - } - } - - override var metadata: MetadataSource? = null - - override var modalityField: Modality = modality - - override var modality: Modality - get() = getCarrier().modalityField - set(v) { - if (modality !== v) { - setCarrier() - modalityField = v - } - } - - override var inlineClassRepresentationField: InlineClassRepresentation? = null - - override var inlineClassRepresentation: InlineClassRepresentation? - get() = getCarrier().inlineClassRepresentationField - set(v) { - if (inlineClassRepresentation !== v) { - setCarrier() - inlineClassRepresentationField = v - } - } - - override var attributeOwnerId: IrAttributeContainer = this - - override var sealedSubclassesField: List = emptyList() - - override var sealedSubclasses: List - get() = getCarrier().sealedSubclassesField - set(v) { - if (sealedSubclasses !== v) { - setCarrier() - sealedSubclassesField = v - } - } -} diff --git a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrConstructor.kt b/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrConstructor.kt deleted file mode 100644 index 403aed9585b..00000000000 --- a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrConstructor.kt +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.declarations.persistent - -import org.jetbrains.kotlin.descriptors.ClassConstructorDescriptor -import org.jetbrains.kotlin.descriptors.DescriptorVisibility -import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI -import org.jetbrains.kotlin.ir.declarations.IrConstructor -import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin -import org.jetbrains.kotlin.ir.declarations.IrDeclarationParent -import org.jetbrains.kotlin.ir.declarations.IrTypeParameter -import org.jetbrains.kotlin.ir.declarations.IrValueParameter -import org.jetbrains.kotlin.ir.declarations.MetadataSource -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.Carrier -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.ConstructorCarrier -import org.jetbrains.kotlin.ir.expressions.IrBody -import org.jetbrains.kotlin.ir.expressions.IrConstructorCall -import org.jetbrains.kotlin.ir.symbols.IrConstructorSymbol -import org.jetbrains.kotlin.ir.symbols.IrTypeParameterSymbol -import org.jetbrains.kotlin.ir.symbols.IrValueParameterSymbol -import org.jetbrains.kotlin.ir.types.IrType -import org.jetbrains.kotlin.ir.types.impl.IrUninitializedType -import org.jetbrains.kotlin.ir.types.impl.ReturnTypeIsNotInitializedException -import org.jetbrains.kotlin.ir.util.IdSignature -import org.jetbrains.kotlin.name.Name -import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedContainerSource - -// Auto-generated by compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Main.kt. DO NOT EDIT! - -internal class PersistentIrConstructor( - override val startOffset: Int, - override val endOffset: Int, - origin: IrDeclarationOrigin, - override val symbol: IrConstructorSymbol, - override val name: Name, - visibility: DescriptorVisibility, - returnType: IrType, - override val isInline: Boolean, - override val isExternal: Boolean, - override val isPrimary: Boolean, - override val isExpect: Boolean, - override val containerSource: DeserializedContainerSource?, - override val factory: PersistentIrFactory -) : IrConstructor(), - PersistentIrDeclarationBase, - ConstructorCarrier { - - init { - symbol.bind(this) - } - - override var signature: IdSignature? = factory.currentSignature(this) - - override var lastModified: Int = factory.stageController.currentStage - override var loweredUpTo: Int = factory.stageController.currentStage - override var values: Array? = null - override val createdOn: Int = factory.stageController.currentStage - - override var parentField: IrDeclarationParent? = null - override var originField: IrDeclarationOrigin = origin - override var removedOn: Int = Int.MAX_VALUE - override var annotationsField: List = emptyList() - private val hashCodeValue: Int = PersistentIrDeclarationBase.hashCodeCounter++ - override fun hashCode(): Int = hashCodeValue - override fun equals(other: Any?): Boolean = (this === other) - - override var returnTypeFieldField: IrType = returnType - - private var returnTypeField: IrType - get() = getCarrier().returnTypeFieldField - set(v) { - if (returnTypeField !== v) { - setCarrier() - returnTypeFieldField = v - } - } - - override var returnType: IrType - get() = returnTypeField.let { - if (it !== IrUninitializedType) it else throw ReturnTypeIsNotInitializedException(this) - } - set(c) { - returnTypeField = c - } - - override var typeParametersField: List = emptyList() - - override var typeParametersSymbolField: List - get() = typeParametersField.map { it.symbol } - set(v) { - typeParametersField = v.map { it.owner } - } - - override var typeParameters: List - get() = getCarrier().typeParametersField - set(v) { - if (typeParameters !== v) { - setCarrier() - typeParametersField = v - } - } - - override var dispatchReceiverParameterField: IrValueParameter? = null - - override var dispatchReceiverParameterSymbolField: IrValueParameterSymbol? - get() = dispatchReceiverParameterField?.symbol - set(v) { - dispatchReceiverParameterField = v?.owner - } - - override var dispatchReceiverParameter: IrValueParameter? - get() = getCarrier().dispatchReceiverParameterField - set(v) { - if (dispatchReceiverParameter !== v) { - setCarrier() - dispatchReceiverParameterField = v - } - } - - override var extensionReceiverParameterField: IrValueParameter? = null - - override var extensionReceiverParameterSymbolField: IrValueParameterSymbol? - get() = extensionReceiverParameterField?.symbol - set(v) { - extensionReceiverParameterField = v?.owner - } - - override var extensionReceiverParameter: IrValueParameter? - get() = getCarrier().extensionReceiverParameterField - set(v) { - if (extensionReceiverParameter !== v) { - setCarrier() - extensionReceiverParameterField = v - } - } - - override var valueParametersField: List = emptyList() - - override var valueParametersSymbolField: List - get() = valueParametersField.map { it.symbol } - set(v) { - valueParametersField = v.map { it.owner } - } - - override var valueParameters: List - get() = getCarrier().valueParametersField - set(v) { - if (valueParameters !== v) { - setCarrier() - valueParametersField = v - } - } - - override var bodyField: IrBody? = null - - override var body: IrBody? - get() = getCarrier().bodyField - set(v) { - if (body !== v) { - if (v is PersistentIrBodyBase<*>) { - v.container = this - } - setCarrier() - bodyField = v - } - } - - override var contextReceiverParametersCount: Int = 0 - - override var metadata: MetadataSource? = null - - override var visibilityField: DescriptorVisibility = visibility - - override var visibility: DescriptorVisibility - get() = getCarrier().visibilityField - set(v) { - if (visibility !== v) { - setCarrier() - visibilityField = v - } - } - - @ObsoleteDescriptorBasedAPI - override val descriptor: ClassConstructorDescriptor - get() = symbol.descriptor -} diff --git a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrEnumEntry.kt b/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrEnumEntry.kt deleted file mode 100644 index fa5c57aba4a..00000000000 --- a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrEnumEntry.kt +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.declarations.persistent - -import org.jetbrains.kotlin.descriptors.ClassDescriptor -import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI -import org.jetbrains.kotlin.ir.declarations.IrClass -import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin -import org.jetbrains.kotlin.ir.declarations.IrDeclarationParent -import org.jetbrains.kotlin.ir.declarations.IrEnumEntry -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.Carrier -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.EnumEntryCarrier -import org.jetbrains.kotlin.ir.expressions.IrConstructorCall -import org.jetbrains.kotlin.ir.expressions.IrExpressionBody -import org.jetbrains.kotlin.ir.symbols.IrClassSymbol -import org.jetbrains.kotlin.ir.symbols.IrEnumEntrySymbol -import org.jetbrains.kotlin.ir.util.IdSignature -import org.jetbrains.kotlin.name.Name - -// Auto-generated by compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Main.kt. DO NOT EDIT! - -internal class PersistentIrEnumEntry( - override val startOffset: Int, - override val endOffset: Int, - origin: IrDeclarationOrigin, - override val symbol: IrEnumEntrySymbol, - override val name: Name, - override val factory: PersistentIrFactory -) : IrEnumEntry(), - PersistentIrDeclarationBase, - EnumEntryCarrier { - - init { - symbol.bind(this) - } - - override var signature: IdSignature? = factory.currentSignature(this) - - override var lastModified: Int = factory.stageController.currentStage - override var loweredUpTo: Int = factory.stageController.currentStage - override var values: Array? = null - override val createdOn: Int = factory.stageController.currentStage - - override var parentField: IrDeclarationParent? = null - override var originField: IrDeclarationOrigin = origin - override var removedOn: Int = Int.MAX_VALUE - override var annotationsField: List = emptyList() - private val hashCodeValue: Int = PersistentIrDeclarationBase.hashCodeCounter++ - override fun hashCode(): Int = hashCodeValue - override fun equals(other: Any?): Boolean = (this === other) - - @ObsoleteDescriptorBasedAPI - override val descriptor: ClassDescriptor - get() = symbol.descriptor - - override var correspondingClassField: IrClass? = null - - override var correspondingClassSymbolField: IrClassSymbol? - get() = correspondingClassField?.symbol - set(v) { - correspondingClassField = v?.owner - } - - override var correspondingClass: IrClass? - get() = getCarrier().correspondingClassField - set(v) { - if (correspondingClass !== v) { - setCarrier() - correspondingClassField = v - } - } - - override var initializerExpressionField: IrExpressionBody? = null - - override var initializerExpression: IrExpressionBody? - get() = getCarrier().initializerExpressionField - set(v) { - if (initializerExpression !== v) { - if (v is PersistentIrBodyBase<*>) { - v.container = this - } - setCarrier() - initializerExpressionField = v - } - } -} diff --git a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrErrorDeclaration.kt b/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrErrorDeclaration.kt deleted file mode 100644 index b458f93cc52..00000000000 --- a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrErrorDeclaration.kt +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.declarations.persistent - -import org.jetbrains.kotlin.descriptors.DeclarationDescriptor -import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI -import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin -import org.jetbrains.kotlin.ir.declarations.IrDeclarationParent -import org.jetbrains.kotlin.ir.declarations.IrErrorDeclaration -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.Carrier -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.ErrorDeclarationCarrier -import org.jetbrains.kotlin.ir.descriptors.toIrBasedDescriptor -import org.jetbrains.kotlin.ir.expressions.IrConstructorCall -import org.jetbrains.kotlin.ir.util.IdSignature - -// Auto-generated by compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Main.kt. DO NOT EDIT! - -@OptIn(ObsoleteDescriptorBasedAPI::class) -internal class PersistentIrErrorDeclaration( - override val startOffset: Int, - override val endOffset: Int, - private val _descriptor: DeclarationDescriptor?, - override val factory: PersistentIrFactory -) : IrErrorDeclaration(), - PersistentIrDeclarationBase, - ErrorDeclarationCarrier { - override val descriptor: DeclarationDescriptor - get() = _descriptor ?: this.toIrBasedDescriptor() - - override var signature: IdSignature? = factory.currentSignature(this) - - override var lastModified: Int = factory.stageController.currentStage - override var loweredUpTo: Int = factory.stageController.currentStage - override var values: Array? = null - override val createdOn: Int = factory.stageController.currentStage - - override var parentField: IrDeclarationParent? = null - override var originField: IrDeclarationOrigin = IrDeclarationOrigin.DEFINED - override var removedOn: Int = Int.MAX_VALUE - override var annotationsField: List = emptyList() -} diff --git a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrField.kt b/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrField.kt deleted file mode 100644 index 8c003b5238d..00000000000 --- a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrField.kt +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.declarations.persistent - -import org.jetbrains.kotlin.descriptors.DescriptorVisibility -import org.jetbrains.kotlin.descriptors.PropertyDescriptor -import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI -import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin -import org.jetbrains.kotlin.ir.declarations.IrDeclarationParent -import org.jetbrains.kotlin.ir.declarations.IrField -import org.jetbrains.kotlin.ir.declarations.MetadataSource -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.Carrier -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.FieldCarrier -import org.jetbrains.kotlin.ir.expressions.IrConstructorCall -import org.jetbrains.kotlin.ir.expressions.IrExpressionBody -import org.jetbrains.kotlin.ir.symbols.IrFieldSymbol -import org.jetbrains.kotlin.ir.symbols.IrPropertySymbol -import org.jetbrains.kotlin.ir.types.IrType -import org.jetbrains.kotlin.ir.util.IdSignature -import org.jetbrains.kotlin.name.Name - -// Auto-generated by compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Main.kt. DO NOT EDIT! - -internal class PersistentIrField( - override val startOffset: Int, - override val endOffset: Int, - origin: IrDeclarationOrigin, - override val symbol: IrFieldSymbol, - override val name: Name, - type: IrType, - override var visibility: DescriptorVisibility, - override val isFinal: Boolean, - override val isExternal: Boolean, - override val isStatic: Boolean, - override val factory: PersistentIrFactory -) : IrField(), - PersistentIrDeclarationBase, - FieldCarrier { - - init { - symbol.bind(this) - } - - override var signature: IdSignature? = factory.currentSignature(this) - - override var lastModified: Int = factory.stageController.currentStage - override var loweredUpTo: Int = factory.stageController.currentStage - override var values: Array? = null - override val createdOn: Int = factory.stageController.currentStage - - override var parentField: IrDeclarationParent? = null - override var originField: IrDeclarationOrigin = origin - override var removedOn: Int = Int.MAX_VALUE - override var annotationsField: List = emptyList() - private val hashCodeValue: Int = PersistentIrDeclarationBase.hashCodeCounter++ - override fun hashCode(): Int = hashCodeValue - override fun equals(other: Any?): Boolean = (this === other) - - @ObsoleteDescriptorBasedAPI - override val descriptor: PropertyDescriptor - get() = symbol.descriptor - - override var initializerField: IrExpressionBody? = null - - override var initializer: IrExpressionBody? - get() = getCarrier().initializerField - set(v) { - if (initializer !== v) { - if (v is PersistentIrBodyBase<*>) { - v.container = this - } - setCarrier() - initializerField = v - } - } - - override var correspondingPropertySymbolField: IrPropertySymbol? = null - - override var correspondingPropertySymbol: IrPropertySymbol? - get() = getCarrier().correspondingPropertySymbolField - set(v) { - if (correspondingPropertySymbol !== v) { - setCarrier() - correspondingPropertySymbolField = v - } - } - - override var metadata: MetadataSource? = null - - override var typeField: IrType = type - - override var type: IrType - get() = getCarrier().typeField - set(v) { - if (type !== v) { - setCarrier() - typeField = v - } - } -} diff --git a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrFunctionCommon.kt b/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrFunctionCommon.kt deleted file mode 100644 index 2bcb135b186..00000000000 --- a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrFunctionCommon.kt +++ /dev/null @@ -1,207 +0,0 @@ -/* - * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.declarations.persistent - -import org.jetbrains.kotlin.descriptors.DescriptorVisibility -import org.jetbrains.kotlin.ir.declarations.IrAttributeContainer -import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin -import org.jetbrains.kotlin.ir.declarations.IrDeclarationParent -import org.jetbrains.kotlin.ir.declarations.IrSimpleFunction -import org.jetbrains.kotlin.ir.declarations.IrTypeParameter -import org.jetbrains.kotlin.ir.declarations.IrValueParameter -import org.jetbrains.kotlin.ir.declarations.MetadataSource -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.Carrier -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.FunctionCarrier -import org.jetbrains.kotlin.ir.expressions.IrBody -import org.jetbrains.kotlin.ir.expressions.IrConstructorCall -import org.jetbrains.kotlin.ir.symbols.IrPropertySymbol -import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol -import org.jetbrains.kotlin.ir.symbols.IrTypeParameterSymbol -import org.jetbrains.kotlin.ir.symbols.IrValueParameterSymbol -import org.jetbrains.kotlin.ir.types.IrType -import org.jetbrains.kotlin.ir.types.impl.IrUninitializedType -import org.jetbrains.kotlin.ir.types.impl.ReturnTypeIsNotInitializedException -import org.jetbrains.kotlin.ir.util.IdSignature -import org.jetbrains.kotlin.name.Name -import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedContainerSource - -// Auto-generated by compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Main.kt. DO NOT EDIT! - -internal abstract class PersistentIrFunctionCommon( - override val startOffset: Int, - override val endOffset: Int, - origin: IrDeclarationOrigin, - override val name: Name, - visibility: DescriptorVisibility, - returnType: IrType, - override val isInline: Boolean, - override val isExternal: Boolean, - override val isTailrec: Boolean, - override val isSuspend: Boolean, - override val isOperator: Boolean, - override val isInfix: Boolean, - override val isExpect: Boolean, - override val containerSource: DeserializedContainerSource? = null, - override val factory: PersistentIrFactory -) : IrSimpleFunction(), - PersistentIrDeclarationBase, - FunctionCarrier { - - override var signature: IdSignature? = factory.currentSignature(this) - - override var lastModified: Int = factory.stageController.currentStage - override var loweredUpTo: Int = factory.stageController.currentStage - override var values: Array? = null - override val createdOn: Int = factory.stageController.currentStage - - override var parentField: IrDeclarationParent? = null - override var originField: IrDeclarationOrigin = origin - override var removedOn: Int = Int.MAX_VALUE - override var annotationsField: List = emptyList() - private val hashCodeValue: Int = PersistentIrDeclarationBase.hashCodeCounter++ - override fun hashCode(): Int = hashCodeValue - override fun equals(other: Any?): Boolean = (this === other) - - override var returnTypeFieldField: IrType = returnType - - private var returnTypeField: IrType - get() = getCarrier().returnTypeFieldField - set(v) { - if (returnTypeField !== v) { - setCarrier() - returnTypeFieldField = v - } - } - - final override var returnType: IrType - get() = returnTypeField.let { - if (it !== IrUninitializedType) it else throw ReturnTypeIsNotInitializedException(this) - } - set(c) { - returnTypeField = c - } - - override var typeParametersField: List = emptyList() - - override var typeParametersSymbolField: List - get() = typeParametersField.map { it.symbol } - set(v) { - typeParametersField = v.map { it.owner } - } - - override var typeParameters: List - get() = getCarrier().typeParametersField - set(v) { - if (typeParameters !== v) { - setCarrier() - typeParametersField = v - } - } - - override var dispatchReceiverParameterField: IrValueParameter? = null - - override var dispatchReceiverParameterSymbolField: IrValueParameterSymbol? - get() = dispatchReceiverParameterField?.symbol - set(v) { - dispatchReceiverParameterField = v?.owner - } - - override var dispatchReceiverParameter: IrValueParameter? - get() = getCarrier().dispatchReceiverParameterField - set(v) { - if (dispatchReceiverParameter !== v) { - setCarrier() - dispatchReceiverParameterField = v - } - } - - override var extensionReceiverParameterField: IrValueParameter? = null - - override var extensionReceiverParameterSymbolField: IrValueParameterSymbol? - get() = extensionReceiverParameterField?.symbol - set(v) { - extensionReceiverParameterField = v?.owner - } - - override var extensionReceiverParameter: IrValueParameter? - get() = getCarrier().extensionReceiverParameterField - set(v) { - if (extensionReceiverParameter !== v) { - setCarrier() - extensionReceiverParameterField = v - } - } - - override var contextReceiverParametersCount: Int = 0 - - override var valueParametersField: List = emptyList() - - override var valueParametersSymbolField: List - get() = valueParametersField.map { it.symbol } - set(v) { - valueParametersField = v.map { it.owner } - } - - override var valueParameters: List - get() = getCarrier().valueParametersField - set(v) { - if (valueParameters !== v) { - setCarrier() - valueParametersField = v - } - } - - override var bodyField: IrBody? = null - - override var body: IrBody? - get() = getCarrier().bodyField - set(v) { - if (body !== v) { - if (v is PersistentIrBodyBase<*>) { - v.container = this - } - setCarrier() - bodyField = v - } - } - - override var metadata: MetadataSource? = null - - override var visibilityField: DescriptorVisibility = visibility - - override var visibility: DescriptorVisibility - get() = getCarrier().visibilityField - set(v) { - if (visibility !== v) { - setCarrier() - visibilityField = v - } - } - - override var overriddenSymbolsField: List = emptyList() - - override var overriddenSymbols: List - get() = getCarrier().overriddenSymbolsField - set(v) { - if (overriddenSymbols !== v) { - setCarrier() - overriddenSymbolsField = v - } - } - - override var attributeOwnerId: IrAttributeContainer = this - - override var correspondingPropertySymbolField: IrPropertySymbol? = null - - override var correspondingPropertySymbol: IrPropertySymbol? - get() = getCarrier().correspondingPropertySymbolField - set(v) { - if (correspondingPropertySymbol !== v) { - setCarrier() - correspondingPropertySymbolField = v - } - } -} diff --git a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrLocalDelegatedProperty.kt b/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrLocalDelegatedProperty.kt deleted file mode 100644 index 9692247f5ce..00000000000 --- a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrLocalDelegatedProperty.kt +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.declarations.persistent - -import org.jetbrains.kotlin.descriptors.VariableDescriptorWithAccessors -import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI -import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin -import org.jetbrains.kotlin.ir.declarations.IrDeclarationParent -import org.jetbrains.kotlin.ir.declarations.IrLocalDelegatedProperty -import org.jetbrains.kotlin.ir.declarations.IrSimpleFunction -import org.jetbrains.kotlin.ir.declarations.IrVariable -import org.jetbrains.kotlin.ir.declarations.MetadataSource -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.Carrier -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.LocalDelegatedPropertyCarrier -import org.jetbrains.kotlin.ir.expressions.IrConstructorCall -import org.jetbrains.kotlin.ir.symbols.IrLocalDelegatedPropertySymbol -import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol -import org.jetbrains.kotlin.ir.types.IrType -import org.jetbrains.kotlin.ir.util.IdSignature -import org.jetbrains.kotlin.name.Name - -// Auto-generated by compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Main.kt. DO NOT EDIT! - -// TODO make not persistent -internal class PersistentIrLocalDelegatedProperty( - override val startOffset: Int, - override val endOffset: Int, - origin: IrDeclarationOrigin, - override val symbol: IrLocalDelegatedPropertySymbol, - override val name: Name, - type: IrType, - override val isVar: Boolean, - override val factory: PersistentIrFactory -) : IrLocalDelegatedProperty(), - PersistentIrDeclarationBase, - LocalDelegatedPropertyCarrier { - - init { - symbol.bind(this) - } - - override var signature: IdSignature? = factory.currentSignature(this) - - override var lastModified: Int = factory.stageController.currentStage - override var loweredUpTo: Int = factory.stageController.currentStage - override var values: Array? = null - override val createdOn: Int = factory.stageController.currentStage - - override var parentField: IrDeclarationParent? = null - override var originField: IrDeclarationOrigin = origin - override var removedOn: Int = Int.MAX_VALUE - override var annotationsField: List = emptyList() - private val hashCodeValue: Int = PersistentIrDeclarationBase.hashCodeCounter++ - override fun hashCode(): Int = hashCodeValue - override fun equals(other: Any?): Boolean = (this === other) - - @ObsoleteDescriptorBasedAPI - override val descriptor: VariableDescriptorWithAccessors - get() = symbol.descriptor - - override var typeField: IrType = type - - override var type: IrType - get() = getCarrier().typeField - set(v) { - if (type !== v) { - setCarrier() - typeField = v - } - } - - override var delegateField: IrVariable? = null - - override var delegate: IrVariable - get() = getCarrier().delegateField!! - set(v) { - if (getCarrier().delegateField !== v) { - setCarrier() - delegateField = v - } - } - - override var getterField: IrSimpleFunction? = null - - override var getterSymbolField: IrSimpleFunctionSymbol? - get() = getterField?.symbol - set(v) { - getterField = v?.owner - } - - override var getter: IrSimpleFunction - get() = getCarrier().getterField!! - set(v) { - if (getCarrier().getterField !== v) { - setCarrier() - getterField = v - } - } - - override var setterField: IrSimpleFunction? = null - - override var setterSymbolField: IrSimpleFunctionSymbol? - get() = setterField?.symbol - set(v) { - setterField = v?.owner - } - - override var setter: IrSimpleFunction? - get() = getCarrier().setterField - set(v) { - if (setter !== v) { - setCarrier() - setterField = v - } - } - - override var metadata: MetadataSource? = null -} diff --git a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrPropertyCommon.kt b/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrPropertyCommon.kt deleted file mode 100644 index e483830390c..00000000000 --- a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrPropertyCommon.kt +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.declarations.persistent - -import org.jetbrains.kotlin.descriptors.DescriptorVisibility -import org.jetbrains.kotlin.ir.declarations.IrAttributeContainer -import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin -import org.jetbrains.kotlin.ir.declarations.IrDeclarationParent -import org.jetbrains.kotlin.ir.declarations.IrField -import org.jetbrains.kotlin.ir.declarations.IrProperty -import org.jetbrains.kotlin.ir.declarations.IrSimpleFunction -import org.jetbrains.kotlin.ir.declarations.MetadataSource -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.Carrier -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.PropertyCarrier -import org.jetbrains.kotlin.ir.expressions.IrConstructorCall -import org.jetbrains.kotlin.ir.symbols.IrFieldSymbol -import org.jetbrains.kotlin.ir.symbols.IrPropertySymbol -import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol -import org.jetbrains.kotlin.ir.util.IdSignature -import org.jetbrains.kotlin.name.Name -import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedContainerSource - -// Auto-generated by compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Main.kt. DO NOT EDIT! - -internal abstract class PersistentIrPropertyCommon( - override val startOffset: Int, - override val endOffset: Int, - origin: IrDeclarationOrigin, - override val name: Name, - override var visibility: DescriptorVisibility, - override val isVar: Boolean, - override val isConst: Boolean, - override val isLateinit: Boolean, - override val isDelegated: Boolean, - override val isExternal: Boolean, - override val isExpect: Boolean, - override val containerSource: DeserializedContainerSource?, - override val factory: PersistentIrFactory -) : IrProperty(), - PersistentIrDeclarationBase, - PropertyCarrier { - - override var signature: IdSignature? = factory.currentSignature(this) - - override var lastModified: Int = factory.stageController.currentStage - override var loweredUpTo: Int = factory.stageController.currentStage - override var values: Array? = null - override val createdOn: Int = factory.stageController.currentStage - - override var parentField: IrDeclarationParent? = null - override var originField: IrDeclarationOrigin = origin - override var removedOn: Int = Int.MAX_VALUE - override var annotationsField: List = emptyList() - private val hashCodeValue: Int = PersistentIrDeclarationBase.hashCodeCounter++ - override fun hashCode(): Int = hashCodeValue - override fun equals(other: Any?): Boolean = (this === other) - - override var backingFieldField: IrField? = null - - override var backingFieldSymbolField: IrFieldSymbol? - get() = backingFieldField?.symbol - set(v) { - backingFieldField = v?.owner - } - - override var backingField: IrField? - get() = getCarrier().backingFieldField - set(v) { - if (backingField !== v) { - setCarrier() - backingFieldField = v - } - } - - override var getterField: IrSimpleFunction? = null - - override var getterSymbolField: IrSimpleFunctionSymbol? - get() = getterField?.symbol - set(v) { - getterField = v?.owner - } - - override var getter: IrSimpleFunction? - get() = getCarrier().getterField - set(v) { - if (getter !== v) { - setCarrier() - getterField = v - } - } - - override var setterField: IrSimpleFunction? = null - - override var setterSymbolField: IrSimpleFunctionSymbol? - get() = setterField?.symbol - set(v) { - setterField = v?.owner - } - - override var setter: IrSimpleFunction? - get() = getCarrier().setterField - set(v) { - if (setter !== v) { - setCarrier() - setterField = v - } - } - - override var overriddenSymbolsField: List = emptyList() - - override var overriddenSymbols: List - get() = getCarrier().overriddenSymbolsField - set(v) { - if (overriddenSymbols !== v) { - setCarrier() - overriddenSymbolsField = v - } - } - - override var metadata: MetadataSource? = null - - @Suppress("LeakingThis") - override var attributeOwnerId: IrAttributeContainer = this -} diff --git a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrTypeAlias.kt b/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrTypeAlias.kt deleted file mode 100644 index 0bfa98d2ce1..00000000000 --- a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrTypeAlias.kt +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.declarations.persistent - -import org.jetbrains.kotlin.descriptors.DescriptorVisibility -import org.jetbrains.kotlin.descriptors.TypeAliasDescriptor -import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI -import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin -import org.jetbrains.kotlin.ir.declarations.IrDeclarationParent -import org.jetbrains.kotlin.ir.declarations.IrTypeAlias -import org.jetbrains.kotlin.ir.declarations.IrTypeParameter -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.Carrier -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.TypeAliasCarrier -import org.jetbrains.kotlin.ir.expressions.IrConstructorCall -import org.jetbrains.kotlin.ir.symbols.IrTypeAliasSymbol -import org.jetbrains.kotlin.ir.symbols.IrTypeParameterSymbol -import org.jetbrains.kotlin.ir.types.IrType -import org.jetbrains.kotlin.ir.util.IdSignature -import org.jetbrains.kotlin.name.Name - -// Auto-generated by compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Main.kt. DO NOT EDIT! - -internal class PersistentIrTypeAlias( - override val startOffset: Int, - override val endOffset: Int, - override val symbol: IrTypeAliasSymbol, - override val name: Name, - override var visibility: DescriptorVisibility, - expandedType: IrType, - override val isActual: Boolean, - origin: IrDeclarationOrigin, - override val factory: PersistentIrFactory -) : IrTypeAlias(), - PersistentIrDeclarationBase, - TypeAliasCarrier { - - init { - symbol.bind(this) - } - - override var signature: IdSignature? = factory.currentSignature(this) - - override var lastModified: Int = factory.stageController.currentStage - override var loweredUpTo: Int = factory.stageController.currentStage - override var values: Array? = null - override val createdOn: Int = factory.stageController.currentStage - - override var parentField: IrDeclarationParent? = null - override var originField: IrDeclarationOrigin = origin - override var removedOn: Int = Int.MAX_VALUE - override var annotationsField: List = emptyList() - private val hashCodeValue: Int = PersistentIrDeclarationBase.hashCodeCounter++ - override fun hashCode(): Int = hashCodeValue - override fun equals(other: Any?): Boolean = (this === other) - - @ObsoleteDescriptorBasedAPI - override val descriptor: TypeAliasDescriptor - get() = symbol.descriptor - - override var typeParametersField: List = emptyList() - - override var typeParametersSymbolField: List - get() = typeParametersField.map { it.symbol } - set(v) { - typeParametersField = v.map { it.owner } - } - - override var typeParameters: List - get() = getCarrier().typeParametersField - set(v) { - if (typeParameters !== v) { - setCarrier() - typeParametersField = v - } - } - - override var expandedTypeField: IrType = expandedType - - override var expandedType: IrType - get() = getCarrier().expandedTypeField - set(v) { - if (expandedType !== v) { - setCarrier() - expandedTypeField = v - } - } -} diff --git a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrTypeParameter.kt b/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrTypeParameter.kt deleted file mode 100644 index fb06d4f9f95..00000000000 --- a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrTypeParameter.kt +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.declarations.persistent - -import org.jetbrains.kotlin.descriptors.TypeParameterDescriptor -import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI -import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin -import org.jetbrains.kotlin.ir.declarations.IrDeclarationParent -import org.jetbrains.kotlin.ir.declarations.IrTypeParameter -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.Carrier -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.TypeParameterCarrier -import org.jetbrains.kotlin.ir.expressions.IrConstructorCall -import org.jetbrains.kotlin.ir.symbols.IrTypeParameterSymbol -import org.jetbrains.kotlin.ir.types.IrType -import org.jetbrains.kotlin.ir.util.IdSignature -import org.jetbrains.kotlin.name.Name -import org.jetbrains.kotlin.types.Variance - -// Auto-generated by compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Main.kt. DO NOT EDIT! - -internal class PersistentIrTypeParameter( - override val startOffset: Int, - override val endOffset: Int, - origin: IrDeclarationOrigin, - override val symbol: IrTypeParameterSymbol, - override val name: Name, - override val index: Int, - override val isReified: Boolean, - override val variance: Variance, - override val factory: PersistentIrFactory -) : IrTypeParameter(), - PersistentIrDeclarationBase, - TypeParameterCarrier { - - init { - symbol.bind(this) - } - - override var signature: IdSignature? = factory.currentSignature(this) - - override var lastModified: Int = factory.stageController.currentStage - override var loweredUpTo: Int = factory.stageController.currentStage - override var values: Array? = null - override val createdOn: Int = factory.stageController.currentStage - - override var parentField: IrDeclarationParent? = null - override var originField: IrDeclarationOrigin = origin - override var removedOn: Int = Int.MAX_VALUE - override var annotationsField: List = emptyList() - private val hashCodeValue: Int = PersistentIrDeclarationBase.hashCodeCounter++ - override fun hashCode(): Int = hashCodeValue - override fun equals(other: Any?): Boolean = (this === other) - - @ObsoleteDescriptorBasedAPI - override val descriptor: TypeParameterDescriptor - get() = symbol.descriptor - - override var superTypesField: List = emptyList() - - override var superTypes: List - get() = getCarrier().superTypesField - set(v) { - if (superTypes !== v) { - setCarrier() - superTypesField = v - } - } -} diff --git a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrValueParameter.kt b/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrValueParameter.kt deleted file mode 100644 index 25492e324c3..00000000000 --- a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrValueParameter.kt +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.declarations.persistent - -import org.jetbrains.kotlin.descriptors.ParameterDescriptor -import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI -import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin -import org.jetbrains.kotlin.ir.declarations.IrDeclarationParent -import org.jetbrains.kotlin.ir.declarations.IrValueParameter -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.Carrier -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.ValueParameterCarrier -import org.jetbrains.kotlin.ir.expressions.IrConstructorCall -import org.jetbrains.kotlin.ir.expressions.IrExpressionBody -import org.jetbrains.kotlin.ir.symbols.IrValueParameterSymbol -import org.jetbrains.kotlin.ir.types.IrType -import org.jetbrains.kotlin.ir.util.IdSignature -import org.jetbrains.kotlin.name.Name - -// Auto-generated by compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Main.kt. DO NOT EDIT! - -internal class PersistentIrValueParameter( - override val startOffset: Int, - override val endOffset: Int, - origin: IrDeclarationOrigin, - override val symbol: IrValueParameterSymbol, - override val name: Name, - override val index: Int, - type: IrType, - varargElementType: IrType?, - override val isCrossinline: Boolean, - override val isNoinline: Boolean, - override val isHidden: Boolean, - override val isAssignable: Boolean, - override val factory: PersistentIrFactory -) : IrValueParameter(), - PersistentIrDeclarationBase, - ValueParameterCarrier { - - @ObsoleteDescriptorBasedAPI - override val descriptor: ParameterDescriptor - get() = symbol.descriptor - - init { - symbol.bind(this) - } - - override var signature: IdSignature? = factory.currentSignature(this) - - override var lastModified: Int = factory.stageController.currentStage - override var loweredUpTo: Int = factory.stageController.currentStage - override var values: Array? = null - override val createdOn: Int = factory.stageController.currentStage - - override var parentField: IrDeclarationParent? = null - override var originField: IrDeclarationOrigin = origin - override var removedOn: Int = Int.MAX_VALUE - override var annotationsField: List = emptyList() - private val hashCodeValue: Int = PersistentIrDeclarationBase.hashCodeCounter++ - override fun hashCode(): Int = hashCodeValue - override fun equals(other: Any?): Boolean = (this === other) - - override var defaultValueField: IrExpressionBody? = null - - override var defaultValue: IrExpressionBody? - get() = getCarrier().defaultValueField - set(v) { - if (defaultValue !== v) { - if (v is PersistentIrBodyBase<*>) { - v.container = this - } - setCarrier() - defaultValueField = v - } - } - - override var typeField: IrType = type - - override var type: IrType - get() = getCarrier().typeField - set(v) { - if (type !== v) { - setCarrier() - typeField = v - } - } - - override var varargElementTypeField: IrType? = varargElementType - - override var varargElementType: IrType? - get() = getCarrier().varargElementTypeField - set(v) { - if (varargElementType !== v) { - setCarrier() - varargElementTypeField = v - } - } -} diff --git a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/AnonymousInitializerCarrier.kt b/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/AnonymousInitializerCarrier.kt deleted file mode 100644 index 07ac3a9cb4b..00000000000 --- a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/AnonymousInitializerCarrier.kt +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.declarations.persistent.carriers - -import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin -import org.jetbrains.kotlin.ir.expressions.IrBlockBody -import org.jetbrains.kotlin.ir.expressions.IrConstructorCall -import org.jetbrains.kotlin.ir.symbols.IrSymbol - -// Auto-generated by compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Main.kt. DO NOT EDIT! - -internal interface AnonymousInitializerCarrier : DeclarationCarrier{ - val bodyField: IrBlockBody? - - override fun clone(): AnonymousInitializerCarrier { - return AnonymousInitializerCarrierImpl( - lastModified, - parentSymbolField, - originField, - annotationsField, - bodyField - ) - } -} - -internal class AnonymousInitializerCarrierImpl( - override val lastModified: Int, - override val parentSymbolField: IrSymbol?, - override val originField: IrDeclarationOrigin, - override val annotationsField: List, - override val bodyField: IrBlockBody? -) : AnonymousInitializerCarrier diff --git a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/ClassCarrier.kt b/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/ClassCarrier.kt deleted file mode 100644 index 31f93279556..00000000000 --- a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/ClassCarrier.kt +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.declarations.persistent.carriers - -import org.jetbrains.kotlin.descriptors.DescriptorVisibility -import org.jetbrains.kotlin.descriptors.InlineClassRepresentation -import org.jetbrains.kotlin.descriptors.Modality -import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin -import org.jetbrains.kotlin.ir.declarations.IrTypeParameter -import org.jetbrains.kotlin.ir.declarations.IrValueParameter -import org.jetbrains.kotlin.ir.expressions.IrConstructorCall -import org.jetbrains.kotlin.ir.symbols.IrClassSymbol -import org.jetbrains.kotlin.ir.symbols.IrSymbol -import org.jetbrains.kotlin.ir.symbols.IrTypeParameterSymbol -import org.jetbrains.kotlin.ir.symbols.IrValueParameterSymbol -import org.jetbrains.kotlin.ir.types.IrSimpleType -import org.jetbrains.kotlin.ir.types.IrType - -// Auto-generated by compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Main.kt. DO NOT EDIT! - -internal interface ClassCarrier : DeclarationCarrier{ - val thisReceiverField: IrValueParameter? - val thisReceiverSymbolField: IrValueParameterSymbol? - val visibilityField: DescriptorVisibility - val modalityField: Modality - val typeParametersField: List - val typeParametersSymbolField: List - val superTypesField: List - val inlineClassRepresentationField: InlineClassRepresentation? - val sealedSubclassesField: List - - override fun clone(): ClassCarrier { - return ClassCarrierImpl( - lastModified, - parentSymbolField, - originField, - annotationsField, - thisReceiverSymbolField, - visibilityField, - modalityField, - typeParametersSymbolField, - superTypesField, - inlineClassRepresentationField, - sealedSubclassesField - ) - } -} - -internal class ClassCarrierImpl( - override val lastModified: Int, - override val parentSymbolField: IrSymbol?, - override val originField: IrDeclarationOrigin, - override val annotationsField: List, - override val thisReceiverSymbolField: IrValueParameterSymbol?, - override val visibilityField: DescriptorVisibility, - override val modalityField: Modality, - override val typeParametersSymbolField: List, - override val superTypesField: List, - override val inlineClassRepresentationField: InlineClassRepresentation?, - override val sealedSubclassesField: List -) : ClassCarrier { - - override val thisReceiverField: IrValueParameter? - get() = thisReceiverSymbolField?.owner - - override val typeParametersField: List by lazy { typeParametersSymbolField.map { it.owner } } -} diff --git a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/ConstructorCarrier.kt b/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/ConstructorCarrier.kt deleted file mode 100644 index ebca177c6cf..00000000000 --- a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/ConstructorCarrier.kt +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.declarations.persistent.carriers - -import org.jetbrains.kotlin.descriptors.DescriptorVisibility -import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin -import org.jetbrains.kotlin.ir.declarations.IrTypeParameter -import org.jetbrains.kotlin.ir.declarations.IrValueParameter -import org.jetbrains.kotlin.ir.expressions.IrBody -import org.jetbrains.kotlin.ir.expressions.IrConstructorCall -import org.jetbrains.kotlin.ir.symbols.IrSymbol -import org.jetbrains.kotlin.ir.symbols.IrTypeParameterSymbol -import org.jetbrains.kotlin.ir.symbols.IrValueParameterSymbol -import org.jetbrains.kotlin.ir.types.IrType - -// Auto-generated by compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Main.kt. DO NOT EDIT! - -internal interface ConstructorCarrier : DeclarationCarrier{ - val returnTypeFieldField: IrType - val dispatchReceiverParameterField: IrValueParameter? - val dispatchReceiverParameterSymbolField: IrValueParameterSymbol? - val extensionReceiverParameterField: IrValueParameter? - val extensionReceiverParameterSymbolField: IrValueParameterSymbol? - val bodyField: IrBody? - val visibilityField: DescriptorVisibility - val typeParametersField: List - val typeParametersSymbolField: List - val valueParametersField: List - val valueParametersSymbolField: List - - override fun clone(): ConstructorCarrier { - return ConstructorCarrierImpl( - lastModified, - parentSymbolField, - originField, - annotationsField, - returnTypeFieldField, - dispatchReceiverParameterSymbolField, - extensionReceiverParameterSymbolField, - bodyField, - visibilityField, - typeParametersSymbolField, - valueParametersSymbolField - ) - } -} - -internal class ConstructorCarrierImpl( - override val lastModified: Int, - override val parentSymbolField: IrSymbol?, - override val originField: IrDeclarationOrigin, - override val annotationsField: List, - override val returnTypeFieldField: IrType, - override val dispatchReceiverParameterSymbolField: IrValueParameterSymbol?, - override val extensionReceiverParameterSymbolField: IrValueParameterSymbol?, - override val bodyField: IrBody?, - override val visibilityField: DescriptorVisibility, - override val typeParametersSymbolField: List, - override val valueParametersSymbolField: List -) : ConstructorCarrier { - - override val dispatchReceiverParameterField: IrValueParameter? - get() = dispatchReceiverParameterSymbolField?.owner - - override val extensionReceiverParameterField: IrValueParameter? - get() = extensionReceiverParameterSymbolField?.owner - - override val typeParametersField: List by lazy { typeParametersSymbolField.map { it.owner } } - - override val valueParametersField: List by lazy { valueParametersSymbolField.map { it.owner } } -} diff --git a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/EnumEntryCarrier.kt b/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/EnumEntryCarrier.kt deleted file mode 100644 index 0c4eb91cf89..00000000000 --- a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/EnumEntryCarrier.kt +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.declarations.persistent.carriers - -import org.jetbrains.kotlin.ir.declarations.IrClass -import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin -import org.jetbrains.kotlin.ir.expressions.IrConstructorCall -import org.jetbrains.kotlin.ir.expressions.IrExpressionBody -import org.jetbrains.kotlin.ir.symbols.IrClassSymbol -import org.jetbrains.kotlin.ir.symbols.IrSymbol - -// Auto-generated by compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Main.kt. DO NOT EDIT! - -internal interface EnumEntryCarrier : DeclarationCarrier{ - val correspondingClassField: IrClass? - val correspondingClassSymbolField: IrClassSymbol? - val initializerExpressionField: IrExpressionBody? - - override fun clone(): EnumEntryCarrier { - return EnumEntryCarrierImpl( - lastModified, - parentSymbolField, - originField, - annotationsField, - correspondingClassSymbolField, - initializerExpressionField - ) - } -} - -internal class EnumEntryCarrierImpl( - override val lastModified: Int, - override val parentSymbolField: IrSymbol?, - override val originField: IrDeclarationOrigin, - override val annotationsField: List, - override val correspondingClassSymbolField: IrClassSymbol?, - override val initializerExpressionField: IrExpressionBody? -) : EnumEntryCarrier { - - override val correspondingClassField: IrClass? - get() = correspondingClassSymbolField?.owner -} diff --git a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/ErrorDeclarationCarrier.kt b/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/ErrorDeclarationCarrier.kt deleted file mode 100644 index e085a0e9da1..00000000000 --- a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/ErrorDeclarationCarrier.kt +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.declarations.persistent.carriers - -import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin -import org.jetbrains.kotlin.ir.expressions.IrConstructorCall -import org.jetbrains.kotlin.ir.symbols.IrSymbol - -// Auto-generated by compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Main.kt. DO NOT EDIT! - -internal interface ErrorDeclarationCarrier : DeclarationCarrier{ - - override fun clone(): ErrorDeclarationCarrier { - return ErrorDeclarationCarrierImpl( - lastModified, - parentSymbolField, - originField, - annotationsField - ) - } -} - -internal class ErrorDeclarationCarrierImpl( - override val lastModified: Int, - override val parentSymbolField: IrSymbol?, - override val originField: IrDeclarationOrigin, - override val annotationsField: List -) : ErrorDeclarationCarrier diff --git a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/FieldCarrier.kt b/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/FieldCarrier.kt deleted file mode 100644 index d3e644e4bcc..00000000000 --- a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/FieldCarrier.kt +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.declarations.persistent.carriers - -import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin -import org.jetbrains.kotlin.ir.expressions.IrConstructorCall -import org.jetbrains.kotlin.ir.expressions.IrExpressionBody -import org.jetbrains.kotlin.ir.symbols.IrPropertySymbol -import org.jetbrains.kotlin.ir.symbols.IrSymbol -import org.jetbrains.kotlin.ir.types.IrType - -// Auto-generated by compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Main.kt. DO NOT EDIT! - -internal interface FieldCarrier : DeclarationCarrier{ - val typeField: IrType - val initializerField: IrExpressionBody? - val correspondingPropertySymbolField: IrPropertySymbol? - - override fun clone(): FieldCarrier { - return FieldCarrierImpl( - lastModified, - parentSymbolField, - originField, - annotationsField, - typeField, - initializerField, - correspondingPropertySymbolField - ) - } -} - -internal class FieldCarrierImpl( - override val lastModified: Int, - override val parentSymbolField: IrSymbol?, - override val originField: IrDeclarationOrigin, - override val annotationsField: List, - override val typeField: IrType, - override val initializerField: IrExpressionBody?, - override val correspondingPropertySymbolField: IrPropertySymbol? -) : FieldCarrier diff --git a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/FunctionCarrier.kt b/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/FunctionCarrier.kt deleted file mode 100644 index 5255479a85a..00000000000 --- a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/FunctionCarrier.kt +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.declarations.persistent.carriers - -import org.jetbrains.kotlin.descriptors.DescriptorVisibility -import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin -import org.jetbrains.kotlin.ir.declarations.IrTypeParameter -import org.jetbrains.kotlin.ir.declarations.IrValueParameter -import org.jetbrains.kotlin.ir.expressions.IrBody -import org.jetbrains.kotlin.ir.expressions.IrConstructorCall -import org.jetbrains.kotlin.ir.symbols.IrPropertySymbol -import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol -import org.jetbrains.kotlin.ir.symbols.IrSymbol -import org.jetbrains.kotlin.ir.symbols.IrTypeParameterSymbol -import org.jetbrains.kotlin.ir.symbols.IrValueParameterSymbol -import org.jetbrains.kotlin.ir.types.IrType - -// Auto-generated by compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Main.kt. DO NOT EDIT! - -internal interface FunctionCarrier : DeclarationCarrier{ - val returnTypeFieldField: IrType - val dispatchReceiverParameterField: IrValueParameter? - val dispatchReceiverParameterSymbolField: IrValueParameterSymbol? - val extensionReceiverParameterField: IrValueParameter? - val extensionReceiverParameterSymbolField: IrValueParameterSymbol? - val bodyField: IrBody? - val visibilityField: DescriptorVisibility - val typeParametersField: List - val typeParametersSymbolField: List - val valueParametersField: List - val valueParametersSymbolField: List - val correspondingPropertySymbolField: IrPropertySymbol? - val overriddenSymbolsField: List - - override fun clone(): FunctionCarrier { - return FunctionCarrierImpl( - lastModified, - parentSymbolField, - originField, - annotationsField, - returnTypeFieldField, - dispatchReceiverParameterSymbolField, - extensionReceiverParameterSymbolField, - bodyField, - visibilityField, - typeParametersSymbolField, - valueParametersSymbolField, - correspondingPropertySymbolField, - overriddenSymbolsField - ) - } -} - -internal class FunctionCarrierImpl( - override val lastModified: Int, - override val parentSymbolField: IrSymbol?, - override val originField: IrDeclarationOrigin, - override val annotationsField: List, - override val returnTypeFieldField: IrType, - override val dispatchReceiverParameterSymbolField: IrValueParameterSymbol?, - override val extensionReceiverParameterSymbolField: IrValueParameterSymbol?, - override val bodyField: IrBody?, - override val visibilityField: DescriptorVisibility, - override val typeParametersSymbolField: List, - override val valueParametersSymbolField: List, - override val correspondingPropertySymbolField: IrPropertySymbol?, - override val overriddenSymbolsField: List -) : FunctionCarrier { - - override val dispatchReceiverParameterField: IrValueParameter? - get() = dispatchReceiverParameterSymbolField?.owner - - override val extensionReceiverParameterField: IrValueParameter? - get() = extensionReceiverParameterSymbolField?.owner - - override val typeParametersField: List by lazy { typeParametersSymbolField.map { it.owner } } - - override val valueParametersField: List by lazy { valueParametersSymbolField.map { it.owner } } -} diff --git a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/LocalDelegatedPropertyCarrier.kt b/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/LocalDelegatedPropertyCarrier.kt deleted file mode 100644 index cffb1b812cb..00000000000 --- a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/LocalDelegatedPropertyCarrier.kt +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.declarations.persistent.carriers - -import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin -import org.jetbrains.kotlin.ir.declarations.IrSimpleFunction -import org.jetbrains.kotlin.ir.declarations.IrVariable -import org.jetbrains.kotlin.ir.expressions.IrConstructorCall -import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol -import org.jetbrains.kotlin.ir.symbols.IrSymbol -import org.jetbrains.kotlin.ir.types.IrType - -// Auto-generated by compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Main.kt. DO NOT EDIT! - -internal interface LocalDelegatedPropertyCarrier : DeclarationCarrier{ - val typeField: IrType - val delegateField: IrVariable? - val getterField: IrSimpleFunction? - val getterSymbolField: IrSimpleFunctionSymbol? - val setterField: IrSimpleFunction? - val setterSymbolField: IrSimpleFunctionSymbol? - - override fun clone(): LocalDelegatedPropertyCarrier { - return LocalDelegatedPropertyCarrierImpl( - lastModified, - parentSymbolField, - originField, - annotationsField, - typeField, - delegateField, - getterSymbolField, - setterSymbolField - ) - } -} - -internal class LocalDelegatedPropertyCarrierImpl( - override val lastModified: Int, - override val parentSymbolField: IrSymbol?, - override val originField: IrDeclarationOrigin, - override val annotationsField: List, - override val typeField: IrType, - override val delegateField: IrVariable?, - override val getterSymbolField: IrSimpleFunctionSymbol?, - override val setterSymbolField: IrSimpleFunctionSymbol? -) : LocalDelegatedPropertyCarrier { - - override val getterField: IrSimpleFunction? - get() = getterSymbolField?.owner - - override val setterField: IrSimpleFunction? - get() = setterSymbolField?.owner -} diff --git a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/PropertyCarrier.kt b/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/PropertyCarrier.kt deleted file mode 100644 index 0612b36c38d..00000000000 --- a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/PropertyCarrier.kt +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.declarations.persistent.carriers - -import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin -import org.jetbrains.kotlin.ir.declarations.IrField -import org.jetbrains.kotlin.ir.declarations.IrSimpleFunction -import org.jetbrains.kotlin.ir.expressions.IrConstructorCall -import org.jetbrains.kotlin.ir.symbols.IrFieldSymbol -import org.jetbrains.kotlin.ir.symbols.IrPropertySymbol -import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol -import org.jetbrains.kotlin.ir.symbols.IrSymbol - -// Auto-generated by compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Main.kt. DO NOT EDIT! - -internal interface PropertyCarrier : DeclarationCarrier{ - val backingFieldField: IrField? - val backingFieldSymbolField: IrFieldSymbol? - val getterField: IrSimpleFunction? - val getterSymbolField: IrSimpleFunctionSymbol? - val setterField: IrSimpleFunction? - val setterSymbolField: IrSimpleFunctionSymbol? - val overriddenSymbolsField: List - - override fun clone(): PropertyCarrier { - return PropertyCarrierImpl( - lastModified, - parentSymbolField, - originField, - annotationsField, - backingFieldSymbolField, - getterSymbolField, - setterSymbolField, - overriddenSymbolsField - ) - } -} - -internal class PropertyCarrierImpl( - override val lastModified: Int, - override val parentSymbolField: IrSymbol?, - override val originField: IrDeclarationOrigin, - override val annotationsField: List, - override val backingFieldSymbolField: IrFieldSymbol?, - override val getterSymbolField: IrSimpleFunctionSymbol?, - override val setterSymbolField: IrSimpleFunctionSymbol?, - override val overriddenSymbolsField: List -) : PropertyCarrier { - - override val backingFieldField: IrField? - get() = backingFieldSymbolField?.owner - - override val getterField: IrSimpleFunction? - get() = getterSymbolField?.owner - - override val setterField: IrSimpleFunction? - get() = setterSymbolField?.owner -} diff --git a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/TypeAliasCarrier.kt b/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/TypeAliasCarrier.kt deleted file mode 100644 index d9a05d295f2..00000000000 --- a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/TypeAliasCarrier.kt +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.declarations.persistent.carriers - -import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin -import org.jetbrains.kotlin.ir.declarations.IrTypeParameter -import org.jetbrains.kotlin.ir.expressions.IrConstructorCall -import org.jetbrains.kotlin.ir.symbols.IrSymbol -import org.jetbrains.kotlin.ir.symbols.IrTypeParameterSymbol -import org.jetbrains.kotlin.ir.types.IrType - -// Auto-generated by compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Main.kt. DO NOT EDIT! - -internal interface TypeAliasCarrier : DeclarationCarrier{ - val typeParametersField: List - val typeParametersSymbolField: List - val expandedTypeField: IrType - - override fun clone(): TypeAliasCarrier { - return TypeAliasCarrierImpl( - lastModified, - parentSymbolField, - originField, - annotationsField, - typeParametersSymbolField, - expandedTypeField - ) - } -} - -internal class TypeAliasCarrierImpl( - override val lastModified: Int, - override val parentSymbolField: IrSymbol?, - override val originField: IrDeclarationOrigin, - override val annotationsField: List, - override val typeParametersSymbolField: List, - override val expandedTypeField: IrType -) : TypeAliasCarrier { - - override val typeParametersField: List by lazy { typeParametersSymbolField.map { it.owner } } -} diff --git a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/TypeParameterCarrier.kt b/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/TypeParameterCarrier.kt deleted file mode 100644 index a9fd6c53af7..00000000000 --- a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/TypeParameterCarrier.kt +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.declarations.persistent.carriers - -import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin -import org.jetbrains.kotlin.ir.expressions.IrConstructorCall -import org.jetbrains.kotlin.ir.symbols.IrSymbol -import org.jetbrains.kotlin.ir.types.IrType - -// Auto-generated by compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Main.kt. DO NOT EDIT! - -internal interface TypeParameterCarrier : DeclarationCarrier{ - val superTypesField: List - - override fun clone(): TypeParameterCarrier { - return TypeParameterCarrierImpl( - lastModified, - parentSymbolField, - originField, - annotationsField, - superTypesField - ) - } -} - -internal class TypeParameterCarrierImpl( - override val lastModified: Int, - override val parentSymbolField: IrSymbol?, - override val originField: IrDeclarationOrigin, - override val annotationsField: List, - override val superTypesField: List -) : TypeParameterCarrier diff --git a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/ValueParameterCarrier.kt b/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/ValueParameterCarrier.kt deleted file mode 100644 index fbfebfd33e5..00000000000 --- a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/carriers/ValueParameterCarrier.kt +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.declarations.persistent.carriers - -import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin -import org.jetbrains.kotlin.ir.expressions.IrConstructorCall -import org.jetbrains.kotlin.ir.expressions.IrExpressionBody -import org.jetbrains.kotlin.ir.symbols.IrSymbol -import org.jetbrains.kotlin.ir.types.IrType - -// Auto-generated by compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Main.kt. DO NOT EDIT! - -internal interface ValueParameterCarrier : DeclarationCarrier{ - val defaultValueField: IrExpressionBody? - val typeField: IrType - val varargElementTypeField: IrType? - - override fun clone(): ValueParameterCarrier { - return ValueParameterCarrierImpl( - lastModified, - parentSymbolField, - originField, - annotationsField, - defaultValueField, - typeField, - varargElementTypeField - ) - } -} - -internal class ValueParameterCarrierImpl( - override val lastModified: Int, - override val parentSymbolField: IrSymbol?, - override val originField: IrDeclarationOrigin, - override val annotationsField: List, - override val defaultValueField: IrExpressionBody?, - override val typeField: IrType, - override val varargElementTypeField: IrType? -) : ValueParameterCarrier diff --git a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/serialization/IrCarrierDeserializer.kt b/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/serialization/IrCarrierDeserializer.kt deleted file mode 100644 index b06efce4fa2..00000000000 --- a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/serialization/IrCarrierDeserializer.kt +++ /dev/null @@ -1,282 +0,0 @@ -/* - * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.serialization - -import org.jetbrains.kotlin.backend.common.serialization.codedInputStream -import org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall as ProtoIrConstructorCall -import org.jetbrains.kotlin.backend.common.serialization.proto.IrInlineClassRepresentation as ProtoIrInlineClassRepresentation -import org.jetbrains.kotlin.backend.common.serialization.proto.IrVariable as ProtoIrVariable -import org.jetbrains.kotlin.backend.common.serialization.proto.PirAnonymousInitializerCarrier -import org.jetbrains.kotlin.backend.common.serialization.proto.PirClassCarrier -import org.jetbrains.kotlin.backend.common.serialization.proto.PirConstructorCarrier -import org.jetbrains.kotlin.backend.common.serialization.proto.PirEnumEntryCarrier -import org.jetbrains.kotlin.backend.common.serialization.proto.PirErrorDeclarationCarrier -import org.jetbrains.kotlin.backend.common.serialization.proto.PirFieldCarrier -import org.jetbrains.kotlin.backend.common.serialization.proto.PirFunctionCarrier -import org.jetbrains.kotlin.backend.common.serialization.proto.PirLocalDelegatedPropertyCarrier -import org.jetbrains.kotlin.backend.common.serialization.proto.PirPropertyCarrier -import org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeAliasCarrier -import org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeParameterCarrier -import org.jetbrains.kotlin.backend.common.serialization.proto.PirValueParameterCarrier -import org.jetbrains.kotlin.descriptors.DescriptorVisibility -import org.jetbrains.kotlin.descriptors.InlineClassRepresentation -import org.jetbrains.kotlin.descriptors.Modality -import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin -import org.jetbrains.kotlin.ir.declarations.IrVariable -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.AnonymousInitializerCarrier -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.AnonymousInitializerCarrierImpl -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.ClassCarrier -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.ClassCarrierImpl -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.ConstructorCarrier -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.ConstructorCarrierImpl -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.EnumEntryCarrier -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.EnumEntryCarrierImpl -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.ErrorDeclarationCarrier -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.ErrorDeclarationCarrierImpl -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.FieldCarrier -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.FieldCarrierImpl -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.FunctionCarrier -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.FunctionCarrierImpl -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.LocalDelegatedPropertyCarrier -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.LocalDelegatedPropertyCarrierImpl -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.PropertyCarrier -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.PropertyCarrierImpl -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.TypeAliasCarrier -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.TypeAliasCarrierImpl -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.TypeParameterCarrier -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.TypeParameterCarrierImpl -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.ValueParameterCarrier -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.ValueParameterCarrierImpl -import org.jetbrains.kotlin.ir.expressions.IrBlockBody -import org.jetbrains.kotlin.ir.expressions.IrBody -import org.jetbrains.kotlin.ir.expressions.IrConstructorCall -import org.jetbrains.kotlin.ir.expressions.IrExpressionBody -import org.jetbrains.kotlin.ir.symbols.IrClassSymbol -import org.jetbrains.kotlin.ir.symbols.IrFieldSymbol -import org.jetbrains.kotlin.ir.symbols.IrPropertySymbol -import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol -import org.jetbrains.kotlin.ir.symbols.IrSymbol -import org.jetbrains.kotlin.ir.symbols.IrTypeParameterSymbol -import org.jetbrains.kotlin.ir.symbols.IrValueParameterSymbol -import org.jetbrains.kotlin.ir.types.IrSimpleType -import org.jetbrains.kotlin.ir.types.IrType -import org.jetbrains.kotlin.protobuf.ExtensionRegistryLite - -// Auto-generated by compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Main.kt. DO NOT EDIT! - -internal abstract class IrCarrierDeserializer { - - abstract fun deserializeParentSymbol(proto: Long): IrSymbol - - abstract fun deserializeOrigin(proto: Int): IrDeclarationOrigin - - abstract fun deserializeAnnotation(proto: ProtoIrConstructorCall): IrConstructorCall - - abstract fun deserializeBody(proto: Int): IrBody - - abstract fun deserializeBlockBody(proto: Int): IrBlockBody - - abstract fun deserializeExpressionBody(proto: Int): IrExpressionBody - - abstract fun deserializeValueParameter(proto: Long): IrValueParameterSymbol - - abstract fun deserializeTypeParameter(proto: Long): IrTypeParameterSymbol - - abstract fun deserializeSuperType(proto: Int): IrType - - abstract fun deserializeSealedSubclass(proto: Long): IrClassSymbol - - abstract fun deserializeType(proto: Int): IrType - - abstract fun deserializeClass(proto: Long): IrClassSymbol - - abstract fun deserializePropertySymbol(proto: Long): IrPropertySymbol - - abstract fun deserializeSimpleFunction(proto: Long): IrSimpleFunctionSymbol - - abstract fun deserializeSimpleFunctionSymbol(proto: Long): IrSimpleFunctionSymbol - - abstract fun deserializeField(proto: Long): IrFieldSymbol - - abstract fun deserializeVariable(proto: ProtoIrVariable): IrVariable - - abstract fun deserializeVisibility(proto: Long): DescriptorVisibility - - abstract fun deserializeModality(proto: Long): Modality - - abstract fun deserializeInlineClassRepresentation(proto: ProtoIrInlineClassRepresentation): InlineClassRepresentation - - abstract fun deserializeIsExternalClass(proto: Long): Boolean - - abstract fun deserializeIsExternalField(proto: Long): Boolean - - abstract fun deserializeIsExternalFunction(proto: Long): Boolean - - abstract fun deserializeIsExternalProperty(proto: Long): Boolean - - fun deserializeAnonymousInitializerCarrier(bytes: ByteArray): AnonymousInitializerCarrier { - val proto = PirAnonymousInitializerCarrier.parseFrom(bytes.codedInputStream, ExtensionRegistryLite.newInstance()) - return AnonymousInitializerCarrierImpl( - proto.lastModified, - if (proto.hasParentSymbol()) deserializeParentSymbol(proto.parentSymbol) else null, - deserializeOrigin(proto.origin), - proto.annotationList.map { deserializeAnnotation(it) }, - if (proto.hasBody()) deserializeBlockBody(proto.body) else null - ) - } - - fun deserializeClassCarrier(bytes: ByteArray): ClassCarrier { - val proto = PirClassCarrier.parseFrom(bytes.codedInputStream, ExtensionRegistryLite.newInstance()) - return ClassCarrierImpl( - proto.lastModified, - if (proto.hasParentSymbol()) deserializeParentSymbol(proto.parentSymbol) else null, - deserializeOrigin(proto.origin), - proto.annotationList.map { deserializeAnnotation(it) }, - if (proto.hasThisReceiver()) deserializeValueParameter(proto.thisReceiver) else null, - deserializeVisibility(proto.flags), - deserializeModality(proto.flags), - proto.typeParametersList.map { deserializeTypeParameter(it) }, - proto.superTypesList.map { deserializeSuperType(it) }, - if (proto.hasInlineClassRepresentation()) deserializeInlineClassRepresentation(proto.inlineClassRepresentation) else null, - proto.sealedSubclassesList.map { deserializeSealedSubclass(it) } - ) - } - - fun deserializeConstructorCarrier(bytes: ByteArray): ConstructorCarrier { - val proto = PirConstructorCarrier.parseFrom(bytes.codedInputStream, ExtensionRegistryLite.newInstance()) - return ConstructorCarrierImpl( - proto.lastModified, - if (proto.hasParentSymbol()) deserializeParentSymbol(proto.parentSymbol) else null, - deserializeOrigin(proto.origin), - proto.annotationList.map { deserializeAnnotation(it) }, - deserializeType(proto.returnTypeField), - if (proto.hasDispatchReceiverParameter()) deserializeValueParameter(proto.dispatchReceiverParameter) else null, - if (proto.hasExtensionReceiverParameter()) deserializeValueParameter(proto.extensionReceiverParameter) else null, - if (proto.hasBody()) deserializeBody(proto.body) else null, - deserializeVisibility(proto.flags), - proto.typeParametersList.map { deserializeTypeParameter(it) }, - proto.valueParametersList.map { deserializeValueParameter(it) } - ) - } - - fun deserializeEnumEntryCarrier(bytes: ByteArray): EnumEntryCarrier { - val proto = PirEnumEntryCarrier.parseFrom(bytes.codedInputStream, ExtensionRegistryLite.newInstance()) - return EnumEntryCarrierImpl( - proto.lastModified, - if (proto.hasParentSymbol()) deserializeParentSymbol(proto.parentSymbol) else null, - deserializeOrigin(proto.origin), - proto.annotationList.map { deserializeAnnotation(it) }, - if (proto.hasCorrespondingClass()) deserializeClass(proto.correspondingClass) else null, - if (proto.hasInitializerExpression()) deserializeExpressionBody(proto.initializerExpression) else null - ) - } - - fun deserializeErrorDeclarationCarrier(bytes: ByteArray): ErrorDeclarationCarrier { - val proto = PirErrorDeclarationCarrier.parseFrom(bytes.codedInputStream, ExtensionRegistryLite.newInstance()) - return ErrorDeclarationCarrierImpl( - proto.lastModified, - if (proto.hasParentSymbol()) deserializeParentSymbol(proto.parentSymbol) else null, - deserializeOrigin(proto.origin), - proto.annotationList.map { deserializeAnnotation(it) } - ) - } - - fun deserializeFieldCarrier(bytes: ByteArray): FieldCarrier { - val proto = PirFieldCarrier.parseFrom(bytes.codedInputStream, ExtensionRegistryLite.newInstance()) - return FieldCarrierImpl( - proto.lastModified, - if (proto.hasParentSymbol()) deserializeParentSymbol(proto.parentSymbol) else null, - deserializeOrigin(proto.origin), - proto.annotationList.map { deserializeAnnotation(it) }, - deserializeType(proto.type), - if (proto.hasInitializer()) deserializeExpressionBody(proto.initializer) else null, - if (proto.hasCorrespondingPropertySymbol()) deserializePropertySymbol(proto.correspondingPropertySymbol) else null - ) - } - - fun deserializeFunctionCarrier(bytes: ByteArray): FunctionCarrier { - val proto = PirFunctionCarrier.parseFrom(bytes.codedInputStream, ExtensionRegistryLite.newInstance()) - return FunctionCarrierImpl( - proto.lastModified, - if (proto.hasParentSymbol()) deserializeParentSymbol(proto.parentSymbol) else null, - deserializeOrigin(proto.origin), - proto.annotationList.map { deserializeAnnotation(it) }, - deserializeType(proto.returnTypeField), - if (proto.hasDispatchReceiverParameter()) deserializeValueParameter(proto.dispatchReceiverParameter) else null, - if (proto.hasExtensionReceiverParameter()) deserializeValueParameter(proto.extensionReceiverParameter) else null, - if (proto.hasBody()) deserializeBody(proto.body) else null, - deserializeVisibility(proto.flags), - proto.typeParametersList.map { deserializeTypeParameter(it) }, - proto.valueParametersList.map { deserializeValueParameter(it) }, - if (proto.hasCorrespondingPropertySymbol()) deserializePropertySymbol(proto.correspondingPropertySymbol) else null, - proto.overriddenSymbolsList.map { deserializeSimpleFunctionSymbol(it) } - ) - } - - fun deserializeLocalDelegatedPropertyCarrier(bytes: ByteArray): LocalDelegatedPropertyCarrier { - val proto = PirLocalDelegatedPropertyCarrier.parseFrom(bytes.codedInputStream, ExtensionRegistryLite.newInstance()) - return LocalDelegatedPropertyCarrierImpl( - proto.lastModified, - if (proto.hasParentSymbol()) deserializeParentSymbol(proto.parentSymbol) else null, - deserializeOrigin(proto.origin), - proto.annotationList.map { deserializeAnnotation(it) }, - deserializeType(proto.type), - if (proto.hasDelegate()) deserializeVariable(proto.delegate) else null, - if (proto.hasGetter()) deserializeSimpleFunction(proto.getter) else null, - if (proto.hasSetter()) deserializeSimpleFunction(proto.setter) else null - ) - } - - fun deserializePropertyCarrier(bytes: ByteArray): PropertyCarrier { - val proto = PirPropertyCarrier.parseFrom(bytes.codedInputStream, ExtensionRegistryLite.newInstance()) - return PropertyCarrierImpl( - proto.lastModified, - if (proto.hasParentSymbol()) deserializeParentSymbol(proto.parentSymbol) else null, - deserializeOrigin(proto.origin), - proto.annotationList.map { deserializeAnnotation(it) }, - if (proto.hasBackingField()) deserializeField(proto.backingField) else null, - if (proto.hasGetter()) deserializeSimpleFunction(proto.getter) else null, - if (proto.hasSetter()) deserializeSimpleFunction(proto.setter) else null, - proto.overriddenSymbolsList.map { deserializePropertySymbol(it) } - ) - } - - fun deserializeTypeAliasCarrier(bytes: ByteArray): TypeAliasCarrier { - val proto = PirTypeAliasCarrier.parseFrom(bytes.codedInputStream, ExtensionRegistryLite.newInstance()) - return TypeAliasCarrierImpl( - proto.lastModified, - if (proto.hasParentSymbol()) deserializeParentSymbol(proto.parentSymbol) else null, - deserializeOrigin(proto.origin), - proto.annotationList.map { deserializeAnnotation(it) }, - proto.typeParametersList.map { deserializeTypeParameter(it) }, - deserializeType(proto.expandedType) - ) - } - - fun deserializeTypeParameterCarrier(bytes: ByteArray): TypeParameterCarrier { - val proto = PirTypeParameterCarrier.parseFrom(bytes.codedInputStream, ExtensionRegistryLite.newInstance()) - return TypeParameterCarrierImpl( - proto.lastModified, - if (proto.hasParentSymbol()) deserializeParentSymbol(proto.parentSymbol) else null, - deserializeOrigin(proto.origin), - proto.annotationList.map { deserializeAnnotation(it) }, - proto.superTypesList.map { deserializeSuperType(it) } - ) - } - - fun deserializeValueParameterCarrier(bytes: ByteArray): ValueParameterCarrier { - val proto = PirValueParameterCarrier.parseFrom(bytes.codedInputStream, ExtensionRegistryLite.newInstance()) - return ValueParameterCarrierImpl( - proto.lastModified, - if (proto.hasParentSymbol()) deserializeParentSymbol(proto.parentSymbol) else null, - deserializeOrigin(proto.origin), - proto.annotationList.map { deserializeAnnotation(it) }, - if (proto.hasDefaultValue()) deserializeExpressionBody(proto.defaultValue) else null, - deserializeType(proto.type), - if (proto.hasVarargElementType()) deserializeType(proto.varargElementType) else null - ) - } -} diff --git a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/serialization/IrCarrierSerializer.kt b/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/serialization/IrCarrierSerializer.kt deleted file mode 100644 index 5d5fe464d6a..00000000000 --- a/compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/serialization/IrCarrierSerializer.kt +++ /dev/null @@ -1,255 +0,0 @@ -/* - * Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.serialization - -import org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall as ProtoIrConstructorCall -import org.jetbrains.kotlin.backend.common.serialization.proto.IrInlineClassRepresentation as ProtoIrInlineClassRepresentation -import org.jetbrains.kotlin.backend.common.serialization.proto.IrVariable as ProtoIrVariable -import org.jetbrains.kotlin.backend.common.serialization.proto.PirAnonymousInitializerCarrier -import org.jetbrains.kotlin.backend.common.serialization.proto.PirClassCarrier -import org.jetbrains.kotlin.backend.common.serialization.proto.PirConstructorCarrier -import org.jetbrains.kotlin.backend.common.serialization.proto.PirEnumEntryCarrier -import org.jetbrains.kotlin.backend.common.serialization.proto.PirErrorDeclarationCarrier -import org.jetbrains.kotlin.backend.common.serialization.proto.PirFieldCarrier -import org.jetbrains.kotlin.backend.common.serialization.proto.PirFunctionCarrier -import org.jetbrains.kotlin.backend.common.serialization.proto.PirLocalDelegatedPropertyCarrier -import org.jetbrains.kotlin.backend.common.serialization.proto.PirPropertyCarrier -import org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeAliasCarrier -import org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeParameterCarrier -import org.jetbrains.kotlin.backend.common.serialization.proto.PirValueParameterCarrier -import org.jetbrains.kotlin.descriptors.DescriptorVisibility -import org.jetbrains.kotlin.descriptors.InlineClassRepresentation -import org.jetbrains.kotlin.descriptors.Modality -import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin -import org.jetbrains.kotlin.ir.declarations.IrVariable -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.AnonymousInitializerCarrier -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.ClassCarrier -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.ConstructorCarrier -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.EnumEntryCarrier -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.ErrorDeclarationCarrier -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.FieldCarrier -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.FunctionCarrier -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.LocalDelegatedPropertyCarrier -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.PropertyCarrier -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.TypeAliasCarrier -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.TypeParameterCarrier -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.ValueParameterCarrier -import org.jetbrains.kotlin.ir.expressions.IrBlockBody -import org.jetbrains.kotlin.ir.expressions.IrBody -import org.jetbrains.kotlin.ir.expressions.IrConstructorCall -import org.jetbrains.kotlin.ir.expressions.IrExpressionBody -import org.jetbrains.kotlin.ir.symbols.IrClassSymbol -import org.jetbrains.kotlin.ir.symbols.IrFieldSymbol -import org.jetbrains.kotlin.ir.symbols.IrPropertySymbol -import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol -import org.jetbrains.kotlin.ir.symbols.IrSymbol -import org.jetbrains.kotlin.ir.symbols.IrTypeParameterSymbol -import org.jetbrains.kotlin.ir.symbols.IrValueParameterSymbol -import org.jetbrains.kotlin.ir.types.IrSimpleType -import org.jetbrains.kotlin.ir.types.IrType - -// Auto-generated by compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Main.kt. DO NOT EDIT! - -internal abstract class IrCarrierSerializer { - - abstract fun serializeParentSymbol(value: IrSymbol): Long - - abstract fun serializeOrigin(value: IrDeclarationOrigin): Int - - abstract fun serializeAnnotation(value: IrConstructorCall): ProtoIrConstructorCall - - abstract fun serializeBody(value: IrBody): Int - - abstract fun serializeBlockBody(value: IrBlockBody): Int - - abstract fun serializeExpressionBody(value: IrExpressionBody): Int - - abstract fun serializeValueParameter(value: IrValueParameterSymbol): Long - - abstract fun serializeTypeParameter(value: IrTypeParameterSymbol): Long - - abstract fun serializeSuperType(value: IrType): Int - - abstract fun serializeSealedSubclass(value: IrClassSymbol): Long - - abstract fun serializeType(value: IrType): Int - - abstract fun serializeClass(value: IrClassSymbol): Long - - abstract fun serializePropertySymbol(value: IrPropertySymbol): Long - - abstract fun serializeSimpleFunction(value: IrSimpleFunctionSymbol): Long - - abstract fun serializeSimpleFunctionSymbol(value: IrSimpleFunctionSymbol): Long - - abstract fun serializeField(value: IrFieldSymbol): Long - - abstract fun serializeVariable(value: IrVariable): ProtoIrVariable - - abstract fun serializeVisibility(value: DescriptorVisibility): Long - - abstract fun serializeModality(value: Modality): Long - - abstract fun serializeInlineClassRepresentation(value: InlineClassRepresentation): ProtoIrInlineClassRepresentation - - abstract fun serializeIsExternalClass(value: Boolean): Long - - abstract fun serializeIsExternalField(value: Boolean): Long - - abstract fun serializeIsExternalFunction(value: Boolean): Long - - abstract fun serializeIsExternalProperty(value: Boolean): Long - - fun serializeAnonymousInitializerCarrier(carrier: AnonymousInitializerCarrier): ByteArray { - val proto = PirAnonymousInitializerCarrier.newBuilder() - proto.setLastModified(carrier.lastModified) - carrier.parentSymbolField?.let { proto.setParentSymbol(serializeParentSymbol(it)) } - proto.setOrigin(serializeOrigin(carrier.originField)) - proto.addAllAnnotation(carrier.annotationsField.map { serializeAnnotation(it) }) - carrier.bodyField?.let { proto.setBody(serializeBlockBody(it)) } - return proto.build().toByteArray() - } - - fun serializeClassCarrier(carrier: ClassCarrier): ByteArray { - val proto = PirClassCarrier.newBuilder() - proto.setLastModified(carrier.lastModified) - carrier.parentSymbolField?.let { proto.setParentSymbol(serializeParentSymbol(it)) } - proto.setOrigin(serializeOrigin(carrier.originField)) - proto.addAllAnnotation(carrier.annotationsField.map { serializeAnnotation(it) }) - carrier.thisReceiverSymbolField?.let { proto.setThisReceiver(serializeValueParameter(it)) } - proto.setFlags(serializeVisibility(carrier.visibilityField) or serializeModality(carrier.modalityField)) - proto.addAllTypeParameters(carrier.typeParametersSymbolField.map { serializeTypeParameter(it) }) - proto.addAllSuperTypes(carrier.superTypesField.map { serializeSuperType(it) }) - carrier.inlineClassRepresentationField?.let { proto.setInlineClassRepresentation(serializeInlineClassRepresentation(it)) } - proto.addAllSealedSubclasses(carrier.sealedSubclassesField.map { serializeSealedSubclass(it) }) - return proto.build().toByteArray() - } - - fun serializeConstructorCarrier(carrier: ConstructorCarrier): ByteArray { - val proto = PirConstructorCarrier.newBuilder() - proto.setLastModified(carrier.lastModified) - carrier.parentSymbolField?.let { proto.setParentSymbol(serializeParentSymbol(it)) } - proto.setOrigin(serializeOrigin(carrier.originField)) - proto.addAllAnnotation(carrier.annotationsField.map { serializeAnnotation(it) }) - proto.setReturnTypeField(serializeType(carrier.returnTypeFieldField)) - carrier.dispatchReceiverParameterSymbolField?.let { proto.setDispatchReceiverParameter(serializeValueParameter(it)) } - carrier.extensionReceiverParameterSymbolField?.let { proto.setExtensionReceiverParameter(serializeValueParameter(it)) } - carrier.bodyField?.let { proto.setBody(serializeBody(it)) } - proto.setFlags(serializeVisibility(carrier.visibilityField)) - proto.addAllTypeParameters(carrier.typeParametersSymbolField.map { serializeTypeParameter(it) }) - proto.addAllValueParameters(carrier.valueParametersSymbolField.map { serializeValueParameter(it) }) - return proto.build().toByteArray() - } - - fun serializeEnumEntryCarrier(carrier: EnumEntryCarrier): ByteArray { - val proto = PirEnumEntryCarrier.newBuilder() - proto.setLastModified(carrier.lastModified) - carrier.parentSymbolField?.let { proto.setParentSymbol(serializeParentSymbol(it)) } - proto.setOrigin(serializeOrigin(carrier.originField)) - proto.addAllAnnotation(carrier.annotationsField.map { serializeAnnotation(it) }) - carrier.correspondingClassSymbolField?.let { proto.setCorrespondingClass(serializeClass(it)) } - carrier.initializerExpressionField?.let { proto.setInitializerExpression(serializeExpressionBody(it)) } - return proto.build().toByteArray() - } - - fun serializeErrorDeclarationCarrier(carrier: ErrorDeclarationCarrier): ByteArray { - val proto = PirErrorDeclarationCarrier.newBuilder() - proto.setLastModified(carrier.lastModified) - carrier.parentSymbolField?.let { proto.setParentSymbol(serializeParentSymbol(it)) } - proto.setOrigin(serializeOrigin(carrier.originField)) - proto.addAllAnnotation(carrier.annotationsField.map { serializeAnnotation(it) }) - return proto.build().toByteArray() - } - - fun serializeFieldCarrier(carrier: FieldCarrier): ByteArray { - val proto = PirFieldCarrier.newBuilder() - proto.setLastModified(carrier.lastModified) - carrier.parentSymbolField?.let { proto.setParentSymbol(serializeParentSymbol(it)) } - proto.setOrigin(serializeOrigin(carrier.originField)) - proto.addAllAnnotation(carrier.annotationsField.map { serializeAnnotation(it) }) - proto.setType(serializeType(carrier.typeField)) - carrier.initializerField?.let { proto.setInitializer(serializeExpressionBody(it)) } - carrier.correspondingPropertySymbolField?.let { proto.setCorrespondingPropertySymbol(serializePropertySymbol(it)) } - return proto.build().toByteArray() - } - - fun serializeFunctionCarrier(carrier: FunctionCarrier): ByteArray { - val proto = PirFunctionCarrier.newBuilder() - proto.setLastModified(carrier.lastModified) - carrier.parentSymbolField?.let { proto.setParentSymbol(serializeParentSymbol(it)) } - proto.setOrigin(serializeOrigin(carrier.originField)) - proto.addAllAnnotation(carrier.annotationsField.map { serializeAnnotation(it) }) - proto.setReturnTypeField(serializeType(carrier.returnTypeFieldField)) - carrier.dispatchReceiverParameterSymbolField?.let { proto.setDispatchReceiverParameter(serializeValueParameter(it)) } - carrier.extensionReceiverParameterSymbolField?.let { proto.setExtensionReceiverParameter(serializeValueParameter(it)) } - carrier.bodyField?.let { proto.setBody(serializeBody(it)) } - proto.setFlags(serializeVisibility(carrier.visibilityField)) - proto.addAllTypeParameters(carrier.typeParametersSymbolField.map { serializeTypeParameter(it) }) - proto.addAllValueParameters(carrier.valueParametersSymbolField.map { serializeValueParameter(it) }) - carrier.correspondingPropertySymbolField?.let { proto.setCorrespondingPropertySymbol(serializePropertySymbol(it)) } - proto.addAllOverriddenSymbols(carrier.overriddenSymbolsField.map { serializeSimpleFunctionSymbol(it) }) - return proto.build().toByteArray() - } - - fun serializeLocalDelegatedPropertyCarrier(carrier: LocalDelegatedPropertyCarrier): ByteArray { - val proto = PirLocalDelegatedPropertyCarrier.newBuilder() - proto.setLastModified(carrier.lastModified) - carrier.parentSymbolField?.let { proto.setParentSymbol(serializeParentSymbol(it)) } - proto.setOrigin(serializeOrigin(carrier.originField)) - proto.addAllAnnotation(carrier.annotationsField.map { serializeAnnotation(it) }) - proto.setType(serializeType(carrier.typeField)) - carrier.delegateField?.let { proto.setDelegate(serializeVariable(it)) } - carrier.getterSymbolField?.let { proto.setGetter(serializeSimpleFunction(it)) } - carrier.setterSymbolField?.let { proto.setSetter(serializeSimpleFunction(it)) } - return proto.build().toByteArray() - } - - fun serializePropertyCarrier(carrier: PropertyCarrier): ByteArray { - val proto = PirPropertyCarrier.newBuilder() - proto.setLastModified(carrier.lastModified) - carrier.parentSymbolField?.let { proto.setParentSymbol(serializeParentSymbol(it)) } - proto.setOrigin(serializeOrigin(carrier.originField)) - proto.addAllAnnotation(carrier.annotationsField.map { serializeAnnotation(it) }) - carrier.backingFieldSymbolField?.let { proto.setBackingField(serializeField(it)) } - carrier.getterSymbolField?.let { proto.setGetter(serializeSimpleFunction(it)) } - carrier.setterSymbolField?.let { proto.setSetter(serializeSimpleFunction(it)) } - proto.addAllOverriddenSymbols(carrier.overriddenSymbolsField.map { serializePropertySymbol(it) }) - return proto.build().toByteArray() - } - - fun serializeTypeAliasCarrier(carrier: TypeAliasCarrier): ByteArray { - val proto = PirTypeAliasCarrier.newBuilder() - proto.setLastModified(carrier.lastModified) - carrier.parentSymbolField?.let { proto.setParentSymbol(serializeParentSymbol(it)) } - proto.setOrigin(serializeOrigin(carrier.originField)) - proto.addAllAnnotation(carrier.annotationsField.map { serializeAnnotation(it) }) - proto.addAllTypeParameters(carrier.typeParametersSymbolField.map { serializeTypeParameter(it) }) - proto.setExpandedType(serializeType(carrier.expandedTypeField)) - return proto.build().toByteArray() - } - - fun serializeTypeParameterCarrier(carrier: TypeParameterCarrier): ByteArray { - val proto = PirTypeParameterCarrier.newBuilder() - proto.setLastModified(carrier.lastModified) - carrier.parentSymbolField?.let { proto.setParentSymbol(serializeParentSymbol(it)) } - proto.setOrigin(serializeOrigin(carrier.originField)) - proto.addAllAnnotation(carrier.annotationsField.map { serializeAnnotation(it) }) - proto.addAllSuperTypes(carrier.superTypesField.map { serializeSuperType(it) }) - return proto.build().toByteArray() - } - - fun serializeValueParameterCarrier(carrier: ValueParameterCarrier): ByteArray { - val proto = PirValueParameterCarrier.newBuilder() - proto.setLastModified(carrier.lastModified) - carrier.parentSymbolField?.let { proto.setParentSymbol(serializeParentSymbol(it)) } - proto.setOrigin(serializeOrigin(carrier.originField)) - proto.addAllAnnotation(carrier.annotationsField.map { serializeAnnotation(it) }) - carrier.defaultValueField?.let { proto.setDefaultValue(serializeExpressionBody(it)) } - proto.setType(serializeType(carrier.typeField)) - carrier.varargElementTypeField?.let { proto.setVarargElementType(serializeType(it)) } - return proto.build().toByteArray() - } -} diff --git a/compiler/ir/ir.tree.persistent/generator/build.gradle.kts b/compiler/ir/ir.tree.persistent/generator/build.gradle.kts deleted file mode 100644 index 940650ad670..00000000000 --- a/compiler/ir/ir.tree.persistent/generator/build.gradle.kts +++ /dev/null @@ -1,15 +0,0 @@ -plugins { - kotlin("jvm") - id("jps-compatible") -} - -dependencies { - implementation(kotlinStdlib()) -} - -sourceSets { - "main" { projectDefault() } - "test" {} -} - -val generatePir by generator("org.jetbrains.kotlin.ir.persistentIrGenerator.MainKt", mainSourceSet) \ No newline at end of file diff --git a/compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/AnonymousInitializer.kt b/compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/AnonymousInitializer.kt deleted file mode 100644 index f07880bb45c..00000000000 --- a/compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/AnonymousInitializer.kt +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.persistentIrGenerator - -internal fun PersistentIrGenerator.generateAnonymousInitializer() { - val body = Field("body", IrBlockBody, blockBodyProto, lateinit = true) - - writeFile("PersistentIrAnonymousInitializer.kt", renderFile("org.jetbrains.kotlin.ir.declarations.persistent") { - lines( - id, - +"internal class PersistentIrAnonymousInitializer(", - arrayOf( - startOffset, - endOffset, - origin, - +"override val symbol: " + IrAnonymousInitializerSymbol, - isStatic + " = false", - irFactory, - ).join(separator = ",\n").indent(), - +") : " + baseClasses("AnonymousInitializer") + " " + blockSpaced( - initBlock, - commonFields, - descriptor(ClassDescriptor), - body.toBody(), - ), - id, - )() - }) - - writeFile("carriers/AnonymousInitializerCarrier.kt", renderFile("org.jetbrains.kotlin.ir.declarations.persistent.carriers") { - carriers("AnonymousInitializer", body)() - }) - - addCarrierProtoMessage("AnonymousInitializer", body) -} \ No newline at end of file diff --git a/compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Class.kt b/compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Class.kt deleted file mode 100644 index 8f8cb636a21..00000000000 --- a/compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Class.kt +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.persistentIrGenerator - -internal fun PersistentIrGenerator.generateClass() { - val visibilityField = Field("visibility", DescriptorVisibility, visibilityProto) - val thisReceiverField = Field( - "thisReceiver", - IrValueParameter + "?", - valueParameterProto, - propSymbolType = IrValueParameterSymbol + "?", - symbolToDeclaration = +"?.owner", - declarationToSymbol = +"?.symbol" - ) - val superTypesField = Field("superTypes", +"List<" + import("IrType", "org.jetbrains.kotlin.ir.types") + ">", superTypeListProto) - val modalityField = Field("modality", descriptorType("Modality"), modalityProto) - val inlineClassRepresentationField = Field( - "inlineClassRepresentation", - descriptorType("InlineClassRepresentation") + "<" + import("IrSimpleType", "org.jetbrains.kotlin.ir.types") + ">?", - inlineClassRepresentationProto - ) - val sealedSubclassesField = Field("sealedSubclasses", +"List<" + irSymbol("IrClassSymbol") + ">", sealedSubclassListProto) - - writeFile("PersistentIrClass.kt", renderFile("org.jetbrains.kotlin.ir.declarations.persistent") { - lines( - id, - +"internal class PersistentIrClass(", - arrayOf( - startOffset, - endOffset, - origin, - +"override val symbol: " + IrClassSymbol, - name, - kind, - visibility, - modality, - isCompanion, - isInner, - isData, - isExternal + " = false", - isInline + " = false", - isExpect + " = false", - isFun, - source, - irFactory, - ).join(separator = ",\n").indent(), - +") : " + baseClasses("Class") + " " + blockSpaced( - initBlock, - commonFields, - descriptor(ClassDescriptor), - visibilityField.toPersistentField(+"visibility"), - thisReceiverField.toPersistentField(+"null"), - lines( - +"private var initialDeclarations: MutableList<" + IrDeclaration + ">? = null", - id, - +"override val declarations: MutableList = " + import("ArrayList", "java.util") + "()", - lines( - +"get() " + block( - +"if (createdOn < factory.stageController.currentStage && initialDeclarations == null) " + block( - +"initialDeclarations = " + import("Collections", "java.util") + ".unmodifiableList(ArrayList(field))" - ), - id, - +""" - return if (factory.stageController.canAccessDeclarationsOf(this)) { - ensureLowered() - field - } else { - initialDeclarations ?: field - } - """.trimIndent() - ) - ).indent() - ), - typeParametersField.toPersistentField(+"emptyList()"), - superTypesField.toPersistentField(+"emptyList()"), - +"override var metadata: " + MetadataSource + "? = null", - modalityField.toPersistentField(+"modality"), - inlineClassRepresentationField.toPersistentField(+"null"), - +"override var attributeOwnerId: " + IrAttributeContainer + " = this", - sealedSubclassesField.toPersistentField(+"emptyList()"), - ), - id, - )() - }) - - writeFile("carriers/ClassCarrier.kt", renderFile("org.jetbrains.kotlin.ir.declarations.persistent.carriers") { - carriers( - "Class", - thisReceiverField, - visibilityField, - modalityField, - typeParametersField, - superTypesField, - inlineClassRepresentationField, - sealedSubclassesField, - )() - }) - - addCarrierProtoMessage( - "Class", - thisReceiverField, - visibilityField, - modalityField, - typeParametersField, - superTypesField, - inlineClassRepresentationField, - sealedSubclassesField, - ) -} diff --git a/compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Constructor.kt b/compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Constructor.kt deleted file mode 100644 index c417a69924b..00000000000 --- a/compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Constructor.kt +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.persistentIrGenerator - -internal fun PersistentIrGenerator.generateConstructor() { - val returnTypeFieldField = Field("returnTypeField", IrType, typeProto) - val bodyField = Field("body", IrBody + "?", bodyProto) - val visibilityField = Field("visibility", DescriptorVisibility, visibilityProto) - - writeFile("PersistentIrConstructor.kt", renderFile("org.jetbrains.kotlin.ir.declarations.persistent") { - lines( - id, - +"internal class PersistentIrConstructor(", - arrayOf( - startOffset, - endOffset, - origin, - +"override val symbol: " + irSymbol("IrConstructorSymbol"), - name, - visibility, - returnType, - isInline, - isExternal, - isPrimary, - isExpect, - containerSource, - irFactory, - ).join(separator = ",\n").indent(), - +") : " + baseClasses("Constructor") + " " + blockSpaced( - initBlock, - commonFields, - returnTypeFieldField.toPersistentField(+"returnType", modifier = "private"), - lines( - +"override var returnType: IrType", - lines( - +"get() = returnTypeField.let " + block( - +"if (it !== " + import( - "IrUninitializedType", - "org.jetbrains.kotlin.ir.types.impl" - ) + ") it else throw " + import( - "ReturnTypeIsNotInitializedException", - "org.jetbrains.kotlin.ir.types.impl" - ) + "(this)" - ), - +"set(c) " + block( - +"returnTypeField = c" - ) - ).indent() - ), - typeParametersField.toPersistentField(+"emptyList()"), - dispatchReceiverParameterField.toPersistentField(+"null"), - extensionReceiverParameterField.toPersistentField(+"null"), - valueParametersField.toPersistentField(+"emptyList()"), - bodyField.toBody(), - contextReceiverParametersCount, - +"override var metadata: " + MetadataSource + "? = null", - visibilityField.toPersistentField(+"visibility"), - descriptor(ClassConstructorDescriptor), - ), - id, - )() - }) - - writeFile("carriers/ConstructorCarrier.kt", renderFile("org.jetbrains.kotlin.ir.declarations.persistent.carriers") { - carriers( - "Constructor", - returnTypeFieldField, - dispatchReceiverParameterField, - extensionReceiverParameterField, - bodyField, - visibilityField, - typeParametersField, - valueParametersField, - )() - }) - - addCarrierProtoMessage( - "Constructor", - returnTypeFieldField, - dispatchReceiverParameterField, - extensionReceiverParameterField, - bodyField, - visibilityField, - typeParametersField, - valueParametersField, - ) -} \ No newline at end of file diff --git a/compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/EnumEntry.kt b/compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/EnumEntry.kt deleted file mode 100644 index 551f7443094..00000000000 --- a/compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/EnumEntry.kt +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.persistentIrGenerator - -internal fun PersistentIrGenerator.generateEnumEntry() { - val correspondingClassField = Field( - "correspondingClass", - IrClass + "?", - classProto, - propSymbolType = IrClassSymbol + "?", - symbolToDeclaration = +"?.owner", - declarationToSymbol = +"?.symbol" - ) - val initializerExpressionField = Field("initializerExpression", IrExpressionBody + "?", expressionBodyProto) - - writeFile("PersistentIrEnumEntry.kt", renderFile("org.jetbrains.kotlin.ir.declarations.persistent") { - lines( - id, - +"internal class PersistentIrEnumEntry(", - arrayOf( - startOffset, - endOffset, - origin, - +"override val symbol: " + irSymbol("IrEnumEntrySymbol"), - name, - irFactory, - ).join(separator = ",\n").indent(), - +") : " + baseClasses("EnumEntry") + " " + blockSpaced( - initBlock, - commonFields, - descriptor(ClassDescriptor), - - correspondingClassField.toPersistentField(+"null"), - initializerExpressionField.toBody(), - ), - id, - )() - }) - - writeFile("carriers/EnumEntryCarrier.kt", renderFile("org.jetbrains.kotlin.ir.declarations.persistent.carriers") { - carriers( - "EnumEntry", - correspondingClassField, - initializerExpressionField, - )() - }) - - addCarrierProtoMessage("EnumEntry", correspondingClassField, initializerExpressionField) -} \ No newline at end of file diff --git a/compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/ErrorDeclaration.kt b/compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/ErrorDeclaration.kt deleted file mode 100644 index f1f1f2e8918..00000000000 --- a/compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/ErrorDeclaration.kt +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.persistentIrGenerator - - -internal fun PersistentIrGenerator.generateErrorDeclaration() { - writeFile("PersistentIrErrorDeclaration.kt", renderFile("org.jetbrains.kotlin.ir.declarations.persistent") { - lines( - id, - +"@OptIn(" + ObsoleteDescriptorBasedAPI + "::class)", - +"internal class PersistentIrErrorDeclaration(", - arrayOf( - startOffset, - endOffset, - +"private val _descriptor: " + DeclarationDescriptor + "?", - irFactory, - ).join(separator = ",\n").indent(), - +") : " + baseClasses("ErrorDeclaration") + " " + block( - lines( - +"override val descriptor: " + DeclarationDescriptor, - +" get() = _descriptor ?: this." + import("toIrBasedDescriptor", "org.jetbrains.kotlin.ir.descriptors") + "()" - ), - id, - signature, - id, - lastModified, - loweredUpTo, - values, - createdOn, - id, - parentField, - +"override var originField: " + IrDeclarationOrigin + " = IrDeclarationOrigin.DEFINED", - removedOn, - annotationsField, - ), - id, - )() - }) - - writeFile("carriers/ErrorDeclarationCarrier.kt", renderFile("org.jetbrains.kotlin.ir.declarations.persistent.carriers") { - carriers( - "ErrorDeclaration", - )() - }) - - addCarrierProtoMessage("ErrorDeclaration") -} \ No newline at end of file diff --git a/compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Field.kt b/compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Field.kt deleted file mode 100644 index be997f93c02..00000000000 --- a/compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Field.kt +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.persistentIrGenerator - -internal fun PersistentIrGenerator.generateField() { - val initializerField = Field("initializer", IrExpressionBody + "?", expressionBodyProto) - val correspondingPropertySymbolField = Field("correspondingPropertySymbol", IrPropertySymbol + "?", propertySymbolProto) - val typeField = Field("type", IrType, typeProto) - - writeFile("PersistentIrField.kt", renderFile("org.jetbrains.kotlin.ir.declarations.persistent") { - lines( - id, - +"internal class PersistentIrField(", - arrayOf( - startOffset, - endOffset, - origin, - +"override val symbol: " + irSymbol("IrFieldSymbol"), - name, - +"type: " + IrType, - +"override var " + visibility, - isFinal, - isExternal, - isStatic, - irFactory, - ).join(separator = ",\n").indent(), - +") : " + baseClasses("Field") + " " + blockSpaced( - initBlock, - commonFields, - descriptor(descriptorType("PropertyDescriptor")), - initializerField.toBody(), - correspondingPropertySymbolField.toPersistentField(+"null"), - +"override var metadata: " + MetadataSource + "? = null", - typeField.toPersistentField(+"type"), - ), - id, - )() - }) - - writeFile("carriers/FieldCarrier.kt", renderFile("org.jetbrains.kotlin.ir.declarations.persistent.carriers") { - carriers( - "Field", - typeField, - initializerField, - correspondingPropertySymbolField, - )() - }) - - addCarrierProtoMessage("Field", typeField, initializerField, correspondingPropertySymbolField) -} \ No newline at end of file diff --git a/compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Function.kt b/compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Function.kt deleted file mode 100644 index d05f8b4b941..00000000000 --- a/compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Function.kt +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.persistentIrGenerator - -internal fun PersistentIrGenerator.generateFunction() { - - val returnTypeFieldField = Field("returnTypeField", IrType, typeProto) - val bodyField = Field("body", IrBody + "?", bodyProto) - val visibilityField = Field("visibility", DescriptorVisibility, visibilityProto) - val overriddenSymbolsField = Field("overriddenSymbols", +"List<" + IrSimpleFunctionSymbol + ">", simpleFunctionSymbolListProto) - val correspondingPropertySymbolField = Field("correspondingPropertySymbol", IrPropertySymbol + "?", propertySymbolProto) - - writeFile("PersistentIrFunctionCommon.kt", renderFile("org.jetbrains.kotlin.ir.declarations.persistent") { - lines( - id, - +"internal abstract class PersistentIrFunctionCommon(", - arrayOf( - startOffset, - endOffset, - origin, - name, - visibility, - returnType, - isInline, - isExternal, - +"override val isTailrec: Boolean", - +"override val isSuspend: Boolean", - +"override val isOperator: Boolean", - +"override val isInfix: Boolean", - isExpect, - containerSource + " = null", - irFactory, - ).join(separator = ",\n").indent(), - +") : " + baseClasses("Function", baseClass = "IrSimpleFunction") + " " + blockSpaced( - commonFields, - returnTypeFieldField.toPersistentField(+"returnType", modifier = "private"), - lines( - +"final override var returnType: IrType", - lines( - +"get() = returnTypeField.let " + block( - +"if (it !== " + import( - "IrUninitializedType", - "org.jetbrains.kotlin.ir.types.impl" - ) + ") it else throw " + import( - "ReturnTypeIsNotInitializedException", - "org.jetbrains.kotlin.ir.types.impl" - ) + "(this)" - ), - +"set(c) " + block( - +"returnTypeField = c" - ) - ).indent() - ), - typeParametersField.toPersistentField(+"emptyList()"), - dispatchReceiverParameterField.toPersistentField(+"null"), - extensionReceiverParameterField.toPersistentField(+"null"), - contextReceiverParametersCount, - valueParametersField.toPersistentField(+"emptyList()"), - bodyField.toBody(), - +"override var metadata: " + MetadataSource + "? = null", - visibilityField.toPersistentField(+"visibility"), - overriddenSymbolsField.toPersistentField(+"emptyList()"), - +"override var attributeOwnerId: " + IrAttributeContainer + " = this", - correspondingPropertySymbolField.toPersistentField(+"null"), - ), - id, - )() - }) - - writeFile("carriers/FunctionCarrier.kt", renderFile("org.jetbrains.kotlin.ir.declarations.persistent.carriers") { - carriers( - "Function", - returnTypeFieldField, - dispatchReceiverParameterField, - extensionReceiverParameterField, - bodyField, - visibilityField, - typeParametersField, - valueParametersField, - correspondingPropertySymbolField, - overriddenSymbolsField, - )() - }) - - addCarrierProtoMessage( - "Function", - returnTypeFieldField, - dispatchReceiverParameterField, - extensionReceiverParameterField, - bodyField, - visibilityField, - typeParametersField, - valueParametersField, - correspondingPropertySymbolField, - overriddenSymbolsField, - ) -} \ No newline at end of file diff --git a/compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/LocalDelegatedProperty.kt b/compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/LocalDelegatedProperty.kt deleted file mode 100644 index 16bef07d87d..00000000000 --- a/compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/LocalDelegatedProperty.kt +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.persistentIrGenerator - -internal fun PersistentIrGenerator.generateLocalDelegatedProperty() { - val typeField = Field("type", IrType, typeProto) - val delegateField = Field("delegate", IrVariable, variableProto, lateinit = true) - val getterField = Field( - "getter", - IrSimpleFunction, - simpleFunctionProto, - lateinit = true, - propSymbolType = IrSimpleFunctionSymbol, - symbolToDeclaration = +".owner", - declarationToSymbol = +".symbol" - ) - val setterField = Field( - "setter", - IrSimpleFunction + "?", - simpleFunctionProto, - propSymbolType = IrSimpleFunctionSymbol + "?", - symbolToDeclaration = +"?.owner", - declarationToSymbol = +"?.symbol" - ) - - writeFile("PersistentIrLocalDelegatedProperty.kt", renderFile("org.jetbrains.kotlin.ir.declarations.persistent") { - lines( - id, - +"// TODO make not persistent", - +"internal class PersistentIrLocalDelegatedProperty(", - arrayOf( - startOffset, - endOffset, - origin, - +"override val symbol: " + irSymbol("IrLocalDelegatedPropertySymbol"), - name, - +"type: " + IrType, - +"override val isVar: Boolean", - irFactory, - ).join(separator = ",\n").indent(), - +") : " + baseClasses("LocalDelegatedProperty") + " " + blockSpaced( - initBlock, - commonFields, - descriptor(descriptorType("VariableDescriptorWithAccessors")), - typeField.toPersistentField(+"type"), - delegateField.toPersistentField(+"null"), - getterField.toPersistentField(+"null"), - setterField.toPersistentField(+"null"), - +"override var metadata: " + MetadataSource + "? = null", - ), - id, - )() - }) - - writeFile("carriers/LocalDelegatedPropertyCarrier.kt", renderFile("org.jetbrains.kotlin.ir.declarations.persistent.carriers") { - carriers( - "LocalDelegatedProperty", - typeField, - delegateField, - getterField, - setterField, - )() - }) - - addCarrierProtoMessage( - "LocalDelegatedProperty", - typeField, - delegateField, - getterField, - setterField, - ) -} \ No newline at end of file diff --git a/compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Main.kt b/compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Main.kt deleted file mode 100644 index 7b4098ec2e5..00000000000 --- a/compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Main.kt +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.persistentIrGenerator - -fun main() { - PersistentIrGenerator.run { - generateAnonymousInitializer() - generateClass() - generateConstructor() - generateEnumEntry() - generateErrorDeclaration() - generateField() - generateFunction() - generateLocalDelegatedProperty() - generateProperty() - generateTypeAlias() - generateTypeParameter() - generateValueParameter() - - generateKotlinPirCarriersProto() - generateCarrierDeserializer() - generateCarrierSerializer() - } -} \ No newline at end of file diff --git a/compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/PersistentIrGenerator.kt b/compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/PersistentIrGenerator.kt deleted file mode 100644 index 6a73f8b0e3a..00000000000 --- a/compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/PersistentIrGenerator.kt +++ /dev/null @@ -1,740 +0,0 @@ -/* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -@file:Suppress("MemberVisibilityCanBePrivate") - -package org.jetbrains.kotlin.ir.persistentIrGenerator - -import java.io.File - -internal interface R { - fun text(t: String): R - - fun indent(fn: R.() -> Unit): R - - fun import(fqn: String): R -} - -internal typealias E = R.() -> R - -internal val id: E get() = { this } - -internal enum class FieldKind { - REQUIRED, OPTIONAL, REPEATED -} - -internal class Proto( - val protoPrefix: String?, // null if flag, proto type if not - val entityName: String, // what to deserialize - val protoType: E, // what type ProtoBuf generates - val irType: E, // what Ir class this maps to - val fieldKind: FieldKind = FieldKind.OPTIONAL, -) - -internal class Field( - val name: String, - val propType: E, - val proto: Proto? = null, - val lateinit: Boolean = false, - val notEq: String = "!==", - val propSymbolType: E? = null, - val symbolToDeclaration: E = id, - val declarationToSymbol: E = id, - val storeInCarrierImpl: Boolean = false, -) - -internal object PersistentIrGenerator { - - private val protoPackage = "org.jetbrains.kotlin.backend.common.serialization.proto" - val carrierPackage = "org.jetbrains.kotlin.ir.declarations.persistent.carriers" - - // Imports - - val codedInputStream: E = import("codedInputStream", "org.jetbrains.kotlin.backend.common.serialization") - val ExtensionRegistryLite: E = import("ExtensionRegistryLite", "org.jetbrains.kotlin.protobuf") - - val ClassDescriptor: E = descriptorType("ClassDescriptor") - val DeclarationDescriptor: E = descriptorType("DeclarationDescriptor") - val ClassConstructorDescriptor: E = descriptorType("ClassConstructorDescriptor") - val DescriptorVisibility = descriptorType("DescriptorVisibility") - - val IrDeclaration = irDeclaration("IrDeclaration") - val IrDeclarationOrigin = irDeclaration("IrDeclarationOrigin") - val IrDeclarationParent = irDeclaration("IrDeclarationParent") - val IrAnonymousInitializer = irDeclaration("IrAnonymousInitializer") - val IrClass = irDeclaration("IrClass") - val IrFunction = irDeclaration("IrFunction") - val IrSimpleFunction = irDeclaration("IrSimpleFunction") - val IrField = irDeclaration("IrField") - val IrTypeParameter = irDeclaration("IrTypeParameter") - val IrValueParameter = irDeclaration("IrValueParameter") - val MetadataSource = irDeclaration("MetadataSource") - val IrAttributeContainer = irDeclaration("IrAttributeContainer") - val IrVariable = irDeclaration("IrVariable") - - val IrConstructorCall = irExpression("IrConstructorCall") - val IrBody = irExpression("IrBody") - val IrBlockBody = irExpression("IrBlockBody") - val IrExpressionBody = irExpression("IrExpressionBody") - - val IrAnonymousInitializerSymbol = irSymbol("IrAnonymousInitializerSymbol") - val IrClassSymbol = irSymbol("IrClassSymbol") - - val AnonymousInitializerCarrier = irCarrier("AnonymousInitializerCarrier") - val Carrier = irCarrier("Carrier") - - val ObsoleteDescriptorBasedAPI = import("ObsoleteDescriptorBasedAPI", "org.jetbrains.kotlin.ir") - - val IrType = import("IrType", "org.jetbrains.kotlin.ir.types") - - val IrSymbol = irSymbol("IrSymbol") - val IrPropertySymbol = irSymbol("IrPropertySymbol") - val IrSimpleFunctionSymbol = irSymbol("IrSimpleFunctionSymbol") - val IrFunctionSymbol = irSymbol("IrFunctionSymbol") - val IrFieldSymbol = irSymbol("IrFieldSymbol") - val IrValueParameterSymbol = irSymbol("IrValueParameterSymbol") - val IrTypeParameterSymbol = irSymbol("IrTypeParameterSymbol") - - val IdSignature = import("IdSignature", "org.jetbrains.kotlin.ir.util") - - // Constructor parameters - - val startOffset = +"override val startOffset: Int" - val endOffset = +"override val endOffset: Int" - val origin = +"origin: " + IrDeclarationOrigin - val isStatic = +"override val isStatic: Boolean" - val name = +"override val name: " + import("Name", "org.jetbrains.kotlin.name") - val kind = +"override val kind: " + descriptorType("ClassKind") - val visibility = +"visibility: " + DescriptorVisibility - val modality = +"modality: " + descriptorType("Modality") - val isCompanion = +"override val isCompanion: Boolean = false" - val isInner = +"override val isInner: Boolean = false" - val isData = +"override val isData: Boolean = false" - val isExternal = +"override val isExternal: Boolean" - val isFinal = +"override val isFinal: Boolean" - val isInline = +"override val isInline: Boolean" - val isExpect = +"override val isExpect: Boolean" - val isFun = +"override val isFun: Boolean = false" - val source = +"override val source: " + descriptorType("SourceElement") + " = SourceElement.NO_SOURCE" - val returnType = +"returnType: " + IrType - val isPrimary = +"override val isPrimary: Boolean" - val containerSource = +"override val containerSource: " + import( - "DeserializedContainerSource", - "org.jetbrains.kotlin.serialization.deserialization.descriptors" - ) + "?" - - val irFactory = +"override val factory: PersistentIrFactory" - - val initBlock = +"init " + block( - +"symbol.bind(this)" - ) - - // import org.jetbrains.kotlin.ir.declarations.persistent.PersistentIrDeclarationBase.Companion.hashCodeCounter - - val hashCodeValue = "private val hashCodeValue: Int = PersistentIrDeclarationBase.hashCodeCounter++" - val hashCodeImplementation = "override fun hashCode(): Int = hashCodeValue" - val equalsImplementation = "override fun equals(other: Any?): Boolean = (this === other)" - val hashCodeAndEqualsImpl = +"$hashCodeValue\n$hashCodeImplementation\n$equalsImplementation" - - // Proto types - - val protoValueParameterType = import("IrValueParameter", protoPackage, "ProtoIrValueParameter") - val protoTypeParameterType = import("IrTypeParameter", protoPackage, "ProtoIrTypeParameter") - val protoVariable = import("IrVariable", protoPackage, "ProtoIrVariable") - val protoIrConstructorCall = import("IrConstructorCall", protoPackage, "ProtoIrConstructorCall") - - val bodyProto = Proto("int32", "body", +"Int", IrBody) - val blockBodyProto = Proto("int32", "blockBody", +"Int", IrBlockBody) - val expressionBodyProto = Proto("int32", "expressionBody", +"Int", IrExpressionBody) - val valueParameterProto = Proto("int64", "valueParameter", +"Long", IrValueParameterSymbol) - val valueParameterListProto = Proto("int64", "valueParameter", +"Long", IrValueParameterSymbol, fieldKind = FieldKind.REPEATED) - val typeParameterListProto = Proto("int64", "typeParameter", +"Long", IrTypeParameterSymbol, fieldKind = FieldKind.REPEATED) - val superTypeListProto = Proto("int32", "superType", +"Int", IrType, fieldKind = FieldKind.REPEATED) - val sealedSubclassListProto = Proto("int64", "sealedSubclass", +"Long", IrClassSymbol, fieldKind = FieldKind.REPEATED) - val typeProto = Proto("int32", "type", +"Int", IrType, fieldKind = FieldKind.REQUIRED) - val optionalTypeProto = Proto("int32", "type", +"Int", IrType, fieldKind = FieldKind.OPTIONAL) - val variableProto = Proto("IrVariable", "variable", protoVariable, IrVariable) - - val classProto = Proto("int64", "class", +"Long", IrClassSymbol) - val propertySymbolProto = Proto("int64", "propertySymbol", +"Long", IrPropertySymbol) - val simpleFunctionProto = Proto("int64", "simpleFunction", +"Long", IrSimpleFunctionSymbol) - val simpleFunctionSymbolListProto = - Proto("int64", "simpleFunctionSymbol", +"Long", IrSimpleFunctionSymbol, fieldKind = FieldKind.REPEATED) - val propertySymbolListProto = - Proto("int64", "propertySymbol", +"Long", IrPropertySymbol, fieldKind = FieldKind.REPEATED) - - val fieldProto = Proto("int64", "field", +"Long", IrFieldSymbol) - - val visibilityProto = Proto(null, "visibility", +"Long", DescriptorVisibility) - val modalityProto = Proto(null, "modality", +"Long", descriptorType("Modality")) - val inlineClassRepresentationProto = Proto( - "IrInlineClassRepresentation", "inlineClassRepresentation", - import("IrInlineClassRepresentation", protoPackage, "ProtoIrInlineClassRepresentation"), - descriptorType("InlineClassRepresentation") + "<" + import("IrSimpleType", "org.jetbrains.kotlin.ir.types") + ">" - ) - - val isExternalClassProto = Proto(null, "isExternalClass", +"Long", +"Boolean") - val isExternalFieldProto = Proto(null, "isExternalField", +"Long", +"Boolean") - val isExternalFunctionProto = Proto(null, "isExternalFunction", +"Long", +"Boolean") - val isExternalPropertyProto = Proto(null, "isExternalProperty", +"Long", +"Boolean") - - private val allProto = listOf( - bodyProto, - blockBodyProto, - expressionBodyProto, - valueParameterProto, - valueParameterListProto, - typeParameterListProto, - superTypeListProto, - sealedSubclassListProto, - typeProto, - optionalTypeProto, - classProto, - propertySymbolProto, - simpleFunctionProto, - simpleFunctionSymbolListProto, - fieldProto, - variableProto, - visibilityProto, - modalityProto, - inlineClassRepresentationProto, - isExternalClassProto, - isExternalFieldProto, - isExternalFunctionProto, - isExternalPropertyProto, - ) - - // Fields - val signature = +"override var signature: " + IdSignature + "? = factory.currentSignature(this)" - - val lastModified = +"override var lastModified: Int = factory.stageController.currentStage" - val loweredUpTo = +"override var loweredUpTo: Int = factory.stageController.currentStage" - val values = +"override var values: Array<" + Carrier + ">? = null" - val createdOn = +"override val createdOn: Int = factory.stageController.currentStage" - - val parentField = +"override var parentField: " + IrDeclarationParent + "? = null" - val originField = +"override var originField: " + IrDeclarationOrigin + " = origin" - val removedOn = +"override var removedOn: Int = Int.MAX_VALUE" - val annotationsField = +"override var annotationsField: List<" + IrConstructorCall + "> = emptyList()" - - val contextReceiverParametersCount = +"override var contextReceiverParametersCount: Int = 0" - - val commonFields = lines( - signature, - id, - lastModified, - loweredUpTo, - values, - createdOn, - id, - parentField, - originField, - removedOn, - annotationsField, - hashCodeAndEqualsImpl - ) - - val typeParametersField = Field( - "typeParameters", - +"List<" + IrTypeParameter + ">", - typeParameterListProto, - propSymbolType = +"List<" + IrTypeParameterSymbol + ">", - symbolToDeclaration = +".map { it.owner }", - declarationToSymbol = +".map { it.symbol }", - storeInCarrierImpl = true, - ) - - val valueParametersField = Field( - "valueParameters", - +"List<" + IrValueParameter + ">", - valueParameterListProto, - propSymbolType = +"List<" + IrValueParameterSymbol + ">", - symbolToDeclaration = +".map { it.owner }", - declarationToSymbol = +".map { it.symbol }", - storeInCarrierImpl = true, - ) - - val dispatchReceiverParameterField = Field( - "dispatchReceiverParameter", - IrValueParameter + "?", - valueParameterProto, - propSymbolType = IrValueParameterSymbol + "?", - symbolToDeclaration = +"?.owner", - declarationToSymbol = +"?.symbol" - ) - - val extensionReceiverParameterField = Field( - "extensionReceiverParameter", - IrValueParameter + "?", - valueParameterProto, - propSymbolType = IrValueParameterSymbol + "?", - symbolToDeclaration = +"?.owner", - declarationToSymbol = +"?.symbol" - ) - - fun Field.toPersistentField(initializer: E, modifier: String = "override") = - persistentField( - name, - propType, - initializer, - lateinit, - modifier, - notEq = notEq, - symbolType = propSymbolType, - declarationToSymbol = declarationToSymbol, - symbolToDeclaration = symbolToDeclaration, - ) - - fun Field.toBody() = body(propType, lateinit, name) - - val protoMessages = mutableListOf() - - fun addCarrierProtoMessage(carrierName: String, vararg fields: Field) { - val protoFields = mutableListOf( - "required int32 lastModified", - "optional int64 parentSymbol", - "optional int32 origin", - "repeated IrConstructorCall annotation" - ) - - protoFields += fields.mapNotNull { f -> - f.proto?.protoPrefix?.let { p -> - val modifier = f.proto.fieldKind.toString().lowercase() - "$modifier $p ${f.name}" - } - } - - val sb = StringBuilder("message Pir${carrierName}Carrier {\n") - protoFields.forEachIndexed { i, f -> - sb.append(" $f = ${i + 1}") - sb.append(";\n") - } - - if (fields.any { it.proto != null && it.proto.protoPrefix == null }) { - sb.append(" optional int64 flags = ${protoFields.size + 1} [default = 0];\n") - } - - sb.append("}\n") - - protoMessages += sb.toString() - - addDeserializerMessage(carrierName, *fields) - addSerializerMessage(carrierName, *fields) - } - - val deserializerMethods = mutableListOf().also { list -> - - list += +"abstract fun deserializeParentSymbol(proto: Long): " + IrSymbol - list += +"abstract fun deserializeOrigin(proto: Int): " + IrDeclarationOrigin - list += +"abstract fun deserializeAnnotation(proto: " + protoIrConstructorCall + "): " + IrConstructorCall - - val seenEntities = mutableSetOf() - - allProto.forEach { p -> - if (p.entityName !in seenEntities) { - seenEntities += p.entityName - list += +"abstract fun deserialize${p.entityName.capitalize()}(proto: " + p.protoType + "): " + p.irType - } - } - } - - fun addDeserializerMessage(carrierName: String, vararg fields: Field) { - val argumentType = import("Pir${carrierName}Carrier", protoPackage) - val returnType = import("${carrierName}Carrier", carrierPackage) - val carrierImpl = import("${carrierName}CarrierImpl", carrierPackage) - - deserializerMethods += lines( - +"fun deserialize${carrierName}Carrier(bytes: ByteArray): " + returnType + " {", - lines( - +"val proto = " + argumentType + ".parseFrom(bytes." + codedInputStream + ", " + ExtensionRegistryLite + ".newInstance())", - +"return " + carrierImpl + "(", - arrayOf( - +"proto.lastModified", - +"if (proto.hasParentSymbol()) deserializeParentSymbol(proto.parentSymbol) else null", - +"deserializeOrigin(proto.origin)", - +"proto.annotationList.map { deserializeAnnotation(it) }", - *fields.map { f -> - if (f.proto == null) { - +"null" - } else { - val deserialize = "deserialize${f.proto.entityName.capitalize()}" - - when { - f.proto.fieldKind == FieldKind.REPEATED -> - +"proto.${f.name}List.map { $deserialize(it) }" - f.proto.protoPrefix != null && f.proto.fieldKind == FieldKind.OPTIONAL -> - +"if (proto.has${f.name.capitalize()}()) $deserialize(proto.${f.name}) else null" - f.proto.protoPrefix == null -> - +"$deserialize(proto.flags)" - else -> - +"$deserialize(proto.${f.name})" - } - } - }.toTypedArray() - ).join(separator = ",\n").indent(), - +")", - ).indent(), - +"}", - ) - } - - val serializerMethods = mutableListOf().also { list -> - - list += +"abstract fun serializeParentSymbol(value: " + IrSymbol + "): Long" - list += +"abstract fun serializeOrigin(value: " + IrDeclarationOrigin + "): Int" - list += +"abstract fun serializeAnnotation(value: " + IrConstructorCall + "): " + protoIrConstructorCall - - val seenEntities = mutableSetOf() - - allProto.forEach { p -> - if (p.entityName !in seenEntities) { - seenEntities += p.entityName - list += +"abstract fun serialize${p.entityName.capitalize()}(value: " + p.irType + "): " + p.protoType - } - } - } - - - fun addSerializerMessage(carrierName: String, vararg fields: Field) { - val argumentType = import("${carrierName}Carrier", carrierPackage) - val returnType = import("Pir${carrierName}Carrier", protoPackage) - - var flagsHandled = false - - serializerMethods += lines( - +"fun serialize${carrierName}Carrier(carrier: " + argumentType + "): ByteArray {", - lines( - +"val proto = " + returnType + ".newBuilder()", - +"proto.setLastModified(carrier.lastModified)", - +"carrier.parentSymbolField?.let { proto.setParentSymbol(serializeParentSymbol(it)) }", - +"proto.setOrigin(serializeOrigin(carrier.originField))", - +"proto.addAllAnnotation(carrier.annotationsField.map { serializeAnnotation(it) })", - *(fields.mapNotNull { f -> - f.proto?.let { p -> - if (p.protoPrefix != null) { - val action = "proto." + (if (p.fieldKind == FieldKind.REPEATED) "addAll" else "set") + f.name.capitalize() - val serializationFun = "serialize${f.proto.entityName.capitalize()}" - val argument = "carrier.${f.name}${if (f.propSymbolType != null) "Symbol" else ""}Field" - - when { - p.fieldKind == FieldKind.OPTIONAL -> - +"$argument?.let { $action($serializationFun(it)) }" - p.fieldKind == FieldKind.REPEATED -> - +"$action($argument.map { $serializationFun(it) })" - else -> - +"$action($serializationFun($argument))" - } - } else { - // It's a flag - if (!flagsHandled) { - flagsHandled = true - val flags = fields.filter { it.proto?.protoPrefix == null } - - val calls = flags.map { f -> "serialize${f.proto!!.entityName.capitalize()}(carrier.${f.name}Field)" } - - +"proto.setFlags(${calls.joinToString(separator = " or ")})" - } else null - } - } - }).toTypedArray(), - +"return proto.build().toByteArray()", - ).indent(), - +"}", - ) - } - - // Helpers - - fun baseClasses(name: String, baseClass: String = "Ir$name"): E = lines( - irDeclaration(baseClass) + "(),", - +" PersistentIrDeclarationBase<" + irCarrier("${name}Carrier") + ">,", - +" ${name}Carrier", - ) - - fun persistentField( - name: String, - type: E, - initializer: E, - lateinit: Boolean = false, - modifier: String = "override", - isBody: Boolean = false, - notEq: String = "!==", - symbolType: E? = null, - declarationToSymbol: E = id, - symbolToDeclaration: E = id, - ): E { - val result = mutableListOf(+"override var ${name}Field: " + type + "${if (lateinit) "?" else ""} = " + initializer, id) - if (symbolType != null) { - result += +"override var ${name}SymbolField: " + symbolType + if (lateinit) "?" else "" - result += lines( - +"get() = ${name}Field" + (if (lateinit) "?" else "") + declarationToSymbol, - +"set(v) " + block( - +"${name}Field = v" + (if (lateinit) "?" else "") + symbolToDeclaration - ) - ).indent() - result += id - } - - result += +"$modifier var $name: " + type - result += lines( - +"get() = getCarrier().${name}Field${if (lateinit) "!!" else ""}", - +"set(v) " + block( - +"if (${if (lateinit) "getCarrier().${name}Field" else name} $notEq v) " + block( - (if (isBody) lines( - +"if (v is PersistentIrBodyBase<*>) " + block( - +"v.container = this" - ), - id - ) else id) + "setCarrier()", - +"${name}Field = v" - ) - ) - ).indent() - - return lines(*result.toTypedArray()) - } - - fun body(bodyType: E, lateinit: Boolean = false, fieldName: String = "body"): E = - persistentField(fieldName, bodyType, initializer = +"null", lateinit, isBody = true) - - fun descriptor(type: E) = lines( - +"@" + ObsoleteDescriptorBasedAPI, - +"override val descriptor: " + type, - +" get() = symbol.descriptor" - ) - - fun carriers(name: String, vararg fields: Field): E = lines( - id, - +"internal interface ${name}Carrier : DeclarationCarrier" + block( - *(fields.flatMap { - var result = listOf(+"val ${it.name}Field: " + it.propType + if (it.lateinit) "?" else "") - - if (it.propSymbolType != null) { - result += +"val ${it.name}SymbolField: " + it.propSymbolType + if (it.lateinit) "?" else "" - } - - result - }.toTypedArray()), - id, - +"override fun clone(): ${name}Carrier " + block( - +"return ${name}CarrierImpl(", - arrayOf( - +"lastModified", - +"parentSymbolField", - +"originField", - +"annotationsField", - *(fields.map { +"${it.name}${if (it.propSymbolType != null) "Symbol" else ""}Field" }.toTypedArray()) - ).join(separator = ",\n").indent(), - +")", - ) - ), - id, - +"internal class ${name}CarrierImpl(", - arrayOf( - +"override val lastModified: Int", - +"override val parentSymbolField: " + IrSymbol + "?", - +"override val originField: " + IrDeclarationOrigin, - +"override val annotationsField: List<" + IrConstructorCall + ">", - *(fields.map { - if (it.propSymbolType != null) { - +"override val ${it.name}SymbolField: " + it.propSymbolType + if (it.lateinit) "?" else "" - } else { - +"override val ${it.name}Field: " + it.propType + if (it.lateinit) "?" else "" - } - }.toTypedArray()), - ).join(separator = ",\n").indent(), - +") : ${name}Carrier" + if (fields.all { it.propSymbolType == null }) id else + " " + blockSpaced( - *(fields.mapNotNull { - it.propSymbolType?.let { _ -> - if (it.storeInCarrierImpl) { - +"override val ${it.name}Field: " + it.propType + " by lazy { ${it.name}SymbolField" + it.symbolToDeclaration + " }" - } else { - lines( - +"override val ${it.name}Field: " + it.propType + if (it.lateinit) "?" else "", - lines( - +"get() = ${it.name}SymbolField" + (if (it.lateinit) "?" else "") + it.symbolToDeclaration, - ).indent() - ) - } - } - }).toTypedArray() - ), - id, - ) - - fun lines(vararg fn: E): E = fn.join(separator = "\n") - - fun block(vararg fn: E): E = lines(+"{", { indent { lines(*fn)() } }, +"}") - - fun blockSpaced(vararg fn: E): E { - return block(*(fn.flatMap { listOf(id, it) }.toTypedArray())) - } - - fun import(name: String, pkg: String, alias: String = name): E = - { import("$pkg.$name${if (alias != name) " as $alias" else ""}").text(alias) } - - fun descriptorType(name: String): E = import(name, "org.jetbrains.kotlin.descriptors") - - fun irDeclaration(name: String): E = import(name, "org.jetbrains.kotlin.ir.declarations") - - fun irExpression(name: String): E = import(name, "org.jetbrains.kotlin.ir.expressions") - - fun irCarrier(name: String): E = import(name, "org.jetbrains.kotlin.ir.declarations.persistent.carriers") - - fun irSymbol(name: String): E = import(name, "org.jetbrains.kotlin.ir.symbols") - - infix operator fun E.plus(e: E?): E = { this@plus(); e.safe()() } - - infix operator fun E.plus(e: String): E = this + (+e) - - operator fun String.unaryPlus(): E = { text(this@unaryPlus) } - - fun E?.safe(): E = this ?: id - - fun Array.join(prefix: String = "", separator: String = "", suffix: String = ""): E = - join(+prefix, +separator, +suffix) - - fun Array.join(prefix: E = id, separator: E = id, suffix: E = id): E { - if (this.isEmpty()) return id - return prefix + interleaveWith(separator) + suffix - } - - fun Array.interleaveWith(b: E): E { - return { - this@interleaveWith.forEachIndexed { i, e -> - if (i != 0) b() - e() - } - this - } - } - - fun Boolean.ifTrue(s: String): E = if (this) +s else id - - fun type(name: E, vararg parameters: E, isNullable: Boolean = false): E = - name + parameters.join("<", ", ", ">") + isNullable.ifTrue("?") - - fun E.indent(): E = { - val self = this@indent - indent { - self() - } - } - - fun renderFile(pkg: String, fn: R.() -> R): String { - val sb = StringBuilder() - val imports: MutableSet = mutableSetOf() - - val renderer = object : R { - var currentIndent = "" - - var atLineStart = true - - override fun text(t: String): R { - if (t.isEmpty()) return this - - if (atLineStart) { - sb.append(currentIndent) - atLineStart = false - } - - val cr = t.indexOf('\n') - if (cr >= 0) { - sb.append(t.substring(0, cr + 1)) - atLineStart = true - text(t.substring(cr + 1)) - } else { - sb.append(t) - } - - return this - } - - override fun indent(fn: R.() -> Unit): R { - val oldIndent = currentIndent - currentIndent = "$oldIndent " - fn() - currentIndent = oldIndent - - return this - } - - override fun import(fqn: String): R { - imports += fqn - - return this - } - } - - renderer.fn() - - var result = File("license/COPYRIGHT_HEADER.txt").readText() + "\n\n" + "package $pkg\n\n" - - result += imports.map { "import $it" }.sorted().joinToString(separator = "\n") - result += "\n\n" - result += "// Auto-generated by compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Main.kt. DO NOT EDIT!\n" - result += sb.toString() - - result = result.lines().map { if (it.isBlank()) "" else it }.joinToString(separator = "\n") - - return result - } - - private val prefix = "compiler/ir/ir.tree.persistent/gen/org/jetbrains/kotlin/ir/declarations/persistent/" - - fun writeFile(path: String, content: String) { - File(prefix + path).writeText(content) - } - - fun generateKotlinPirCarriersProto() { - val file = File("compiler/ir/serialization.common/src/KotlinPirCarriers.proto") - - val sb = StringBuilder(""" - syntax = "proto2"; - package org.jetbrains.kotlin.backend.common.serialization.proto; - - option java_multiple_files = true; - option java_outer_classname = "KotlinIr"; - option optimize_for = LITE_RUNTIME; - - import "compiler/ir/serialization.common/src/KotlinIr.proto"; - - // Auto-generated by compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Main.kt. DO NOT EDIT! - - """.trimIndent()) - - for (m in protoMessages) { - sb.append("\n").append(m) - } - - file.writeText(sb.toString()) - } - - fun generateCarrierDeserializer() { - writeFile("../../serialization/IrCarrierDeserializer.kt", renderFile("org.jetbrains.kotlin.ir.serialization") { - lines( - id, - +"internal abstract class IrCarrierDeserializer " + blockSpaced( - *deserializerMethods.toTypedArray() - ), - id, - )() - }) - } - - fun generateCarrierSerializer() { - writeFile("../../serialization/IrCarrierSerializer.kt", renderFile("org.jetbrains.kotlin.ir.serialization") { - lines( - id, - +"internal abstract class IrCarrierSerializer " + blockSpaced( - *serializerMethods.toTypedArray() - ), - id, - )() - }) - } -} - -private fun String.capitalize(): String = replaceFirstChar { if (it.isLowerCase()) it.titlecase() else it.toString() } \ No newline at end of file diff --git a/compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Property.kt b/compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Property.kt deleted file mode 100644 index 21bf1f3882f..00000000000 --- a/compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Property.kt +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.persistentIrGenerator - -internal fun PersistentIrGenerator.generateProperty() { - val backingFieldField = Field( - "backingField", - IrField + "?", - fieldProto, - propSymbolType = IrFieldSymbol + "?", - symbolToDeclaration = +"?.owner", - declarationToSymbol = +"?.symbol" - ) - val getterField = Field( - "getter", - IrSimpleFunction + "?", - simpleFunctionProto, - propSymbolType = IrSimpleFunctionSymbol + "?", - symbolToDeclaration = +"?.owner", - declarationToSymbol = +"?.symbol" - ) - val setterField = Field( - "setter", - IrSimpleFunction + "?", - simpleFunctionProto, - propSymbolType = IrSimpleFunctionSymbol + "?", - symbolToDeclaration = +"?.owner", - declarationToSymbol = +"?.symbol" - ) - val overriddenSymbolsField = Field( - "overriddenSymbols", - +"List<" + IrPropertySymbol + ">", - propertySymbolListProto - ) - - writeFile("PersistentIrPropertyCommon.kt", renderFile("org.jetbrains.kotlin.ir.declarations.persistent") { - lines( - id, - +"internal abstract class PersistentIrPropertyCommon(", - arrayOf( - startOffset, - endOffset, - origin, - name, - +"override var " + visibility, // TODO non-persisted state - +"override val isVar: Boolean", - +"override val isConst: Boolean", - +"override val isLateinit: Boolean", - +"override val isDelegated: Boolean", - isExternal, - isExpect, - containerSource, - irFactory, - ).join(separator = ",\n").indent(), - +") : " + baseClasses("Property") + " " + blockSpaced( - commonFields, - backingFieldField.toPersistentField(+"null"), - getterField.toPersistentField(+"null"), - setterField.toPersistentField(+"null"), - overriddenSymbolsField.toPersistentField(+"emptyList()"), - +"override var metadata: " + MetadataSource + "? = null", - lines( - +"@Suppress(\"LeakingThis\")", - +"override var attributeOwnerId: " + IrAttributeContainer + " = this", - ), - ), - id, - )() - }) - - writeFile("carriers/PropertyCarrier.kt", renderFile("org.jetbrains.kotlin.ir.declarations.persistent.carriers") { - carriers( - "Property", - backingFieldField, - getterField, - setterField, - overriddenSymbolsField, - )() - }) - - addCarrierProtoMessage( - "Property", - backingFieldField, - getterField, - setterField, - overriddenSymbolsField, - ) -} \ No newline at end of file diff --git a/compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/TypeAlias.kt b/compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/TypeAlias.kt deleted file mode 100644 index a0e37b7112d..00000000000 --- a/compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/TypeAlias.kt +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.persistentIrGenerator - -internal fun PersistentIrGenerator.generateTypeAlias() { - val expandedTypeField = Field("expandedType", IrType, typeProto) - - writeFile("PersistentIrTypeAlias.kt", renderFile("org.jetbrains.kotlin.ir.declarations.persistent") { - lines( - id, - +"internal class PersistentIrTypeAlias(", - arrayOf( - startOffset, - endOffset, - +"override val symbol: " + irSymbol("IrTypeAliasSymbol"), - name, - +"override var " + visibility, - +"expandedType: " + IrType, - +"override val isActual: Boolean", - origin, - irFactory, - ).join(separator = ",\n").indent(), - +") : " + baseClasses("TypeAlias") + " " + blockSpaced( - initBlock, - commonFields, - descriptor(descriptorType("TypeAliasDescriptor")), - - typeParametersField.toPersistentField(+"emptyList()"), - expandedTypeField.toPersistentField(+"expandedType"), - ), - id, - )() - }) - - writeFile("carriers/TypeAliasCarrier.kt", renderFile("org.jetbrains.kotlin.ir.declarations.persistent.carriers") { - carriers( - "TypeAlias", - typeParametersField, - expandedTypeField, - )() - }) - - addCarrierProtoMessage("TypeAlias", typeParametersField, expandedTypeField) -} \ No newline at end of file diff --git a/compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/TypeParameter.kt b/compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/TypeParameter.kt deleted file mode 100644 index f1657d3cde3..00000000000 --- a/compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/TypeParameter.kt +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.persistentIrGenerator - -internal fun PersistentIrGenerator.generateTypeParameter() { - val superTypesField = Field("superTypes", +"List<" + IrType + ">", superTypeListProto) - - writeFile("PersistentIrTypeParameter.kt", renderFile("org.jetbrains.kotlin.ir.declarations.persistent") { - lines( - id, - +"internal class PersistentIrTypeParameter(", - arrayOf( - startOffset, - endOffset, - origin, - +"override val symbol: " + irSymbol("IrTypeParameterSymbol"), - name, - +"override val index: Int", - +"override val isReified: Boolean", - +"override val variance: " + import("Variance", "org.jetbrains.kotlin.types"), - irFactory, - ).join(separator = ",\n").indent(), - +") : " + baseClasses("TypeParameter") + " " + blockSpaced( - initBlock, - commonFields, - descriptor(descriptorType("TypeParameterDescriptor")), - superTypesField.toPersistentField(+"emptyList()"), - ), - id, - )() - }) - - writeFile("carriers/TypeParameterCarrier.kt", renderFile("org.jetbrains.kotlin.ir.declarations.persistent.carriers") { - carriers( - "TypeParameter", - superTypesField, - )() - }) - - addCarrierProtoMessage("TypeParameter", superTypesField) -} \ No newline at end of file diff --git a/compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/ValueParameter.kt b/compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/ValueParameter.kt deleted file mode 100644 index b666ed113b9..00000000000 --- a/compiler/ir/ir.tree.persistent/generator/src/org/jetbrains/kotlin/ir/persistentIrGenerator/ValueParameter.kt +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.persistentIrGenerator - -internal fun PersistentIrGenerator.generateValueParameter() { - - val defaultValueField = Field("defaultValue", IrExpressionBody + "?", expressionBodyProto) - val typeField = Field("type", IrType, typeProto) - val varargElementTypeField = Field("varargElementType", IrType + "?", optionalTypeProto) - - writeFile("PersistentIrValueParameter.kt", renderFile("org.jetbrains.kotlin.ir.declarations.persistent") { - lines( - id, - +"internal class PersistentIrValueParameter(", - arrayOf( - startOffset, - endOffset, - origin, - +"override val symbol: " + irSymbol("IrValueParameterSymbol"), - name, - +"override val index: Int", - +"type: " + IrType, - +"varargElementType: " + IrType + "?", - +"override val isCrossinline: Boolean", - +"override val isNoinline: Boolean", - +"override val isHidden: Boolean", - +"override val isAssignable: Boolean", - irFactory, - ).join(separator = ",\n").indent(), - +") : " + baseClasses("ValueParameter") + " " + blockSpaced( - descriptor(descriptorType("ParameterDescriptor")), - initBlock, - commonFields, - defaultValueField.toBody(), - typeField.toPersistentField(+"type"), - varargElementTypeField.toPersistentField(+"varargElementType"), - ), - id, - )() - }) - writeFile("carriers/ValueParameterCarrier.kt", renderFile("org.jetbrains.kotlin.ir.declarations.persistent.carriers") { - carriers( - "ValueParameter", - defaultValueField, - typeField, - varargElementTypeField, - )() - }) - - addCarrierProtoMessage("ValueParameter", defaultValueField, typeField, varargElementTypeField) -} \ No newline at end of file diff --git a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrDeclarationBase.kt b/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrDeclarationBase.kt deleted file mode 100644 index 803e5c2831c..00000000000 --- a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrDeclarationBase.kt +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - - -package org.jetbrains.kotlin.ir.declarations.persistent - -import org.jetbrains.kotlin.ir.IrElement -import org.jetbrains.kotlin.ir.declarations.IrDeclaration -import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin -import org.jetbrains.kotlin.ir.declarations.IrDeclarationParent -import org.jetbrains.kotlin.ir.declarations.IrSymbolOwner -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.BodyCarrier -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.Carrier -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.DeclarationCarrier -import org.jetbrains.kotlin.ir.expressions.IrBody -import org.jetbrains.kotlin.ir.expressions.IrConstructorCall -import org.jetbrains.kotlin.ir.symbols.IrSymbol -import org.jetbrains.kotlin.ir.util.IdSignature -import org.jetbrains.kotlin.utils.addToStdlib.cast - -interface PersistentIrDeclarationBase : PersistentIrElementBase, IrDeclaration, DeclarationCarrier { - var removedOn: Int - - override var parentField: IrDeclarationParent? - - override var parentSymbolField: IrSymbol? - get() = parentField?.let { (it as IrSymbolOwner).symbol } - set(v) { - parentField = v?.owner?.cast() - } - - override var originField: IrDeclarationOrigin - - override var annotationsField: List - - var signature: IdSignature? - - // TODO reduce boilerplate - override var parent: IrDeclarationParent - get() = getCarrier().parentField ?: throw UninitializedPropertyAccessException("Parent not initialized: $this") - set(p) { - if (getCarrier().parentField !== p) { - setCarrier() - parentField = p - } - } - - override var origin: IrDeclarationOrigin - get() = getCarrier().originField - set(p) { - if (getCarrier().originField !== p) { - setCarrier() - originField = p - } - } - - override var annotations: List - get() = getCarrier().annotationsField - set(v) { - if (getCarrier().annotationsField !== v) { - setCarrier() - annotationsField = v - } - } - - override fun ensureLowered() { - if (factory.stageController.currentStage > loweredUpTo) { - factory.stageController.lazyLower(this) - } - } - - companion object { - var hashCodeCounter = 0 - } -} - -interface PersistentIrElementBase : IrElement, Carrier { - - val factory: PersistentIrFactory - - override var lastModified: Int - - var loweredUpTo: Int - - // TODO Array? - var values: Array? - - val createdOn: Int - - fun ensureLowered() - - @Suppress("UNCHECKED_CAST") - fun getCarrier(): T { - factory.stageController.currentStage.let { stage -> - ensureLowered() - - if (stage >= lastModified) return this as T - - if (stage < createdOn) error("Access before creation") - - val v = values - ?: error("How come?") - - var l = -1 - var r = v.size - while (r - l > 1) { - val m = (l + r) / 2 - if ((v[m] as T).lastModified <= stage) { - l = m - } else { - r = m - } - } - if (l < 0) { - error("access before creation") - } - - return v[l] as T - } - } - - // TODO naming? e.g. `mutableCarrier` - @Suppress("UNCHECKED_CAST") - fun setCarrier() { - val stage = factory.stageController.currentStage - - ensureLowered() - - if (!factory.stageController.canModify(this)) { - error("Cannot modify this element!") - } - - if (loweredUpTo > stage) { - error("retrospective modification") - } - - // TODO move up? i.e. fast path - if (stage == lastModified) { - return - } else { - values = (values ?: emptyArray()) + this.clone() as T - } - - this.lastModified = stage - } -} - -interface PersistentIrBodyBase> : PersistentIrElementBase, BodyCarrier { - var initializer: (B.() -> Unit)? - - override var containerField: IrDeclaration? - - override var containerFieldSymbol: IrSymbol? - get() = (containerField as? IrSymbolOwner)?.symbol - set(s) { - containerField = s?.owner?.cast() - } - - val hasContainer: Boolean - get() = getCarrier().containerField != null - - var container: IrDeclaration - get() = getCarrier().containerField!! - set(p) { - if (getCarrier().containerField !== p) { - setCarrier() - containerField = p - } - } - - fun checkEnabled(fn: () -> T): T { - if (!factory.stageController.bodiesEnabled) error("Bodies disabled!") - ensureLowered() - return fn() - } - - @Suppress("UNCHECKED_CAST") - override fun ensureLowered() { - initializer?.let { initFn -> - initializer = null - factory.stageController.withStage(createdOn) { - factory.stageController.bodyLowering { - initFn.invoke(this as B) - } - } - } - if (loweredUpTo + 1 < factory.stageController.currentStage) { - factory.stageController.lazyLower(this as IrBody) - } - } -} diff --git a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrFactory.kt b/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrFactory.kt deleted file mode 100644 index 5062082715a..00000000000 --- a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrFactory.kt +++ /dev/null @@ -1,356 +0,0 @@ -/* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.declarations.persistent - -import org.jetbrains.kotlin.descriptors.* -import org.jetbrains.kotlin.ir.IrStatement -import org.jetbrains.kotlin.ir.declarations.* -import org.jetbrains.kotlin.ir.expressions.IrBlockBody -import org.jetbrains.kotlin.ir.expressions.IrBody -import org.jetbrains.kotlin.ir.expressions.IrExpression -import org.jetbrains.kotlin.ir.expressions.IrExpressionBody -import org.jetbrains.kotlin.ir.expressions.persistent.PersistentIrBlockBody -import org.jetbrains.kotlin.ir.expressions.persistent.PersistentIrExpressionBody -import org.jetbrains.kotlin.ir.symbols.* -import org.jetbrains.kotlin.ir.types.IrType -import org.jetbrains.kotlin.ir.util.IdSignature -import org.jetbrains.kotlin.name.Name -import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedContainerSource -import org.jetbrains.kotlin.types.Variance - -class PersistentIrFactory : IrFactory { - - override var stageController = StageController() - - val allDeclarations = hashSetOf() - - val allBodies = hashSetOf() - - private fun IrDeclaration.register() { - allDeclarations += this - } - - fun declarationSignature(declaration: IrDeclaration): IdSignature? { - return (declaration as? PersistentIrDeclarationBase<*>)?.signature ?: declaration.symbol.signature - } - - override fun unlistFunction(f: IrFunction) { - allDeclarations.remove(f) - f.dispatchReceiverParameter?.let { allDeclarations.remove(it) } - f.extensionReceiverParameter?.let { allDeclarations.remove(it) } - allDeclarations.removeAll(f.valueParameters) - allDeclarations.removeAll(f.typeParameters) - allBodies.remove(f.body) - } - - @Suppress("UNUSED_PARAMETER") - internal fun currentSignature(declaration: IrDeclaration): IdSignature? { - val parentSig = stageController.currentDeclaration?.let { declarationSignature(it) } ?: return null - - return stageController.createSignature(parentSig) - } - - override fun createAnonymousInitializer( - startOffset: Int, - endOffset: Int, - origin: IrDeclarationOrigin, - symbol: IrAnonymousInitializerSymbol, - isStatic: Boolean, - ): IrAnonymousInitializer = - PersistentIrAnonymousInitializer(startOffset, endOffset, origin, symbol, isStatic, this).also { it.register() } - - override fun createClass( - startOffset: Int, - endOffset: Int, - origin: IrDeclarationOrigin, - symbol: IrClassSymbol, - name: Name, - kind: ClassKind, - visibility: DescriptorVisibility, - modality: Modality, - isCompanion: Boolean, - isInner: Boolean, - isData: Boolean, - isExternal: Boolean, - isInline: Boolean, - isExpect: Boolean, - isFun: Boolean, - source: SourceElement, - ): IrClass = - PersistentIrClass( - startOffset, endOffset, origin, symbol, name, kind, visibility, modality, - isCompanion, isInner, isData, isExternal, isInline, isExpect, isFun, source, - this - ).also { it.register() } - - override fun createConstructor( - startOffset: Int, - endOffset: Int, - origin: IrDeclarationOrigin, - symbol: IrConstructorSymbol, - name: Name, - visibility: DescriptorVisibility, - returnType: IrType, - isInline: Boolean, - isExternal: Boolean, - isPrimary: Boolean, - isExpect: Boolean, - containerSource: DeserializedContainerSource?, - ): IrConstructor = - PersistentIrConstructor( - startOffset, endOffset, origin, symbol, name, visibility, returnType, isInline, isExternal, isPrimary, isExpect, - containerSource, this - ).also { it.register() } - - override fun createEnumEntry( - startOffset: Int, - endOffset: Int, - origin: IrDeclarationOrigin, - symbol: IrEnumEntrySymbol, - name: Name, - ): IrEnumEntry = - PersistentIrEnumEntry(startOffset, endOffset, origin, symbol, name, this).also { it.register() } - - override fun createErrorDeclaration( - startOffset: Int, - endOffset: Int, - descriptor: DeclarationDescriptor?, - ): IrErrorDeclaration = - PersistentIrErrorDeclaration(startOffset, endOffset, descriptor, this).also { it.register() } - - override fun createField( - startOffset: Int, - endOffset: Int, - origin: IrDeclarationOrigin, - symbol: IrFieldSymbol, - name: Name, - type: IrType, - visibility: DescriptorVisibility, - isFinal: Boolean, - isExternal: Boolean, - isStatic: Boolean, - ): IrField = - PersistentIrField( - startOffset, - endOffset, - origin, - symbol, - name, - type, - visibility, - isFinal, - isExternal, - isStatic, - this - ).also { it.register() } - - override fun createFunction( - startOffset: Int, - endOffset: Int, - origin: IrDeclarationOrigin, - symbol: IrSimpleFunctionSymbol, - name: Name, - visibility: DescriptorVisibility, - modality: Modality, - returnType: IrType, - isInline: Boolean, - isExternal: Boolean, - isTailrec: Boolean, - isSuspend: Boolean, - isOperator: Boolean, - isInfix: Boolean, - isExpect: Boolean, - isFakeOverride: Boolean, - containerSource: DeserializedContainerSource?, - ): IrSimpleFunction = - PersistentIrFunction( - startOffset, endOffset, origin, symbol, name, visibility, modality, returnType, - isInline, isExternal, isTailrec, isSuspend, isOperator, isInfix, isExpect, isFakeOverride, - containerSource, this - ).also { it.register() } - - override fun createFakeOverrideFunction( - startOffset: Int, - endOffset: Int, - origin: IrDeclarationOrigin, - name: Name, - visibility: DescriptorVisibility, - modality: Modality, - returnType: IrType, - isInline: Boolean, - isExternal: Boolean, - isTailrec: Boolean, - isSuspend: Boolean, - isOperator: Boolean, - isInfix: Boolean, - isExpect: Boolean, - ): IrSimpleFunction = - PersistentIrFakeOverrideFunction( - startOffset, endOffset, origin, name, visibility, modality, returnType, - isInline, isExternal, isTailrec, isSuspend, isOperator, isInfix, isExpect, this - ).also { it.register() } - - override fun createLocalDelegatedProperty( - startOffset: Int, - endOffset: Int, - origin: IrDeclarationOrigin, - symbol: IrLocalDelegatedPropertySymbol, - name: Name, - type: IrType, - isVar: Boolean, - ): IrLocalDelegatedProperty = - PersistentIrLocalDelegatedProperty( - startOffset, endOffset, origin, symbol, name, type, isVar, this - ).also { it.register() } - - override fun createProperty( - startOffset: Int, - endOffset: Int, - origin: IrDeclarationOrigin, - symbol: IrPropertySymbol, - name: Name, - visibility: DescriptorVisibility, - modality: Modality, - isVar: Boolean, - isConst: Boolean, - isLateinit: Boolean, - isDelegated: Boolean, - isExternal: Boolean, - isExpect: Boolean, - isFakeOverride: Boolean, - containerSource: DeserializedContainerSource?, - ): IrProperty = - PersistentIrProperty( - startOffset, endOffset, origin, symbol, name, visibility, modality, - isVar, isConst, isLateinit, isDelegated, isExternal, isExpect, isFakeOverride, - containerSource, this - ).also { it.register() } - - override fun createFakeOverrideProperty( - startOffset: Int, - endOffset: Int, - origin: IrDeclarationOrigin, - name: Name, - visibility: DescriptorVisibility, - modality: Modality, - isVar: Boolean, - isConst: Boolean, - isLateinit: Boolean, - isDelegated: Boolean, - isExternal: Boolean, - isExpect: Boolean, - ): IrProperty = - PersistentIrFakeOverrideProperty( - startOffset, endOffset, origin, name, visibility, modality, - isVar, isConst, isLateinit, isDelegated, isExternal, isExpect, - this - ).also { it.register() } - - override fun createTypeAlias( - startOffset: Int, - endOffset: Int, - symbol: IrTypeAliasSymbol, - name: Name, - visibility: DescriptorVisibility, - expandedType: IrType, - isActual: Boolean, - origin: IrDeclarationOrigin, - ): IrTypeAlias = - PersistentIrTypeAlias(startOffset, endOffset, symbol, name, visibility, expandedType, isActual, origin, this).also { it.register() } - - override fun createTypeParameter( - startOffset: Int, - endOffset: Int, - origin: IrDeclarationOrigin, - symbol: IrTypeParameterSymbol, - name: Name, - index: Int, - isReified: Boolean, - variance: Variance, - ): IrTypeParameter = - PersistentIrTypeParameter(startOffset, endOffset, origin, symbol, name, index, isReified, variance, this).also { it.register() } - - override fun createValueParameter( - startOffset: Int, - endOffset: Int, - origin: IrDeclarationOrigin, - symbol: IrValueParameterSymbol, - name: Name, - index: Int, - type: IrType, - varargElementType: IrType?, - isCrossinline: Boolean, - isNoinline: Boolean, - isHidden: Boolean, - isAssignable: Boolean - ): IrValueParameter = - PersistentIrValueParameter( - startOffset, - endOffset, - origin, - symbol, - name, - index, - type, - varargElementType, - isCrossinline, - isNoinline, - isHidden, - isAssignable, - this - ).also { it.register() } - - override fun createExpressionBody( - startOffset: Int, - endOffset: Int, - initializer: IrExpressionBody.() -> Unit, - ): IrExpressionBody = - PersistentIrExpressionBody(startOffset, endOffset, this, initializer).also { - allBodies += it - } - - override fun createExpressionBody( - startOffset: Int, - endOffset: Int, - expression: IrExpression, - ): IrExpressionBody = - PersistentIrExpressionBody(startOffset, endOffset, expression, this).also { - allBodies += it - } - - override fun createExpressionBody( - expression: IrExpression, - ): IrExpressionBody = - PersistentIrExpressionBody(expression, this).also { - allBodies += it - } - - override fun createBlockBody( - startOffset: Int, - endOffset: Int, - ): IrBlockBody = - PersistentIrBlockBody(startOffset, endOffset, this).also { - allBodies += it - } - - override fun createBlockBody( - startOffset: Int, - endOffset: Int, - statements: List, - ): IrBlockBody = - PersistentIrBlockBody(startOffset, endOffset, statements, this).also { - allBodies += it - } - - override fun createBlockBody( - startOffset: Int, - endOffset: Int, - initializer: IrBlockBody.() -> Unit, - ): IrBlockBody = - PersistentIrBlockBody(startOffset, endOffset, this, initializer).also { - allBodies += it - } -} diff --git a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrFunction.kt b/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrFunction.kt deleted file mode 100644 index d0604df2480..00000000000 --- a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrFunction.kt +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.declarations.persistent - -import org.jetbrains.kotlin.descriptors.DescriptorVisibility -import org.jetbrains.kotlin.descriptors.FunctionDescriptor -import org.jetbrains.kotlin.descriptors.Modality -import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI -import org.jetbrains.kotlin.ir.declarations.* -import org.jetbrains.kotlin.ir.descriptors.toIrBasedDescriptor -import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol -import org.jetbrains.kotlin.ir.types.IrType -import org.jetbrains.kotlin.name.Name -import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedContainerSource - -internal class PersistentIrFunction( - startOffset: Int, - endOffset: Int, - origin: IrDeclarationOrigin, - override val symbol: IrSimpleFunctionSymbol, - name: Name, - visibility: DescriptorVisibility, - override val modality: Modality, - returnType: IrType, - isInline: Boolean, - isExternal: Boolean, - isTailrec: Boolean, - isSuspend: Boolean, - isOperator: Boolean, - isInfix: Boolean, - isExpect: Boolean, - override val isFakeOverride: Boolean = origin == IrDeclarationOrigin.FAKE_OVERRIDE, - containerSource: DeserializedContainerSource?, - factory: PersistentIrFactory, -) : PersistentIrFunctionCommon( - startOffset, endOffset, origin, name, visibility, returnType, isInline, - isExternal, isTailrec, isSuspend, isOperator, isInfix, isExpect, - containerSource, factory -) { - @ObsoleteDescriptorBasedAPI - override val descriptor: FunctionDescriptor - get() = symbol.descriptor - - init { - symbol.bind(this) - } -} - -internal class PersistentIrFakeOverrideFunction( - startOffset: Int, - endOffset: Int, - origin: IrDeclarationOrigin, - name: Name, - override var visibility: DescriptorVisibility, - override var modality: Modality, - returnType: IrType, - isInline: Boolean, - isExternal: Boolean, - isTailrec: Boolean, - isSuspend: Boolean, - isOperator: Boolean, - isInfix: Boolean, - isExpect: Boolean, - factory: PersistentIrFactory, -) : PersistentIrFunctionCommon( - startOffset, endOffset, origin, name, visibility, returnType, isInline, - isExternal, isTailrec, isSuspend, isOperator, isInfix, isExpect, factory = factory -), IrFakeOverrideFunction { - override val isFakeOverride: Boolean - get() = true - - private var _symbol: IrSimpleFunctionSymbol? = null - - override val symbol: IrSimpleFunctionSymbol - get() = _symbol ?: - error("$this has not acquired a symbol yet") - - override val isBound: Boolean - get() = _symbol != null - - @ObsoleteDescriptorBasedAPI - override val descriptor - get() = _symbol?.descriptor ?: this.toIrBasedDescriptor() - - @OptIn(ObsoleteDescriptorBasedAPI::class) - override fun acquireSymbol(symbol: IrSimpleFunctionSymbol): IrSimpleFunction { - assert(_symbol == null) { "$this already has symbol _symbol" } - _symbol = symbol - symbol.bind(this) - return this - } -} diff --git a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrProperty.kt b/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrProperty.kt deleted file mode 100644 index 7665b1db46c..00000000000 --- a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/PersistentIrProperty.kt +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - - -package org.jetbrains.kotlin.ir.declarations.persistent - -import org.jetbrains.kotlin.descriptors.Modality -import org.jetbrains.kotlin.descriptors.PropertyDescriptor -import org.jetbrains.kotlin.descriptors.DescriptorVisibility -import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI -import org.jetbrains.kotlin.ir.declarations.* -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.Carrier -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.PropertyCarrier -import org.jetbrains.kotlin.ir.descriptors.toIrBasedDescriptor -import org.jetbrains.kotlin.ir.expressions.IrConstructorCall -import org.jetbrains.kotlin.ir.symbols.IrPropertySymbol -import org.jetbrains.kotlin.name.Name -import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedContainerSource - -internal class PersistentIrProperty( - startOffset: Int, - endOffset: Int, - origin: IrDeclarationOrigin, - override val symbol: IrPropertySymbol, - name: Name, - visibility: DescriptorVisibility, - override val modality: Modality, - isVar: Boolean, - isConst: Boolean, - isLateinit: Boolean, - isDelegated: Boolean, - isExternal: Boolean, - isExpect: Boolean = false, - override val isFakeOverride: Boolean = origin == IrDeclarationOrigin.FAKE_OVERRIDE, - containerSource: DeserializedContainerSource?, - factory: PersistentIrFactory, -) : PersistentIrPropertyCommon( - startOffset, endOffset, origin, name, visibility, isVar, isConst, isLateinit, isDelegated, isExternal, isExpect, - containerSource, factory -) { - init { - symbol.bind(this) - } - - @ObsoleteDescriptorBasedAPI - override val descriptor: PropertyDescriptor - get() = symbol.descriptor -} - -internal class PersistentIrFakeOverrideProperty( - startOffset: Int, - endOffset: Int, - origin: IrDeclarationOrigin, - name: Name, - visibility: DescriptorVisibility, - override var modality: Modality, - isVar: Boolean, - isConst: Boolean, - isLateinit: Boolean, - isDelegated: Boolean, - isExternal: Boolean, - isExpect: Boolean, - factory: PersistentIrFactory, -) : PersistentIrPropertyCommon( - startOffset, endOffset, origin, name, visibility, isVar, isConst, isLateinit, - isDelegated, isExternal, isExpect, - containerSource = null, factory -), IrFakeOverrideProperty { - override val isFakeOverride: Boolean - get() = true - - private var _symbol: IrPropertySymbol? = null - - override val symbol: IrPropertySymbol - get() = _symbol ?: error("$this has not acquired a symbol yet") - - @ObsoleteDescriptorBasedAPI - override val descriptor - get() = _symbol?.descriptor ?: this.toIrBasedDescriptor() - - override val isBound: Boolean - get() = _symbol != null - - @OptIn(ObsoleteDescriptorBasedAPI::class) - override fun acquireSymbol(symbol: IrPropertySymbol): IrProperty { - assert(_symbol == null) { "$this already has symbol _symbol" } - _symbol = symbol - symbol.bind(this) - return this - } -} diff --git a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/carriers/BodyCarrier.kt b/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/carriers/BodyCarrier.kt deleted file mode 100644 index 119d0b617ff..00000000000 --- a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/carriers/BodyCarrier.kt +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license - * that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.declarations.persistent.carriers - -import org.jetbrains.kotlin.ir.declarations.IrDeclaration -import org.jetbrains.kotlin.ir.symbols.IrSymbol -import org.jetbrains.kotlin.utils.addToStdlib.cast - -interface BodyCarrier : Carrier { - var containerFieldSymbol: IrSymbol? - - var containerField: IrDeclaration? - get() = containerFieldSymbol?.owner?.cast() - set(v) { - containerFieldSymbol = v?.symbol - } - - - override fun clone(): BodyCarrier { - return BodyCarrierImpl(lastModified, containerFieldSymbol) - } -} - -internal class BodyCarrierImpl( - override val lastModified: Int, - override var containerFieldSymbol: IrSymbol? -) : BodyCarrier diff --git a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/carriers/Carrier.kt b/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/carriers/Carrier.kt deleted file mode 100644 index 4392d009b1f..00000000000 --- a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/carriers/Carrier.kt +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license - * that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.declarations.persistent.carriers - -interface Carrier { - val lastModified: Int - - fun clone(): Carrier -} diff --git a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/carriers/DeclarationCarrier.kt b/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/carriers/DeclarationCarrier.kt deleted file mode 100644 index 634c24533e3..00000000000 --- a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/declarations/persistent/carriers/DeclarationCarrier.kt +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license - * that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.declarations.persistent.carriers - -import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin -import org.jetbrains.kotlin.ir.declarations.IrDeclarationParent -import org.jetbrains.kotlin.ir.declarations.IrSymbolOwner -import org.jetbrains.kotlin.ir.expressions.IrConstructorCall -import org.jetbrains.kotlin.ir.symbols.IrSymbol -import org.jetbrains.kotlin.utils.addToStdlib.cast - -interface DeclarationCarrier : Carrier { - val parentSymbolField: IrSymbol? - get() = parentField?.cast()?.symbol - - val parentField: IrDeclarationParent? - get() = parentSymbolField?.owner?.cast() - - val originField: IrDeclarationOrigin - val annotationsField: List -} diff --git a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/expressions/persistent/PersistentIrBlockBody.kt b/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/expressions/persistent/PersistentIrBlockBody.kt deleted file mode 100644 index 746d76e0112..00000000000 --- a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/expressions/persistent/PersistentIrBlockBody.kt +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2010-2016 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jetbrains.kotlin.ir.expressions.persistent - -import org.jetbrains.kotlin.ir.IrStatement -import org.jetbrains.kotlin.ir.declarations.IrDeclaration -import org.jetbrains.kotlin.ir.declarations.persistent.PersistentIrBodyBase -import org.jetbrains.kotlin.ir.declarations.persistent.PersistentIrDeclarationBase -import org.jetbrains.kotlin.ir.declarations.persistent.PersistentIrFactory -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.Carrier -import org.jetbrains.kotlin.ir.expressions.IrBlockBody - -internal class PersistentIrBlockBody( - override val startOffset: Int, - override val endOffset: Int, - override val factory: PersistentIrFactory, - override var initializer: (PersistentIrBlockBody.() -> Unit)? = null -) : IrBlockBody(), PersistentIrBodyBase { - override var lastModified: Int = factory.stageController.currentStage - override var loweredUpTo: Int = factory.stageController.currentStage - override var values: Array? = null - override val createdOn: Int = factory.stageController.currentStage - - override var containerField: IrDeclaration? = null - - constructor(startOffset: Int, endOffset: Int, statements: List, factory: PersistentIrFactory) : this(startOffset, endOffset, factory) { - statementsField.addAll(statements) - } - - private var statementsField: MutableList = ArrayList() - - override val statements: MutableList - get() = checkEnabled { statementsField } - - private val hashCodeValue: Int = PersistentIrDeclarationBase.hashCodeCounter++ - override fun hashCode(): Int = hashCodeValue - override fun equals(other: Any?): Boolean = (this === other) -} diff --git a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/expressions/persistent/PersistentIrExpressionBody.kt b/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/expressions/persistent/PersistentIrExpressionBody.kt deleted file mode 100644 index c2bea677211..00000000000 --- a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/expressions/persistent/PersistentIrExpressionBody.kt +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2010-2016 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jetbrains.kotlin.ir.expressions.persistent - -import org.jetbrains.kotlin.ir.declarations.IrDeclaration -import org.jetbrains.kotlin.ir.declarations.persistent.PersistentIrBodyBase -import org.jetbrains.kotlin.ir.declarations.persistent.PersistentIrDeclarationBase -import org.jetbrains.kotlin.ir.declarations.persistent.PersistentIrFactory -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.Carrier -import org.jetbrains.kotlin.ir.expressions.IrExpression -import org.jetbrains.kotlin.ir.expressions.IrExpressionBody - -internal class PersistentIrExpressionBody private constructor( - override val startOffset: Int, - override val endOffset: Int, - override val factory: PersistentIrFactory, - private var expressionField: IrExpression? = null, - override var initializer: (PersistentIrExpressionBody.() -> Unit)? = null, -) : IrExpressionBody(), PersistentIrBodyBase { - override var lastModified: Int = factory.stageController.currentStage - override var loweredUpTo: Int = factory.stageController.currentStage - override var values: Array? = null - override val createdOn: Int = factory.stageController.currentStage - - override var containerField: IrDeclaration? = null - - constructor(expression: IrExpression, factory: PersistentIrFactory) : this(expression.startOffset, expression.endOffset, factory, expression, null) - - constructor(startOffset: Int, endOffset: Int, expression: IrExpression,factory: PersistentIrFactory) : this(startOffset, endOffset, factory, expression, null) - - constructor(startOffset: Int, endOffset: Int, factory: PersistentIrFactory, initializer: IrExpressionBody.() -> Unit) : - this(startOffset, endOffset, factory, null, initializer) - - override var expression: IrExpression - get() = checkEnabled { expressionField!! } - set(e) { - checkEnabled { expressionField = e } - } - - private val hashCodeValue: Int = PersistentIrDeclarationBase.hashCodeCounter++ - override fun hashCode(): Int = hashCodeValue - override fun equals(other: Any?): Boolean = (this === other) -} diff --git a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/serialization/CarrierDeserializer.kt b/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/serialization/CarrierDeserializer.kt deleted file mode 100644 index bf32845056f..00000000000 --- a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/serialization/CarrierDeserializer.kt +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -/* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.serialization - -import org.jetbrains.kotlin.backend.common.serialization.IrDeclarationDeserializer -import org.jetbrains.kotlin.backend.common.serialization.codedInputStream -import org.jetbrains.kotlin.backend.common.serialization.proto.PirBodyCarrier -import org.jetbrains.kotlin.ir.UNDEFINED_OFFSET -import org.jetbrains.kotlin.ir.declarations.IrDeclaration -import org.jetbrains.kotlin.ir.declarations.persistent.* -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.BodyCarrier -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.BodyCarrierImpl -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.Carrier -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.DeclarationCarrier -import org.jetbrains.kotlin.ir.expressions.IrBlockBody -import org.jetbrains.kotlin.ir.expressions.IrBody -import org.jetbrains.kotlin.ir.expressions.IrExpressionBody -import org.jetbrains.kotlin.ir.expressions.IrSyntheticBodyKind -import org.jetbrains.kotlin.ir.expressions.impl.IrSyntheticBodyImpl -import org.jetbrains.kotlin.ir.util.IdSignature -import org.jetbrains.kotlin.library.impl.IrArrayMemoryReader -import org.jetbrains.kotlin.library.impl.IrIntArrayMemoryReader -import org.jetbrains.kotlin.protobuf.ExtensionRegistryLite -import kotlin.collections.set - -class CarrierDeserializer( - val declarationDeserializer: IrDeclarationDeserializer, - val serializedCarriers: SerializedCarriers, -) { - private val carrierDeserializerImpl = - IrCarrierDeserializerImpl(declarationDeserializer, ::deserializeBody, ::deserializeExpressionBody) - - private val blockBodyCache = mutableMapOf() - - private fun deserializeBody(index: Int): IrBody = blockBodyCache.getOrPut(index) { - when (index) { - -1 -> IrSyntheticBodyImpl(UNDEFINED_OFFSET, UNDEFINED_OFFSET, IrSyntheticBodyKind.ENUM_VALUEOF) - -2 -> IrSyntheticBodyImpl(UNDEFINED_OFFSET, UNDEFINED_OFFSET, IrSyntheticBodyKind.ENUM_VALUES) - else -> (declarationDeserializer.deserializeStatementBody(index) as IrBlockBody).also { - injectCarriers(it, index) - } - } - - } - - private val expressionBodyCache = mutableMapOf() - - private fun deserializeExpressionBody(index: Int): IrExpressionBody = expressionBodyCache.getOrPut(index) { - declarationDeserializer.deserializeExpressionBody(index)!!.also { - injectCarriers(it, index) - } - } - - private val signatureToIndex = mutableMapOf().also { map -> - IrIntArrayMemoryReader(serializedCarriers.signatures).array.forEachIndexed { i, index -> - val idSig = declarationDeserializer.symbolDeserializer.deserializeIdSignature(index) - map[idSig] = i - } - } - - private val declarationReader = IrArrayMemoryReader(serializedCarriers.declarationCarriers) - private val bodyReader = IrArrayMemoryReader(serializedCarriers.bodyCarriers) - private val removedOnReader = IrIntArrayMemoryReader(serializedCarriers.removedOn) - - fun injectCarriers(declaration: IrDeclaration, signature: IdSignature) { - if (declaration is PersistentIrDeclarationBase<*>) { - when (declaration) { - is PersistentIrAnonymousInitializer -> declaration.load(signature, carrierDeserializerImpl::deserializeAnonymousInitializerCarrier) - is PersistentIrClass -> declaration.load(signature, carrierDeserializerImpl::deserializeClassCarrier) - is PersistentIrConstructor -> declaration.load(signature, carrierDeserializerImpl::deserializeConstructorCarrier) - is PersistentIrEnumEntry -> declaration.load(signature, carrierDeserializerImpl::deserializeEnumEntryCarrier) - is PersistentIrErrorDeclaration -> declaration.load(signature, carrierDeserializerImpl::deserializeErrorDeclarationCarrier) - is PersistentIrField -> declaration.load(signature, carrierDeserializerImpl::deserializeFieldCarrier) - is PersistentIrFunctionCommon -> declaration.load(signature, carrierDeserializerImpl::deserializeFunctionCarrier) - is PersistentIrLocalDelegatedProperty -> declaration.load(signature, carrierDeserializerImpl::deserializeLocalDelegatedPropertyCarrier) - is PersistentIrPropertyCommon -> declaration.load(signature, carrierDeserializerImpl::deserializePropertyCarrier) - is PersistentIrTypeAlias -> declaration.load(signature, carrierDeserializerImpl::deserializeTypeAliasCarrier) - is PersistentIrTypeParameter -> declaration.load(signature, carrierDeserializerImpl::deserializeTypeParameterCarrier) - is PersistentIrValueParameter -> declaration.load(signature, carrierDeserializerImpl::deserializeValueParameterCarrier) - else -> error("unknown declaration type: ${declaration::class.qualifiedName}") - } - } - } - - fun injectCarriers(body: IrBody, index: Int) { - if (body is PersistentIrBodyBase<*>) { - val bodyCarriers = bodyReader.tableItemBytes(index) - - val carriers = IrArrayMemoryReader(bodyCarriers).mapToArray { bodyBytes -> - val bodyProto = PirBodyCarrier.parseFrom(bodyBytes.codedInputStream, ExtensionRegistryLite.newInstance()) - deserializeBodyCarrier(bodyProto) - } - - body.load(carriers) - } - } - - private inline fun PersistentIrDeclarationBase.load(signature: IdSignature, fn: (ByteArray) -> C) { - val index = signatureToIndex[signature] ?: return -// ?: error("Not found: $signature") - - val bodyCarriers = declarationReader.tableItemBytes(index) - - load(IrArrayMemoryReader(bodyCarriers).mapToArray(fn)) - - removedOn = removedOnReader.array[index] - } - - private inline fun PersistentIrElementBase.load(carriers: Array) { - if (carriers.isNotEmpty()) { - @Suppress("UNCHECKED_CAST") - this.values = carriers as Array - // pretend to be lowered "all the way" - // TODO: make less hacky? - this.lastModified = 1000 - } - } - - private fun deserializeBodyCarrier(proto: PirBodyCarrier): BodyCarrier { - return BodyCarrierImpl( - proto.lastModified, - if (proto.hasContainerFieldSymbol()) declarationDeserializer.symbolDeserializer.deserializeIrSymbol(proto.containerFieldSymbol) else null, - ) - } -} - -private inline fun IrArrayMemoryReader.mapToArray(fn: (ByteArray) -> T): Array { - return Array(entryCount()) { i -> - fn(tableItemBytes(i)) - } -} \ No newline at end of file diff --git a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/serialization/CarrierSerializer.kt b/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/serialization/CarrierSerializer.kt deleted file mode 100644 index e5692d5450c..00000000000 --- a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/serialization/CarrierSerializer.kt +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -/* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.serialization - -import org.jetbrains.kotlin.backend.common.serialization.IrFileSerializer -import org.jetbrains.kotlin.backend.common.serialization.proto.PirBodyCarrier -import org.jetbrains.kotlin.ir.declarations.IrDeclaration -import org.jetbrains.kotlin.ir.declarations.persistent.PersistentIrBodyBase -import org.jetbrains.kotlin.ir.declarations.persistent.PersistentIrDeclarationBase -import org.jetbrains.kotlin.ir.declarations.persistent.PersistentIrElementBase -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.* -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.AnonymousInitializerCarrier -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.ClassCarrier -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.ConstructorCarrier -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.EnumEntryCarrier -import org.jetbrains.kotlin.ir.declarations.persistent.carriers.ErrorDeclarationCarrier -import org.jetbrains.kotlin.ir.expressions.IrBody -import org.jetbrains.kotlin.ir.expressions.IrSyntheticBody -import org.jetbrains.kotlin.ir.expressions.IrSyntheticBodyKind -import org.jetbrains.kotlin.ir.util.IdSignature -import org.jetbrains.kotlin.library.impl.IrMemoryArrayWriter -import org.jetbrains.kotlin.library.impl.IrMemoryIntArrayWriter - -class SerializedCarriers( - val signatures: ByteArray, - val declarationCarriers: ByteArray, - val bodyCarriers: ByteArray, - val removedOn: ByteArray, -) - -// Declarations are references by signatures, bodies are referenced by index. -fun IrFileSerializer.serializeCarriers(declarations: Iterable, bodies: List, signaturer: (IrDeclaration) -> IdSignature): SerializedCarriers { - val serializer = CarrierSerializer(this, bodies, signaturer) - - declarations.forEach { serializer.serializeDeclarationCarrier(it) } - bodies.forEach { serializer.serializeBodyCarriers(it) } - - return serializer.build() -} - -private class CarrierSerializer(val fileSerializer: IrFileSerializer, bodies: List, val signaturer: (IrDeclaration) -> IdSignature) { - - private val bodyToIndex = mutableMapOf().also { map -> - bodies.forEachIndexed { index, irBody -> - map[irBody] = index - } - } - - private val serializerImpl = IrCarrierSerializerImpl(fileSerializer) { - if (it is IrSyntheticBody) { - when (it.kind) { - IrSyntheticBodyKind.ENUM_VALUEOF -> -1 - IrSyntheticBodyKind.ENUM_VALUES -> -2 - } - } else bodyToIndex[it] - ?: error("") - } - - val signatures = mutableListOf() - val declarationCarriers = mutableListOf() - val bodyCarriers = mutableListOf() - val removedOn = mutableListOf() - - fun build(): SerializedCarriers { - return SerializedCarriers( - IrMemoryIntArrayWriter(signatures).writeIntoMemory(), - IrMemoryArrayWriter(declarationCarriers).writeIntoMemory(), - IrMemoryArrayWriter(bodyCarriers).writeIntoMemory(), - IrMemoryIntArrayWriter(removedOn).writeIntoMemory(), - ) - } - - fun serializeDeclarationCarrier(declaration: IrDeclaration) { - if (declaration is PersistentIrDeclarationBase<*>) { - // TODO proper signature calculations? - val signature = signaturer(declaration) - signatures += fileSerializer.protoIdSignature(signature) - declarationCarriers += serializeCarriers(declaration) - removedOn += declaration.removedOn - } // else -> TODO? - } - - fun serializeBodyCarriers(body: IrBody) { - if (body is PersistentIrBodyBase<*>) { - bodyCarriers += serializeCarriers(body) - } - } - - private fun serializeCarriers(element: PersistentIrElementBase<*>): ByteArray { - val carriers = with(serializerImpl) { - // Serialize all state - // TODO maybe skip state in the initial declarations? - val values = ((element.values ?: arrayOf()) + element) - values.map { - when (it) { - is AnonymousInitializerCarrier -> serializeAnonymousInitializerCarrier(it) - is ClassCarrier -> serializeClassCarrier(it) - is ConstructorCarrier -> serializeConstructorCarrier(it) - is EnumEntryCarrier -> serializeEnumEntryCarrier(it) - is ErrorDeclarationCarrier -> serializeErrorDeclarationCarrier(it) - is FieldCarrier -> serializeFieldCarrier(it) - is FunctionCarrier -> serializeFunctionCarrier(it) - is LocalDelegatedPropertyCarrier -> serializeLocalDelegatedPropertyCarrier(it) - is PropertyCarrier -> serializePropertyCarrier(it) - is TypeAliasCarrier -> serializeTypeAliasCarrier(it) - is TypeParameterCarrier -> serializeTypeParameterCarrier(it) - is ValueParameterCarrier -> serializeValueParameterCarrier(it) - is BodyCarrier -> serializeBodyCarrier(it) - else -> error("unknown Carrier") - } - } - } - - return IrMemoryArrayWriter(carriers).writeIntoMemory() - } - - private fun serializeBodyCarrier(bodyCarrier: BodyCarrier): ByteArray { - val proto = PirBodyCarrier.newBuilder() - proto.lastModified = bodyCarrier.lastModified - bodyCarrier.containerFieldSymbol?.let { proto.containerFieldSymbol = serializerImpl.fileSerializer.serializeIrSymbol(it) } - return proto.build().toByteArray() - } -} \ No newline at end of file diff --git a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/serialization/IrCarrierDeserializerImpl.kt b/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/serialization/IrCarrierDeserializerImpl.kt deleted file mode 100644 index b8a5d4681db..00000000000 --- a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/serialization/IrCarrierDeserializerImpl.kt +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.serialization - -import org.jetbrains.kotlin.backend.common.serialization.IrDeclarationDeserializer -import org.jetbrains.kotlin.backend.common.serialization.IrFlags -import org.jetbrains.kotlin.descriptors.DescriptorVisibility -import org.jetbrains.kotlin.descriptors.InlineClassRepresentation -import org.jetbrains.kotlin.descriptors.Modality -import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin -import org.jetbrains.kotlin.ir.declarations.IrVariable -import org.jetbrains.kotlin.ir.expressions.IrBlockBody -import org.jetbrains.kotlin.ir.expressions.IrBody -import org.jetbrains.kotlin.ir.expressions.IrConstructorCall -import org.jetbrains.kotlin.ir.expressions.IrExpressionBody -import org.jetbrains.kotlin.ir.symbols.* -import org.jetbrains.kotlin.ir.types.IrSimpleType -import org.jetbrains.kotlin.ir.types.IrType -import org.jetbrains.kotlin.serialization.deserialization.ProtoEnumFlags -import org.jetbrains.kotlin.serialization.deserialization.descriptorVisibility -import org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall as ProtoIrConstructorCall -import org.jetbrains.kotlin.backend.common.serialization.proto.IrInlineClassRepresentation as ProtoIrInlineClassRepresentation -import org.jetbrains.kotlin.backend.common.serialization.proto.IrVariable as ProtoIrVariable - -internal class IrCarrierDeserializerImpl( - val declarationDeserializer: IrDeclarationDeserializer, - val indexToBody: (Int) -> IrBody, - val indexToExpressionBody: (Int) -> IrExpressionBody -) : IrCarrierDeserializer() { - override fun deserializeParentSymbol(proto: Long): IrSymbol { - return declarationDeserializer.symbolDeserializer.deserializeIrSymbol(proto) - } - - override fun deserializeOrigin(proto: Int): IrDeclarationOrigin { - return declarationDeserializer.deserializeIrDeclarationOrigin(proto) - } - - override fun deserializeAnnotation(proto: ProtoIrConstructorCall): IrConstructorCall { - return declarationDeserializer.bodyDeserializer.deserializeAnnotation(proto) - } - - override fun deserializeBody(proto: Int): IrBody { - return indexToBody(proto) - } - - override fun deserializeBlockBody(proto: Int): IrBlockBody { - return indexToBody(proto) as IrBlockBody - } - - override fun deserializeExpressionBody(proto: Int): IrExpressionBody { - return indexToExpressionBody(proto) - } - - override fun deserializeValueParameter(proto: Long): IrValueParameterSymbol { - return declarationDeserializer.symbolDeserializer.deserializeIrSymbol(proto) as IrValueParameterSymbol - } - - override fun deserializeTypeParameter(proto: Long): IrTypeParameterSymbol { - return declarationDeserializer.symbolDeserializer.deserializeIrSymbol(proto) as IrTypeParameterSymbol - } - - override fun deserializeSuperType(proto: Int): IrType { - return declarationDeserializer.deserializeIrType(proto) - } - - override fun deserializeSealedSubclass(proto: Long): IrClassSymbol { - return declarationDeserializer.symbolDeserializer.deserializeIrSymbol(proto) as IrClassSymbol - } - - override fun deserializeType(proto: Int): IrType { - return declarationDeserializer.deserializeIrType(proto) - } - - override fun deserializeClass(proto: Long): IrClassSymbol { - return declarationDeserializer.symbolDeserializer.deserializeIrSymbol(proto) as IrClassSymbol - } - - override fun deserializePropertySymbol(proto: Long): IrPropertySymbol { - return declarationDeserializer.symbolDeserializer.deserializeIrSymbol(proto) as IrPropertySymbol - } - - override fun deserializeSimpleFunction(proto: Long): IrSimpleFunctionSymbol { - return declarationDeserializer.symbolDeserializer.deserializeIrSymbol(proto) as IrSimpleFunctionSymbol - } - - override fun deserializeSimpleFunctionSymbol(proto: Long): IrSimpleFunctionSymbol { - return declarationDeserializer.symbolDeserializer.deserializeIrSymbol(proto) as IrSimpleFunctionSymbol - } - - override fun deserializeField(proto: Long): IrFieldSymbol { - return declarationDeserializer.symbolDeserializer.deserializeIrSymbol(proto) as IrFieldSymbol - } - - override fun deserializeVariable(proto: ProtoIrVariable): IrVariable { - return declarationDeserializer.deserializeIrVariable(proto) - } - - override fun deserializeVisibility(proto: Long): DescriptorVisibility { - return ProtoEnumFlags.descriptorVisibility(IrFlags.VISIBILITY.get(proto.toInt())) - } - - override fun deserializeModality(proto: Long): Modality { - return ProtoEnumFlags.modality(IrFlags.MODALITY.get(proto.toInt())) - } - - override fun deserializeInlineClassRepresentation(proto: ProtoIrInlineClassRepresentation): InlineClassRepresentation { - return declarationDeserializer.deserializeInlineClassRepresentation(proto) - } - - override fun deserializeIsExternalClass(proto: Long): Boolean { - return IrFlags.IS_EXTERNAL_CLASS.get(proto.toInt()) - } - - override fun deserializeIsExternalField(proto: Long): Boolean { - return IrFlags.IS_EXTERNAL_FIELD.get(proto.toInt()) - } - - override fun deserializeIsExternalFunction(proto: Long): Boolean { - return IrFlags.IS_EXTERNAL_FUNCTION.get(proto.toInt()) - } - - override fun deserializeIsExternalProperty(proto: Long): Boolean { - return IrFlags.IS_EXTERNAL_PROPERTY.get(proto.toInt()) - } -} diff --git a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/serialization/IrCarrierSerializerImpl.kt b/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/serialization/IrCarrierSerializerImpl.kt deleted file mode 100644 index c57e2dcc16c..00000000000 --- a/compiler/ir/ir.tree.persistent/src/org/jetbrains/kotlin/ir/serialization/IrCarrierSerializerImpl.kt +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.ir.serialization - -import org.jetbrains.kotlin.backend.common.serialization.IrFileSerializer -import org.jetbrains.kotlin.backend.common.serialization.IrFlags -import org.jetbrains.kotlin.descriptors.DescriptorVisibility -import org.jetbrains.kotlin.descriptors.InlineClassRepresentation -import org.jetbrains.kotlin.descriptors.Modality -import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin -import org.jetbrains.kotlin.ir.declarations.IrVariable -import org.jetbrains.kotlin.ir.expressions.IrBlockBody -import org.jetbrains.kotlin.ir.expressions.IrBody -import org.jetbrains.kotlin.ir.expressions.IrConstructorCall -import org.jetbrains.kotlin.ir.expressions.IrExpressionBody -import org.jetbrains.kotlin.ir.symbols.* -import org.jetbrains.kotlin.ir.types.IrSimpleType -import org.jetbrains.kotlin.ir.types.IrType -import org.jetbrains.kotlin.metadata.deserialization.Flags -import org.jetbrains.kotlin.serialization.deserialization.ProtoEnumFlags -import org.jetbrains.kotlin.serialization.deserialization.descriptorVisibility -import org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall as ProtoIrConstructorCall -import org.jetbrains.kotlin.backend.common.serialization.proto.IrInlineClassRepresentation as ProtoIrInlineClassRepresentation -import org.jetbrains.kotlin.backend.common.serialization.proto.IrVariable as ProtoIrVariable - -internal class IrCarrierSerializerImpl(val fileSerializer: IrFileSerializer, val bodyIndex: (IrBody) -> Int) : IrCarrierSerializer() { - override fun serializeParentSymbol(value: IrSymbol): Long { - return fileSerializer.serializeIrSymbol(value) - } - - override fun serializeOrigin(value: IrDeclarationOrigin): Int { - return fileSerializer.serializeIrDeclarationOrigin(value) - } - - override fun serializeAnnotation(value: IrConstructorCall): ProtoIrConstructorCall { - return fileSerializer.serializeConstructorCall(value) - } - - override fun serializeBody(value: IrBody): Int { - return bodyIndex(value) - } - - override fun serializeBlockBody(value: IrBlockBody): Int { - return serializeBody(value) - } - - override fun serializeExpressionBody(value: IrExpressionBody): Int { - return serializeBody(value) - } - - override fun serializeValueParameter(value: IrValueParameterSymbol): Long { - return fileSerializer.serializeIrSymbol(value) - } - - override fun serializeTypeParameter(value: IrTypeParameterSymbol): Long { - return fileSerializer.serializeIrSymbol(value) - } - - override fun serializeSuperType(value: IrType): Int { - return fileSerializer.serializeIrType(value) - } - - override fun serializeSealedSubclass(value: IrClassSymbol): Long { - return fileSerializer.serializeIrSymbol(value) - } - - override fun serializeType(value: IrType): Int { - return fileSerializer.serializeIrType(value) - } - - override fun serializeClass(value: IrClassSymbol): Long { - return fileSerializer.serializeIrSymbol(value) - } - - override fun serializePropertySymbol(value: IrPropertySymbol): Long { - return fileSerializer.serializeIrSymbol(value) - } - - override fun serializeSimpleFunction(value: IrSimpleFunctionSymbol): Long { - return fileSerializer.serializeIrSymbol(value) - } - - override fun serializeSimpleFunctionSymbol(value: IrSimpleFunctionSymbol): Long { - return fileSerializer.serializeIrSymbol(value) - } - - override fun serializeField(value: IrFieldSymbol): Long { - return fileSerializer.serializeIrSymbol(value) - } - - override fun serializeVariable(value: IrVariable): ProtoIrVariable { - return fileSerializer.serializeIrVariable(value) - } - - override fun serializeVisibility(value: DescriptorVisibility): Long { - return Flags.VISIBILITY.toFlags(ProtoEnumFlags.descriptorVisibility(value)).toLong() - } - - override fun serializeModality(value: Modality): Long { - return Flags.MODALITY.toFlags(ProtoEnumFlags.modality(value)).toLong() - } - - override fun serializeInlineClassRepresentation(value: InlineClassRepresentation): ProtoIrInlineClassRepresentation { - return fileSerializer.serializeInlineClassRepresentation(value) - } - - override fun serializeIsExternalClass(value: Boolean): Long { - return IrFlags.IS_EXTERNAL_CLASS.toFlags(value).toLong() - } - - override fun serializeIsExternalField(value: Boolean): Long { - return IrFlags.IS_EXTERNAL_FIELD.toFlags(value).toLong() - } - - override fun serializeIsExternalFunction(value: Boolean): Long { - return IrFlags.IS_EXTERNAL_FUNCTION.toFlags(value).toLong() - } - - override fun serializeIsExternalProperty(value: Boolean): Long { - return IrFlags.IS_EXTERNAL_PROPERTY.toFlags(value).toLong() - } -} diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/IrFactory.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/IrFactory.kt index a994ec75ff7..3d7b8b93a58 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/IrFactory.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/declarations/IrFactory.kt @@ -239,6 +239,4 @@ interface IrFactory { endOffset: Int, initializer: IrBlockBody.() -> Unit, ): IrBlockBody - - fun unlistFunction(f: IrFunction) {} } diff --git a/compiler/ir/serialization.common/src/KotlinPirCarriers.proto b/compiler/ir/serialization.common/src/KotlinPirCarriers.proto deleted file mode 100644 index 390649b74ac..00000000000 --- a/compiler/ir/serialization.common/src/KotlinPirCarriers.proto +++ /dev/null @@ -1,136 +0,0 @@ -syntax = "proto2"; -package org.jetbrains.kotlin.backend.common.serialization.proto; - -option java_multiple_files = true; -option java_outer_classname = "KotlinIr"; -option optimize_for = LITE_RUNTIME; - -import "compiler/ir/serialization.common/src/KotlinIr.proto"; - -// Auto-generated by compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/persistentIrGenerator/Main.kt. DO NOT EDIT! - -message PirAnonymousInitializerCarrier { - required int32 lastModified = 1; - optional int64 parentSymbol = 2; - optional int32 origin = 3; - repeated IrConstructorCall annotation = 4; - optional int32 body = 5; -} - -message PirClassCarrier { - required int32 lastModified = 1; - optional int64 parentSymbol = 2; - optional int32 origin = 3; - repeated IrConstructorCall annotation = 4; - optional int64 thisReceiver = 5; - repeated int64 typeParameters = 6; - repeated int32 superTypes = 7; - optional IrInlineClassRepresentation inlineClassRepresentation = 8; - repeated int64 sealedSubclasses = 9; - optional int64 flags = 10 [default = 0]; -} - -message PirConstructorCarrier { - required int32 lastModified = 1; - optional int64 parentSymbol = 2; - optional int32 origin = 3; - repeated IrConstructorCall annotation = 4; - required int32 returnTypeField = 5; - optional int64 dispatchReceiverParameter = 6; - optional int64 extensionReceiverParameter = 7; - optional int32 body = 8; - repeated int64 typeParameters = 9; - repeated int64 valueParameters = 10; - optional int64 flags = 11 [default = 0]; -} - -message PirEnumEntryCarrier { - required int32 lastModified = 1; - optional int64 parentSymbol = 2; - optional int32 origin = 3; - repeated IrConstructorCall annotation = 4; - optional int64 correspondingClass = 5; - optional int32 initializerExpression = 6; -} - -message PirErrorDeclarationCarrier { - required int32 lastModified = 1; - optional int64 parentSymbol = 2; - optional int32 origin = 3; - repeated IrConstructorCall annotation = 4; -} - -message PirFieldCarrier { - required int32 lastModified = 1; - optional int64 parentSymbol = 2; - optional int32 origin = 3; - repeated IrConstructorCall annotation = 4; - required int32 type = 5; - optional int32 initializer = 6; - optional int64 correspondingPropertySymbol = 7; -} - -message PirFunctionCarrier { - required int32 lastModified = 1; - optional int64 parentSymbol = 2; - optional int32 origin = 3; - repeated IrConstructorCall annotation = 4; - required int32 returnTypeField = 5; - optional int64 dispatchReceiverParameter = 6; - optional int64 extensionReceiverParameter = 7; - optional int32 body = 8; - repeated int64 typeParameters = 9; - repeated int64 valueParameters = 10; - optional int64 correspondingPropertySymbol = 11; - repeated int64 overriddenSymbols = 12; - optional int64 flags = 13 [default = 0]; -} - -message PirLocalDelegatedPropertyCarrier { - required int32 lastModified = 1; - optional int64 parentSymbol = 2; - optional int32 origin = 3; - repeated IrConstructorCall annotation = 4; - required int32 type = 5; - optional IrVariable delegate = 6; - optional int64 getter = 7; - optional int64 setter = 8; -} - -message PirPropertyCarrier { - required int32 lastModified = 1; - optional int64 parentSymbol = 2; - optional int32 origin = 3; - repeated IrConstructorCall annotation = 4; - optional int64 backingField = 5; - optional int64 getter = 6; - optional int64 setter = 7; - repeated int64 overriddenSymbols = 8; -} - -message PirTypeAliasCarrier { - required int32 lastModified = 1; - optional int64 parentSymbol = 2; - optional int32 origin = 3; - repeated IrConstructorCall annotation = 4; - repeated int64 typeParameters = 5; - required int32 expandedType = 6; -} - -message PirTypeParameterCarrier { - required int32 lastModified = 1; - optional int64 parentSymbol = 2; - optional int32 origin = 3; - repeated IrConstructorCall annotation = 4; - repeated int32 superTypes = 5; -} - -message PirValueParameterCarrier { - required int32 lastModified = 1; - optional int64 parentSymbol = 2; - optional int32 origin = 3; - repeated IrConstructorCall annotation = 4; - optional int32 defaultValue = 5; - required int32 type = 6; - optional int32 varargElementType = 7; -} diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirAnonymousInitializerCarrier.java b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirAnonymousInitializerCarrier.java deleted file mode 100644 index cb341254a47..00000000000 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirAnonymousInitializerCarrier.java +++ /dev/null @@ -1,766 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: compiler/ir/serialization.common/src/KotlinPirCarriers.proto - -package org.jetbrains.kotlin.backend.common.serialization.proto; - -/** - * Protobuf type {@code org.jetbrains.kotlin.backend.common.serialization.proto.PirAnonymousInitializerCarrier} - */ -public final class PirAnonymousInitializerCarrier extends - org.jetbrains.kotlin.protobuf.GeneratedMessageLite implements - // @@protoc_insertion_point(message_implements:org.jetbrains.kotlin.backend.common.serialization.proto.PirAnonymousInitializerCarrier) - PirAnonymousInitializerCarrierOrBuilder { - // Use PirAnonymousInitializerCarrier.newBuilder() to construct. - private PirAnonymousInitializerCarrier(org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private PirAnonymousInitializerCarrier(boolean noInit) { this.unknownFields = org.jetbrains.kotlin.protobuf.ByteString.EMPTY;} - - private static final PirAnonymousInitializerCarrier defaultInstance; - public static PirAnonymousInitializerCarrier getDefaultInstance() { - return defaultInstance; - } - - public PirAnonymousInitializerCarrier getDefaultInstanceForType() { - return defaultInstance; - } - - private final org.jetbrains.kotlin.protobuf.ByteString unknownFields; - private PirAnonymousInitializerCarrier( - 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 8: { - bitField0_ |= 0x00000001; - lastModified_ = input.readInt32(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - parentSymbol_ = input.readInt64(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - origin_ = input.readInt32(); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - annotation_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - annotation_.add(input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.PARSER, extensionRegistry)); - break; - } - case 40: { - bitField0_ |= 0x00000008; - body_ = input.readInt32(); - 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_ & 0x00000008) == 0x00000008)) { - annotation_ = java.util.Collections.unmodifiableList(annotation_); - } - try { - unknownFieldsCodedOutput.flush(); - } catch (java.io.IOException e) { - // Should not happen - } finally { - unknownFields = unknownFieldsOutput.toByteString(); - } - makeExtensionsImmutable(); - } - } - public static org.jetbrains.kotlin.protobuf.Parser PARSER = - new org.jetbrains.kotlin.protobuf.AbstractParser() { - public PirAnonymousInitializerCarrier parsePartialFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return new PirAnonymousInitializerCarrier(input, extensionRegistry); - } - }; - - @java.lang.Override - public org.jetbrains.kotlin.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - public static final int LASTMODIFIED_FIELD_NUMBER = 1; - private int lastModified_; - /** - * required int32 lastModified = 1; - */ - public boolean hasLastModified() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required int32 lastModified = 1; - */ - public int getLastModified() { - return lastModified_; - } - - public static final int PARENTSYMBOL_FIELD_NUMBER = 2; - private long parentSymbol_; - /** - * optional int64 parentSymbol = 2; - */ - public boolean hasParentSymbol() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional int64 parentSymbol = 2; - */ - public long getParentSymbol() { - return parentSymbol_; - } - - public static final int ORIGIN_FIELD_NUMBER = 3; - private int origin_; - /** - * optional int32 origin = 3; - */ - public boolean hasOrigin() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int32 origin = 3; - */ - public int getOrigin() { - return origin_; - } - - public static final int ANNOTATION_FIELD_NUMBER = 4; - private java.util.List annotation_; - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public java.util.List getAnnotationList() { - return annotation_; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public java.util.List - getAnnotationOrBuilderList() { - return annotation_; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public int getAnnotationCount() { - return annotation_.size(); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index) { - return annotation_.get(index); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCallOrBuilder getAnnotationOrBuilder( - int index) { - return annotation_.get(index); - } - - public static final int BODY_FIELD_NUMBER = 5; - private int body_; - /** - * optional int32 body = 5; - */ - public boolean hasBody() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional int32 body = 5; - */ - public int getBody() { - return body_; - } - - private void initFields() { - lastModified_ = 0; - parentSymbol_ = 0L; - origin_ = 0; - annotation_ = java.util.Collections.emptyList(); - body_ = 0; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (!hasLastModified()) { - memoizedIsInitialized = 0; - return false; - } - for (int i = 0; i < getAnnotationCount(); i++) { - if (!getAnnotation(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(org.jetbrains.kotlin.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeInt32(1, lastModified_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeInt64(2, parentSymbol_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeInt32(3, origin_); - } - for (int i = 0; i < annotation_.size(); i++) { - output.writeMessage(4, annotation_.get(i)); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeInt32(5, body_); - } - 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 - .computeInt32Size(1, lastModified_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt64Size(2, parentSymbol_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt32Size(3, origin_); - } - for (int i = 0; i < annotation_.size(); i++) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeMessageSize(4, annotation_.get(i)); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt32Size(5, body_); - } - size += unknownFields.size(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirAnonymousInitializerCarrier parseFrom( - org.jetbrains.kotlin.protobuf.ByteString data) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirAnonymousInitializerCarrier parseFrom( - org.jetbrains.kotlin.protobuf.ByteString data, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirAnonymousInitializerCarrier parseFrom(byte[] data) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirAnonymousInitializerCarrier parseFrom( - byte[] data, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirAnonymousInitializerCarrier parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirAnonymousInitializerCarrier parseFrom( - java.io.InputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirAnonymousInitializerCarrier parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirAnonymousInitializerCarrier parseDelimitedFrom( - java.io.InputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirAnonymousInitializerCarrier parseFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirAnonymousInitializerCarrier parseFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.jetbrains.kotlin.backend.common.serialization.proto.PirAnonymousInitializerCarrier prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - /** - * Protobuf type {@code org.jetbrains.kotlin.backend.common.serialization.proto.PirAnonymousInitializerCarrier} - */ - public static final class Builder extends - org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder< - org.jetbrains.kotlin.backend.common.serialization.proto.PirAnonymousInitializerCarrier, Builder> - implements - // @@protoc_insertion_point(builder_implements:org.jetbrains.kotlin.backend.common.serialization.proto.PirAnonymousInitializerCarrier) - org.jetbrains.kotlin.backend.common.serialization.proto.PirAnonymousInitializerCarrierOrBuilder { - // Construct using org.jetbrains.kotlin.backend.common.serialization.proto.PirAnonymousInitializerCarrier.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - lastModified_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - parentSymbol_ = 0L; - bitField0_ = (bitField0_ & ~0x00000002); - origin_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - annotation_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - body_ = 0; - bitField0_ = (bitField0_ & ~0x00000010); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public org.jetbrains.kotlin.backend.common.serialization.proto.PirAnonymousInitializerCarrier getDefaultInstanceForType() { - return org.jetbrains.kotlin.backend.common.serialization.proto.PirAnonymousInitializerCarrier.getDefaultInstance(); - } - - public org.jetbrains.kotlin.backend.common.serialization.proto.PirAnonymousInitializerCarrier build() { - org.jetbrains.kotlin.backend.common.serialization.proto.PirAnonymousInitializerCarrier result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.jetbrains.kotlin.backend.common.serialization.proto.PirAnonymousInitializerCarrier buildPartial() { - org.jetbrains.kotlin.backend.common.serialization.proto.PirAnonymousInitializerCarrier result = new org.jetbrains.kotlin.backend.common.serialization.proto.PirAnonymousInitializerCarrier(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.lastModified_ = lastModified_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.parentSymbol_ = parentSymbol_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.origin_ = origin_; - if (((bitField0_ & 0x00000008) == 0x00000008)) { - annotation_ = java.util.Collections.unmodifiableList(annotation_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.annotation_ = annotation_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000008; - } - result.body_ = body_; - result.bitField0_ = to_bitField0_; - return result; - } - - public Builder mergeFrom(org.jetbrains.kotlin.backend.common.serialization.proto.PirAnonymousInitializerCarrier other) { - if (other == org.jetbrains.kotlin.backend.common.serialization.proto.PirAnonymousInitializerCarrier.getDefaultInstance()) return this; - if (other.hasLastModified()) { - setLastModified(other.getLastModified()); - } - if (other.hasParentSymbol()) { - setParentSymbol(other.getParentSymbol()); - } - if (other.hasOrigin()) { - setOrigin(other.getOrigin()); - } - if (!other.annotation_.isEmpty()) { - if (annotation_.isEmpty()) { - annotation_ = other.annotation_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureAnnotationIsMutable(); - annotation_.addAll(other.annotation_); - } - - } - if (other.hasBody()) { - setBody(other.getBody()); - } - setUnknownFields( - getUnknownFields().concat(other.unknownFields)); - return this; - } - - public final boolean isInitialized() { - if (!hasLastModified()) { - - return false; - } - for (int i = 0; i < getAnnotationCount(); i++) { - if (!getAnnotation(i).isInitialized()) { - - return false; - } - } - return true; - } - - public Builder mergeFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.jetbrains.kotlin.backend.common.serialization.proto.PirAnonymousInitializerCarrier parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.jetbrains.kotlin.backend.common.serialization.proto.PirAnonymousInitializerCarrier) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int lastModified_ ; - /** - * required int32 lastModified = 1; - */ - public boolean hasLastModified() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required int32 lastModified = 1; - */ - public int getLastModified() { - return lastModified_; - } - /** - * required int32 lastModified = 1; - */ - public Builder setLastModified(int value) { - bitField0_ |= 0x00000001; - lastModified_ = value; - - return this; - } - /** - * required int32 lastModified = 1; - */ - public Builder clearLastModified() { - bitField0_ = (bitField0_ & ~0x00000001); - lastModified_ = 0; - - return this; - } - - private long parentSymbol_ ; - /** - * optional int64 parentSymbol = 2; - */ - public boolean hasParentSymbol() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional int64 parentSymbol = 2; - */ - public long getParentSymbol() { - return parentSymbol_; - } - /** - * optional int64 parentSymbol = 2; - */ - public Builder setParentSymbol(long value) { - bitField0_ |= 0x00000002; - parentSymbol_ = value; - - return this; - } - /** - * optional int64 parentSymbol = 2; - */ - public Builder clearParentSymbol() { - bitField0_ = (bitField0_ & ~0x00000002); - parentSymbol_ = 0L; - - return this; - } - - private int origin_ ; - /** - * optional int32 origin = 3; - */ - public boolean hasOrigin() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int32 origin = 3; - */ - public int getOrigin() { - return origin_; - } - /** - * optional int32 origin = 3; - */ - public Builder setOrigin(int value) { - bitField0_ |= 0x00000004; - origin_ = value; - - return this; - } - /** - * optional int32 origin = 3; - */ - public Builder clearOrigin() { - bitField0_ = (bitField0_ & ~0x00000004); - origin_ = 0; - - return this; - } - - private java.util.List annotation_ = - java.util.Collections.emptyList(); - private void ensureAnnotationIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { - annotation_ = new java.util.ArrayList(annotation_); - bitField0_ |= 0x00000008; - } - } - - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public java.util.List getAnnotationList() { - return java.util.Collections.unmodifiableList(annotation_); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public int getAnnotationCount() { - return annotation_.size(); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index) { - return annotation_.get(index); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder setAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnnotationIsMutable(); - annotation_.set(index, value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder setAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) { - ensureAnnotationIsMutable(); - annotation_.set(index, builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation(org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnnotationIsMutable(); - annotation_.add(value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnnotationIsMutable(); - annotation_.add(index, value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation( - org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) { - ensureAnnotationIsMutable(); - annotation_.add(builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) { - ensureAnnotationIsMutable(); - annotation_.add(index, builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAllAnnotation( - java.lang.Iterable values) { - ensureAnnotationIsMutable(); - org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( - values, annotation_); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder clearAnnotation() { - annotation_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder removeAnnotation(int index) { - ensureAnnotationIsMutable(); - annotation_.remove(index); - - return this; - } - - private int body_ ; - /** - * optional int32 body = 5; - */ - public boolean hasBody() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional int32 body = 5; - */ - public int getBody() { - return body_; - } - /** - * optional int32 body = 5; - */ - public Builder setBody(int value) { - bitField0_ |= 0x00000010; - body_ = value; - - return this; - } - /** - * optional int32 body = 5; - */ - public Builder clearBody() { - bitField0_ = (bitField0_ & ~0x00000010); - body_ = 0; - - return this; - } - - // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.backend.common.serialization.proto.PirAnonymousInitializerCarrier) - } - - static { - defaultInstance = new PirAnonymousInitializerCarrier(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.PirAnonymousInitializerCarrier) -} diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirAnonymousInitializerCarrierOrBuilder.java b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirAnonymousInitializerCarrierOrBuilder.java deleted file mode 100644 index fa22684024d..00000000000 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirAnonymousInitializerCarrierOrBuilder.java +++ /dev/null @@ -1,59 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: compiler/ir/serialization.common/src/KotlinPirCarriers.proto - -package org.jetbrains.kotlin.backend.common.serialization.proto; - -public interface PirAnonymousInitializerCarrierOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.backend.common.serialization.proto.PirAnonymousInitializerCarrier) - org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder { - - /** - * required int32 lastModified = 1; - */ - boolean hasLastModified(); - /** - * required int32 lastModified = 1; - */ - int getLastModified(); - - /** - * optional int64 parentSymbol = 2; - */ - boolean hasParentSymbol(); - /** - * optional int64 parentSymbol = 2; - */ - long getParentSymbol(); - - /** - * optional int32 origin = 3; - */ - boolean hasOrigin(); - /** - * optional int32 origin = 3; - */ - int getOrigin(); - - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - java.util.List - getAnnotationList(); - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index); - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - int getAnnotationCount(); - - /** - * optional int32 body = 5; - */ - boolean hasBody(); - /** - * optional int32 body = 5; - */ - int getBody(); -} \ No newline at end of file diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirBodyCarrier.java b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirBodyCarrier.java deleted file mode 100644 index b11445f7c47..00000000000 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirBodyCarrier.java +++ /dev/null @@ -1,420 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: compiler/ir/serialization.common/src/KotlinIr.proto - -package org.jetbrains.kotlin.backend.common.serialization.proto; - -/** - * Protobuf type {@code org.jetbrains.kotlin.backend.common.serialization.proto.PirBodyCarrier} - */ -public final class PirBodyCarrier extends - org.jetbrains.kotlin.protobuf.GeneratedMessageLite implements - // @@protoc_insertion_point(message_implements:org.jetbrains.kotlin.backend.common.serialization.proto.PirBodyCarrier) - PirBodyCarrierOrBuilder { - // Use PirBodyCarrier.newBuilder() to construct. - private PirBodyCarrier(org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private PirBodyCarrier(boolean noInit) { this.unknownFields = org.jetbrains.kotlin.protobuf.ByteString.EMPTY;} - - private static final PirBodyCarrier defaultInstance; - public static PirBodyCarrier getDefaultInstance() { - return defaultInstance; - } - - public PirBodyCarrier getDefaultInstanceForType() { - return defaultInstance; - } - - private final org.jetbrains.kotlin.protobuf.ByteString unknownFields; - private PirBodyCarrier( - 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 8: { - bitField0_ |= 0x00000001; - lastModified_ = input.readInt32(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - containerFieldSymbol_ = input.readInt64(); - 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 PirBodyCarrier parsePartialFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return new PirBodyCarrier(input, extensionRegistry); - } - }; - - @java.lang.Override - public org.jetbrains.kotlin.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - public static final int LAST_MODIFIED_FIELD_NUMBER = 1; - private int lastModified_; - /** - * required int32 last_modified = 1; - */ - public boolean hasLastModified() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required int32 last_modified = 1; - */ - public int getLastModified() { - return lastModified_; - } - - public static final int CONTAINER_FIELD_SYMBOL_FIELD_NUMBER = 2; - private long containerFieldSymbol_; - /** - * optional int64 container_field_symbol = 2; - */ - public boolean hasContainerFieldSymbol() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional int64 container_field_symbol = 2; - */ - public long getContainerFieldSymbol() { - return containerFieldSymbol_; - } - - private void initFields() { - lastModified_ = 0; - containerFieldSymbol_ = 0L; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (!hasLastModified()) { - 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.writeInt32(1, lastModified_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeInt64(2, containerFieldSymbol_); - } - 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 - .computeInt32Size(1, lastModified_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt64Size(2, containerFieldSymbol_); - } - size += unknownFields.size(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirBodyCarrier parseFrom( - org.jetbrains.kotlin.protobuf.ByteString data) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirBodyCarrier parseFrom( - org.jetbrains.kotlin.protobuf.ByteString data, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirBodyCarrier parseFrom(byte[] data) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirBodyCarrier parseFrom( - byte[] data, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirBodyCarrier parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirBodyCarrier parseFrom( - java.io.InputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirBodyCarrier parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirBodyCarrier parseDelimitedFrom( - java.io.InputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirBodyCarrier parseFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirBodyCarrier parseFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.jetbrains.kotlin.backend.common.serialization.proto.PirBodyCarrier prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - /** - * Protobuf type {@code org.jetbrains.kotlin.backend.common.serialization.proto.PirBodyCarrier} - */ - public static final class Builder extends - org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder< - org.jetbrains.kotlin.backend.common.serialization.proto.PirBodyCarrier, Builder> - implements - // @@protoc_insertion_point(builder_implements:org.jetbrains.kotlin.backend.common.serialization.proto.PirBodyCarrier) - org.jetbrains.kotlin.backend.common.serialization.proto.PirBodyCarrierOrBuilder { - // Construct using org.jetbrains.kotlin.backend.common.serialization.proto.PirBodyCarrier.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - lastModified_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - containerFieldSymbol_ = 0L; - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public org.jetbrains.kotlin.backend.common.serialization.proto.PirBodyCarrier getDefaultInstanceForType() { - return org.jetbrains.kotlin.backend.common.serialization.proto.PirBodyCarrier.getDefaultInstance(); - } - - public org.jetbrains.kotlin.backend.common.serialization.proto.PirBodyCarrier build() { - org.jetbrains.kotlin.backend.common.serialization.proto.PirBodyCarrier result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.jetbrains.kotlin.backend.common.serialization.proto.PirBodyCarrier buildPartial() { - org.jetbrains.kotlin.backend.common.serialization.proto.PirBodyCarrier result = new org.jetbrains.kotlin.backend.common.serialization.proto.PirBodyCarrier(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.lastModified_ = lastModified_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.containerFieldSymbol_ = containerFieldSymbol_; - result.bitField0_ = to_bitField0_; - return result; - } - - public Builder mergeFrom(org.jetbrains.kotlin.backend.common.serialization.proto.PirBodyCarrier other) { - if (other == org.jetbrains.kotlin.backend.common.serialization.proto.PirBodyCarrier.getDefaultInstance()) return this; - if (other.hasLastModified()) { - setLastModified(other.getLastModified()); - } - if (other.hasContainerFieldSymbol()) { - setContainerFieldSymbol(other.getContainerFieldSymbol()); - } - setUnknownFields( - getUnknownFields().concat(other.unknownFields)); - return this; - } - - public final boolean isInitialized() { - if (!hasLastModified()) { - - return false; - } - return true; - } - - public Builder mergeFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.jetbrains.kotlin.backend.common.serialization.proto.PirBodyCarrier parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.jetbrains.kotlin.backend.common.serialization.proto.PirBodyCarrier) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int lastModified_ ; - /** - * required int32 last_modified = 1; - */ - public boolean hasLastModified() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required int32 last_modified = 1; - */ - public int getLastModified() { - return lastModified_; - } - /** - * required int32 last_modified = 1; - */ - public Builder setLastModified(int value) { - bitField0_ |= 0x00000001; - lastModified_ = value; - - return this; - } - /** - * required int32 last_modified = 1; - */ - public Builder clearLastModified() { - bitField0_ = (bitField0_ & ~0x00000001); - lastModified_ = 0; - - return this; - } - - private long containerFieldSymbol_ ; - /** - * optional int64 container_field_symbol = 2; - */ - public boolean hasContainerFieldSymbol() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional int64 container_field_symbol = 2; - */ - public long getContainerFieldSymbol() { - return containerFieldSymbol_; - } - /** - * optional int64 container_field_symbol = 2; - */ - public Builder setContainerFieldSymbol(long value) { - bitField0_ |= 0x00000002; - containerFieldSymbol_ = value; - - return this; - } - /** - * optional int64 container_field_symbol = 2; - */ - public Builder clearContainerFieldSymbol() { - bitField0_ = (bitField0_ & ~0x00000002); - containerFieldSymbol_ = 0L; - - return this; - } - - // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.backend.common.serialization.proto.PirBodyCarrier) - } - - static { - defaultInstance = new PirBodyCarrier(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.PirBodyCarrier) -} \ No newline at end of file diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirBodyCarrierOrBuilder.java b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirBodyCarrierOrBuilder.java deleted file mode 100644 index e8c66ee36f0..00000000000 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirBodyCarrierOrBuilder.java +++ /dev/null @@ -1,27 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: compiler/ir/serialization.common/src/KotlinIr.proto - -package org.jetbrains.kotlin.backend.common.serialization.proto; - -public interface PirBodyCarrierOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.backend.common.serialization.proto.PirBodyCarrier) - org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder { - - /** - * required int32 last_modified = 1; - */ - boolean hasLastModified(); - /** - * required int32 last_modified = 1; - */ - int getLastModified(); - - /** - * optional int64 container_field_symbol = 2; - */ - boolean hasContainerFieldSymbol(); - /** - * optional int64 container_field_symbol = 2; - */ - long getContainerFieldSymbol(); -} \ No newline at end of file diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirClassCarrier.java b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirClassCarrier.java deleted file mode 100644 index f266602b930..00000000000 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirClassCarrier.java +++ /dev/null @@ -1,1378 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: compiler/ir/serialization.common/src/KotlinPirCarriers.proto - -package org.jetbrains.kotlin.backend.common.serialization.proto; - -/** - * Protobuf type {@code org.jetbrains.kotlin.backend.common.serialization.proto.PirClassCarrier} - */ -public final class PirClassCarrier extends - org.jetbrains.kotlin.protobuf.GeneratedMessageLite implements - // @@protoc_insertion_point(message_implements:org.jetbrains.kotlin.backend.common.serialization.proto.PirClassCarrier) - PirClassCarrierOrBuilder { - // Use PirClassCarrier.newBuilder() to construct. - private PirClassCarrier(org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private PirClassCarrier(boolean noInit) { this.unknownFields = org.jetbrains.kotlin.protobuf.ByteString.EMPTY;} - - private static final PirClassCarrier defaultInstance; - public static PirClassCarrier getDefaultInstance() { - return defaultInstance; - } - - public PirClassCarrier getDefaultInstanceForType() { - return defaultInstance; - } - - private final org.jetbrains.kotlin.protobuf.ByteString unknownFields; - private PirClassCarrier( - 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 8: { - bitField0_ |= 0x00000001; - lastModified_ = input.readInt32(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - parentSymbol_ = input.readInt64(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - origin_ = input.readInt32(); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - annotation_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - annotation_.add(input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.PARSER, extensionRegistry)); - break; - } - case 40: { - bitField0_ |= 0x00000008; - thisReceiver_ = input.readInt64(); - break; - } - case 48: { - if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { - typeParameters_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000020; - } - typeParameters_.add(input.readInt64()); - break; - } - case 50: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000020) == 0x00000020) && input.getBytesUntilLimit() > 0) { - typeParameters_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000020; - } - while (input.getBytesUntilLimit() > 0) { - typeParameters_.add(input.readInt64()); - } - input.popLimit(limit); - break; - } - case 56: { - if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) { - superTypes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000040; - } - superTypes_.add(input.readInt32()); - break; - } - case 58: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000040) == 0x00000040) && input.getBytesUntilLimit() > 0) { - superTypes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000040; - } - while (input.getBytesUntilLimit() > 0) { - superTypes_.add(input.readInt32()); - } - input.popLimit(limit); - break; - } - case 66: { - org.jetbrains.kotlin.backend.common.serialization.proto.IrInlineClassRepresentation.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) == 0x00000010)) { - subBuilder = inlineClassRepresentation_.toBuilder(); - } - inlineClassRepresentation_ = input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IrInlineClassRepresentation.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(inlineClassRepresentation_); - inlineClassRepresentation_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 72: { - if (!((mutable_bitField0_ & 0x00000100) == 0x00000100)) { - sealedSubclasses_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000100; - } - sealedSubclasses_.add(input.readInt64()); - break; - } - case 74: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000100) == 0x00000100) && input.getBytesUntilLimit() > 0) { - sealedSubclasses_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000100; - } - while (input.getBytesUntilLimit() > 0) { - sealedSubclasses_.add(input.readInt64()); - } - input.popLimit(limit); - break; - } - case 80: { - bitField0_ |= 0x00000020; - flags_ = input.readInt64(); - 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_ & 0x00000008) == 0x00000008)) { - annotation_ = java.util.Collections.unmodifiableList(annotation_); - } - if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { - typeParameters_ = java.util.Collections.unmodifiableList(typeParameters_); - } - if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) { - superTypes_ = java.util.Collections.unmodifiableList(superTypes_); - } - if (((mutable_bitField0_ & 0x00000100) == 0x00000100)) { - sealedSubclasses_ = java.util.Collections.unmodifiableList(sealedSubclasses_); - } - 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 PirClassCarrier parsePartialFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return new PirClassCarrier(input, extensionRegistry); - } - }; - - @java.lang.Override - public org.jetbrains.kotlin.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - public static final int LASTMODIFIED_FIELD_NUMBER = 1; - private int lastModified_; - /** - * required int32 lastModified = 1; - */ - public boolean hasLastModified() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required int32 lastModified = 1; - */ - public int getLastModified() { - return lastModified_; - } - - public static final int PARENTSYMBOL_FIELD_NUMBER = 2; - private long parentSymbol_; - /** - * optional int64 parentSymbol = 2; - */ - public boolean hasParentSymbol() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional int64 parentSymbol = 2; - */ - public long getParentSymbol() { - return parentSymbol_; - } - - public static final int ORIGIN_FIELD_NUMBER = 3; - private int origin_; - /** - * optional int32 origin = 3; - */ - public boolean hasOrigin() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int32 origin = 3; - */ - public int getOrigin() { - return origin_; - } - - public static final int ANNOTATION_FIELD_NUMBER = 4; - private java.util.List annotation_; - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public java.util.List getAnnotationList() { - return annotation_; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public java.util.List - getAnnotationOrBuilderList() { - return annotation_; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public int getAnnotationCount() { - return annotation_.size(); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index) { - return annotation_.get(index); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCallOrBuilder getAnnotationOrBuilder( - int index) { - return annotation_.get(index); - } - - public static final int THISRECEIVER_FIELD_NUMBER = 5; - private long thisReceiver_; - /** - * optional int64 thisReceiver = 5; - */ - public boolean hasThisReceiver() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional int64 thisReceiver = 5; - */ - public long getThisReceiver() { - return thisReceiver_; - } - - public static final int TYPEPARAMETERS_FIELD_NUMBER = 6; - private java.util.List typeParameters_; - /** - * repeated int64 typeParameters = 6; - */ - public java.util.List - getTypeParametersList() { - return typeParameters_; - } - /** - * repeated int64 typeParameters = 6; - */ - public int getTypeParametersCount() { - return typeParameters_.size(); - } - /** - * repeated int64 typeParameters = 6; - */ - public long getTypeParameters(int index) { - return typeParameters_.get(index); - } - - public static final int SUPERTYPES_FIELD_NUMBER = 7; - private java.util.List superTypes_; - /** - * repeated int32 superTypes = 7; - */ - public java.util.List - getSuperTypesList() { - return superTypes_; - } - /** - * repeated int32 superTypes = 7; - */ - public int getSuperTypesCount() { - return superTypes_.size(); - } - /** - * repeated int32 superTypes = 7; - */ - public int getSuperTypes(int index) { - return superTypes_.get(index); - } - - public static final int INLINECLASSREPRESENTATION_FIELD_NUMBER = 8; - private org.jetbrains.kotlin.backend.common.serialization.proto.IrInlineClassRepresentation inlineClassRepresentation_; - /** - * optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrInlineClassRepresentation inlineClassRepresentation = 8; - */ - public boolean hasInlineClassRepresentation() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrInlineClassRepresentation inlineClassRepresentation = 8; - */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrInlineClassRepresentation getInlineClassRepresentation() { - return inlineClassRepresentation_; - } - - public static final int SEALEDSUBCLASSES_FIELD_NUMBER = 9; - private java.util.List sealedSubclasses_; - /** - * repeated int64 sealedSubclasses = 9; - */ - public java.util.List - getSealedSubclassesList() { - return sealedSubclasses_; - } - /** - * repeated int64 sealedSubclasses = 9; - */ - public int getSealedSubclassesCount() { - return sealedSubclasses_.size(); - } - /** - * repeated int64 sealedSubclasses = 9; - */ - public long getSealedSubclasses(int index) { - return sealedSubclasses_.get(index); - } - - public static final int FLAGS_FIELD_NUMBER = 10; - private long flags_; - /** - * optional int64 flags = 10 [default = 0]; - */ - public boolean hasFlags() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional int64 flags = 10 [default = 0]; - */ - public long getFlags() { - return flags_; - } - - private void initFields() { - lastModified_ = 0; - parentSymbol_ = 0L; - origin_ = 0; - annotation_ = java.util.Collections.emptyList(); - thisReceiver_ = 0L; - typeParameters_ = java.util.Collections.emptyList(); - superTypes_ = java.util.Collections.emptyList(); - inlineClassRepresentation_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrInlineClassRepresentation.getDefaultInstance(); - sealedSubclasses_ = java.util.Collections.emptyList(); - flags_ = 0L; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (!hasLastModified()) { - memoizedIsInitialized = 0; - return false; - } - for (int i = 0; i < getAnnotationCount(); i++) { - if (!getAnnotation(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - if (hasInlineClassRepresentation()) { - if (!getInlineClassRepresentation().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.writeInt32(1, lastModified_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeInt64(2, parentSymbol_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeInt32(3, origin_); - } - for (int i = 0; i < annotation_.size(); i++) { - output.writeMessage(4, annotation_.get(i)); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeInt64(5, thisReceiver_); - } - for (int i = 0; i < typeParameters_.size(); i++) { - output.writeInt64(6, typeParameters_.get(i)); - } - for (int i = 0; i < superTypes_.size(); i++) { - output.writeInt32(7, superTypes_.get(i)); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeMessage(8, inlineClassRepresentation_); - } - for (int i = 0; i < sealedSubclasses_.size(); i++) { - output.writeInt64(9, sealedSubclasses_.get(i)); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeInt64(10, flags_); - } - 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 - .computeInt32Size(1, lastModified_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt64Size(2, parentSymbol_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt32Size(3, origin_); - } - for (int i = 0; i < annotation_.size(); i++) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeMessageSize(4, annotation_.get(i)); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt64Size(5, thisReceiver_); - } - { - int dataSize = 0; - for (int i = 0; i < typeParameters_.size(); i++) { - dataSize += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt64SizeNoTag(typeParameters_.get(i)); - } - size += dataSize; - size += 1 * getTypeParametersList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < superTypes_.size(); i++) { - dataSize += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt32SizeNoTag(superTypes_.get(i)); - } - size += dataSize; - size += 1 * getSuperTypesList().size(); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeMessageSize(8, inlineClassRepresentation_); - } - { - int dataSize = 0; - for (int i = 0; i < sealedSubclasses_.size(); i++) { - dataSize += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt64SizeNoTag(sealedSubclasses_.get(i)); - } - size += dataSize; - size += 1 * getSealedSubclassesList().size(); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt64Size(10, flags_); - } - size += unknownFields.size(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirClassCarrier parseFrom( - org.jetbrains.kotlin.protobuf.ByteString data) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirClassCarrier parseFrom( - org.jetbrains.kotlin.protobuf.ByteString data, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirClassCarrier parseFrom(byte[] data) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirClassCarrier parseFrom( - byte[] data, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirClassCarrier parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirClassCarrier parseFrom( - java.io.InputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirClassCarrier parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirClassCarrier parseDelimitedFrom( - java.io.InputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirClassCarrier parseFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirClassCarrier parseFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.jetbrains.kotlin.backend.common.serialization.proto.PirClassCarrier prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - /** - * Protobuf type {@code org.jetbrains.kotlin.backend.common.serialization.proto.PirClassCarrier} - */ - public static final class Builder extends - org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder< - org.jetbrains.kotlin.backend.common.serialization.proto.PirClassCarrier, Builder> - implements - // @@protoc_insertion_point(builder_implements:org.jetbrains.kotlin.backend.common.serialization.proto.PirClassCarrier) - org.jetbrains.kotlin.backend.common.serialization.proto.PirClassCarrierOrBuilder { - // Construct using org.jetbrains.kotlin.backend.common.serialization.proto.PirClassCarrier.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - lastModified_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - parentSymbol_ = 0L; - bitField0_ = (bitField0_ & ~0x00000002); - origin_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - annotation_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - thisReceiver_ = 0L; - bitField0_ = (bitField0_ & ~0x00000010); - typeParameters_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - superTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); - inlineClassRepresentation_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrInlineClassRepresentation.getDefaultInstance(); - bitField0_ = (bitField0_ & ~0x00000080); - sealedSubclasses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000100); - flags_ = 0L; - bitField0_ = (bitField0_ & ~0x00000200); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public org.jetbrains.kotlin.backend.common.serialization.proto.PirClassCarrier getDefaultInstanceForType() { - return org.jetbrains.kotlin.backend.common.serialization.proto.PirClassCarrier.getDefaultInstance(); - } - - public org.jetbrains.kotlin.backend.common.serialization.proto.PirClassCarrier build() { - org.jetbrains.kotlin.backend.common.serialization.proto.PirClassCarrier result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.jetbrains.kotlin.backend.common.serialization.proto.PirClassCarrier buildPartial() { - org.jetbrains.kotlin.backend.common.serialization.proto.PirClassCarrier result = new org.jetbrains.kotlin.backend.common.serialization.proto.PirClassCarrier(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.lastModified_ = lastModified_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.parentSymbol_ = parentSymbol_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.origin_ = origin_; - if (((bitField0_ & 0x00000008) == 0x00000008)) { - annotation_ = java.util.Collections.unmodifiableList(annotation_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.annotation_ = annotation_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000008; - } - result.thisReceiver_ = thisReceiver_; - if (((bitField0_ & 0x00000020) == 0x00000020)) { - typeParameters_ = java.util.Collections.unmodifiableList(typeParameters_); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.typeParameters_ = typeParameters_; - if (((bitField0_ & 0x00000040) == 0x00000040)) { - superTypes_ = java.util.Collections.unmodifiableList(superTypes_); - bitField0_ = (bitField0_ & ~0x00000040); - } - result.superTypes_ = superTypes_; - if (((from_bitField0_ & 0x00000080) == 0x00000080)) { - to_bitField0_ |= 0x00000010; - } - result.inlineClassRepresentation_ = inlineClassRepresentation_; - if (((bitField0_ & 0x00000100) == 0x00000100)) { - sealedSubclasses_ = java.util.Collections.unmodifiableList(sealedSubclasses_); - bitField0_ = (bitField0_ & ~0x00000100); - } - result.sealedSubclasses_ = sealedSubclasses_; - if (((from_bitField0_ & 0x00000200) == 0x00000200)) { - to_bitField0_ |= 0x00000020; - } - result.flags_ = flags_; - result.bitField0_ = to_bitField0_; - return result; - } - - public Builder mergeFrom(org.jetbrains.kotlin.backend.common.serialization.proto.PirClassCarrier other) { - if (other == org.jetbrains.kotlin.backend.common.serialization.proto.PirClassCarrier.getDefaultInstance()) return this; - if (other.hasLastModified()) { - setLastModified(other.getLastModified()); - } - if (other.hasParentSymbol()) { - setParentSymbol(other.getParentSymbol()); - } - if (other.hasOrigin()) { - setOrigin(other.getOrigin()); - } - if (!other.annotation_.isEmpty()) { - if (annotation_.isEmpty()) { - annotation_ = other.annotation_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureAnnotationIsMutable(); - annotation_.addAll(other.annotation_); - } - - } - if (other.hasThisReceiver()) { - setThisReceiver(other.getThisReceiver()); - } - if (!other.typeParameters_.isEmpty()) { - if (typeParameters_.isEmpty()) { - typeParameters_ = other.typeParameters_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureTypeParametersIsMutable(); - typeParameters_.addAll(other.typeParameters_); - } - - } - if (!other.superTypes_.isEmpty()) { - if (superTypes_.isEmpty()) { - superTypes_ = other.superTypes_; - bitField0_ = (bitField0_ & ~0x00000040); - } else { - ensureSuperTypesIsMutable(); - superTypes_.addAll(other.superTypes_); - } - - } - if (other.hasInlineClassRepresentation()) { - mergeInlineClassRepresentation(other.getInlineClassRepresentation()); - } - if (!other.sealedSubclasses_.isEmpty()) { - if (sealedSubclasses_.isEmpty()) { - sealedSubclasses_ = other.sealedSubclasses_; - bitField0_ = (bitField0_ & ~0x00000100); - } else { - ensureSealedSubclassesIsMutable(); - sealedSubclasses_.addAll(other.sealedSubclasses_); - } - - } - if (other.hasFlags()) { - setFlags(other.getFlags()); - } - setUnknownFields( - getUnknownFields().concat(other.unknownFields)); - return this; - } - - public final boolean isInitialized() { - if (!hasLastModified()) { - - return false; - } - for (int i = 0; i < getAnnotationCount(); i++) { - if (!getAnnotation(i).isInitialized()) { - - return false; - } - } - if (hasInlineClassRepresentation()) { - if (!getInlineClassRepresentation().isInitialized()) { - - return false; - } - } - return true; - } - - public Builder mergeFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.jetbrains.kotlin.backend.common.serialization.proto.PirClassCarrier parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.jetbrains.kotlin.backend.common.serialization.proto.PirClassCarrier) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int lastModified_ ; - /** - * required int32 lastModified = 1; - */ - public boolean hasLastModified() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required int32 lastModified = 1; - */ - public int getLastModified() { - return lastModified_; - } - /** - * required int32 lastModified = 1; - */ - public Builder setLastModified(int value) { - bitField0_ |= 0x00000001; - lastModified_ = value; - - return this; - } - /** - * required int32 lastModified = 1; - */ - public Builder clearLastModified() { - bitField0_ = (bitField0_ & ~0x00000001); - lastModified_ = 0; - - return this; - } - - private long parentSymbol_ ; - /** - * optional int64 parentSymbol = 2; - */ - public boolean hasParentSymbol() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional int64 parentSymbol = 2; - */ - public long getParentSymbol() { - return parentSymbol_; - } - /** - * optional int64 parentSymbol = 2; - */ - public Builder setParentSymbol(long value) { - bitField0_ |= 0x00000002; - parentSymbol_ = value; - - return this; - } - /** - * optional int64 parentSymbol = 2; - */ - public Builder clearParentSymbol() { - bitField0_ = (bitField0_ & ~0x00000002); - parentSymbol_ = 0L; - - return this; - } - - private int origin_ ; - /** - * optional int32 origin = 3; - */ - public boolean hasOrigin() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int32 origin = 3; - */ - public int getOrigin() { - return origin_; - } - /** - * optional int32 origin = 3; - */ - public Builder setOrigin(int value) { - bitField0_ |= 0x00000004; - origin_ = value; - - return this; - } - /** - * optional int32 origin = 3; - */ - public Builder clearOrigin() { - bitField0_ = (bitField0_ & ~0x00000004); - origin_ = 0; - - return this; - } - - private java.util.List annotation_ = - java.util.Collections.emptyList(); - private void ensureAnnotationIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { - annotation_ = new java.util.ArrayList(annotation_); - bitField0_ |= 0x00000008; - } - } - - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public java.util.List getAnnotationList() { - return java.util.Collections.unmodifiableList(annotation_); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public int getAnnotationCount() { - return annotation_.size(); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index) { - return annotation_.get(index); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder setAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnnotationIsMutable(); - annotation_.set(index, value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder setAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) { - ensureAnnotationIsMutable(); - annotation_.set(index, builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation(org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnnotationIsMutable(); - annotation_.add(value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnnotationIsMutable(); - annotation_.add(index, value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation( - org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) { - ensureAnnotationIsMutable(); - annotation_.add(builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) { - ensureAnnotationIsMutable(); - annotation_.add(index, builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAllAnnotation( - java.lang.Iterable values) { - ensureAnnotationIsMutable(); - org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( - values, annotation_); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder clearAnnotation() { - annotation_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder removeAnnotation(int index) { - ensureAnnotationIsMutable(); - annotation_.remove(index); - - return this; - } - - private long thisReceiver_ ; - /** - * optional int64 thisReceiver = 5; - */ - public boolean hasThisReceiver() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional int64 thisReceiver = 5; - */ - public long getThisReceiver() { - return thisReceiver_; - } - /** - * optional int64 thisReceiver = 5; - */ - public Builder setThisReceiver(long value) { - bitField0_ |= 0x00000010; - thisReceiver_ = value; - - return this; - } - /** - * optional int64 thisReceiver = 5; - */ - public Builder clearThisReceiver() { - bitField0_ = (bitField0_ & ~0x00000010); - thisReceiver_ = 0L; - - return this; - } - - private java.util.List typeParameters_ = java.util.Collections.emptyList(); - private void ensureTypeParametersIsMutable() { - if (!((bitField0_ & 0x00000020) == 0x00000020)) { - typeParameters_ = new java.util.ArrayList(typeParameters_); - bitField0_ |= 0x00000020; - } - } - /** - * repeated int64 typeParameters = 6; - */ - public java.util.List - getTypeParametersList() { - return java.util.Collections.unmodifiableList(typeParameters_); - } - /** - * repeated int64 typeParameters = 6; - */ - public int getTypeParametersCount() { - return typeParameters_.size(); - } - /** - * repeated int64 typeParameters = 6; - */ - public long getTypeParameters(int index) { - return typeParameters_.get(index); - } - /** - * repeated int64 typeParameters = 6; - */ - public Builder setTypeParameters( - int index, long value) { - ensureTypeParametersIsMutable(); - typeParameters_.set(index, value); - - return this; - } - /** - * repeated int64 typeParameters = 6; - */ - public Builder addTypeParameters(long value) { - ensureTypeParametersIsMutable(); - typeParameters_.add(value); - - return this; - } - /** - * repeated int64 typeParameters = 6; - */ - public Builder addAllTypeParameters( - java.lang.Iterable values) { - ensureTypeParametersIsMutable(); - org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( - values, typeParameters_); - - return this; - } - /** - * repeated int64 typeParameters = 6; - */ - public Builder clearTypeParameters() { - typeParameters_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - - return this; - } - - private java.util.List superTypes_ = java.util.Collections.emptyList(); - private void ensureSuperTypesIsMutable() { - if (!((bitField0_ & 0x00000040) == 0x00000040)) { - superTypes_ = new java.util.ArrayList(superTypes_); - bitField0_ |= 0x00000040; - } - } - /** - * repeated int32 superTypes = 7; - */ - public java.util.List - getSuperTypesList() { - return java.util.Collections.unmodifiableList(superTypes_); - } - /** - * repeated int32 superTypes = 7; - */ - public int getSuperTypesCount() { - return superTypes_.size(); - } - /** - * repeated int32 superTypes = 7; - */ - public int getSuperTypes(int index) { - return superTypes_.get(index); - } - /** - * repeated int32 superTypes = 7; - */ - public Builder setSuperTypes( - int index, int value) { - ensureSuperTypesIsMutable(); - superTypes_.set(index, value); - - return this; - } - /** - * repeated int32 superTypes = 7; - */ - public Builder addSuperTypes(int value) { - ensureSuperTypesIsMutable(); - superTypes_.add(value); - - return this; - } - /** - * repeated int32 superTypes = 7; - */ - public Builder addAllSuperTypes( - java.lang.Iterable values) { - ensureSuperTypesIsMutable(); - org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( - values, superTypes_); - - return this; - } - /** - * repeated int32 superTypes = 7; - */ - public Builder clearSuperTypes() { - superTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); - - return this; - } - - private org.jetbrains.kotlin.backend.common.serialization.proto.IrInlineClassRepresentation inlineClassRepresentation_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrInlineClassRepresentation.getDefaultInstance(); - /** - * optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrInlineClassRepresentation inlineClassRepresentation = 8; - */ - public boolean hasInlineClassRepresentation() { - return ((bitField0_ & 0x00000080) == 0x00000080); - } - /** - * optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrInlineClassRepresentation inlineClassRepresentation = 8; - */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrInlineClassRepresentation getInlineClassRepresentation() { - return inlineClassRepresentation_; - } - /** - * optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrInlineClassRepresentation inlineClassRepresentation = 8; - */ - public Builder setInlineClassRepresentation(org.jetbrains.kotlin.backend.common.serialization.proto.IrInlineClassRepresentation value) { - if (value == null) { - throw new NullPointerException(); - } - inlineClassRepresentation_ = value; - - bitField0_ |= 0x00000080; - return this; - } - /** - * optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrInlineClassRepresentation inlineClassRepresentation = 8; - */ - public Builder setInlineClassRepresentation( - org.jetbrains.kotlin.backend.common.serialization.proto.IrInlineClassRepresentation.Builder builderForValue) { - inlineClassRepresentation_ = builderForValue.build(); - - bitField0_ |= 0x00000080; - return this; - } - /** - * optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrInlineClassRepresentation inlineClassRepresentation = 8; - */ - public Builder mergeInlineClassRepresentation(org.jetbrains.kotlin.backend.common.serialization.proto.IrInlineClassRepresentation value) { - if (((bitField0_ & 0x00000080) == 0x00000080) && - inlineClassRepresentation_ != org.jetbrains.kotlin.backend.common.serialization.proto.IrInlineClassRepresentation.getDefaultInstance()) { - inlineClassRepresentation_ = - org.jetbrains.kotlin.backend.common.serialization.proto.IrInlineClassRepresentation.newBuilder(inlineClassRepresentation_).mergeFrom(value).buildPartial(); - } else { - inlineClassRepresentation_ = value; - } - - bitField0_ |= 0x00000080; - return this; - } - /** - * optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrInlineClassRepresentation inlineClassRepresentation = 8; - */ - public Builder clearInlineClassRepresentation() { - inlineClassRepresentation_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrInlineClassRepresentation.getDefaultInstance(); - - bitField0_ = (bitField0_ & ~0x00000080); - return this; - } - - private java.util.List sealedSubclasses_ = java.util.Collections.emptyList(); - private void ensureSealedSubclassesIsMutable() { - if (!((bitField0_ & 0x00000100) == 0x00000100)) { - sealedSubclasses_ = new java.util.ArrayList(sealedSubclasses_); - bitField0_ |= 0x00000100; - } - } - /** - * repeated int64 sealedSubclasses = 9; - */ - public java.util.List - getSealedSubclassesList() { - return java.util.Collections.unmodifiableList(sealedSubclasses_); - } - /** - * repeated int64 sealedSubclasses = 9; - */ - public int getSealedSubclassesCount() { - return sealedSubclasses_.size(); - } - /** - * repeated int64 sealedSubclasses = 9; - */ - public long getSealedSubclasses(int index) { - return sealedSubclasses_.get(index); - } - /** - * repeated int64 sealedSubclasses = 9; - */ - public Builder setSealedSubclasses( - int index, long value) { - ensureSealedSubclassesIsMutable(); - sealedSubclasses_.set(index, value); - - return this; - } - /** - * repeated int64 sealedSubclasses = 9; - */ - public Builder addSealedSubclasses(long value) { - ensureSealedSubclassesIsMutable(); - sealedSubclasses_.add(value); - - return this; - } - /** - * repeated int64 sealedSubclasses = 9; - */ - public Builder addAllSealedSubclasses( - java.lang.Iterable values) { - ensureSealedSubclassesIsMutable(); - org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( - values, sealedSubclasses_); - - return this; - } - /** - * repeated int64 sealedSubclasses = 9; - */ - public Builder clearSealedSubclasses() { - sealedSubclasses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000100); - - return this; - } - - private long flags_ ; - /** - * optional int64 flags = 10 [default = 0]; - */ - public boolean hasFlags() { - return ((bitField0_ & 0x00000200) == 0x00000200); - } - /** - * optional int64 flags = 10 [default = 0]; - */ - public long getFlags() { - return flags_; - } - /** - * optional int64 flags = 10 [default = 0]; - */ - public Builder setFlags(long value) { - bitField0_ |= 0x00000200; - flags_ = value; - - return this; - } - /** - * optional int64 flags = 10 [default = 0]; - */ - public Builder clearFlags() { - bitField0_ = (bitField0_ & ~0x00000200); - flags_ = 0L; - - return this; - } - - // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.backend.common.serialization.proto.PirClassCarrier) - } - - static { - defaultInstance = new PirClassCarrier(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.PirClassCarrier) -} diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirClassCarrierOrBuilder.java b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirClassCarrierOrBuilder.java deleted file mode 100644 index 0836a7ee571..00000000000 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirClassCarrierOrBuilder.java +++ /dev/null @@ -1,116 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: compiler/ir/serialization.common/src/KotlinPirCarriers.proto - -package org.jetbrains.kotlin.backend.common.serialization.proto; - -public interface PirClassCarrierOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.backend.common.serialization.proto.PirClassCarrier) - org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder { - - /** - * required int32 lastModified = 1; - */ - boolean hasLastModified(); - /** - * required int32 lastModified = 1; - */ - int getLastModified(); - - /** - * optional int64 parentSymbol = 2; - */ - boolean hasParentSymbol(); - /** - * optional int64 parentSymbol = 2; - */ - long getParentSymbol(); - - /** - * optional int32 origin = 3; - */ - boolean hasOrigin(); - /** - * optional int32 origin = 3; - */ - int getOrigin(); - - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - java.util.List - getAnnotationList(); - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index); - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - int getAnnotationCount(); - - /** - * optional int64 thisReceiver = 5; - */ - boolean hasThisReceiver(); - /** - * optional int64 thisReceiver = 5; - */ - long getThisReceiver(); - - /** - * repeated int64 typeParameters = 6; - */ - java.util.List getTypeParametersList(); - /** - * repeated int64 typeParameters = 6; - */ - int getTypeParametersCount(); - /** - * repeated int64 typeParameters = 6; - */ - long getTypeParameters(int index); - - /** - * repeated int32 superTypes = 7; - */ - java.util.List getSuperTypesList(); - /** - * repeated int32 superTypes = 7; - */ - int getSuperTypesCount(); - /** - * repeated int32 superTypes = 7; - */ - int getSuperTypes(int index); - - /** - * optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrInlineClassRepresentation inlineClassRepresentation = 8; - */ - boolean hasInlineClassRepresentation(); - /** - * optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrInlineClassRepresentation inlineClassRepresentation = 8; - */ - org.jetbrains.kotlin.backend.common.serialization.proto.IrInlineClassRepresentation getInlineClassRepresentation(); - - /** - * repeated int64 sealedSubclasses = 9; - */ - java.util.List getSealedSubclassesList(); - /** - * repeated int64 sealedSubclasses = 9; - */ - int getSealedSubclassesCount(); - /** - * repeated int64 sealedSubclasses = 9; - */ - long getSealedSubclasses(int index); - - /** - * optional int64 flags = 10 [default = 0]; - */ - boolean hasFlags(); - /** - * optional int64 flags = 10 [default = 0]; - */ - long getFlags(); -} \ No newline at end of file diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirConstructorCarrier.java b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirConstructorCarrier.java deleted file mode 100644 index 90d537c0fd6..00000000000 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirConstructorCarrier.java +++ /dev/null @@ -1,1334 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: compiler/ir/serialization.common/src/KotlinPirCarriers.proto - -package org.jetbrains.kotlin.backend.common.serialization.proto; - -/** - * Protobuf type {@code org.jetbrains.kotlin.backend.common.serialization.proto.PirConstructorCarrier} - */ -public final class PirConstructorCarrier extends - org.jetbrains.kotlin.protobuf.GeneratedMessageLite implements - // @@protoc_insertion_point(message_implements:org.jetbrains.kotlin.backend.common.serialization.proto.PirConstructorCarrier) - PirConstructorCarrierOrBuilder { - // Use PirConstructorCarrier.newBuilder() to construct. - private PirConstructorCarrier(org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private PirConstructorCarrier(boolean noInit) { this.unknownFields = org.jetbrains.kotlin.protobuf.ByteString.EMPTY;} - - private static final PirConstructorCarrier defaultInstance; - public static PirConstructorCarrier getDefaultInstance() { - return defaultInstance; - } - - public PirConstructorCarrier getDefaultInstanceForType() { - return defaultInstance; - } - - private final org.jetbrains.kotlin.protobuf.ByteString unknownFields; - private PirConstructorCarrier( - 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 8: { - bitField0_ |= 0x00000001; - lastModified_ = input.readInt32(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - parentSymbol_ = input.readInt64(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - origin_ = input.readInt32(); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - annotation_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - annotation_.add(input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.PARSER, extensionRegistry)); - break; - } - case 40: { - bitField0_ |= 0x00000008; - returnTypeField_ = input.readInt32(); - break; - } - case 48: { - bitField0_ |= 0x00000010; - dispatchReceiverParameter_ = input.readInt64(); - break; - } - case 56: { - bitField0_ |= 0x00000020; - extensionReceiverParameter_ = input.readInt64(); - break; - } - case 64: { - bitField0_ |= 0x00000040; - body_ = input.readInt32(); - break; - } - case 72: { - if (!((mutable_bitField0_ & 0x00000100) == 0x00000100)) { - typeParameters_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000100; - } - typeParameters_.add(input.readInt64()); - break; - } - case 74: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000100) == 0x00000100) && input.getBytesUntilLimit() > 0) { - typeParameters_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000100; - } - while (input.getBytesUntilLimit() > 0) { - typeParameters_.add(input.readInt64()); - } - input.popLimit(limit); - break; - } - case 80: { - if (!((mutable_bitField0_ & 0x00000200) == 0x00000200)) { - valueParameters_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000200; - } - valueParameters_.add(input.readInt64()); - break; - } - case 82: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000200) == 0x00000200) && input.getBytesUntilLimit() > 0) { - valueParameters_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000200; - } - while (input.getBytesUntilLimit() > 0) { - valueParameters_.add(input.readInt64()); - } - input.popLimit(limit); - break; - } - case 88: { - bitField0_ |= 0x00000080; - flags_ = input.readInt64(); - 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_ & 0x00000008) == 0x00000008)) { - annotation_ = java.util.Collections.unmodifiableList(annotation_); - } - if (((mutable_bitField0_ & 0x00000100) == 0x00000100)) { - typeParameters_ = java.util.Collections.unmodifiableList(typeParameters_); - } - if (((mutable_bitField0_ & 0x00000200) == 0x00000200)) { - valueParameters_ = java.util.Collections.unmodifiableList(valueParameters_); - } - 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 PirConstructorCarrier parsePartialFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return new PirConstructorCarrier(input, extensionRegistry); - } - }; - - @java.lang.Override - public org.jetbrains.kotlin.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - public static final int LASTMODIFIED_FIELD_NUMBER = 1; - private int lastModified_; - /** - * required int32 lastModified = 1; - */ - public boolean hasLastModified() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required int32 lastModified = 1; - */ - public int getLastModified() { - return lastModified_; - } - - public static final int PARENTSYMBOL_FIELD_NUMBER = 2; - private long parentSymbol_; - /** - * optional int64 parentSymbol = 2; - */ - public boolean hasParentSymbol() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional int64 parentSymbol = 2; - */ - public long getParentSymbol() { - return parentSymbol_; - } - - public static final int ORIGIN_FIELD_NUMBER = 3; - private int origin_; - /** - * optional int32 origin = 3; - */ - public boolean hasOrigin() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int32 origin = 3; - */ - public int getOrigin() { - return origin_; - } - - public static final int ANNOTATION_FIELD_NUMBER = 4; - private java.util.List annotation_; - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public java.util.List getAnnotationList() { - return annotation_; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public java.util.List - getAnnotationOrBuilderList() { - return annotation_; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public int getAnnotationCount() { - return annotation_.size(); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index) { - return annotation_.get(index); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCallOrBuilder getAnnotationOrBuilder( - int index) { - return annotation_.get(index); - } - - public static final int RETURNTYPEFIELD_FIELD_NUMBER = 5; - private int returnTypeField_; - /** - * required int32 returnTypeField = 5; - */ - public boolean hasReturnTypeField() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * required int32 returnTypeField = 5; - */ - public int getReturnTypeField() { - return returnTypeField_; - } - - public static final int DISPATCHRECEIVERPARAMETER_FIELD_NUMBER = 6; - private long dispatchReceiverParameter_; - /** - * optional int64 dispatchReceiverParameter = 6; - */ - public boolean hasDispatchReceiverParameter() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional int64 dispatchReceiverParameter = 6; - */ - public long getDispatchReceiverParameter() { - return dispatchReceiverParameter_; - } - - public static final int EXTENSIONRECEIVERPARAMETER_FIELD_NUMBER = 7; - private long extensionReceiverParameter_; - /** - * optional int64 extensionReceiverParameter = 7; - */ - public boolean hasExtensionReceiverParameter() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional int64 extensionReceiverParameter = 7; - */ - public long getExtensionReceiverParameter() { - return extensionReceiverParameter_; - } - - public static final int BODY_FIELD_NUMBER = 8; - private int body_; - /** - * optional int32 body = 8; - */ - public boolean hasBody() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - /** - * optional int32 body = 8; - */ - public int getBody() { - return body_; - } - - public static final int TYPEPARAMETERS_FIELD_NUMBER = 9; - private java.util.List typeParameters_; - /** - * repeated int64 typeParameters = 9; - */ - public java.util.List - getTypeParametersList() { - return typeParameters_; - } - /** - * repeated int64 typeParameters = 9; - */ - public int getTypeParametersCount() { - return typeParameters_.size(); - } - /** - * repeated int64 typeParameters = 9; - */ - public long getTypeParameters(int index) { - return typeParameters_.get(index); - } - - public static final int VALUEPARAMETERS_FIELD_NUMBER = 10; - private java.util.List valueParameters_; - /** - * repeated int64 valueParameters = 10; - */ - public java.util.List - getValueParametersList() { - return valueParameters_; - } - /** - * repeated int64 valueParameters = 10; - */ - public int getValueParametersCount() { - return valueParameters_.size(); - } - /** - * repeated int64 valueParameters = 10; - */ - public long getValueParameters(int index) { - return valueParameters_.get(index); - } - - public static final int FLAGS_FIELD_NUMBER = 11; - private long flags_; - /** - * optional int64 flags = 11 [default = 0]; - */ - public boolean hasFlags() { - return ((bitField0_ & 0x00000080) == 0x00000080); - } - /** - * optional int64 flags = 11 [default = 0]; - */ - public long getFlags() { - return flags_; - } - - private void initFields() { - lastModified_ = 0; - parentSymbol_ = 0L; - origin_ = 0; - annotation_ = java.util.Collections.emptyList(); - returnTypeField_ = 0; - dispatchReceiverParameter_ = 0L; - extensionReceiverParameter_ = 0L; - body_ = 0; - typeParameters_ = java.util.Collections.emptyList(); - valueParameters_ = java.util.Collections.emptyList(); - flags_ = 0L; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (!hasLastModified()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasReturnTypeField()) { - memoizedIsInitialized = 0; - return false; - } - for (int i = 0; i < getAnnotationCount(); i++) { - if (!getAnnotation(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(org.jetbrains.kotlin.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeInt32(1, lastModified_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeInt64(2, parentSymbol_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeInt32(3, origin_); - } - for (int i = 0; i < annotation_.size(); i++) { - output.writeMessage(4, annotation_.get(i)); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeInt32(5, returnTypeField_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeInt64(6, dispatchReceiverParameter_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeInt64(7, extensionReceiverParameter_); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - output.writeInt32(8, body_); - } - for (int i = 0; i < typeParameters_.size(); i++) { - output.writeInt64(9, typeParameters_.get(i)); - } - for (int i = 0; i < valueParameters_.size(); i++) { - output.writeInt64(10, valueParameters_.get(i)); - } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - output.writeInt64(11, flags_); - } - 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 - .computeInt32Size(1, lastModified_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt64Size(2, parentSymbol_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt32Size(3, origin_); - } - for (int i = 0; i < annotation_.size(); i++) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeMessageSize(4, annotation_.get(i)); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt32Size(5, returnTypeField_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt64Size(6, dispatchReceiverParameter_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt64Size(7, extensionReceiverParameter_); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt32Size(8, body_); - } - { - int dataSize = 0; - for (int i = 0; i < typeParameters_.size(); i++) { - dataSize += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt64SizeNoTag(typeParameters_.get(i)); - } - size += dataSize; - size += 1 * getTypeParametersList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < valueParameters_.size(); i++) { - dataSize += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt64SizeNoTag(valueParameters_.get(i)); - } - size += dataSize; - size += 1 * getValueParametersList().size(); - } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt64Size(11, flags_); - } - size += unknownFields.size(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirConstructorCarrier parseFrom( - org.jetbrains.kotlin.protobuf.ByteString data) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirConstructorCarrier parseFrom( - org.jetbrains.kotlin.protobuf.ByteString data, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirConstructorCarrier parseFrom(byte[] data) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirConstructorCarrier parseFrom( - byte[] data, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirConstructorCarrier parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirConstructorCarrier parseFrom( - java.io.InputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirConstructorCarrier parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirConstructorCarrier parseDelimitedFrom( - java.io.InputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirConstructorCarrier parseFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirConstructorCarrier parseFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.jetbrains.kotlin.backend.common.serialization.proto.PirConstructorCarrier prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - /** - * Protobuf type {@code org.jetbrains.kotlin.backend.common.serialization.proto.PirConstructorCarrier} - */ - public static final class Builder extends - org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder< - org.jetbrains.kotlin.backend.common.serialization.proto.PirConstructorCarrier, Builder> - implements - // @@protoc_insertion_point(builder_implements:org.jetbrains.kotlin.backend.common.serialization.proto.PirConstructorCarrier) - org.jetbrains.kotlin.backend.common.serialization.proto.PirConstructorCarrierOrBuilder { - // Construct using org.jetbrains.kotlin.backend.common.serialization.proto.PirConstructorCarrier.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - lastModified_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - parentSymbol_ = 0L; - bitField0_ = (bitField0_ & ~0x00000002); - origin_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - annotation_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - returnTypeField_ = 0; - bitField0_ = (bitField0_ & ~0x00000010); - dispatchReceiverParameter_ = 0L; - bitField0_ = (bitField0_ & ~0x00000020); - extensionReceiverParameter_ = 0L; - bitField0_ = (bitField0_ & ~0x00000040); - body_ = 0; - bitField0_ = (bitField0_ & ~0x00000080); - typeParameters_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000100); - valueParameters_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000200); - flags_ = 0L; - bitField0_ = (bitField0_ & ~0x00000400); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public org.jetbrains.kotlin.backend.common.serialization.proto.PirConstructorCarrier getDefaultInstanceForType() { - return org.jetbrains.kotlin.backend.common.serialization.proto.PirConstructorCarrier.getDefaultInstance(); - } - - public org.jetbrains.kotlin.backend.common.serialization.proto.PirConstructorCarrier build() { - org.jetbrains.kotlin.backend.common.serialization.proto.PirConstructorCarrier result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.jetbrains.kotlin.backend.common.serialization.proto.PirConstructorCarrier buildPartial() { - org.jetbrains.kotlin.backend.common.serialization.proto.PirConstructorCarrier result = new org.jetbrains.kotlin.backend.common.serialization.proto.PirConstructorCarrier(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.lastModified_ = lastModified_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.parentSymbol_ = parentSymbol_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.origin_ = origin_; - if (((bitField0_ & 0x00000008) == 0x00000008)) { - annotation_ = java.util.Collections.unmodifiableList(annotation_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.annotation_ = annotation_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000008; - } - result.returnTypeField_ = returnTypeField_; - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x00000010; - } - result.dispatchReceiverParameter_ = dispatchReceiverParameter_; - if (((from_bitField0_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x00000020; - } - result.extensionReceiverParameter_ = extensionReceiverParameter_; - if (((from_bitField0_ & 0x00000080) == 0x00000080)) { - to_bitField0_ |= 0x00000040; - } - result.body_ = body_; - if (((bitField0_ & 0x00000100) == 0x00000100)) { - typeParameters_ = java.util.Collections.unmodifiableList(typeParameters_); - bitField0_ = (bitField0_ & ~0x00000100); - } - result.typeParameters_ = typeParameters_; - if (((bitField0_ & 0x00000200) == 0x00000200)) { - valueParameters_ = java.util.Collections.unmodifiableList(valueParameters_); - bitField0_ = (bitField0_ & ~0x00000200); - } - result.valueParameters_ = valueParameters_; - if (((from_bitField0_ & 0x00000400) == 0x00000400)) { - to_bitField0_ |= 0x00000080; - } - result.flags_ = flags_; - result.bitField0_ = to_bitField0_; - return result; - } - - public Builder mergeFrom(org.jetbrains.kotlin.backend.common.serialization.proto.PirConstructorCarrier other) { - if (other == org.jetbrains.kotlin.backend.common.serialization.proto.PirConstructorCarrier.getDefaultInstance()) return this; - if (other.hasLastModified()) { - setLastModified(other.getLastModified()); - } - if (other.hasParentSymbol()) { - setParentSymbol(other.getParentSymbol()); - } - if (other.hasOrigin()) { - setOrigin(other.getOrigin()); - } - if (!other.annotation_.isEmpty()) { - if (annotation_.isEmpty()) { - annotation_ = other.annotation_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureAnnotationIsMutable(); - annotation_.addAll(other.annotation_); - } - - } - if (other.hasReturnTypeField()) { - setReturnTypeField(other.getReturnTypeField()); - } - if (other.hasDispatchReceiverParameter()) { - setDispatchReceiverParameter(other.getDispatchReceiverParameter()); - } - if (other.hasExtensionReceiverParameter()) { - setExtensionReceiverParameter(other.getExtensionReceiverParameter()); - } - if (other.hasBody()) { - setBody(other.getBody()); - } - if (!other.typeParameters_.isEmpty()) { - if (typeParameters_.isEmpty()) { - typeParameters_ = other.typeParameters_; - bitField0_ = (bitField0_ & ~0x00000100); - } else { - ensureTypeParametersIsMutable(); - typeParameters_.addAll(other.typeParameters_); - } - - } - if (!other.valueParameters_.isEmpty()) { - if (valueParameters_.isEmpty()) { - valueParameters_ = other.valueParameters_; - bitField0_ = (bitField0_ & ~0x00000200); - } else { - ensureValueParametersIsMutable(); - valueParameters_.addAll(other.valueParameters_); - } - - } - if (other.hasFlags()) { - setFlags(other.getFlags()); - } - setUnknownFields( - getUnknownFields().concat(other.unknownFields)); - return this; - } - - public final boolean isInitialized() { - if (!hasLastModified()) { - - return false; - } - if (!hasReturnTypeField()) { - - return false; - } - for (int i = 0; i < getAnnotationCount(); i++) { - if (!getAnnotation(i).isInitialized()) { - - return false; - } - } - return true; - } - - public Builder mergeFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.jetbrains.kotlin.backend.common.serialization.proto.PirConstructorCarrier parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.jetbrains.kotlin.backend.common.serialization.proto.PirConstructorCarrier) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int lastModified_ ; - /** - * required int32 lastModified = 1; - */ - public boolean hasLastModified() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required int32 lastModified = 1; - */ - public int getLastModified() { - return lastModified_; - } - /** - * required int32 lastModified = 1; - */ - public Builder setLastModified(int value) { - bitField0_ |= 0x00000001; - lastModified_ = value; - - return this; - } - /** - * required int32 lastModified = 1; - */ - public Builder clearLastModified() { - bitField0_ = (bitField0_ & ~0x00000001); - lastModified_ = 0; - - return this; - } - - private long parentSymbol_ ; - /** - * optional int64 parentSymbol = 2; - */ - public boolean hasParentSymbol() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional int64 parentSymbol = 2; - */ - public long getParentSymbol() { - return parentSymbol_; - } - /** - * optional int64 parentSymbol = 2; - */ - public Builder setParentSymbol(long value) { - bitField0_ |= 0x00000002; - parentSymbol_ = value; - - return this; - } - /** - * optional int64 parentSymbol = 2; - */ - public Builder clearParentSymbol() { - bitField0_ = (bitField0_ & ~0x00000002); - parentSymbol_ = 0L; - - return this; - } - - private int origin_ ; - /** - * optional int32 origin = 3; - */ - public boolean hasOrigin() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int32 origin = 3; - */ - public int getOrigin() { - return origin_; - } - /** - * optional int32 origin = 3; - */ - public Builder setOrigin(int value) { - bitField0_ |= 0x00000004; - origin_ = value; - - return this; - } - /** - * optional int32 origin = 3; - */ - public Builder clearOrigin() { - bitField0_ = (bitField0_ & ~0x00000004); - origin_ = 0; - - return this; - } - - private java.util.List annotation_ = - java.util.Collections.emptyList(); - private void ensureAnnotationIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { - annotation_ = new java.util.ArrayList(annotation_); - bitField0_ |= 0x00000008; - } - } - - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public java.util.List getAnnotationList() { - return java.util.Collections.unmodifiableList(annotation_); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public int getAnnotationCount() { - return annotation_.size(); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index) { - return annotation_.get(index); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder setAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnnotationIsMutable(); - annotation_.set(index, value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder setAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) { - ensureAnnotationIsMutable(); - annotation_.set(index, builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation(org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnnotationIsMutable(); - annotation_.add(value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnnotationIsMutable(); - annotation_.add(index, value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation( - org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) { - ensureAnnotationIsMutable(); - annotation_.add(builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) { - ensureAnnotationIsMutable(); - annotation_.add(index, builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAllAnnotation( - java.lang.Iterable values) { - ensureAnnotationIsMutable(); - org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( - values, annotation_); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder clearAnnotation() { - annotation_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder removeAnnotation(int index) { - ensureAnnotationIsMutable(); - annotation_.remove(index); - - return this; - } - - private int returnTypeField_ ; - /** - * required int32 returnTypeField = 5; - */ - public boolean hasReturnTypeField() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * required int32 returnTypeField = 5; - */ - public int getReturnTypeField() { - return returnTypeField_; - } - /** - * required int32 returnTypeField = 5; - */ - public Builder setReturnTypeField(int value) { - bitField0_ |= 0x00000010; - returnTypeField_ = value; - - return this; - } - /** - * required int32 returnTypeField = 5; - */ - public Builder clearReturnTypeField() { - bitField0_ = (bitField0_ & ~0x00000010); - returnTypeField_ = 0; - - return this; - } - - private long dispatchReceiverParameter_ ; - /** - * optional int64 dispatchReceiverParameter = 6; - */ - public boolean hasDispatchReceiverParameter() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional int64 dispatchReceiverParameter = 6; - */ - public long getDispatchReceiverParameter() { - return dispatchReceiverParameter_; - } - /** - * optional int64 dispatchReceiverParameter = 6; - */ - public Builder setDispatchReceiverParameter(long value) { - bitField0_ |= 0x00000020; - dispatchReceiverParameter_ = value; - - return this; - } - /** - * optional int64 dispatchReceiverParameter = 6; - */ - public Builder clearDispatchReceiverParameter() { - bitField0_ = (bitField0_ & ~0x00000020); - dispatchReceiverParameter_ = 0L; - - return this; - } - - private long extensionReceiverParameter_ ; - /** - * optional int64 extensionReceiverParameter = 7; - */ - public boolean hasExtensionReceiverParameter() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - /** - * optional int64 extensionReceiverParameter = 7; - */ - public long getExtensionReceiverParameter() { - return extensionReceiverParameter_; - } - /** - * optional int64 extensionReceiverParameter = 7; - */ - public Builder setExtensionReceiverParameter(long value) { - bitField0_ |= 0x00000040; - extensionReceiverParameter_ = value; - - return this; - } - /** - * optional int64 extensionReceiverParameter = 7; - */ - public Builder clearExtensionReceiverParameter() { - bitField0_ = (bitField0_ & ~0x00000040); - extensionReceiverParameter_ = 0L; - - return this; - } - - private int body_ ; - /** - * optional int32 body = 8; - */ - public boolean hasBody() { - return ((bitField0_ & 0x00000080) == 0x00000080); - } - /** - * optional int32 body = 8; - */ - public int getBody() { - return body_; - } - /** - * optional int32 body = 8; - */ - public Builder setBody(int value) { - bitField0_ |= 0x00000080; - body_ = value; - - return this; - } - /** - * optional int32 body = 8; - */ - public Builder clearBody() { - bitField0_ = (bitField0_ & ~0x00000080); - body_ = 0; - - return this; - } - - private java.util.List typeParameters_ = java.util.Collections.emptyList(); - private void ensureTypeParametersIsMutable() { - if (!((bitField0_ & 0x00000100) == 0x00000100)) { - typeParameters_ = new java.util.ArrayList(typeParameters_); - bitField0_ |= 0x00000100; - } - } - /** - * repeated int64 typeParameters = 9; - */ - public java.util.List - getTypeParametersList() { - return java.util.Collections.unmodifiableList(typeParameters_); - } - /** - * repeated int64 typeParameters = 9; - */ - public int getTypeParametersCount() { - return typeParameters_.size(); - } - /** - * repeated int64 typeParameters = 9; - */ - public long getTypeParameters(int index) { - return typeParameters_.get(index); - } - /** - * repeated int64 typeParameters = 9; - */ - public Builder setTypeParameters( - int index, long value) { - ensureTypeParametersIsMutable(); - typeParameters_.set(index, value); - - return this; - } - /** - * repeated int64 typeParameters = 9; - */ - public Builder addTypeParameters(long value) { - ensureTypeParametersIsMutable(); - typeParameters_.add(value); - - return this; - } - /** - * repeated int64 typeParameters = 9; - */ - public Builder addAllTypeParameters( - java.lang.Iterable values) { - ensureTypeParametersIsMutable(); - org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( - values, typeParameters_); - - return this; - } - /** - * repeated int64 typeParameters = 9; - */ - public Builder clearTypeParameters() { - typeParameters_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000100); - - return this; - } - - private java.util.List valueParameters_ = java.util.Collections.emptyList(); - private void ensureValueParametersIsMutable() { - if (!((bitField0_ & 0x00000200) == 0x00000200)) { - valueParameters_ = new java.util.ArrayList(valueParameters_); - bitField0_ |= 0x00000200; - } - } - /** - * repeated int64 valueParameters = 10; - */ - public java.util.List - getValueParametersList() { - return java.util.Collections.unmodifiableList(valueParameters_); - } - /** - * repeated int64 valueParameters = 10; - */ - public int getValueParametersCount() { - return valueParameters_.size(); - } - /** - * repeated int64 valueParameters = 10; - */ - public long getValueParameters(int index) { - return valueParameters_.get(index); - } - /** - * repeated int64 valueParameters = 10; - */ - public Builder setValueParameters( - int index, long value) { - ensureValueParametersIsMutable(); - valueParameters_.set(index, value); - - return this; - } - /** - * repeated int64 valueParameters = 10; - */ - public Builder addValueParameters(long value) { - ensureValueParametersIsMutable(); - valueParameters_.add(value); - - return this; - } - /** - * repeated int64 valueParameters = 10; - */ - public Builder addAllValueParameters( - java.lang.Iterable values) { - ensureValueParametersIsMutable(); - org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( - values, valueParameters_); - - return this; - } - /** - * repeated int64 valueParameters = 10; - */ - public Builder clearValueParameters() { - valueParameters_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000200); - - return this; - } - - private long flags_ ; - /** - * optional int64 flags = 11 [default = 0]; - */ - public boolean hasFlags() { - return ((bitField0_ & 0x00000400) == 0x00000400); - } - /** - * optional int64 flags = 11 [default = 0]; - */ - public long getFlags() { - return flags_; - } - /** - * optional int64 flags = 11 [default = 0]; - */ - public Builder setFlags(long value) { - bitField0_ |= 0x00000400; - flags_ = value; - - return this; - } - /** - * optional int64 flags = 11 [default = 0]; - */ - public Builder clearFlags() { - bitField0_ = (bitField0_ & ~0x00000400); - flags_ = 0L; - - return this; - } - - // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.backend.common.serialization.proto.PirConstructorCarrier) - } - - static { - defaultInstance = new PirConstructorCarrier(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.PirConstructorCarrier) -} diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirConstructorCarrierOrBuilder.java b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirConstructorCarrierOrBuilder.java deleted file mode 100644 index 041ed879007..00000000000 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirConstructorCarrierOrBuilder.java +++ /dev/null @@ -1,121 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: compiler/ir/serialization.common/src/KotlinPirCarriers.proto - -package org.jetbrains.kotlin.backend.common.serialization.proto; - -public interface PirConstructorCarrierOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.backend.common.serialization.proto.PirConstructorCarrier) - org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder { - - /** - * required int32 lastModified = 1; - */ - boolean hasLastModified(); - /** - * required int32 lastModified = 1; - */ - int getLastModified(); - - /** - * optional int64 parentSymbol = 2; - */ - boolean hasParentSymbol(); - /** - * optional int64 parentSymbol = 2; - */ - long getParentSymbol(); - - /** - * optional int32 origin = 3; - */ - boolean hasOrigin(); - /** - * optional int32 origin = 3; - */ - int getOrigin(); - - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - java.util.List - getAnnotationList(); - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index); - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - int getAnnotationCount(); - - /** - * required int32 returnTypeField = 5; - */ - boolean hasReturnTypeField(); - /** - * required int32 returnTypeField = 5; - */ - int getReturnTypeField(); - - /** - * optional int64 dispatchReceiverParameter = 6; - */ - boolean hasDispatchReceiverParameter(); - /** - * optional int64 dispatchReceiverParameter = 6; - */ - long getDispatchReceiverParameter(); - - /** - * optional int64 extensionReceiverParameter = 7; - */ - boolean hasExtensionReceiverParameter(); - /** - * optional int64 extensionReceiverParameter = 7; - */ - long getExtensionReceiverParameter(); - - /** - * optional int32 body = 8; - */ - boolean hasBody(); - /** - * optional int32 body = 8; - */ - int getBody(); - - /** - * repeated int64 typeParameters = 9; - */ - java.util.List getTypeParametersList(); - /** - * repeated int64 typeParameters = 9; - */ - int getTypeParametersCount(); - /** - * repeated int64 typeParameters = 9; - */ - long getTypeParameters(int index); - - /** - * repeated int64 valueParameters = 10; - */ - java.util.List getValueParametersList(); - /** - * repeated int64 valueParameters = 10; - */ - int getValueParametersCount(); - /** - * repeated int64 valueParameters = 10; - */ - long getValueParameters(int index); - - /** - * optional int64 flags = 11 [default = 0]; - */ - boolean hasFlags(); - /** - * optional int64 flags = 11 [default = 0]; - */ - long getFlags(); -} \ No newline at end of file diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirEnumEntryCarrier.java b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirEnumEntryCarrier.java deleted file mode 100644 index 6ac6c39d5ac..00000000000 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirEnumEntryCarrier.java +++ /dev/null @@ -1,835 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: compiler/ir/serialization.common/src/KotlinPirCarriers.proto - -package org.jetbrains.kotlin.backend.common.serialization.proto; - -/** - * Protobuf type {@code org.jetbrains.kotlin.backend.common.serialization.proto.PirEnumEntryCarrier} - */ -public final class PirEnumEntryCarrier extends - org.jetbrains.kotlin.protobuf.GeneratedMessageLite implements - // @@protoc_insertion_point(message_implements:org.jetbrains.kotlin.backend.common.serialization.proto.PirEnumEntryCarrier) - PirEnumEntryCarrierOrBuilder { - // Use PirEnumEntryCarrier.newBuilder() to construct. - private PirEnumEntryCarrier(org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private PirEnumEntryCarrier(boolean noInit) { this.unknownFields = org.jetbrains.kotlin.protobuf.ByteString.EMPTY;} - - private static final PirEnumEntryCarrier defaultInstance; - public static PirEnumEntryCarrier getDefaultInstance() { - return defaultInstance; - } - - public PirEnumEntryCarrier getDefaultInstanceForType() { - return defaultInstance; - } - - private final org.jetbrains.kotlin.protobuf.ByteString unknownFields; - private PirEnumEntryCarrier( - 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 8: { - bitField0_ |= 0x00000001; - lastModified_ = input.readInt32(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - parentSymbol_ = input.readInt64(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - origin_ = input.readInt32(); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - annotation_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - annotation_.add(input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.PARSER, extensionRegistry)); - break; - } - case 40: { - bitField0_ |= 0x00000008; - correspondingClass_ = input.readInt64(); - break; - } - case 48: { - bitField0_ |= 0x00000010; - initializerExpression_ = input.readInt32(); - 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_ & 0x00000008) == 0x00000008)) { - annotation_ = java.util.Collections.unmodifiableList(annotation_); - } - try { - unknownFieldsCodedOutput.flush(); - } catch (java.io.IOException e) { - // Should not happen - } finally { - unknownFields = unknownFieldsOutput.toByteString(); - } - makeExtensionsImmutable(); - } - } - public static org.jetbrains.kotlin.protobuf.Parser PARSER = - new org.jetbrains.kotlin.protobuf.AbstractParser() { - public PirEnumEntryCarrier parsePartialFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return new PirEnumEntryCarrier(input, extensionRegistry); - } - }; - - @java.lang.Override - public org.jetbrains.kotlin.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - public static final int LASTMODIFIED_FIELD_NUMBER = 1; - private int lastModified_; - /** - * required int32 lastModified = 1; - */ - public boolean hasLastModified() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required int32 lastModified = 1; - */ - public int getLastModified() { - return lastModified_; - } - - public static final int PARENTSYMBOL_FIELD_NUMBER = 2; - private long parentSymbol_; - /** - * optional int64 parentSymbol = 2; - */ - public boolean hasParentSymbol() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional int64 parentSymbol = 2; - */ - public long getParentSymbol() { - return parentSymbol_; - } - - public static final int ORIGIN_FIELD_NUMBER = 3; - private int origin_; - /** - * optional int32 origin = 3; - */ - public boolean hasOrigin() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int32 origin = 3; - */ - public int getOrigin() { - return origin_; - } - - public static final int ANNOTATION_FIELD_NUMBER = 4; - private java.util.List annotation_; - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public java.util.List getAnnotationList() { - return annotation_; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public java.util.List - getAnnotationOrBuilderList() { - return annotation_; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public int getAnnotationCount() { - return annotation_.size(); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index) { - return annotation_.get(index); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCallOrBuilder getAnnotationOrBuilder( - int index) { - return annotation_.get(index); - } - - public static final int CORRESPONDINGCLASS_FIELD_NUMBER = 5; - private long correspondingClass_; - /** - * optional int64 correspondingClass = 5; - */ - public boolean hasCorrespondingClass() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional int64 correspondingClass = 5; - */ - public long getCorrespondingClass() { - return correspondingClass_; - } - - public static final int INITIALIZEREXPRESSION_FIELD_NUMBER = 6; - private int initializerExpression_; - /** - * optional int32 initializerExpression = 6; - */ - public boolean hasInitializerExpression() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional int32 initializerExpression = 6; - */ - public int getInitializerExpression() { - return initializerExpression_; - } - - private void initFields() { - lastModified_ = 0; - parentSymbol_ = 0L; - origin_ = 0; - annotation_ = java.util.Collections.emptyList(); - correspondingClass_ = 0L; - initializerExpression_ = 0; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (!hasLastModified()) { - memoizedIsInitialized = 0; - return false; - } - for (int i = 0; i < getAnnotationCount(); i++) { - if (!getAnnotation(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(org.jetbrains.kotlin.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeInt32(1, lastModified_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeInt64(2, parentSymbol_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeInt32(3, origin_); - } - for (int i = 0; i < annotation_.size(); i++) { - output.writeMessage(4, annotation_.get(i)); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeInt64(5, correspondingClass_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeInt32(6, initializerExpression_); - } - 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 - .computeInt32Size(1, lastModified_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt64Size(2, parentSymbol_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt32Size(3, origin_); - } - for (int i = 0; i < annotation_.size(); i++) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeMessageSize(4, annotation_.get(i)); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt64Size(5, correspondingClass_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt32Size(6, initializerExpression_); - } - size += unknownFields.size(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirEnumEntryCarrier parseFrom( - org.jetbrains.kotlin.protobuf.ByteString data) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirEnumEntryCarrier parseFrom( - org.jetbrains.kotlin.protobuf.ByteString data, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirEnumEntryCarrier parseFrom(byte[] data) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirEnumEntryCarrier parseFrom( - byte[] data, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirEnumEntryCarrier parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirEnumEntryCarrier parseFrom( - java.io.InputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirEnumEntryCarrier parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirEnumEntryCarrier parseDelimitedFrom( - java.io.InputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirEnumEntryCarrier parseFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirEnumEntryCarrier parseFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.jetbrains.kotlin.backend.common.serialization.proto.PirEnumEntryCarrier prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - /** - * Protobuf type {@code org.jetbrains.kotlin.backend.common.serialization.proto.PirEnumEntryCarrier} - */ - public static final class Builder extends - org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder< - org.jetbrains.kotlin.backend.common.serialization.proto.PirEnumEntryCarrier, Builder> - implements - // @@protoc_insertion_point(builder_implements:org.jetbrains.kotlin.backend.common.serialization.proto.PirEnumEntryCarrier) - org.jetbrains.kotlin.backend.common.serialization.proto.PirEnumEntryCarrierOrBuilder { - // Construct using org.jetbrains.kotlin.backend.common.serialization.proto.PirEnumEntryCarrier.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - lastModified_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - parentSymbol_ = 0L; - bitField0_ = (bitField0_ & ~0x00000002); - origin_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - annotation_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - correspondingClass_ = 0L; - bitField0_ = (bitField0_ & ~0x00000010); - initializerExpression_ = 0; - bitField0_ = (bitField0_ & ~0x00000020); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public org.jetbrains.kotlin.backend.common.serialization.proto.PirEnumEntryCarrier getDefaultInstanceForType() { - return org.jetbrains.kotlin.backend.common.serialization.proto.PirEnumEntryCarrier.getDefaultInstance(); - } - - public org.jetbrains.kotlin.backend.common.serialization.proto.PirEnumEntryCarrier build() { - org.jetbrains.kotlin.backend.common.serialization.proto.PirEnumEntryCarrier result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.jetbrains.kotlin.backend.common.serialization.proto.PirEnumEntryCarrier buildPartial() { - org.jetbrains.kotlin.backend.common.serialization.proto.PirEnumEntryCarrier result = new org.jetbrains.kotlin.backend.common.serialization.proto.PirEnumEntryCarrier(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.lastModified_ = lastModified_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.parentSymbol_ = parentSymbol_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.origin_ = origin_; - if (((bitField0_ & 0x00000008) == 0x00000008)) { - annotation_ = java.util.Collections.unmodifiableList(annotation_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.annotation_ = annotation_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000008; - } - result.correspondingClass_ = correspondingClass_; - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x00000010; - } - result.initializerExpression_ = initializerExpression_; - result.bitField0_ = to_bitField0_; - return result; - } - - public Builder mergeFrom(org.jetbrains.kotlin.backend.common.serialization.proto.PirEnumEntryCarrier other) { - if (other == org.jetbrains.kotlin.backend.common.serialization.proto.PirEnumEntryCarrier.getDefaultInstance()) return this; - if (other.hasLastModified()) { - setLastModified(other.getLastModified()); - } - if (other.hasParentSymbol()) { - setParentSymbol(other.getParentSymbol()); - } - if (other.hasOrigin()) { - setOrigin(other.getOrigin()); - } - if (!other.annotation_.isEmpty()) { - if (annotation_.isEmpty()) { - annotation_ = other.annotation_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureAnnotationIsMutable(); - annotation_.addAll(other.annotation_); - } - - } - if (other.hasCorrespondingClass()) { - setCorrespondingClass(other.getCorrespondingClass()); - } - if (other.hasInitializerExpression()) { - setInitializerExpression(other.getInitializerExpression()); - } - setUnknownFields( - getUnknownFields().concat(other.unknownFields)); - return this; - } - - public final boolean isInitialized() { - if (!hasLastModified()) { - - return false; - } - for (int i = 0; i < getAnnotationCount(); i++) { - if (!getAnnotation(i).isInitialized()) { - - return false; - } - } - return true; - } - - public Builder mergeFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.jetbrains.kotlin.backend.common.serialization.proto.PirEnumEntryCarrier parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.jetbrains.kotlin.backend.common.serialization.proto.PirEnumEntryCarrier) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int lastModified_ ; - /** - * required int32 lastModified = 1; - */ - public boolean hasLastModified() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required int32 lastModified = 1; - */ - public int getLastModified() { - return lastModified_; - } - /** - * required int32 lastModified = 1; - */ - public Builder setLastModified(int value) { - bitField0_ |= 0x00000001; - lastModified_ = value; - - return this; - } - /** - * required int32 lastModified = 1; - */ - public Builder clearLastModified() { - bitField0_ = (bitField0_ & ~0x00000001); - lastModified_ = 0; - - return this; - } - - private long parentSymbol_ ; - /** - * optional int64 parentSymbol = 2; - */ - public boolean hasParentSymbol() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional int64 parentSymbol = 2; - */ - public long getParentSymbol() { - return parentSymbol_; - } - /** - * optional int64 parentSymbol = 2; - */ - public Builder setParentSymbol(long value) { - bitField0_ |= 0x00000002; - parentSymbol_ = value; - - return this; - } - /** - * optional int64 parentSymbol = 2; - */ - public Builder clearParentSymbol() { - bitField0_ = (bitField0_ & ~0x00000002); - parentSymbol_ = 0L; - - return this; - } - - private int origin_ ; - /** - * optional int32 origin = 3; - */ - public boolean hasOrigin() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int32 origin = 3; - */ - public int getOrigin() { - return origin_; - } - /** - * optional int32 origin = 3; - */ - public Builder setOrigin(int value) { - bitField0_ |= 0x00000004; - origin_ = value; - - return this; - } - /** - * optional int32 origin = 3; - */ - public Builder clearOrigin() { - bitField0_ = (bitField0_ & ~0x00000004); - origin_ = 0; - - return this; - } - - private java.util.List annotation_ = - java.util.Collections.emptyList(); - private void ensureAnnotationIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { - annotation_ = new java.util.ArrayList(annotation_); - bitField0_ |= 0x00000008; - } - } - - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public java.util.List getAnnotationList() { - return java.util.Collections.unmodifiableList(annotation_); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public int getAnnotationCount() { - return annotation_.size(); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index) { - return annotation_.get(index); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder setAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnnotationIsMutable(); - annotation_.set(index, value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder setAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) { - ensureAnnotationIsMutable(); - annotation_.set(index, builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation(org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnnotationIsMutable(); - annotation_.add(value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnnotationIsMutable(); - annotation_.add(index, value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation( - org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) { - ensureAnnotationIsMutable(); - annotation_.add(builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) { - ensureAnnotationIsMutable(); - annotation_.add(index, builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAllAnnotation( - java.lang.Iterable values) { - ensureAnnotationIsMutable(); - org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( - values, annotation_); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder clearAnnotation() { - annotation_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder removeAnnotation(int index) { - ensureAnnotationIsMutable(); - annotation_.remove(index); - - return this; - } - - private long correspondingClass_ ; - /** - * optional int64 correspondingClass = 5; - */ - public boolean hasCorrespondingClass() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional int64 correspondingClass = 5; - */ - public long getCorrespondingClass() { - return correspondingClass_; - } - /** - * optional int64 correspondingClass = 5; - */ - public Builder setCorrespondingClass(long value) { - bitField0_ |= 0x00000010; - correspondingClass_ = value; - - return this; - } - /** - * optional int64 correspondingClass = 5; - */ - public Builder clearCorrespondingClass() { - bitField0_ = (bitField0_ & ~0x00000010); - correspondingClass_ = 0L; - - return this; - } - - private int initializerExpression_ ; - /** - * optional int32 initializerExpression = 6; - */ - public boolean hasInitializerExpression() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional int32 initializerExpression = 6; - */ - public int getInitializerExpression() { - return initializerExpression_; - } - /** - * optional int32 initializerExpression = 6; - */ - public Builder setInitializerExpression(int value) { - bitField0_ |= 0x00000020; - initializerExpression_ = value; - - return this; - } - /** - * optional int32 initializerExpression = 6; - */ - public Builder clearInitializerExpression() { - bitField0_ = (bitField0_ & ~0x00000020); - initializerExpression_ = 0; - - return this; - } - - // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.backend.common.serialization.proto.PirEnumEntryCarrier) - } - - static { - defaultInstance = new PirEnumEntryCarrier(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.PirEnumEntryCarrier) -} diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirEnumEntryCarrierOrBuilder.java b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirEnumEntryCarrierOrBuilder.java deleted file mode 100644 index 61bdecc25f8..00000000000 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirEnumEntryCarrierOrBuilder.java +++ /dev/null @@ -1,68 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: compiler/ir/serialization.common/src/KotlinPirCarriers.proto - -package org.jetbrains.kotlin.backend.common.serialization.proto; - -public interface PirEnumEntryCarrierOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.backend.common.serialization.proto.PirEnumEntryCarrier) - org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder { - - /** - * required int32 lastModified = 1; - */ - boolean hasLastModified(); - /** - * required int32 lastModified = 1; - */ - int getLastModified(); - - /** - * optional int64 parentSymbol = 2; - */ - boolean hasParentSymbol(); - /** - * optional int64 parentSymbol = 2; - */ - long getParentSymbol(); - - /** - * optional int32 origin = 3; - */ - boolean hasOrigin(); - /** - * optional int32 origin = 3; - */ - int getOrigin(); - - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - java.util.List - getAnnotationList(); - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index); - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - int getAnnotationCount(); - - /** - * optional int64 correspondingClass = 5; - */ - boolean hasCorrespondingClass(); - /** - * optional int64 correspondingClass = 5; - */ - long getCorrespondingClass(); - - /** - * optional int32 initializerExpression = 6; - */ - boolean hasInitializerExpression(); - /** - * optional int32 initializerExpression = 6; - */ - int getInitializerExpression(); -} \ No newline at end of file diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirErrorDeclarationCarrier.java b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirErrorDeclarationCarrier.java deleted file mode 100644 index a8775287cb3..00000000000 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirErrorDeclarationCarrier.java +++ /dev/null @@ -1,697 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: compiler/ir/serialization.common/src/KotlinPirCarriers.proto - -package org.jetbrains.kotlin.backend.common.serialization.proto; - -/** - * Protobuf type {@code org.jetbrains.kotlin.backend.common.serialization.proto.PirErrorDeclarationCarrier} - */ -public final class PirErrorDeclarationCarrier extends - org.jetbrains.kotlin.protobuf.GeneratedMessageLite implements - // @@protoc_insertion_point(message_implements:org.jetbrains.kotlin.backend.common.serialization.proto.PirErrorDeclarationCarrier) - PirErrorDeclarationCarrierOrBuilder { - // Use PirErrorDeclarationCarrier.newBuilder() to construct. - private PirErrorDeclarationCarrier(org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private PirErrorDeclarationCarrier(boolean noInit) { this.unknownFields = org.jetbrains.kotlin.protobuf.ByteString.EMPTY;} - - private static final PirErrorDeclarationCarrier defaultInstance; - public static PirErrorDeclarationCarrier getDefaultInstance() { - return defaultInstance; - } - - public PirErrorDeclarationCarrier getDefaultInstanceForType() { - return defaultInstance; - } - - private final org.jetbrains.kotlin.protobuf.ByteString unknownFields; - private PirErrorDeclarationCarrier( - 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 8: { - bitField0_ |= 0x00000001; - lastModified_ = input.readInt32(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - parentSymbol_ = input.readInt64(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - origin_ = input.readInt32(); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - annotation_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - annotation_.add(input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.PARSER, extensionRegistry)); - break; - } - } - } - } catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - annotation_ = java.util.Collections.unmodifiableList(annotation_); - } - try { - unknownFieldsCodedOutput.flush(); - } catch (java.io.IOException e) { - // Should not happen - } finally { - unknownFields = unknownFieldsOutput.toByteString(); - } - makeExtensionsImmutable(); - } - } - public static org.jetbrains.kotlin.protobuf.Parser PARSER = - new org.jetbrains.kotlin.protobuf.AbstractParser() { - public PirErrorDeclarationCarrier parsePartialFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return new PirErrorDeclarationCarrier(input, extensionRegistry); - } - }; - - @java.lang.Override - public org.jetbrains.kotlin.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - public static final int LASTMODIFIED_FIELD_NUMBER = 1; - private int lastModified_; - /** - * required int32 lastModified = 1; - */ - public boolean hasLastModified() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required int32 lastModified = 1; - */ - public int getLastModified() { - return lastModified_; - } - - public static final int PARENTSYMBOL_FIELD_NUMBER = 2; - private long parentSymbol_; - /** - * optional int64 parentSymbol = 2; - */ - public boolean hasParentSymbol() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional int64 parentSymbol = 2; - */ - public long getParentSymbol() { - return parentSymbol_; - } - - public static final int ORIGIN_FIELD_NUMBER = 3; - private int origin_; - /** - * optional int32 origin = 3; - */ - public boolean hasOrigin() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int32 origin = 3; - */ - public int getOrigin() { - return origin_; - } - - public static final int ANNOTATION_FIELD_NUMBER = 4; - private java.util.List annotation_; - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public java.util.List getAnnotationList() { - return annotation_; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public java.util.List - getAnnotationOrBuilderList() { - return annotation_; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public int getAnnotationCount() { - return annotation_.size(); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index) { - return annotation_.get(index); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCallOrBuilder getAnnotationOrBuilder( - int index) { - return annotation_.get(index); - } - - private void initFields() { - lastModified_ = 0; - parentSymbol_ = 0L; - origin_ = 0; - annotation_ = java.util.Collections.emptyList(); - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (!hasLastModified()) { - memoizedIsInitialized = 0; - return false; - } - for (int i = 0; i < getAnnotationCount(); i++) { - if (!getAnnotation(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(org.jetbrains.kotlin.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeInt32(1, lastModified_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeInt64(2, parentSymbol_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeInt32(3, origin_); - } - for (int i = 0; i < annotation_.size(); i++) { - output.writeMessage(4, annotation_.get(i)); - } - 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 - .computeInt32Size(1, lastModified_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt64Size(2, parentSymbol_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt32Size(3, origin_); - } - for (int i = 0; i < annotation_.size(); i++) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeMessageSize(4, annotation_.get(i)); - } - size += unknownFields.size(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirErrorDeclarationCarrier parseFrom( - org.jetbrains.kotlin.protobuf.ByteString data) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirErrorDeclarationCarrier parseFrom( - org.jetbrains.kotlin.protobuf.ByteString data, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirErrorDeclarationCarrier parseFrom(byte[] data) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirErrorDeclarationCarrier parseFrom( - byte[] data, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirErrorDeclarationCarrier parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirErrorDeclarationCarrier parseFrom( - java.io.InputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirErrorDeclarationCarrier parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirErrorDeclarationCarrier parseDelimitedFrom( - java.io.InputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirErrorDeclarationCarrier parseFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirErrorDeclarationCarrier parseFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.jetbrains.kotlin.backend.common.serialization.proto.PirErrorDeclarationCarrier prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - /** - * Protobuf type {@code org.jetbrains.kotlin.backend.common.serialization.proto.PirErrorDeclarationCarrier} - */ - public static final class Builder extends - org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder< - org.jetbrains.kotlin.backend.common.serialization.proto.PirErrorDeclarationCarrier, Builder> - implements - // @@protoc_insertion_point(builder_implements:org.jetbrains.kotlin.backend.common.serialization.proto.PirErrorDeclarationCarrier) - org.jetbrains.kotlin.backend.common.serialization.proto.PirErrorDeclarationCarrierOrBuilder { - // Construct using org.jetbrains.kotlin.backend.common.serialization.proto.PirErrorDeclarationCarrier.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - lastModified_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - parentSymbol_ = 0L; - bitField0_ = (bitField0_ & ~0x00000002); - origin_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - annotation_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public org.jetbrains.kotlin.backend.common.serialization.proto.PirErrorDeclarationCarrier getDefaultInstanceForType() { - return org.jetbrains.kotlin.backend.common.serialization.proto.PirErrorDeclarationCarrier.getDefaultInstance(); - } - - public org.jetbrains.kotlin.backend.common.serialization.proto.PirErrorDeclarationCarrier build() { - org.jetbrains.kotlin.backend.common.serialization.proto.PirErrorDeclarationCarrier result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.jetbrains.kotlin.backend.common.serialization.proto.PirErrorDeclarationCarrier buildPartial() { - org.jetbrains.kotlin.backend.common.serialization.proto.PirErrorDeclarationCarrier result = new org.jetbrains.kotlin.backend.common.serialization.proto.PirErrorDeclarationCarrier(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.lastModified_ = lastModified_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.parentSymbol_ = parentSymbol_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.origin_ = origin_; - if (((bitField0_ & 0x00000008) == 0x00000008)) { - annotation_ = java.util.Collections.unmodifiableList(annotation_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.annotation_ = annotation_; - result.bitField0_ = to_bitField0_; - return result; - } - - public Builder mergeFrom(org.jetbrains.kotlin.backend.common.serialization.proto.PirErrorDeclarationCarrier other) { - if (other == org.jetbrains.kotlin.backend.common.serialization.proto.PirErrorDeclarationCarrier.getDefaultInstance()) return this; - if (other.hasLastModified()) { - setLastModified(other.getLastModified()); - } - if (other.hasParentSymbol()) { - setParentSymbol(other.getParentSymbol()); - } - if (other.hasOrigin()) { - setOrigin(other.getOrigin()); - } - if (!other.annotation_.isEmpty()) { - if (annotation_.isEmpty()) { - annotation_ = other.annotation_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureAnnotationIsMutable(); - annotation_.addAll(other.annotation_); - } - - } - setUnknownFields( - getUnknownFields().concat(other.unknownFields)); - return this; - } - - public final boolean isInitialized() { - if (!hasLastModified()) { - - return false; - } - for (int i = 0; i < getAnnotationCount(); i++) { - if (!getAnnotation(i).isInitialized()) { - - return false; - } - } - return true; - } - - public Builder mergeFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.jetbrains.kotlin.backend.common.serialization.proto.PirErrorDeclarationCarrier parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.jetbrains.kotlin.backend.common.serialization.proto.PirErrorDeclarationCarrier) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int lastModified_ ; - /** - * required int32 lastModified = 1; - */ - public boolean hasLastModified() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required int32 lastModified = 1; - */ - public int getLastModified() { - return lastModified_; - } - /** - * required int32 lastModified = 1; - */ - public Builder setLastModified(int value) { - bitField0_ |= 0x00000001; - lastModified_ = value; - - return this; - } - /** - * required int32 lastModified = 1; - */ - public Builder clearLastModified() { - bitField0_ = (bitField0_ & ~0x00000001); - lastModified_ = 0; - - return this; - } - - private long parentSymbol_ ; - /** - * optional int64 parentSymbol = 2; - */ - public boolean hasParentSymbol() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional int64 parentSymbol = 2; - */ - public long getParentSymbol() { - return parentSymbol_; - } - /** - * optional int64 parentSymbol = 2; - */ - public Builder setParentSymbol(long value) { - bitField0_ |= 0x00000002; - parentSymbol_ = value; - - return this; - } - /** - * optional int64 parentSymbol = 2; - */ - public Builder clearParentSymbol() { - bitField0_ = (bitField0_ & ~0x00000002); - parentSymbol_ = 0L; - - return this; - } - - private int origin_ ; - /** - * optional int32 origin = 3; - */ - public boolean hasOrigin() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int32 origin = 3; - */ - public int getOrigin() { - return origin_; - } - /** - * optional int32 origin = 3; - */ - public Builder setOrigin(int value) { - bitField0_ |= 0x00000004; - origin_ = value; - - return this; - } - /** - * optional int32 origin = 3; - */ - public Builder clearOrigin() { - bitField0_ = (bitField0_ & ~0x00000004); - origin_ = 0; - - return this; - } - - private java.util.List annotation_ = - java.util.Collections.emptyList(); - private void ensureAnnotationIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { - annotation_ = new java.util.ArrayList(annotation_); - bitField0_ |= 0x00000008; - } - } - - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public java.util.List getAnnotationList() { - return java.util.Collections.unmodifiableList(annotation_); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public int getAnnotationCount() { - return annotation_.size(); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index) { - return annotation_.get(index); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder setAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnnotationIsMutable(); - annotation_.set(index, value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder setAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) { - ensureAnnotationIsMutable(); - annotation_.set(index, builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation(org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnnotationIsMutable(); - annotation_.add(value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnnotationIsMutable(); - annotation_.add(index, value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation( - org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) { - ensureAnnotationIsMutable(); - annotation_.add(builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) { - ensureAnnotationIsMutable(); - annotation_.add(index, builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAllAnnotation( - java.lang.Iterable values) { - ensureAnnotationIsMutable(); - org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( - values, annotation_); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder clearAnnotation() { - annotation_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder removeAnnotation(int index) { - ensureAnnotationIsMutable(); - annotation_.remove(index); - - return this; - } - - // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.backend.common.serialization.proto.PirErrorDeclarationCarrier) - } - - static { - defaultInstance = new PirErrorDeclarationCarrier(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.PirErrorDeclarationCarrier) -} diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirErrorDeclarationCarrierOrBuilder.java b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirErrorDeclarationCarrierOrBuilder.java deleted file mode 100644 index 46caf1a51f7..00000000000 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirErrorDeclarationCarrierOrBuilder.java +++ /dev/null @@ -1,50 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: compiler/ir/serialization.common/src/KotlinPirCarriers.proto - -package org.jetbrains.kotlin.backend.common.serialization.proto; - -public interface PirErrorDeclarationCarrierOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.backend.common.serialization.proto.PirErrorDeclarationCarrier) - org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder { - - /** - * required int32 lastModified = 1; - */ - boolean hasLastModified(); - /** - * required int32 lastModified = 1; - */ - int getLastModified(); - - /** - * optional int64 parentSymbol = 2; - */ - boolean hasParentSymbol(); - /** - * optional int64 parentSymbol = 2; - */ - long getParentSymbol(); - - /** - * optional int32 origin = 3; - */ - boolean hasOrigin(); - /** - * optional int32 origin = 3; - */ - int getOrigin(); - - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - java.util.List - getAnnotationList(); - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index); - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - int getAnnotationCount(); -} \ No newline at end of file diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirFieldCarrier.java b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirFieldCarrier.java deleted file mode 100644 index 94c63978f3f..00000000000 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirFieldCarrier.java +++ /dev/null @@ -1,912 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: compiler/ir/serialization.common/src/KotlinPirCarriers.proto - -package org.jetbrains.kotlin.backend.common.serialization.proto; - -/** - * Protobuf type {@code org.jetbrains.kotlin.backend.common.serialization.proto.PirFieldCarrier} - */ -public final class PirFieldCarrier extends - org.jetbrains.kotlin.protobuf.GeneratedMessageLite implements - // @@protoc_insertion_point(message_implements:org.jetbrains.kotlin.backend.common.serialization.proto.PirFieldCarrier) - PirFieldCarrierOrBuilder { - // Use PirFieldCarrier.newBuilder() to construct. - private PirFieldCarrier(org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private PirFieldCarrier(boolean noInit) { this.unknownFields = org.jetbrains.kotlin.protobuf.ByteString.EMPTY;} - - private static final PirFieldCarrier defaultInstance; - public static PirFieldCarrier getDefaultInstance() { - return defaultInstance; - } - - public PirFieldCarrier getDefaultInstanceForType() { - return defaultInstance; - } - - private final org.jetbrains.kotlin.protobuf.ByteString unknownFields; - private PirFieldCarrier( - 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 8: { - bitField0_ |= 0x00000001; - lastModified_ = input.readInt32(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - parentSymbol_ = input.readInt64(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - origin_ = input.readInt32(); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - annotation_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - annotation_.add(input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.PARSER, extensionRegistry)); - break; - } - case 40: { - bitField0_ |= 0x00000008; - type_ = input.readInt32(); - break; - } - case 48: { - bitField0_ |= 0x00000010; - initializer_ = input.readInt32(); - break; - } - case 56: { - bitField0_ |= 0x00000020; - correspondingPropertySymbol_ = input.readInt64(); - 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_ & 0x00000008) == 0x00000008)) { - annotation_ = java.util.Collections.unmodifiableList(annotation_); - } - try { - unknownFieldsCodedOutput.flush(); - } catch (java.io.IOException e) { - // Should not happen - } finally { - unknownFields = unknownFieldsOutput.toByteString(); - } - makeExtensionsImmutable(); - } - } - public static org.jetbrains.kotlin.protobuf.Parser PARSER = - new org.jetbrains.kotlin.protobuf.AbstractParser() { - public PirFieldCarrier parsePartialFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return new PirFieldCarrier(input, extensionRegistry); - } - }; - - @java.lang.Override - public org.jetbrains.kotlin.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - public static final int LASTMODIFIED_FIELD_NUMBER = 1; - private int lastModified_; - /** - * required int32 lastModified = 1; - */ - public boolean hasLastModified() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required int32 lastModified = 1; - */ - public int getLastModified() { - return lastModified_; - } - - public static final int PARENTSYMBOL_FIELD_NUMBER = 2; - private long parentSymbol_; - /** - * optional int64 parentSymbol = 2; - */ - public boolean hasParentSymbol() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional int64 parentSymbol = 2; - */ - public long getParentSymbol() { - return parentSymbol_; - } - - public static final int ORIGIN_FIELD_NUMBER = 3; - private int origin_; - /** - * optional int32 origin = 3; - */ - public boolean hasOrigin() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int32 origin = 3; - */ - public int getOrigin() { - return origin_; - } - - public static final int ANNOTATION_FIELD_NUMBER = 4; - private java.util.List annotation_; - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public java.util.List getAnnotationList() { - return annotation_; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public java.util.List - getAnnotationOrBuilderList() { - return annotation_; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public int getAnnotationCount() { - return annotation_.size(); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index) { - return annotation_.get(index); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCallOrBuilder getAnnotationOrBuilder( - int index) { - return annotation_.get(index); - } - - public static final int TYPE_FIELD_NUMBER = 5; - private int type_; - /** - * required int32 type = 5; - */ - public boolean hasType() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * required int32 type = 5; - */ - public int getType() { - return type_; - } - - public static final int INITIALIZER_FIELD_NUMBER = 6; - private int initializer_; - /** - * optional int32 initializer = 6; - */ - public boolean hasInitializer() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional int32 initializer = 6; - */ - public int getInitializer() { - return initializer_; - } - - public static final int CORRESPONDINGPROPERTYSYMBOL_FIELD_NUMBER = 7; - private long correspondingPropertySymbol_; - /** - * optional int64 correspondingPropertySymbol = 7; - */ - public boolean hasCorrespondingPropertySymbol() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional int64 correspondingPropertySymbol = 7; - */ - public long getCorrespondingPropertySymbol() { - return correspondingPropertySymbol_; - } - - private void initFields() { - lastModified_ = 0; - parentSymbol_ = 0L; - origin_ = 0; - annotation_ = java.util.Collections.emptyList(); - type_ = 0; - initializer_ = 0; - correspondingPropertySymbol_ = 0L; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (!hasLastModified()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasType()) { - memoizedIsInitialized = 0; - return false; - } - for (int i = 0; i < getAnnotationCount(); i++) { - if (!getAnnotation(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(org.jetbrains.kotlin.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeInt32(1, lastModified_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeInt64(2, parentSymbol_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeInt32(3, origin_); - } - for (int i = 0; i < annotation_.size(); i++) { - output.writeMessage(4, annotation_.get(i)); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeInt32(5, type_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeInt32(6, initializer_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeInt64(7, correspondingPropertySymbol_); - } - 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 - .computeInt32Size(1, lastModified_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt64Size(2, parentSymbol_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt32Size(3, origin_); - } - for (int i = 0; i < annotation_.size(); i++) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeMessageSize(4, annotation_.get(i)); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt32Size(5, type_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt32Size(6, initializer_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt64Size(7, correspondingPropertySymbol_); - } - size += unknownFields.size(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirFieldCarrier parseFrom( - org.jetbrains.kotlin.protobuf.ByteString data) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirFieldCarrier parseFrom( - org.jetbrains.kotlin.protobuf.ByteString data, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirFieldCarrier parseFrom(byte[] data) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirFieldCarrier parseFrom( - byte[] data, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirFieldCarrier parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirFieldCarrier parseFrom( - java.io.InputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirFieldCarrier parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirFieldCarrier parseDelimitedFrom( - java.io.InputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirFieldCarrier parseFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirFieldCarrier parseFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.jetbrains.kotlin.backend.common.serialization.proto.PirFieldCarrier prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - /** - * Protobuf type {@code org.jetbrains.kotlin.backend.common.serialization.proto.PirFieldCarrier} - */ - public static final class Builder extends - org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder< - org.jetbrains.kotlin.backend.common.serialization.proto.PirFieldCarrier, Builder> - implements - // @@protoc_insertion_point(builder_implements:org.jetbrains.kotlin.backend.common.serialization.proto.PirFieldCarrier) - org.jetbrains.kotlin.backend.common.serialization.proto.PirFieldCarrierOrBuilder { - // Construct using org.jetbrains.kotlin.backend.common.serialization.proto.PirFieldCarrier.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - lastModified_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - parentSymbol_ = 0L; - bitField0_ = (bitField0_ & ~0x00000002); - origin_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - annotation_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - type_ = 0; - bitField0_ = (bitField0_ & ~0x00000010); - initializer_ = 0; - bitField0_ = (bitField0_ & ~0x00000020); - correspondingPropertySymbol_ = 0L; - bitField0_ = (bitField0_ & ~0x00000040); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public org.jetbrains.kotlin.backend.common.serialization.proto.PirFieldCarrier getDefaultInstanceForType() { - return org.jetbrains.kotlin.backend.common.serialization.proto.PirFieldCarrier.getDefaultInstance(); - } - - public org.jetbrains.kotlin.backend.common.serialization.proto.PirFieldCarrier build() { - org.jetbrains.kotlin.backend.common.serialization.proto.PirFieldCarrier result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.jetbrains.kotlin.backend.common.serialization.proto.PirFieldCarrier buildPartial() { - org.jetbrains.kotlin.backend.common.serialization.proto.PirFieldCarrier result = new org.jetbrains.kotlin.backend.common.serialization.proto.PirFieldCarrier(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.lastModified_ = lastModified_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.parentSymbol_ = parentSymbol_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.origin_ = origin_; - if (((bitField0_ & 0x00000008) == 0x00000008)) { - annotation_ = java.util.Collections.unmodifiableList(annotation_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.annotation_ = annotation_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000008; - } - result.type_ = type_; - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x00000010; - } - result.initializer_ = initializer_; - if (((from_bitField0_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x00000020; - } - result.correspondingPropertySymbol_ = correspondingPropertySymbol_; - result.bitField0_ = to_bitField0_; - return result; - } - - public Builder mergeFrom(org.jetbrains.kotlin.backend.common.serialization.proto.PirFieldCarrier other) { - if (other == org.jetbrains.kotlin.backend.common.serialization.proto.PirFieldCarrier.getDefaultInstance()) return this; - if (other.hasLastModified()) { - setLastModified(other.getLastModified()); - } - if (other.hasParentSymbol()) { - setParentSymbol(other.getParentSymbol()); - } - if (other.hasOrigin()) { - setOrigin(other.getOrigin()); - } - if (!other.annotation_.isEmpty()) { - if (annotation_.isEmpty()) { - annotation_ = other.annotation_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureAnnotationIsMutable(); - annotation_.addAll(other.annotation_); - } - - } - if (other.hasType()) { - setType(other.getType()); - } - if (other.hasInitializer()) { - setInitializer(other.getInitializer()); - } - if (other.hasCorrespondingPropertySymbol()) { - setCorrespondingPropertySymbol(other.getCorrespondingPropertySymbol()); - } - setUnknownFields( - getUnknownFields().concat(other.unknownFields)); - return this; - } - - public final boolean isInitialized() { - if (!hasLastModified()) { - - return false; - } - if (!hasType()) { - - return false; - } - for (int i = 0; i < getAnnotationCount(); i++) { - if (!getAnnotation(i).isInitialized()) { - - return false; - } - } - return true; - } - - public Builder mergeFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.jetbrains.kotlin.backend.common.serialization.proto.PirFieldCarrier parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.jetbrains.kotlin.backend.common.serialization.proto.PirFieldCarrier) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int lastModified_ ; - /** - * required int32 lastModified = 1; - */ - public boolean hasLastModified() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required int32 lastModified = 1; - */ - public int getLastModified() { - return lastModified_; - } - /** - * required int32 lastModified = 1; - */ - public Builder setLastModified(int value) { - bitField0_ |= 0x00000001; - lastModified_ = value; - - return this; - } - /** - * required int32 lastModified = 1; - */ - public Builder clearLastModified() { - bitField0_ = (bitField0_ & ~0x00000001); - lastModified_ = 0; - - return this; - } - - private long parentSymbol_ ; - /** - * optional int64 parentSymbol = 2; - */ - public boolean hasParentSymbol() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional int64 parentSymbol = 2; - */ - public long getParentSymbol() { - return parentSymbol_; - } - /** - * optional int64 parentSymbol = 2; - */ - public Builder setParentSymbol(long value) { - bitField0_ |= 0x00000002; - parentSymbol_ = value; - - return this; - } - /** - * optional int64 parentSymbol = 2; - */ - public Builder clearParentSymbol() { - bitField0_ = (bitField0_ & ~0x00000002); - parentSymbol_ = 0L; - - return this; - } - - private int origin_ ; - /** - * optional int32 origin = 3; - */ - public boolean hasOrigin() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int32 origin = 3; - */ - public int getOrigin() { - return origin_; - } - /** - * optional int32 origin = 3; - */ - public Builder setOrigin(int value) { - bitField0_ |= 0x00000004; - origin_ = value; - - return this; - } - /** - * optional int32 origin = 3; - */ - public Builder clearOrigin() { - bitField0_ = (bitField0_ & ~0x00000004); - origin_ = 0; - - return this; - } - - private java.util.List annotation_ = - java.util.Collections.emptyList(); - private void ensureAnnotationIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { - annotation_ = new java.util.ArrayList(annotation_); - bitField0_ |= 0x00000008; - } - } - - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public java.util.List getAnnotationList() { - return java.util.Collections.unmodifiableList(annotation_); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public int getAnnotationCount() { - return annotation_.size(); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index) { - return annotation_.get(index); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder setAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnnotationIsMutable(); - annotation_.set(index, value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder setAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) { - ensureAnnotationIsMutable(); - annotation_.set(index, builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation(org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnnotationIsMutable(); - annotation_.add(value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnnotationIsMutable(); - annotation_.add(index, value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation( - org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) { - ensureAnnotationIsMutable(); - annotation_.add(builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) { - ensureAnnotationIsMutable(); - annotation_.add(index, builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAllAnnotation( - java.lang.Iterable values) { - ensureAnnotationIsMutable(); - org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( - values, annotation_); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder clearAnnotation() { - annotation_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder removeAnnotation(int index) { - ensureAnnotationIsMutable(); - annotation_.remove(index); - - return this; - } - - private int type_ ; - /** - * required int32 type = 5; - */ - public boolean hasType() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * required int32 type = 5; - */ - public int getType() { - return type_; - } - /** - * required int32 type = 5; - */ - public Builder setType(int value) { - bitField0_ |= 0x00000010; - type_ = value; - - return this; - } - /** - * required int32 type = 5; - */ - public Builder clearType() { - bitField0_ = (bitField0_ & ~0x00000010); - type_ = 0; - - return this; - } - - private int initializer_ ; - /** - * optional int32 initializer = 6; - */ - public boolean hasInitializer() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional int32 initializer = 6; - */ - public int getInitializer() { - return initializer_; - } - /** - * optional int32 initializer = 6; - */ - public Builder setInitializer(int value) { - bitField0_ |= 0x00000020; - initializer_ = value; - - return this; - } - /** - * optional int32 initializer = 6; - */ - public Builder clearInitializer() { - bitField0_ = (bitField0_ & ~0x00000020); - initializer_ = 0; - - return this; - } - - private long correspondingPropertySymbol_ ; - /** - * optional int64 correspondingPropertySymbol = 7; - */ - public boolean hasCorrespondingPropertySymbol() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - /** - * optional int64 correspondingPropertySymbol = 7; - */ - public long getCorrespondingPropertySymbol() { - return correspondingPropertySymbol_; - } - /** - * optional int64 correspondingPropertySymbol = 7; - */ - public Builder setCorrespondingPropertySymbol(long value) { - bitField0_ |= 0x00000040; - correspondingPropertySymbol_ = value; - - return this; - } - /** - * optional int64 correspondingPropertySymbol = 7; - */ - public Builder clearCorrespondingPropertySymbol() { - bitField0_ = (bitField0_ & ~0x00000040); - correspondingPropertySymbol_ = 0L; - - return this; - } - - // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.backend.common.serialization.proto.PirFieldCarrier) - } - - static { - defaultInstance = new PirFieldCarrier(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.PirFieldCarrier) -} diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirFieldCarrierOrBuilder.java b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirFieldCarrierOrBuilder.java deleted file mode 100644 index df89f50e4c8..00000000000 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirFieldCarrierOrBuilder.java +++ /dev/null @@ -1,77 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: compiler/ir/serialization.common/src/KotlinPirCarriers.proto - -package org.jetbrains.kotlin.backend.common.serialization.proto; - -public interface PirFieldCarrierOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.backend.common.serialization.proto.PirFieldCarrier) - org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder { - - /** - * required int32 lastModified = 1; - */ - boolean hasLastModified(); - /** - * required int32 lastModified = 1; - */ - int getLastModified(); - - /** - * optional int64 parentSymbol = 2; - */ - boolean hasParentSymbol(); - /** - * optional int64 parentSymbol = 2; - */ - long getParentSymbol(); - - /** - * optional int32 origin = 3; - */ - boolean hasOrigin(); - /** - * optional int32 origin = 3; - */ - int getOrigin(); - - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - java.util.List - getAnnotationList(); - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index); - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - int getAnnotationCount(); - - /** - * required int32 type = 5; - */ - boolean hasType(); - /** - * required int32 type = 5; - */ - int getType(); - - /** - * optional int32 initializer = 6; - */ - boolean hasInitializer(); - /** - * optional int32 initializer = 6; - */ - int getInitializer(); - - /** - * optional int64 correspondingPropertySymbol = 7; - */ - boolean hasCorrespondingPropertySymbol(); - /** - * optional int64 correspondingPropertySymbol = 7; - */ - long getCorrespondingPropertySymbol(); -} \ No newline at end of file diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirFunctionCarrier.java b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirFunctionCarrier.java deleted file mode 100644 index 86110ff7923..00000000000 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirFunctionCarrier.java +++ /dev/null @@ -1,1545 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: compiler/ir/serialization.common/src/KotlinPirCarriers.proto - -package org.jetbrains.kotlin.backend.common.serialization.proto; - -/** - * Protobuf type {@code org.jetbrains.kotlin.backend.common.serialization.proto.PirFunctionCarrier} - */ -public final class PirFunctionCarrier extends - org.jetbrains.kotlin.protobuf.GeneratedMessageLite implements - // @@protoc_insertion_point(message_implements:org.jetbrains.kotlin.backend.common.serialization.proto.PirFunctionCarrier) - PirFunctionCarrierOrBuilder { - // Use PirFunctionCarrier.newBuilder() to construct. - private PirFunctionCarrier(org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private PirFunctionCarrier(boolean noInit) { this.unknownFields = org.jetbrains.kotlin.protobuf.ByteString.EMPTY;} - - private static final PirFunctionCarrier defaultInstance; - public static PirFunctionCarrier getDefaultInstance() { - return defaultInstance; - } - - public PirFunctionCarrier getDefaultInstanceForType() { - return defaultInstance; - } - - private final org.jetbrains.kotlin.protobuf.ByteString unknownFields; - private PirFunctionCarrier( - 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 8: { - bitField0_ |= 0x00000001; - lastModified_ = input.readInt32(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - parentSymbol_ = input.readInt64(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - origin_ = input.readInt32(); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - annotation_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - annotation_.add(input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.PARSER, extensionRegistry)); - break; - } - case 40: { - bitField0_ |= 0x00000008; - returnTypeField_ = input.readInt32(); - break; - } - case 48: { - bitField0_ |= 0x00000010; - dispatchReceiverParameter_ = input.readInt64(); - break; - } - case 56: { - bitField0_ |= 0x00000020; - extensionReceiverParameter_ = input.readInt64(); - break; - } - case 64: { - bitField0_ |= 0x00000040; - body_ = input.readInt32(); - break; - } - case 72: { - if (!((mutable_bitField0_ & 0x00000100) == 0x00000100)) { - typeParameters_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000100; - } - typeParameters_.add(input.readInt64()); - break; - } - case 74: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000100) == 0x00000100) && input.getBytesUntilLimit() > 0) { - typeParameters_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000100; - } - while (input.getBytesUntilLimit() > 0) { - typeParameters_.add(input.readInt64()); - } - input.popLimit(limit); - break; - } - case 80: { - if (!((mutable_bitField0_ & 0x00000200) == 0x00000200)) { - valueParameters_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000200; - } - valueParameters_.add(input.readInt64()); - break; - } - case 82: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000200) == 0x00000200) && input.getBytesUntilLimit() > 0) { - valueParameters_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000200; - } - while (input.getBytesUntilLimit() > 0) { - valueParameters_.add(input.readInt64()); - } - input.popLimit(limit); - break; - } - case 88: { - bitField0_ |= 0x00000080; - correspondingPropertySymbol_ = input.readInt64(); - break; - } - case 96: { - if (!((mutable_bitField0_ & 0x00000800) == 0x00000800)) { - overriddenSymbols_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000800; - } - overriddenSymbols_.add(input.readInt64()); - break; - } - case 98: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000800) == 0x00000800) && input.getBytesUntilLimit() > 0) { - overriddenSymbols_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000800; - } - while (input.getBytesUntilLimit() > 0) { - overriddenSymbols_.add(input.readInt64()); - } - input.popLimit(limit); - break; - } - case 104: { - bitField0_ |= 0x00000100; - flags_ = input.readInt64(); - 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_ & 0x00000008) == 0x00000008)) { - annotation_ = java.util.Collections.unmodifiableList(annotation_); - } - if (((mutable_bitField0_ & 0x00000100) == 0x00000100)) { - typeParameters_ = java.util.Collections.unmodifiableList(typeParameters_); - } - if (((mutable_bitField0_ & 0x00000200) == 0x00000200)) { - valueParameters_ = java.util.Collections.unmodifiableList(valueParameters_); - } - if (((mutable_bitField0_ & 0x00000800) == 0x00000800)) { - overriddenSymbols_ = java.util.Collections.unmodifiableList(overriddenSymbols_); - } - 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 PirFunctionCarrier parsePartialFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return new PirFunctionCarrier(input, extensionRegistry); - } - }; - - @java.lang.Override - public org.jetbrains.kotlin.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - public static final int LASTMODIFIED_FIELD_NUMBER = 1; - private int lastModified_; - /** - * required int32 lastModified = 1; - */ - public boolean hasLastModified() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required int32 lastModified = 1; - */ - public int getLastModified() { - return lastModified_; - } - - public static final int PARENTSYMBOL_FIELD_NUMBER = 2; - private long parentSymbol_; - /** - * optional int64 parentSymbol = 2; - */ - public boolean hasParentSymbol() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional int64 parentSymbol = 2; - */ - public long getParentSymbol() { - return parentSymbol_; - } - - public static final int ORIGIN_FIELD_NUMBER = 3; - private int origin_; - /** - * optional int32 origin = 3; - */ - public boolean hasOrigin() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int32 origin = 3; - */ - public int getOrigin() { - return origin_; - } - - public static final int ANNOTATION_FIELD_NUMBER = 4; - private java.util.List annotation_; - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public java.util.List getAnnotationList() { - return annotation_; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public java.util.List - getAnnotationOrBuilderList() { - return annotation_; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public int getAnnotationCount() { - return annotation_.size(); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index) { - return annotation_.get(index); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCallOrBuilder getAnnotationOrBuilder( - int index) { - return annotation_.get(index); - } - - public static final int RETURNTYPEFIELD_FIELD_NUMBER = 5; - private int returnTypeField_; - /** - * required int32 returnTypeField = 5; - */ - public boolean hasReturnTypeField() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * required int32 returnTypeField = 5; - */ - public int getReturnTypeField() { - return returnTypeField_; - } - - public static final int DISPATCHRECEIVERPARAMETER_FIELD_NUMBER = 6; - private long dispatchReceiverParameter_; - /** - * optional int64 dispatchReceiverParameter = 6; - */ - public boolean hasDispatchReceiverParameter() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional int64 dispatchReceiverParameter = 6; - */ - public long getDispatchReceiverParameter() { - return dispatchReceiverParameter_; - } - - public static final int EXTENSIONRECEIVERPARAMETER_FIELD_NUMBER = 7; - private long extensionReceiverParameter_; - /** - * optional int64 extensionReceiverParameter = 7; - */ - public boolean hasExtensionReceiverParameter() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional int64 extensionReceiverParameter = 7; - */ - public long getExtensionReceiverParameter() { - return extensionReceiverParameter_; - } - - public static final int BODY_FIELD_NUMBER = 8; - private int body_; - /** - * optional int32 body = 8; - */ - public boolean hasBody() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - /** - * optional int32 body = 8; - */ - public int getBody() { - return body_; - } - - public static final int TYPEPARAMETERS_FIELD_NUMBER = 9; - private java.util.List typeParameters_; - /** - * repeated int64 typeParameters = 9; - */ - public java.util.List - getTypeParametersList() { - return typeParameters_; - } - /** - * repeated int64 typeParameters = 9; - */ - public int getTypeParametersCount() { - return typeParameters_.size(); - } - /** - * repeated int64 typeParameters = 9; - */ - public long getTypeParameters(int index) { - return typeParameters_.get(index); - } - - public static final int VALUEPARAMETERS_FIELD_NUMBER = 10; - private java.util.List valueParameters_; - /** - * repeated int64 valueParameters = 10; - */ - public java.util.List - getValueParametersList() { - return valueParameters_; - } - /** - * repeated int64 valueParameters = 10; - */ - public int getValueParametersCount() { - return valueParameters_.size(); - } - /** - * repeated int64 valueParameters = 10; - */ - public long getValueParameters(int index) { - return valueParameters_.get(index); - } - - public static final int CORRESPONDINGPROPERTYSYMBOL_FIELD_NUMBER = 11; - private long correspondingPropertySymbol_; - /** - * optional int64 correspondingPropertySymbol = 11; - */ - public boolean hasCorrespondingPropertySymbol() { - return ((bitField0_ & 0x00000080) == 0x00000080); - } - /** - * optional int64 correspondingPropertySymbol = 11; - */ - public long getCorrespondingPropertySymbol() { - return correspondingPropertySymbol_; - } - - public static final int OVERRIDDENSYMBOLS_FIELD_NUMBER = 12; - private java.util.List overriddenSymbols_; - /** - * repeated int64 overriddenSymbols = 12; - */ - public java.util.List - getOverriddenSymbolsList() { - return overriddenSymbols_; - } - /** - * repeated int64 overriddenSymbols = 12; - */ - public int getOverriddenSymbolsCount() { - return overriddenSymbols_.size(); - } - /** - * repeated int64 overriddenSymbols = 12; - */ - public long getOverriddenSymbols(int index) { - return overriddenSymbols_.get(index); - } - - public static final int FLAGS_FIELD_NUMBER = 13; - private long flags_; - /** - * optional int64 flags = 13 [default = 0]; - */ - public boolean hasFlags() { - return ((bitField0_ & 0x00000100) == 0x00000100); - } - /** - * optional int64 flags = 13 [default = 0]; - */ - public long getFlags() { - return flags_; - } - - private void initFields() { - lastModified_ = 0; - parentSymbol_ = 0L; - origin_ = 0; - annotation_ = java.util.Collections.emptyList(); - returnTypeField_ = 0; - dispatchReceiverParameter_ = 0L; - extensionReceiverParameter_ = 0L; - body_ = 0; - typeParameters_ = java.util.Collections.emptyList(); - valueParameters_ = java.util.Collections.emptyList(); - correspondingPropertySymbol_ = 0L; - overriddenSymbols_ = java.util.Collections.emptyList(); - flags_ = 0L; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (!hasLastModified()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasReturnTypeField()) { - memoizedIsInitialized = 0; - return false; - } - for (int i = 0; i < getAnnotationCount(); i++) { - if (!getAnnotation(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(org.jetbrains.kotlin.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeInt32(1, lastModified_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeInt64(2, parentSymbol_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeInt32(3, origin_); - } - for (int i = 0; i < annotation_.size(); i++) { - output.writeMessage(4, annotation_.get(i)); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeInt32(5, returnTypeField_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeInt64(6, dispatchReceiverParameter_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeInt64(7, extensionReceiverParameter_); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - output.writeInt32(8, body_); - } - for (int i = 0; i < typeParameters_.size(); i++) { - output.writeInt64(9, typeParameters_.get(i)); - } - for (int i = 0; i < valueParameters_.size(); i++) { - output.writeInt64(10, valueParameters_.get(i)); - } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - output.writeInt64(11, correspondingPropertySymbol_); - } - for (int i = 0; i < overriddenSymbols_.size(); i++) { - output.writeInt64(12, overriddenSymbols_.get(i)); - } - if (((bitField0_ & 0x00000100) == 0x00000100)) { - output.writeInt64(13, flags_); - } - 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 - .computeInt32Size(1, lastModified_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt64Size(2, parentSymbol_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt32Size(3, origin_); - } - for (int i = 0; i < annotation_.size(); i++) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeMessageSize(4, annotation_.get(i)); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt32Size(5, returnTypeField_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt64Size(6, dispatchReceiverParameter_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt64Size(7, extensionReceiverParameter_); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt32Size(8, body_); - } - { - int dataSize = 0; - for (int i = 0; i < typeParameters_.size(); i++) { - dataSize += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt64SizeNoTag(typeParameters_.get(i)); - } - size += dataSize; - size += 1 * getTypeParametersList().size(); - } - { - int dataSize = 0; - for (int i = 0; i < valueParameters_.size(); i++) { - dataSize += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt64SizeNoTag(valueParameters_.get(i)); - } - size += dataSize; - size += 1 * getValueParametersList().size(); - } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt64Size(11, correspondingPropertySymbol_); - } - { - int dataSize = 0; - for (int i = 0; i < overriddenSymbols_.size(); i++) { - dataSize += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt64SizeNoTag(overriddenSymbols_.get(i)); - } - size += dataSize; - size += 1 * getOverriddenSymbolsList().size(); - } - if (((bitField0_ & 0x00000100) == 0x00000100)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt64Size(13, flags_); - } - size += unknownFields.size(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirFunctionCarrier parseFrom( - org.jetbrains.kotlin.protobuf.ByteString data) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirFunctionCarrier parseFrom( - org.jetbrains.kotlin.protobuf.ByteString data, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirFunctionCarrier parseFrom(byte[] data) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirFunctionCarrier parseFrom( - byte[] data, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirFunctionCarrier parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirFunctionCarrier parseFrom( - java.io.InputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirFunctionCarrier parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirFunctionCarrier parseDelimitedFrom( - java.io.InputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirFunctionCarrier parseFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirFunctionCarrier parseFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.jetbrains.kotlin.backend.common.serialization.proto.PirFunctionCarrier prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - /** - * Protobuf type {@code org.jetbrains.kotlin.backend.common.serialization.proto.PirFunctionCarrier} - */ - public static final class Builder extends - org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder< - org.jetbrains.kotlin.backend.common.serialization.proto.PirFunctionCarrier, Builder> - implements - // @@protoc_insertion_point(builder_implements:org.jetbrains.kotlin.backend.common.serialization.proto.PirFunctionCarrier) - org.jetbrains.kotlin.backend.common.serialization.proto.PirFunctionCarrierOrBuilder { - // Construct using org.jetbrains.kotlin.backend.common.serialization.proto.PirFunctionCarrier.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - lastModified_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - parentSymbol_ = 0L; - bitField0_ = (bitField0_ & ~0x00000002); - origin_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - annotation_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - returnTypeField_ = 0; - bitField0_ = (bitField0_ & ~0x00000010); - dispatchReceiverParameter_ = 0L; - bitField0_ = (bitField0_ & ~0x00000020); - extensionReceiverParameter_ = 0L; - bitField0_ = (bitField0_ & ~0x00000040); - body_ = 0; - bitField0_ = (bitField0_ & ~0x00000080); - typeParameters_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000100); - valueParameters_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000200); - correspondingPropertySymbol_ = 0L; - bitField0_ = (bitField0_ & ~0x00000400); - overriddenSymbols_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000800); - flags_ = 0L; - bitField0_ = (bitField0_ & ~0x00001000); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public org.jetbrains.kotlin.backend.common.serialization.proto.PirFunctionCarrier getDefaultInstanceForType() { - return org.jetbrains.kotlin.backend.common.serialization.proto.PirFunctionCarrier.getDefaultInstance(); - } - - public org.jetbrains.kotlin.backend.common.serialization.proto.PirFunctionCarrier build() { - org.jetbrains.kotlin.backend.common.serialization.proto.PirFunctionCarrier result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.jetbrains.kotlin.backend.common.serialization.proto.PirFunctionCarrier buildPartial() { - org.jetbrains.kotlin.backend.common.serialization.proto.PirFunctionCarrier result = new org.jetbrains.kotlin.backend.common.serialization.proto.PirFunctionCarrier(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.lastModified_ = lastModified_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.parentSymbol_ = parentSymbol_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.origin_ = origin_; - if (((bitField0_ & 0x00000008) == 0x00000008)) { - annotation_ = java.util.Collections.unmodifiableList(annotation_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.annotation_ = annotation_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000008; - } - result.returnTypeField_ = returnTypeField_; - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x00000010; - } - result.dispatchReceiverParameter_ = dispatchReceiverParameter_; - if (((from_bitField0_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x00000020; - } - result.extensionReceiverParameter_ = extensionReceiverParameter_; - if (((from_bitField0_ & 0x00000080) == 0x00000080)) { - to_bitField0_ |= 0x00000040; - } - result.body_ = body_; - if (((bitField0_ & 0x00000100) == 0x00000100)) { - typeParameters_ = java.util.Collections.unmodifiableList(typeParameters_); - bitField0_ = (bitField0_ & ~0x00000100); - } - result.typeParameters_ = typeParameters_; - if (((bitField0_ & 0x00000200) == 0x00000200)) { - valueParameters_ = java.util.Collections.unmodifiableList(valueParameters_); - bitField0_ = (bitField0_ & ~0x00000200); - } - result.valueParameters_ = valueParameters_; - if (((from_bitField0_ & 0x00000400) == 0x00000400)) { - to_bitField0_ |= 0x00000080; - } - result.correspondingPropertySymbol_ = correspondingPropertySymbol_; - if (((bitField0_ & 0x00000800) == 0x00000800)) { - overriddenSymbols_ = java.util.Collections.unmodifiableList(overriddenSymbols_); - bitField0_ = (bitField0_ & ~0x00000800); - } - result.overriddenSymbols_ = overriddenSymbols_; - if (((from_bitField0_ & 0x00001000) == 0x00001000)) { - to_bitField0_ |= 0x00000100; - } - result.flags_ = flags_; - result.bitField0_ = to_bitField0_; - return result; - } - - public Builder mergeFrom(org.jetbrains.kotlin.backend.common.serialization.proto.PirFunctionCarrier other) { - if (other == org.jetbrains.kotlin.backend.common.serialization.proto.PirFunctionCarrier.getDefaultInstance()) return this; - if (other.hasLastModified()) { - setLastModified(other.getLastModified()); - } - if (other.hasParentSymbol()) { - setParentSymbol(other.getParentSymbol()); - } - if (other.hasOrigin()) { - setOrigin(other.getOrigin()); - } - if (!other.annotation_.isEmpty()) { - if (annotation_.isEmpty()) { - annotation_ = other.annotation_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureAnnotationIsMutable(); - annotation_.addAll(other.annotation_); - } - - } - if (other.hasReturnTypeField()) { - setReturnTypeField(other.getReturnTypeField()); - } - if (other.hasDispatchReceiverParameter()) { - setDispatchReceiverParameter(other.getDispatchReceiverParameter()); - } - if (other.hasExtensionReceiverParameter()) { - setExtensionReceiverParameter(other.getExtensionReceiverParameter()); - } - if (other.hasBody()) { - setBody(other.getBody()); - } - if (!other.typeParameters_.isEmpty()) { - if (typeParameters_.isEmpty()) { - typeParameters_ = other.typeParameters_; - bitField0_ = (bitField0_ & ~0x00000100); - } else { - ensureTypeParametersIsMutable(); - typeParameters_.addAll(other.typeParameters_); - } - - } - if (!other.valueParameters_.isEmpty()) { - if (valueParameters_.isEmpty()) { - valueParameters_ = other.valueParameters_; - bitField0_ = (bitField0_ & ~0x00000200); - } else { - ensureValueParametersIsMutable(); - valueParameters_.addAll(other.valueParameters_); - } - - } - if (other.hasCorrespondingPropertySymbol()) { - setCorrespondingPropertySymbol(other.getCorrespondingPropertySymbol()); - } - if (!other.overriddenSymbols_.isEmpty()) { - if (overriddenSymbols_.isEmpty()) { - overriddenSymbols_ = other.overriddenSymbols_; - bitField0_ = (bitField0_ & ~0x00000800); - } else { - ensureOverriddenSymbolsIsMutable(); - overriddenSymbols_.addAll(other.overriddenSymbols_); - } - - } - if (other.hasFlags()) { - setFlags(other.getFlags()); - } - setUnknownFields( - getUnknownFields().concat(other.unknownFields)); - return this; - } - - public final boolean isInitialized() { - if (!hasLastModified()) { - - return false; - } - if (!hasReturnTypeField()) { - - return false; - } - for (int i = 0; i < getAnnotationCount(); i++) { - if (!getAnnotation(i).isInitialized()) { - - return false; - } - } - return true; - } - - public Builder mergeFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.jetbrains.kotlin.backend.common.serialization.proto.PirFunctionCarrier parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.jetbrains.kotlin.backend.common.serialization.proto.PirFunctionCarrier) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int lastModified_ ; - /** - * required int32 lastModified = 1; - */ - public boolean hasLastModified() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required int32 lastModified = 1; - */ - public int getLastModified() { - return lastModified_; - } - /** - * required int32 lastModified = 1; - */ - public Builder setLastModified(int value) { - bitField0_ |= 0x00000001; - lastModified_ = value; - - return this; - } - /** - * required int32 lastModified = 1; - */ - public Builder clearLastModified() { - bitField0_ = (bitField0_ & ~0x00000001); - lastModified_ = 0; - - return this; - } - - private long parentSymbol_ ; - /** - * optional int64 parentSymbol = 2; - */ - public boolean hasParentSymbol() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional int64 parentSymbol = 2; - */ - public long getParentSymbol() { - return parentSymbol_; - } - /** - * optional int64 parentSymbol = 2; - */ - public Builder setParentSymbol(long value) { - bitField0_ |= 0x00000002; - parentSymbol_ = value; - - return this; - } - /** - * optional int64 parentSymbol = 2; - */ - public Builder clearParentSymbol() { - bitField0_ = (bitField0_ & ~0x00000002); - parentSymbol_ = 0L; - - return this; - } - - private int origin_ ; - /** - * optional int32 origin = 3; - */ - public boolean hasOrigin() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int32 origin = 3; - */ - public int getOrigin() { - return origin_; - } - /** - * optional int32 origin = 3; - */ - public Builder setOrigin(int value) { - bitField0_ |= 0x00000004; - origin_ = value; - - return this; - } - /** - * optional int32 origin = 3; - */ - public Builder clearOrigin() { - bitField0_ = (bitField0_ & ~0x00000004); - origin_ = 0; - - return this; - } - - private java.util.List annotation_ = - java.util.Collections.emptyList(); - private void ensureAnnotationIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { - annotation_ = new java.util.ArrayList(annotation_); - bitField0_ |= 0x00000008; - } - } - - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public java.util.List getAnnotationList() { - return java.util.Collections.unmodifiableList(annotation_); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public int getAnnotationCount() { - return annotation_.size(); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index) { - return annotation_.get(index); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder setAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnnotationIsMutable(); - annotation_.set(index, value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder setAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) { - ensureAnnotationIsMutable(); - annotation_.set(index, builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation(org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnnotationIsMutable(); - annotation_.add(value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnnotationIsMutable(); - annotation_.add(index, value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation( - org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) { - ensureAnnotationIsMutable(); - annotation_.add(builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) { - ensureAnnotationIsMutable(); - annotation_.add(index, builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAllAnnotation( - java.lang.Iterable values) { - ensureAnnotationIsMutable(); - org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( - values, annotation_); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder clearAnnotation() { - annotation_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder removeAnnotation(int index) { - ensureAnnotationIsMutable(); - annotation_.remove(index); - - return this; - } - - private int returnTypeField_ ; - /** - * required int32 returnTypeField = 5; - */ - public boolean hasReturnTypeField() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * required int32 returnTypeField = 5; - */ - public int getReturnTypeField() { - return returnTypeField_; - } - /** - * required int32 returnTypeField = 5; - */ - public Builder setReturnTypeField(int value) { - bitField0_ |= 0x00000010; - returnTypeField_ = value; - - return this; - } - /** - * required int32 returnTypeField = 5; - */ - public Builder clearReturnTypeField() { - bitField0_ = (bitField0_ & ~0x00000010); - returnTypeField_ = 0; - - return this; - } - - private long dispatchReceiverParameter_ ; - /** - * optional int64 dispatchReceiverParameter = 6; - */ - public boolean hasDispatchReceiverParameter() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional int64 dispatchReceiverParameter = 6; - */ - public long getDispatchReceiverParameter() { - return dispatchReceiverParameter_; - } - /** - * optional int64 dispatchReceiverParameter = 6; - */ - public Builder setDispatchReceiverParameter(long value) { - bitField0_ |= 0x00000020; - dispatchReceiverParameter_ = value; - - return this; - } - /** - * optional int64 dispatchReceiverParameter = 6; - */ - public Builder clearDispatchReceiverParameter() { - bitField0_ = (bitField0_ & ~0x00000020); - dispatchReceiverParameter_ = 0L; - - return this; - } - - private long extensionReceiverParameter_ ; - /** - * optional int64 extensionReceiverParameter = 7; - */ - public boolean hasExtensionReceiverParameter() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - /** - * optional int64 extensionReceiverParameter = 7; - */ - public long getExtensionReceiverParameter() { - return extensionReceiverParameter_; - } - /** - * optional int64 extensionReceiverParameter = 7; - */ - public Builder setExtensionReceiverParameter(long value) { - bitField0_ |= 0x00000040; - extensionReceiverParameter_ = value; - - return this; - } - /** - * optional int64 extensionReceiverParameter = 7; - */ - public Builder clearExtensionReceiverParameter() { - bitField0_ = (bitField0_ & ~0x00000040); - extensionReceiverParameter_ = 0L; - - return this; - } - - private int body_ ; - /** - * optional int32 body = 8; - */ - public boolean hasBody() { - return ((bitField0_ & 0x00000080) == 0x00000080); - } - /** - * optional int32 body = 8; - */ - public int getBody() { - return body_; - } - /** - * optional int32 body = 8; - */ - public Builder setBody(int value) { - bitField0_ |= 0x00000080; - body_ = value; - - return this; - } - /** - * optional int32 body = 8; - */ - public Builder clearBody() { - bitField0_ = (bitField0_ & ~0x00000080); - body_ = 0; - - return this; - } - - private java.util.List typeParameters_ = java.util.Collections.emptyList(); - private void ensureTypeParametersIsMutable() { - if (!((bitField0_ & 0x00000100) == 0x00000100)) { - typeParameters_ = new java.util.ArrayList(typeParameters_); - bitField0_ |= 0x00000100; - } - } - /** - * repeated int64 typeParameters = 9; - */ - public java.util.List - getTypeParametersList() { - return java.util.Collections.unmodifiableList(typeParameters_); - } - /** - * repeated int64 typeParameters = 9; - */ - public int getTypeParametersCount() { - return typeParameters_.size(); - } - /** - * repeated int64 typeParameters = 9; - */ - public long getTypeParameters(int index) { - return typeParameters_.get(index); - } - /** - * repeated int64 typeParameters = 9; - */ - public Builder setTypeParameters( - int index, long value) { - ensureTypeParametersIsMutable(); - typeParameters_.set(index, value); - - return this; - } - /** - * repeated int64 typeParameters = 9; - */ - public Builder addTypeParameters(long value) { - ensureTypeParametersIsMutable(); - typeParameters_.add(value); - - return this; - } - /** - * repeated int64 typeParameters = 9; - */ - public Builder addAllTypeParameters( - java.lang.Iterable values) { - ensureTypeParametersIsMutable(); - org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( - values, typeParameters_); - - return this; - } - /** - * repeated int64 typeParameters = 9; - */ - public Builder clearTypeParameters() { - typeParameters_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000100); - - return this; - } - - private java.util.List valueParameters_ = java.util.Collections.emptyList(); - private void ensureValueParametersIsMutable() { - if (!((bitField0_ & 0x00000200) == 0x00000200)) { - valueParameters_ = new java.util.ArrayList(valueParameters_); - bitField0_ |= 0x00000200; - } - } - /** - * repeated int64 valueParameters = 10; - */ - public java.util.List - getValueParametersList() { - return java.util.Collections.unmodifiableList(valueParameters_); - } - /** - * repeated int64 valueParameters = 10; - */ - public int getValueParametersCount() { - return valueParameters_.size(); - } - /** - * repeated int64 valueParameters = 10; - */ - public long getValueParameters(int index) { - return valueParameters_.get(index); - } - /** - * repeated int64 valueParameters = 10; - */ - public Builder setValueParameters( - int index, long value) { - ensureValueParametersIsMutable(); - valueParameters_.set(index, value); - - return this; - } - /** - * repeated int64 valueParameters = 10; - */ - public Builder addValueParameters(long value) { - ensureValueParametersIsMutable(); - valueParameters_.add(value); - - return this; - } - /** - * repeated int64 valueParameters = 10; - */ - public Builder addAllValueParameters( - java.lang.Iterable values) { - ensureValueParametersIsMutable(); - org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( - values, valueParameters_); - - return this; - } - /** - * repeated int64 valueParameters = 10; - */ - public Builder clearValueParameters() { - valueParameters_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000200); - - return this; - } - - private long correspondingPropertySymbol_ ; - /** - * optional int64 correspondingPropertySymbol = 11; - */ - public boolean hasCorrespondingPropertySymbol() { - return ((bitField0_ & 0x00000400) == 0x00000400); - } - /** - * optional int64 correspondingPropertySymbol = 11; - */ - public long getCorrespondingPropertySymbol() { - return correspondingPropertySymbol_; - } - /** - * optional int64 correspondingPropertySymbol = 11; - */ - public Builder setCorrespondingPropertySymbol(long value) { - bitField0_ |= 0x00000400; - correspondingPropertySymbol_ = value; - - return this; - } - /** - * optional int64 correspondingPropertySymbol = 11; - */ - public Builder clearCorrespondingPropertySymbol() { - bitField0_ = (bitField0_ & ~0x00000400); - correspondingPropertySymbol_ = 0L; - - return this; - } - - private java.util.List overriddenSymbols_ = java.util.Collections.emptyList(); - private void ensureOverriddenSymbolsIsMutable() { - if (!((bitField0_ & 0x00000800) == 0x00000800)) { - overriddenSymbols_ = new java.util.ArrayList(overriddenSymbols_); - bitField0_ |= 0x00000800; - } - } - /** - * repeated int64 overriddenSymbols = 12; - */ - public java.util.List - getOverriddenSymbolsList() { - return java.util.Collections.unmodifiableList(overriddenSymbols_); - } - /** - * repeated int64 overriddenSymbols = 12; - */ - public int getOverriddenSymbolsCount() { - return overriddenSymbols_.size(); - } - /** - * repeated int64 overriddenSymbols = 12; - */ - public long getOverriddenSymbols(int index) { - return overriddenSymbols_.get(index); - } - /** - * repeated int64 overriddenSymbols = 12; - */ - public Builder setOverriddenSymbols( - int index, long value) { - ensureOverriddenSymbolsIsMutable(); - overriddenSymbols_.set(index, value); - - return this; - } - /** - * repeated int64 overriddenSymbols = 12; - */ - public Builder addOverriddenSymbols(long value) { - ensureOverriddenSymbolsIsMutable(); - overriddenSymbols_.add(value); - - return this; - } - /** - * repeated int64 overriddenSymbols = 12; - */ - public Builder addAllOverriddenSymbols( - java.lang.Iterable values) { - ensureOverriddenSymbolsIsMutable(); - org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( - values, overriddenSymbols_); - - return this; - } - /** - * repeated int64 overriddenSymbols = 12; - */ - public Builder clearOverriddenSymbols() { - overriddenSymbols_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000800); - - return this; - } - - private long flags_ ; - /** - * optional int64 flags = 13 [default = 0]; - */ - public boolean hasFlags() { - return ((bitField0_ & 0x00001000) == 0x00001000); - } - /** - * optional int64 flags = 13 [default = 0]; - */ - public long getFlags() { - return flags_; - } - /** - * optional int64 flags = 13 [default = 0]; - */ - public Builder setFlags(long value) { - bitField0_ |= 0x00001000; - flags_ = value; - - return this; - } - /** - * optional int64 flags = 13 [default = 0]; - */ - public Builder clearFlags() { - bitField0_ = (bitField0_ & ~0x00001000); - flags_ = 0L; - - return this; - } - - // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.backend.common.serialization.proto.PirFunctionCarrier) - } - - static { - defaultInstance = new PirFunctionCarrier(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.PirFunctionCarrier) -} diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirFunctionCarrierOrBuilder.java b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirFunctionCarrierOrBuilder.java deleted file mode 100644 index f9aaab54d7f..00000000000 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirFunctionCarrierOrBuilder.java +++ /dev/null @@ -1,143 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: compiler/ir/serialization.common/src/KotlinPirCarriers.proto - -package org.jetbrains.kotlin.backend.common.serialization.proto; - -public interface PirFunctionCarrierOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.backend.common.serialization.proto.PirFunctionCarrier) - org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder { - - /** - * required int32 lastModified = 1; - */ - boolean hasLastModified(); - /** - * required int32 lastModified = 1; - */ - int getLastModified(); - - /** - * optional int64 parentSymbol = 2; - */ - boolean hasParentSymbol(); - /** - * optional int64 parentSymbol = 2; - */ - long getParentSymbol(); - - /** - * optional int32 origin = 3; - */ - boolean hasOrigin(); - /** - * optional int32 origin = 3; - */ - int getOrigin(); - - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - java.util.List - getAnnotationList(); - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index); - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - int getAnnotationCount(); - - /** - * required int32 returnTypeField = 5; - */ - boolean hasReturnTypeField(); - /** - * required int32 returnTypeField = 5; - */ - int getReturnTypeField(); - - /** - * optional int64 dispatchReceiverParameter = 6; - */ - boolean hasDispatchReceiverParameter(); - /** - * optional int64 dispatchReceiverParameter = 6; - */ - long getDispatchReceiverParameter(); - - /** - * optional int64 extensionReceiverParameter = 7; - */ - boolean hasExtensionReceiverParameter(); - /** - * optional int64 extensionReceiverParameter = 7; - */ - long getExtensionReceiverParameter(); - - /** - * optional int32 body = 8; - */ - boolean hasBody(); - /** - * optional int32 body = 8; - */ - int getBody(); - - /** - * repeated int64 typeParameters = 9; - */ - java.util.List getTypeParametersList(); - /** - * repeated int64 typeParameters = 9; - */ - int getTypeParametersCount(); - /** - * repeated int64 typeParameters = 9; - */ - long getTypeParameters(int index); - - /** - * repeated int64 valueParameters = 10; - */ - java.util.List getValueParametersList(); - /** - * repeated int64 valueParameters = 10; - */ - int getValueParametersCount(); - /** - * repeated int64 valueParameters = 10; - */ - long getValueParameters(int index); - - /** - * optional int64 correspondingPropertySymbol = 11; - */ - boolean hasCorrespondingPropertySymbol(); - /** - * optional int64 correspondingPropertySymbol = 11; - */ - long getCorrespondingPropertySymbol(); - - /** - * repeated int64 overriddenSymbols = 12; - */ - java.util.List getOverriddenSymbolsList(); - /** - * repeated int64 overriddenSymbols = 12; - */ - int getOverriddenSymbolsCount(); - /** - * repeated int64 overriddenSymbols = 12; - */ - long getOverriddenSymbols(int index); - - /** - * optional int64 flags = 13 [default = 0]; - */ - boolean hasFlags(); - /** - * optional int64 flags = 13 [default = 0]; - */ - long getFlags(); -} \ No newline at end of file diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirInlineClassRepresentationOrBuilder.java b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirInlineClassRepresentationOrBuilder.java deleted file mode 100644 index 86685d59f20..00000000000 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirInlineClassRepresentationOrBuilder.java +++ /dev/null @@ -1,27 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: compiler/ir/serialization.common/src/KotlinIr.proto - -package org.jetbrains.kotlin.backend.common.serialization.proto; - -public interface PirInlineClassRepresentationOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.backend.common.serialization.proto.PirInlineClassRepresentation) - org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder { - - /** - * required int32 underlying_property_name = 1; - */ - boolean hasUnderlyingPropertyName(); - /** - * required int32 underlying_property_name = 1; - */ - int getUnderlyingPropertyName(); - - /** - * required int32 underlying_property_type = 2; - */ - boolean hasUnderlyingPropertyType(); - /** - * required int32 underlying_property_type = 2; - */ - int getUnderlyingPropertyType(); -} \ No newline at end of file diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirLocalDelegatedPropertyCarrier.java b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirLocalDelegatedPropertyCarrier.java deleted file mode 100644 index 338a2e92ba9..00000000000 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirLocalDelegatedPropertyCarrier.java +++ /dev/null @@ -1,1029 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: compiler/ir/serialization.common/src/KotlinPirCarriers.proto - -package org.jetbrains.kotlin.backend.common.serialization.proto; - -/** - * Protobuf type {@code org.jetbrains.kotlin.backend.common.serialization.proto.PirLocalDelegatedPropertyCarrier} - */ -public final class PirLocalDelegatedPropertyCarrier extends - org.jetbrains.kotlin.protobuf.GeneratedMessageLite implements - // @@protoc_insertion_point(message_implements:org.jetbrains.kotlin.backend.common.serialization.proto.PirLocalDelegatedPropertyCarrier) - PirLocalDelegatedPropertyCarrierOrBuilder { - // Use PirLocalDelegatedPropertyCarrier.newBuilder() to construct. - private PirLocalDelegatedPropertyCarrier(org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private PirLocalDelegatedPropertyCarrier(boolean noInit) { this.unknownFields = org.jetbrains.kotlin.protobuf.ByteString.EMPTY;} - - private static final PirLocalDelegatedPropertyCarrier defaultInstance; - public static PirLocalDelegatedPropertyCarrier getDefaultInstance() { - return defaultInstance; - } - - public PirLocalDelegatedPropertyCarrier getDefaultInstanceForType() { - return defaultInstance; - } - - private final org.jetbrains.kotlin.protobuf.ByteString unknownFields; - private PirLocalDelegatedPropertyCarrier( - 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 8: { - bitField0_ |= 0x00000001; - lastModified_ = input.readInt32(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - parentSymbol_ = input.readInt64(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - origin_ = input.readInt32(); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - annotation_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - annotation_.add(input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.PARSER, extensionRegistry)); - break; - } - case 40: { - bitField0_ |= 0x00000008; - type_ = input.readInt32(); - break; - } - case 50: { - org.jetbrains.kotlin.backend.common.serialization.proto.IrVariable.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) == 0x00000010)) { - subBuilder = delegate_.toBuilder(); - } - delegate_ = input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IrVariable.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(delegate_); - delegate_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 56: { - bitField0_ |= 0x00000020; - getter_ = input.readInt64(); - break; - } - case 64: { - bitField0_ |= 0x00000040; - setter_ = input.readInt64(); - 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_ & 0x00000008) == 0x00000008)) { - annotation_ = java.util.Collections.unmodifiableList(annotation_); - } - try { - unknownFieldsCodedOutput.flush(); - } catch (java.io.IOException e) { - // Should not happen - } finally { - unknownFields = unknownFieldsOutput.toByteString(); - } - makeExtensionsImmutable(); - } - } - public static org.jetbrains.kotlin.protobuf.Parser PARSER = - new org.jetbrains.kotlin.protobuf.AbstractParser() { - public PirLocalDelegatedPropertyCarrier parsePartialFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return new PirLocalDelegatedPropertyCarrier(input, extensionRegistry); - } - }; - - @java.lang.Override - public org.jetbrains.kotlin.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - public static final int LASTMODIFIED_FIELD_NUMBER = 1; - private int lastModified_; - /** - * required int32 lastModified = 1; - */ - public boolean hasLastModified() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required int32 lastModified = 1; - */ - public int getLastModified() { - return lastModified_; - } - - public static final int PARENTSYMBOL_FIELD_NUMBER = 2; - private long parentSymbol_; - /** - * optional int64 parentSymbol = 2; - */ - public boolean hasParentSymbol() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional int64 parentSymbol = 2; - */ - public long getParentSymbol() { - return parentSymbol_; - } - - public static final int ORIGIN_FIELD_NUMBER = 3; - private int origin_; - /** - * optional int32 origin = 3; - */ - public boolean hasOrigin() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int32 origin = 3; - */ - public int getOrigin() { - return origin_; - } - - public static final int ANNOTATION_FIELD_NUMBER = 4; - private java.util.List annotation_; - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public java.util.List getAnnotationList() { - return annotation_; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public java.util.List - getAnnotationOrBuilderList() { - return annotation_; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public int getAnnotationCount() { - return annotation_.size(); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index) { - return annotation_.get(index); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCallOrBuilder getAnnotationOrBuilder( - int index) { - return annotation_.get(index); - } - - public static final int TYPE_FIELD_NUMBER = 5; - private int type_; - /** - * required int32 type = 5; - */ - public boolean hasType() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * required int32 type = 5; - */ - public int getType() { - return type_; - } - - public static final int DELEGATE_FIELD_NUMBER = 6; - private org.jetbrains.kotlin.backend.common.serialization.proto.IrVariable delegate_; - /** - * optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrVariable delegate = 6; - */ - public boolean hasDelegate() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrVariable delegate = 6; - */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrVariable getDelegate() { - return delegate_; - } - - public static final int GETTER_FIELD_NUMBER = 7; - private long getter_; - /** - * optional int64 getter = 7; - */ - public boolean hasGetter() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional int64 getter = 7; - */ - public long getGetter() { - return getter_; - } - - public static final int SETTER_FIELD_NUMBER = 8; - private long setter_; - /** - * optional int64 setter = 8; - */ - public boolean hasSetter() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - /** - * optional int64 setter = 8; - */ - public long getSetter() { - return setter_; - } - - private void initFields() { - lastModified_ = 0; - parentSymbol_ = 0L; - origin_ = 0; - annotation_ = java.util.Collections.emptyList(); - type_ = 0; - delegate_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrVariable.getDefaultInstance(); - getter_ = 0L; - setter_ = 0L; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (!hasLastModified()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasType()) { - memoizedIsInitialized = 0; - return false; - } - for (int i = 0; i < getAnnotationCount(); i++) { - if (!getAnnotation(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - if (hasDelegate()) { - if (!getDelegate().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.writeInt32(1, lastModified_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeInt64(2, parentSymbol_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeInt32(3, origin_); - } - for (int i = 0; i < annotation_.size(); i++) { - output.writeMessage(4, annotation_.get(i)); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeInt32(5, type_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeMessage(6, delegate_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeInt64(7, getter_); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - output.writeInt64(8, setter_); - } - 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 - .computeInt32Size(1, lastModified_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt64Size(2, parentSymbol_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt32Size(3, origin_); - } - for (int i = 0; i < annotation_.size(); i++) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeMessageSize(4, annotation_.get(i)); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt32Size(5, type_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeMessageSize(6, delegate_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt64Size(7, getter_); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt64Size(8, setter_); - } - size += unknownFields.size(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirLocalDelegatedPropertyCarrier parseFrom( - org.jetbrains.kotlin.protobuf.ByteString data) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirLocalDelegatedPropertyCarrier parseFrom( - org.jetbrains.kotlin.protobuf.ByteString data, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirLocalDelegatedPropertyCarrier parseFrom(byte[] data) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirLocalDelegatedPropertyCarrier parseFrom( - byte[] data, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirLocalDelegatedPropertyCarrier parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirLocalDelegatedPropertyCarrier parseFrom( - java.io.InputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirLocalDelegatedPropertyCarrier parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirLocalDelegatedPropertyCarrier parseDelimitedFrom( - java.io.InputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirLocalDelegatedPropertyCarrier parseFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirLocalDelegatedPropertyCarrier parseFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.jetbrains.kotlin.backend.common.serialization.proto.PirLocalDelegatedPropertyCarrier prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - /** - * Protobuf type {@code org.jetbrains.kotlin.backend.common.serialization.proto.PirLocalDelegatedPropertyCarrier} - */ - public static final class Builder extends - org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder< - org.jetbrains.kotlin.backend.common.serialization.proto.PirLocalDelegatedPropertyCarrier, Builder> - implements - // @@protoc_insertion_point(builder_implements:org.jetbrains.kotlin.backend.common.serialization.proto.PirLocalDelegatedPropertyCarrier) - org.jetbrains.kotlin.backend.common.serialization.proto.PirLocalDelegatedPropertyCarrierOrBuilder { - // Construct using org.jetbrains.kotlin.backend.common.serialization.proto.PirLocalDelegatedPropertyCarrier.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - lastModified_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - parentSymbol_ = 0L; - bitField0_ = (bitField0_ & ~0x00000002); - origin_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - annotation_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - type_ = 0; - bitField0_ = (bitField0_ & ~0x00000010); - delegate_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrVariable.getDefaultInstance(); - bitField0_ = (bitField0_ & ~0x00000020); - getter_ = 0L; - bitField0_ = (bitField0_ & ~0x00000040); - setter_ = 0L; - bitField0_ = (bitField0_ & ~0x00000080); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public org.jetbrains.kotlin.backend.common.serialization.proto.PirLocalDelegatedPropertyCarrier getDefaultInstanceForType() { - return org.jetbrains.kotlin.backend.common.serialization.proto.PirLocalDelegatedPropertyCarrier.getDefaultInstance(); - } - - public org.jetbrains.kotlin.backend.common.serialization.proto.PirLocalDelegatedPropertyCarrier build() { - org.jetbrains.kotlin.backend.common.serialization.proto.PirLocalDelegatedPropertyCarrier result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.jetbrains.kotlin.backend.common.serialization.proto.PirLocalDelegatedPropertyCarrier buildPartial() { - org.jetbrains.kotlin.backend.common.serialization.proto.PirLocalDelegatedPropertyCarrier result = new org.jetbrains.kotlin.backend.common.serialization.proto.PirLocalDelegatedPropertyCarrier(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.lastModified_ = lastModified_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.parentSymbol_ = parentSymbol_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.origin_ = origin_; - if (((bitField0_ & 0x00000008) == 0x00000008)) { - annotation_ = java.util.Collections.unmodifiableList(annotation_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.annotation_ = annotation_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000008; - } - result.type_ = type_; - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x00000010; - } - result.delegate_ = delegate_; - if (((from_bitField0_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x00000020; - } - result.getter_ = getter_; - if (((from_bitField0_ & 0x00000080) == 0x00000080)) { - to_bitField0_ |= 0x00000040; - } - result.setter_ = setter_; - result.bitField0_ = to_bitField0_; - return result; - } - - public Builder mergeFrom(org.jetbrains.kotlin.backend.common.serialization.proto.PirLocalDelegatedPropertyCarrier other) { - if (other == org.jetbrains.kotlin.backend.common.serialization.proto.PirLocalDelegatedPropertyCarrier.getDefaultInstance()) return this; - if (other.hasLastModified()) { - setLastModified(other.getLastModified()); - } - if (other.hasParentSymbol()) { - setParentSymbol(other.getParentSymbol()); - } - if (other.hasOrigin()) { - setOrigin(other.getOrigin()); - } - if (!other.annotation_.isEmpty()) { - if (annotation_.isEmpty()) { - annotation_ = other.annotation_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureAnnotationIsMutable(); - annotation_.addAll(other.annotation_); - } - - } - if (other.hasType()) { - setType(other.getType()); - } - if (other.hasDelegate()) { - mergeDelegate(other.getDelegate()); - } - if (other.hasGetter()) { - setGetter(other.getGetter()); - } - if (other.hasSetter()) { - setSetter(other.getSetter()); - } - setUnknownFields( - getUnknownFields().concat(other.unknownFields)); - return this; - } - - public final boolean isInitialized() { - if (!hasLastModified()) { - - return false; - } - if (!hasType()) { - - return false; - } - for (int i = 0; i < getAnnotationCount(); i++) { - if (!getAnnotation(i).isInitialized()) { - - return false; - } - } - if (hasDelegate()) { - if (!getDelegate().isInitialized()) { - - return false; - } - } - return true; - } - - public Builder mergeFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.jetbrains.kotlin.backend.common.serialization.proto.PirLocalDelegatedPropertyCarrier parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.jetbrains.kotlin.backend.common.serialization.proto.PirLocalDelegatedPropertyCarrier) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int lastModified_ ; - /** - * required int32 lastModified = 1; - */ - public boolean hasLastModified() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required int32 lastModified = 1; - */ - public int getLastModified() { - return lastModified_; - } - /** - * required int32 lastModified = 1; - */ - public Builder setLastModified(int value) { - bitField0_ |= 0x00000001; - lastModified_ = value; - - return this; - } - /** - * required int32 lastModified = 1; - */ - public Builder clearLastModified() { - bitField0_ = (bitField0_ & ~0x00000001); - lastModified_ = 0; - - return this; - } - - private long parentSymbol_ ; - /** - * optional int64 parentSymbol = 2; - */ - public boolean hasParentSymbol() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional int64 parentSymbol = 2; - */ - public long getParentSymbol() { - return parentSymbol_; - } - /** - * optional int64 parentSymbol = 2; - */ - public Builder setParentSymbol(long value) { - bitField0_ |= 0x00000002; - parentSymbol_ = value; - - return this; - } - /** - * optional int64 parentSymbol = 2; - */ - public Builder clearParentSymbol() { - bitField0_ = (bitField0_ & ~0x00000002); - parentSymbol_ = 0L; - - return this; - } - - private int origin_ ; - /** - * optional int32 origin = 3; - */ - public boolean hasOrigin() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int32 origin = 3; - */ - public int getOrigin() { - return origin_; - } - /** - * optional int32 origin = 3; - */ - public Builder setOrigin(int value) { - bitField0_ |= 0x00000004; - origin_ = value; - - return this; - } - /** - * optional int32 origin = 3; - */ - public Builder clearOrigin() { - bitField0_ = (bitField0_ & ~0x00000004); - origin_ = 0; - - return this; - } - - private java.util.List annotation_ = - java.util.Collections.emptyList(); - private void ensureAnnotationIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { - annotation_ = new java.util.ArrayList(annotation_); - bitField0_ |= 0x00000008; - } - } - - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public java.util.List getAnnotationList() { - return java.util.Collections.unmodifiableList(annotation_); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public int getAnnotationCount() { - return annotation_.size(); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index) { - return annotation_.get(index); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder setAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnnotationIsMutable(); - annotation_.set(index, value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder setAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) { - ensureAnnotationIsMutable(); - annotation_.set(index, builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation(org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnnotationIsMutable(); - annotation_.add(value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnnotationIsMutable(); - annotation_.add(index, value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation( - org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) { - ensureAnnotationIsMutable(); - annotation_.add(builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) { - ensureAnnotationIsMutable(); - annotation_.add(index, builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAllAnnotation( - java.lang.Iterable values) { - ensureAnnotationIsMutable(); - org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( - values, annotation_); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder clearAnnotation() { - annotation_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder removeAnnotation(int index) { - ensureAnnotationIsMutable(); - annotation_.remove(index); - - return this; - } - - private int type_ ; - /** - * required int32 type = 5; - */ - public boolean hasType() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * required int32 type = 5; - */ - public int getType() { - return type_; - } - /** - * required int32 type = 5; - */ - public Builder setType(int value) { - bitField0_ |= 0x00000010; - type_ = value; - - return this; - } - /** - * required int32 type = 5; - */ - public Builder clearType() { - bitField0_ = (bitField0_ & ~0x00000010); - type_ = 0; - - return this; - } - - private org.jetbrains.kotlin.backend.common.serialization.proto.IrVariable delegate_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrVariable.getDefaultInstance(); - /** - * optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrVariable delegate = 6; - */ - public boolean hasDelegate() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrVariable delegate = 6; - */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrVariable getDelegate() { - return delegate_; - } - /** - * optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrVariable delegate = 6; - */ - public Builder setDelegate(org.jetbrains.kotlin.backend.common.serialization.proto.IrVariable value) { - if (value == null) { - throw new NullPointerException(); - } - delegate_ = value; - - bitField0_ |= 0x00000020; - return this; - } - /** - * optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrVariable delegate = 6; - */ - public Builder setDelegate( - org.jetbrains.kotlin.backend.common.serialization.proto.IrVariable.Builder builderForValue) { - delegate_ = builderForValue.build(); - - bitField0_ |= 0x00000020; - return this; - } - /** - * optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrVariable delegate = 6; - */ - public Builder mergeDelegate(org.jetbrains.kotlin.backend.common.serialization.proto.IrVariable value) { - if (((bitField0_ & 0x00000020) == 0x00000020) && - delegate_ != org.jetbrains.kotlin.backend.common.serialization.proto.IrVariable.getDefaultInstance()) { - delegate_ = - org.jetbrains.kotlin.backend.common.serialization.proto.IrVariable.newBuilder(delegate_).mergeFrom(value).buildPartial(); - } else { - delegate_ = value; - } - - bitField0_ |= 0x00000020; - return this; - } - /** - * optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrVariable delegate = 6; - */ - public Builder clearDelegate() { - delegate_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrVariable.getDefaultInstance(); - - bitField0_ = (bitField0_ & ~0x00000020); - return this; - } - - private long getter_ ; - /** - * optional int64 getter = 7; - */ - public boolean hasGetter() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - /** - * optional int64 getter = 7; - */ - public long getGetter() { - return getter_; - } - /** - * optional int64 getter = 7; - */ - public Builder setGetter(long value) { - bitField0_ |= 0x00000040; - getter_ = value; - - return this; - } - /** - * optional int64 getter = 7; - */ - public Builder clearGetter() { - bitField0_ = (bitField0_ & ~0x00000040); - getter_ = 0L; - - return this; - } - - private long setter_ ; - /** - * optional int64 setter = 8; - */ - public boolean hasSetter() { - return ((bitField0_ & 0x00000080) == 0x00000080); - } - /** - * optional int64 setter = 8; - */ - public long getSetter() { - return setter_; - } - /** - * optional int64 setter = 8; - */ - public Builder setSetter(long value) { - bitField0_ |= 0x00000080; - setter_ = value; - - return this; - } - /** - * optional int64 setter = 8; - */ - public Builder clearSetter() { - bitField0_ = (bitField0_ & ~0x00000080); - setter_ = 0L; - - return this; - } - - // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.backend.common.serialization.proto.PirLocalDelegatedPropertyCarrier) - } - - static { - defaultInstance = new PirLocalDelegatedPropertyCarrier(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.PirLocalDelegatedPropertyCarrier) -} diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirLocalDelegatedPropertyCarrierOrBuilder.java b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirLocalDelegatedPropertyCarrierOrBuilder.java deleted file mode 100644 index a8d25d14de2..00000000000 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirLocalDelegatedPropertyCarrierOrBuilder.java +++ /dev/null @@ -1,86 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: compiler/ir/serialization.common/src/KotlinPirCarriers.proto - -package org.jetbrains.kotlin.backend.common.serialization.proto; - -public interface PirLocalDelegatedPropertyCarrierOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.backend.common.serialization.proto.PirLocalDelegatedPropertyCarrier) - org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder { - - /** - * required int32 lastModified = 1; - */ - boolean hasLastModified(); - /** - * required int32 lastModified = 1; - */ - int getLastModified(); - - /** - * optional int64 parentSymbol = 2; - */ - boolean hasParentSymbol(); - /** - * optional int64 parentSymbol = 2; - */ - long getParentSymbol(); - - /** - * optional int32 origin = 3; - */ - boolean hasOrigin(); - /** - * optional int32 origin = 3; - */ - int getOrigin(); - - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - java.util.List - getAnnotationList(); - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index); - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - int getAnnotationCount(); - - /** - * required int32 type = 5; - */ - boolean hasType(); - /** - * required int32 type = 5; - */ - int getType(); - - /** - * optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrVariable delegate = 6; - */ - boolean hasDelegate(); - /** - * optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrVariable delegate = 6; - */ - org.jetbrains.kotlin.backend.common.serialization.proto.IrVariable getDelegate(); - - /** - * optional int64 getter = 7; - */ - boolean hasGetter(); - /** - * optional int64 getter = 7; - */ - long getGetter(); - - /** - * optional int64 setter = 8; - */ - boolean hasSetter(); - /** - * optional int64 setter = 8; - */ - long getSetter(); -} \ No newline at end of file diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirPropertyCarrier.java b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirPropertyCarrier.java deleted file mode 100644 index 25676f387f9..00000000000 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirPropertyCarrier.java +++ /dev/null @@ -1,1046 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: compiler/ir/serialization.common/src/KotlinPirCarriers.proto - -package org.jetbrains.kotlin.backend.common.serialization.proto; - -/** - * Protobuf type {@code org.jetbrains.kotlin.backend.common.serialization.proto.PirPropertyCarrier} - */ -public final class PirPropertyCarrier extends - org.jetbrains.kotlin.protobuf.GeneratedMessageLite implements - // @@protoc_insertion_point(message_implements:org.jetbrains.kotlin.backend.common.serialization.proto.PirPropertyCarrier) - PirPropertyCarrierOrBuilder { - // Use PirPropertyCarrier.newBuilder() to construct. - private PirPropertyCarrier(org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private PirPropertyCarrier(boolean noInit) { this.unknownFields = org.jetbrains.kotlin.protobuf.ByteString.EMPTY;} - - private static final PirPropertyCarrier defaultInstance; - public static PirPropertyCarrier getDefaultInstance() { - return defaultInstance; - } - - public PirPropertyCarrier getDefaultInstanceForType() { - return defaultInstance; - } - - private final org.jetbrains.kotlin.protobuf.ByteString unknownFields; - private PirPropertyCarrier( - 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 8: { - bitField0_ |= 0x00000001; - lastModified_ = input.readInt32(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - parentSymbol_ = input.readInt64(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - origin_ = input.readInt32(); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - annotation_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - annotation_.add(input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.PARSER, extensionRegistry)); - break; - } - case 40: { - bitField0_ |= 0x00000008; - backingField_ = input.readInt64(); - break; - } - case 48: { - bitField0_ |= 0x00000010; - getter_ = input.readInt64(); - break; - } - case 56: { - bitField0_ |= 0x00000020; - setter_ = input.readInt64(); - break; - } - case 64: { - if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) { - overriddenSymbols_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000080; - } - overriddenSymbols_.add(input.readInt64()); - break; - } - case 66: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000080) == 0x00000080) && input.getBytesUntilLimit() > 0) { - overriddenSymbols_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000080; - } - while (input.getBytesUntilLimit() > 0) { - overriddenSymbols_.add(input.readInt64()); - } - input.popLimit(limit); - break; - } - } - } - } catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - annotation_ = java.util.Collections.unmodifiableList(annotation_); - } - if (((mutable_bitField0_ & 0x00000080) == 0x00000080)) { - overriddenSymbols_ = java.util.Collections.unmodifiableList(overriddenSymbols_); - } - 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 PirPropertyCarrier parsePartialFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return new PirPropertyCarrier(input, extensionRegistry); - } - }; - - @java.lang.Override - public org.jetbrains.kotlin.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - public static final int LASTMODIFIED_FIELD_NUMBER = 1; - private int lastModified_; - /** - * required int32 lastModified = 1; - */ - public boolean hasLastModified() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required int32 lastModified = 1; - */ - public int getLastModified() { - return lastModified_; - } - - public static final int PARENTSYMBOL_FIELD_NUMBER = 2; - private long parentSymbol_; - /** - * optional int64 parentSymbol = 2; - */ - public boolean hasParentSymbol() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional int64 parentSymbol = 2; - */ - public long getParentSymbol() { - return parentSymbol_; - } - - public static final int ORIGIN_FIELD_NUMBER = 3; - private int origin_; - /** - * optional int32 origin = 3; - */ - public boolean hasOrigin() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int32 origin = 3; - */ - public int getOrigin() { - return origin_; - } - - public static final int ANNOTATION_FIELD_NUMBER = 4; - private java.util.List annotation_; - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public java.util.List getAnnotationList() { - return annotation_; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public java.util.List - getAnnotationOrBuilderList() { - return annotation_; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public int getAnnotationCount() { - return annotation_.size(); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index) { - return annotation_.get(index); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCallOrBuilder getAnnotationOrBuilder( - int index) { - return annotation_.get(index); - } - - public static final int BACKINGFIELD_FIELD_NUMBER = 5; - private long backingField_; - /** - * optional int64 backingField = 5; - */ - public boolean hasBackingField() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional int64 backingField = 5; - */ - public long getBackingField() { - return backingField_; - } - - public static final int GETTER_FIELD_NUMBER = 6; - private long getter_; - /** - * optional int64 getter = 6; - */ - public boolean hasGetter() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional int64 getter = 6; - */ - public long getGetter() { - return getter_; - } - - public static final int SETTER_FIELD_NUMBER = 7; - private long setter_; - /** - * optional int64 setter = 7; - */ - public boolean hasSetter() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional int64 setter = 7; - */ - public long getSetter() { - return setter_; - } - - public static final int OVERRIDDENSYMBOLS_FIELD_NUMBER = 8; - private java.util.List overriddenSymbols_; - /** - * repeated int64 overriddenSymbols = 8; - */ - public java.util.List - getOverriddenSymbolsList() { - return overriddenSymbols_; - } - /** - * repeated int64 overriddenSymbols = 8; - */ - public int getOverriddenSymbolsCount() { - return overriddenSymbols_.size(); - } - /** - * repeated int64 overriddenSymbols = 8; - */ - public long getOverriddenSymbols(int index) { - return overriddenSymbols_.get(index); - } - - private void initFields() { - lastModified_ = 0; - parentSymbol_ = 0L; - origin_ = 0; - annotation_ = java.util.Collections.emptyList(); - backingField_ = 0L; - getter_ = 0L; - setter_ = 0L; - overriddenSymbols_ = java.util.Collections.emptyList(); - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (!hasLastModified()) { - memoizedIsInitialized = 0; - return false; - } - for (int i = 0; i < getAnnotationCount(); i++) { - if (!getAnnotation(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(org.jetbrains.kotlin.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeInt32(1, lastModified_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeInt64(2, parentSymbol_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeInt32(3, origin_); - } - for (int i = 0; i < annotation_.size(); i++) { - output.writeMessage(4, annotation_.get(i)); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeInt64(5, backingField_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeInt64(6, getter_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeInt64(7, setter_); - } - for (int i = 0; i < overriddenSymbols_.size(); i++) { - output.writeInt64(8, overriddenSymbols_.get(i)); - } - 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 - .computeInt32Size(1, lastModified_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt64Size(2, parentSymbol_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt32Size(3, origin_); - } - for (int i = 0; i < annotation_.size(); i++) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeMessageSize(4, annotation_.get(i)); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt64Size(5, backingField_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt64Size(6, getter_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt64Size(7, setter_); - } - { - int dataSize = 0; - for (int i = 0; i < overriddenSymbols_.size(); i++) { - dataSize += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt64SizeNoTag(overriddenSymbols_.get(i)); - } - size += dataSize; - size += 1 * getOverriddenSymbolsList().size(); - } - size += unknownFields.size(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirPropertyCarrier parseFrom( - org.jetbrains.kotlin.protobuf.ByteString data) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirPropertyCarrier parseFrom( - org.jetbrains.kotlin.protobuf.ByteString data, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirPropertyCarrier parseFrom(byte[] data) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirPropertyCarrier parseFrom( - byte[] data, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirPropertyCarrier parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirPropertyCarrier parseFrom( - java.io.InputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirPropertyCarrier parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirPropertyCarrier parseDelimitedFrom( - java.io.InputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirPropertyCarrier parseFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirPropertyCarrier parseFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.jetbrains.kotlin.backend.common.serialization.proto.PirPropertyCarrier prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - /** - * Protobuf type {@code org.jetbrains.kotlin.backend.common.serialization.proto.PirPropertyCarrier} - */ - public static final class Builder extends - org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder< - org.jetbrains.kotlin.backend.common.serialization.proto.PirPropertyCarrier, Builder> - implements - // @@protoc_insertion_point(builder_implements:org.jetbrains.kotlin.backend.common.serialization.proto.PirPropertyCarrier) - org.jetbrains.kotlin.backend.common.serialization.proto.PirPropertyCarrierOrBuilder { - // Construct using org.jetbrains.kotlin.backend.common.serialization.proto.PirPropertyCarrier.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - lastModified_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - parentSymbol_ = 0L; - bitField0_ = (bitField0_ & ~0x00000002); - origin_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - annotation_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - backingField_ = 0L; - bitField0_ = (bitField0_ & ~0x00000010); - getter_ = 0L; - bitField0_ = (bitField0_ & ~0x00000020); - setter_ = 0L; - bitField0_ = (bitField0_ & ~0x00000040); - overriddenSymbols_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public org.jetbrains.kotlin.backend.common.serialization.proto.PirPropertyCarrier getDefaultInstanceForType() { - return org.jetbrains.kotlin.backend.common.serialization.proto.PirPropertyCarrier.getDefaultInstance(); - } - - public org.jetbrains.kotlin.backend.common.serialization.proto.PirPropertyCarrier build() { - org.jetbrains.kotlin.backend.common.serialization.proto.PirPropertyCarrier result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.jetbrains.kotlin.backend.common.serialization.proto.PirPropertyCarrier buildPartial() { - org.jetbrains.kotlin.backend.common.serialization.proto.PirPropertyCarrier result = new org.jetbrains.kotlin.backend.common.serialization.proto.PirPropertyCarrier(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.lastModified_ = lastModified_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.parentSymbol_ = parentSymbol_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.origin_ = origin_; - if (((bitField0_ & 0x00000008) == 0x00000008)) { - annotation_ = java.util.Collections.unmodifiableList(annotation_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.annotation_ = annotation_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000008; - } - result.backingField_ = backingField_; - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x00000010; - } - result.getter_ = getter_; - if (((from_bitField0_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x00000020; - } - result.setter_ = setter_; - if (((bitField0_ & 0x00000080) == 0x00000080)) { - overriddenSymbols_ = java.util.Collections.unmodifiableList(overriddenSymbols_); - bitField0_ = (bitField0_ & ~0x00000080); - } - result.overriddenSymbols_ = overriddenSymbols_; - result.bitField0_ = to_bitField0_; - return result; - } - - public Builder mergeFrom(org.jetbrains.kotlin.backend.common.serialization.proto.PirPropertyCarrier other) { - if (other == org.jetbrains.kotlin.backend.common.serialization.proto.PirPropertyCarrier.getDefaultInstance()) return this; - if (other.hasLastModified()) { - setLastModified(other.getLastModified()); - } - if (other.hasParentSymbol()) { - setParentSymbol(other.getParentSymbol()); - } - if (other.hasOrigin()) { - setOrigin(other.getOrigin()); - } - if (!other.annotation_.isEmpty()) { - if (annotation_.isEmpty()) { - annotation_ = other.annotation_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureAnnotationIsMutable(); - annotation_.addAll(other.annotation_); - } - - } - if (other.hasBackingField()) { - setBackingField(other.getBackingField()); - } - if (other.hasGetter()) { - setGetter(other.getGetter()); - } - if (other.hasSetter()) { - setSetter(other.getSetter()); - } - if (!other.overriddenSymbols_.isEmpty()) { - if (overriddenSymbols_.isEmpty()) { - overriddenSymbols_ = other.overriddenSymbols_; - bitField0_ = (bitField0_ & ~0x00000080); - } else { - ensureOverriddenSymbolsIsMutable(); - overriddenSymbols_.addAll(other.overriddenSymbols_); - } - - } - setUnknownFields( - getUnknownFields().concat(other.unknownFields)); - return this; - } - - public final boolean isInitialized() { - if (!hasLastModified()) { - - return false; - } - for (int i = 0; i < getAnnotationCount(); i++) { - if (!getAnnotation(i).isInitialized()) { - - return false; - } - } - return true; - } - - public Builder mergeFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.jetbrains.kotlin.backend.common.serialization.proto.PirPropertyCarrier parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.jetbrains.kotlin.backend.common.serialization.proto.PirPropertyCarrier) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int lastModified_ ; - /** - * required int32 lastModified = 1; - */ - public boolean hasLastModified() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required int32 lastModified = 1; - */ - public int getLastModified() { - return lastModified_; - } - /** - * required int32 lastModified = 1; - */ - public Builder setLastModified(int value) { - bitField0_ |= 0x00000001; - lastModified_ = value; - - return this; - } - /** - * required int32 lastModified = 1; - */ - public Builder clearLastModified() { - bitField0_ = (bitField0_ & ~0x00000001); - lastModified_ = 0; - - return this; - } - - private long parentSymbol_ ; - /** - * optional int64 parentSymbol = 2; - */ - public boolean hasParentSymbol() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional int64 parentSymbol = 2; - */ - public long getParentSymbol() { - return parentSymbol_; - } - /** - * optional int64 parentSymbol = 2; - */ - public Builder setParentSymbol(long value) { - bitField0_ |= 0x00000002; - parentSymbol_ = value; - - return this; - } - /** - * optional int64 parentSymbol = 2; - */ - public Builder clearParentSymbol() { - bitField0_ = (bitField0_ & ~0x00000002); - parentSymbol_ = 0L; - - return this; - } - - private int origin_ ; - /** - * optional int32 origin = 3; - */ - public boolean hasOrigin() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int32 origin = 3; - */ - public int getOrigin() { - return origin_; - } - /** - * optional int32 origin = 3; - */ - public Builder setOrigin(int value) { - bitField0_ |= 0x00000004; - origin_ = value; - - return this; - } - /** - * optional int32 origin = 3; - */ - public Builder clearOrigin() { - bitField0_ = (bitField0_ & ~0x00000004); - origin_ = 0; - - return this; - } - - private java.util.List annotation_ = - java.util.Collections.emptyList(); - private void ensureAnnotationIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { - annotation_ = new java.util.ArrayList(annotation_); - bitField0_ |= 0x00000008; - } - } - - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public java.util.List getAnnotationList() { - return java.util.Collections.unmodifiableList(annotation_); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public int getAnnotationCount() { - return annotation_.size(); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index) { - return annotation_.get(index); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder setAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnnotationIsMutable(); - annotation_.set(index, value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder setAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) { - ensureAnnotationIsMutable(); - annotation_.set(index, builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation(org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnnotationIsMutable(); - annotation_.add(value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnnotationIsMutable(); - annotation_.add(index, value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation( - org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) { - ensureAnnotationIsMutable(); - annotation_.add(builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) { - ensureAnnotationIsMutable(); - annotation_.add(index, builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAllAnnotation( - java.lang.Iterable values) { - ensureAnnotationIsMutable(); - org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( - values, annotation_); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder clearAnnotation() { - annotation_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder removeAnnotation(int index) { - ensureAnnotationIsMutable(); - annotation_.remove(index); - - return this; - } - - private long backingField_ ; - /** - * optional int64 backingField = 5; - */ - public boolean hasBackingField() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional int64 backingField = 5; - */ - public long getBackingField() { - return backingField_; - } - /** - * optional int64 backingField = 5; - */ - public Builder setBackingField(long value) { - bitField0_ |= 0x00000010; - backingField_ = value; - - return this; - } - /** - * optional int64 backingField = 5; - */ - public Builder clearBackingField() { - bitField0_ = (bitField0_ & ~0x00000010); - backingField_ = 0L; - - return this; - } - - private long getter_ ; - /** - * optional int64 getter = 6; - */ - public boolean hasGetter() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional int64 getter = 6; - */ - public long getGetter() { - return getter_; - } - /** - * optional int64 getter = 6; - */ - public Builder setGetter(long value) { - bitField0_ |= 0x00000020; - getter_ = value; - - return this; - } - /** - * optional int64 getter = 6; - */ - public Builder clearGetter() { - bitField0_ = (bitField0_ & ~0x00000020); - getter_ = 0L; - - return this; - } - - private long setter_ ; - /** - * optional int64 setter = 7; - */ - public boolean hasSetter() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - /** - * optional int64 setter = 7; - */ - public long getSetter() { - return setter_; - } - /** - * optional int64 setter = 7; - */ - public Builder setSetter(long value) { - bitField0_ |= 0x00000040; - setter_ = value; - - return this; - } - /** - * optional int64 setter = 7; - */ - public Builder clearSetter() { - bitField0_ = (bitField0_ & ~0x00000040); - setter_ = 0L; - - return this; - } - - private java.util.List overriddenSymbols_ = java.util.Collections.emptyList(); - private void ensureOverriddenSymbolsIsMutable() { - if (!((bitField0_ & 0x00000080) == 0x00000080)) { - overriddenSymbols_ = new java.util.ArrayList(overriddenSymbols_); - bitField0_ |= 0x00000080; - } - } - /** - * repeated int64 overriddenSymbols = 8; - */ - public java.util.List - getOverriddenSymbolsList() { - return java.util.Collections.unmodifiableList(overriddenSymbols_); - } - /** - * repeated int64 overriddenSymbols = 8; - */ - public int getOverriddenSymbolsCount() { - return overriddenSymbols_.size(); - } - /** - * repeated int64 overriddenSymbols = 8; - */ - public long getOverriddenSymbols(int index) { - return overriddenSymbols_.get(index); - } - /** - * repeated int64 overriddenSymbols = 8; - */ - public Builder setOverriddenSymbols( - int index, long value) { - ensureOverriddenSymbolsIsMutable(); - overriddenSymbols_.set(index, value); - - return this; - } - /** - * repeated int64 overriddenSymbols = 8; - */ - public Builder addOverriddenSymbols(long value) { - ensureOverriddenSymbolsIsMutable(); - overriddenSymbols_.add(value); - - return this; - } - /** - * repeated int64 overriddenSymbols = 8; - */ - public Builder addAllOverriddenSymbols( - java.lang.Iterable values) { - ensureOverriddenSymbolsIsMutable(); - org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( - values, overriddenSymbols_); - - return this; - } - /** - * repeated int64 overriddenSymbols = 8; - */ - public Builder clearOverriddenSymbols() { - overriddenSymbols_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); - - return this; - } - - // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.backend.common.serialization.proto.PirPropertyCarrier) - } - - static { - defaultInstance = new PirPropertyCarrier(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.PirPropertyCarrier) -} diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirPropertyCarrierOrBuilder.java b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirPropertyCarrierOrBuilder.java deleted file mode 100644 index 1bae27f6e2b..00000000000 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirPropertyCarrierOrBuilder.java +++ /dev/null @@ -1,90 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: compiler/ir/serialization.common/src/KotlinPirCarriers.proto - -package org.jetbrains.kotlin.backend.common.serialization.proto; - -public interface PirPropertyCarrierOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.backend.common.serialization.proto.PirPropertyCarrier) - org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder { - - /** - * required int32 lastModified = 1; - */ - boolean hasLastModified(); - /** - * required int32 lastModified = 1; - */ - int getLastModified(); - - /** - * optional int64 parentSymbol = 2; - */ - boolean hasParentSymbol(); - /** - * optional int64 parentSymbol = 2; - */ - long getParentSymbol(); - - /** - * optional int32 origin = 3; - */ - boolean hasOrigin(); - /** - * optional int32 origin = 3; - */ - int getOrigin(); - - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - java.util.List - getAnnotationList(); - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index); - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - int getAnnotationCount(); - - /** - * optional int64 backingField = 5; - */ - boolean hasBackingField(); - /** - * optional int64 backingField = 5; - */ - long getBackingField(); - - /** - * optional int64 getter = 6; - */ - boolean hasGetter(); - /** - * optional int64 getter = 6; - */ - long getGetter(); - - /** - * optional int64 setter = 7; - */ - boolean hasSetter(); - /** - * optional int64 setter = 7; - */ - long getSetter(); - - /** - * repeated int64 overriddenSymbols = 8; - */ - java.util.List getOverriddenSymbolsList(); - /** - * repeated int64 overriddenSymbols = 8; - */ - int getOverriddenSymbolsCount(); - /** - * repeated int64 overriddenSymbols = 8; - */ - long getOverriddenSymbols(int index); -} \ No newline at end of file diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirTypeAliasCarrier.java b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirTypeAliasCarrier.java deleted file mode 100644 index e2083876307..00000000000 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirTypeAliasCarrier.java +++ /dev/null @@ -1,916 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: compiler/ir/serialization.common/src/KotlinPirCarriers.proto - -package org.jetbrains.kotlin.backend.common.serialization.proto; - -/** - * Protobuf type {@code org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeAliasCarrier} - */ -public final class PirTypeAliasCarrier extends - org.jetbrains.kotlin.protobuf.GeneratedMessageLite implements - // @@protoc_insertion_point(message_implements:org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeAliasCarrier) - PirTypeAliasCarrierOrBuilder { - // Use PirTypeAliasCarrier.newBuilder() to construct. - private PirTypeAliasCarrier(org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private PirTypeAliasCarrier(boolean noInit) { this.unknownFields = org.jetbrains.kotlin.protobuf.ByteString.EMPTY;} - - private static final PirTypeAliasCarrier defaultInstance; - public static PirTypeAliasCarrier getDefaultInstance() { - return defaultInstance; - } - - public PirTypeAliasCarrier getDefaultInstanceForType() { - return defaultInstance; - } - - private final org.jetbrains.kotlin.protobuf.ByteString unknownFields; - private PirTypeAliasCarrier( - 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 8: { - bitField0_ |= 0x00000001; - lastModified_ = input.readInt32(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - parentSymbol_ = input.readInt64(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - origin_ = input.readInt32(); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - annotation_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - annotation_.add(input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.PARSER, extensionRegistry)); - break; - } - case 40: { - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { - typeParameters_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - typeParameters_.add(input.readInt64()); - break; - } - case 42: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010) && input.getBytesUntilLimit() > 0) { - typeParameters_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - while (input.getBytesUntilLimit() > 0) { - typeParameters_.add(input.readInt64()); - } - input.popLimit(limit); - break; - } - case 48: { - bitField0_ |= 0x00000008; - expandedType_ = input.readInt32(); - 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_ & 0x00000008) == 0x00000008)) { - annotation_ = java.util.Collections.unmodifiableList(annotation_); - } - if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { - typeParameters_ = java.util.Collections.unmodifiableList(typeParameters_); - } - 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 PirTypeAliasCarrier parsePartialFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return new PirTypeAliasCarrier(input, extensionRegistry); - } - }; - - @java.lang.Override - public org.jetbrains.kotlin.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - public static final int LASTMODIFIED_FIELD_NUMBER = 1; - private int lastModified_; - /** - * required int32 lastModified = 1; - */ - public boolean hasLastModified() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required int32 lastModified = 1; - */ - public int getLastModified() { - return lastModified_; - } - - public static final int PARENTSYMBOL_FIELD_NUMBER = 2; - private long parentSymbol_; - /** - * optional int64 parentSymbol = 2; - */ - public boolean hasParentSymbol() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional int64 parentSymbol = 2; - */ - public long getParentSymbol() { - return parentSymbol_; - } - - public static final int ORIGIN_FIELD_NUMBER = 3; - private int origin_; - /** - * optional int32 origin = 3; - */ - public boolean hasOrigin() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int32 origin = 3; - */ - public int getOrigin() { - return origin_; - } - - public static final int ANNOTATION_FIELD_NUMBER = 4; - private java.util.List annotation_; - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public java.util.List getAnnotationList() { - return annotation_; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public java.util.List - getAnnotationOrBuilderList() { - return annotation_; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public int getAnnotationCount() { - return annotation_.size(); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index) { - return annotation_.get(index); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCallOrBuilder getAnnotationOrBuilder( - int index) { - return annotation_.get(index); - } - - public static final int TYPEPARAMETERS_FIELD_NUMBER = 5; - private java.util.List typeParameters_; - /** - * repeated int64 typeParameters = 5; - */ - public java.util.List - getTypeParametersList() { - return typeParameters_; - } - /** - * repeated int64 typeParameters = 5; - */ - public int getTypeParametersCount() { - return typeParameters_.size(); - } - /** - * repeated int64 typeParameters = 5; - */ - public long getTypeParameters(int index) { - return typeParameters_.get(index); - } - - public static final int EXPANDEDTYPE_FIELD_NUMBER = 6; - private int expandedType_; - /** - * required int32 expandedType = 6; - */ - public boolean hasExpandedType() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * required int32 expandedType = 6; - */ - public int getExpandedType() { - return expandedType_; - } - - private void initFields() { - lastModified_ = 0; - parentSymbol_ = 0L; - origin_ = 0; - annotation_ = java.util.Collections.emptyList(); - typeParameters_ = java.util.Collections.emptyList(); - expandedType_ = 0; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (!hasLastModified()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasExpandedType()) { - memoizedIsInitialized = 0; - return false; - } - for (int i = 0; i < getAnnotationCount(); i++) { - if (!getAnnotation(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(org.jetbrains.kotlin.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeInt32(1, lastModified_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeInt64(2, parentSymbol_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeInt32(3, origin_); - } - for (int i = 0; i < annotation_.size(); i++) { - output.writeMessage(4, annotation_.get(i)); - } - for (int i = 0; i < typeParameters_.size(); i++) { - output.writeInt64(5, typeParameters_.get(i)); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeInt32(6, expandedType_); - } - 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 - .computeInt32Size(1, lastModified_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt64Size(2, parentSymbol_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt32Size(3, origin_); - } - for (int i = 0; i < annotation_.size(); i++) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeMessageSize(4, annotation_.get(i)); - } - { - int dataSize = 0; - for (int i = 0; i < typeParameters_.size(); i++) { - dataSize += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt64SizeNoTag(typeParameters_.get(i)); - } - size += dataSize; - size += 1 * getTypeParametersList().size(); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt32Size(6, expandedType_); - } - size += unknownFields.size(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeAliasCarrier parseFrom( - org.jetbrains.kotlin.protobuf.ByteString data) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeAliasCarrier parseFrom( - org.jetbrains.kotlin.protobuf.ByteString data, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeAliasCarrier parseFrom(byte[] data) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeAliasCarrier parseFrom( - byte[] data, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeAliasCarrier parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeAliasCarrier parseFrom( - java.io.InputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeAliasCarrier parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeAliasCarrier parseDelimitedFrom( - java.io.InputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeAliasCarrier parseFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeAliasCarrier parseFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeAliasCarrier prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - /** - * Protobuf type {@code org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeAliasCarrier} - */ - public static final class Builder extends - org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder< - org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeAliasCarrier, Builder> - implements - // @@protoc_insertion_point(builder_implements:org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeAliasCarrier) - org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeAliasCarrierOrBuilder { - // Construct using org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeAliasCarrier.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - lastModified_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - parentSymbol_ = 0L; - bitField0_ = (bitField0_ & ~0x00000002); - origin_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - annotation_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - typeParameters_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - expandedType_ = 0; - bitField0_ = (bitField0_ & ~0x00000020); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeAliasCarrier getDefaultInstanceForType() { - return org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeAliasCarrier.getDefaultInstance(); - } - - public org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeAliasCarrier build() { - org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeAliasCarrier result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeAliasCarrier buildPartial() { - org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeAliasCarrier result = new org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeAliasCarrier(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.lastModified_ = lastModified_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.parentSymbol_ = parentSymbol_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.origin_ = origin_; - if (((bitField0_ & 0x00000008) == 0x00000008)) { - annotation_ = java.util.Collections.unmodifiableList(annotation_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.annotation_ = annotation_; - if (((bitField0_ & 0x00000010) == 0x00000010)) { - typeParameters_ = java.util.Collections.unmodifiableList(typeParameters_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.typeParameters_ = typeParameters_; - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x00000008; - } - result.expandedType_ = expandedType_; - result.bitField0_ = to_bitField0_; - return result; - } - - public Builder mergeFrom(org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeAliasCarrier other) { - if (other == org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeAliasCarrier.getDefaultInstance()) return this; - if (other.hasLastModified()) { - setLastModified(other.getLastModified()); - } - if (other.hasParentSymbol()) { - setParentSymbol(other.getParentSymbol()); - } - if (other.hasOrigin()) { - setOrigin(other.getOrigin()); - } - if (!other.annotation_.isEmpty()) { - if (annotation_.isEmpty()) { - annotation_ = other.annotation_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureAnnotationIsMutable(); - annotation_.addAll(other.annotation_); - } - - } - if (!other.typeParameters_.isEmpty()) { - if (typeParameters_.isEmpty()) { - typeParameters_ = other.typeParameters_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureTypeParametersIsMutable(); - typeParameters_.addAll(other.typeParameters_); - } - - } - if (other.hasExpandedType()) { - setExpandedType(other.getExpandedType()); - } - setUnknownFields( - getUnknownFields().concat(other.unknownFields)); - return this; - } - - public final boolean isInitialized() { - if (!hasLastModified()) { - - return false; - } - if (!hasExpandedType()) { - - return false; - } - for (int i = 0; i < getAnnotationCount(); i++) { - if (!getAnnotation(i).isInitialized()) { - - return false; - } - } - return true; - } - - public Builder mergeFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeAliasCarrier parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeAliasCarrier) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int lastModified_ ; - /** - * required int32 lastModified = 1; - */ - public boolean hasLastModified() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required int32 lastModified = 1; - */ - public int getLastModified() { - return lastModified_; - } - /** - * required int32 lastModified = 1; - */ - public Builder setLastModified(int value) { - bitField0_ |= 0x00000001; - lastModified_ = value; - - return this; - } - /** - * required int32 lastModified = 1; - */ - public Builder clearLastModified() { - bitField0_ = (bitField0_ & ~0x00000001); - lastModified_ = 0; - - return this; - } - - private long parentSymbol_ ; - /** - * optional int64 parentSymbol = 2; - */ - public boolean hasParentSymbol() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional int64 parentSymbol = 2; - */ - public long getParentSymbol() { - return parentSymbol_; - } - /** - * optional int64 parentSymbol = 2; - */ - public Builder setParentSymbol(long value) { - bitField0_ |= 0x00000002; - parentSymbol_ = value; - - return this; - } - /** - * optional int64 parentSymbol = 2; - */ - public Builder clearParentSymbol() { - bitField0_ = (bitField0_ & ~0x00000002); - parentSymbol_ = 0L; - - return this; - } - - private int origin_ ; - /** - * optional int32 origin = 3; - */ - public boolean hasOrigin() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int32 origin = 3; - */ - public int getOrigin() { - return origin_; - } - /** - * optional int32 origin = 3; - */ - public Builder setOrigin(int value) { - bitField0_ |= 0x00000004; - origin_ = value; - - return this; - } - /** - * optional int32 origin = 3; - */ - public Builder clearOrigin() { - bitField0_ = (bitField0_ & ~0x00000004); - origin_ = 0; - - return this; - } - - private java.util.List annotation_ = - java.util.Collections.emptyList(); - private void ensureAnnotationIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { - annotation_ = new java.util.ArrayList(annotation_); - bitField0_ |= 0x00000008; - } - } - - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public java.util.List getAnnotationList() { - return java.util.Collections.unmodifiableList(annotation_); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public int getAnnotationCount() { - return annotation_.size(); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index) { - return annotation_.get(index); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder setAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnnotationIsMutable(); - annotation_.set(index, value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder setAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) { - ensureAnnotationIsMutable(); - annotation_.set(index, builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation(org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnnotationIsMutable(); - annotation_.add(value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnnotationIsMutable(); - annotation_.add(index, value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation( - org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) { - ensureAnnotationIsMutable(); - annotation_.add(builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) { - ensureAnnotationIsMutable(); - annotation_.add(index, builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAllAnnotation( - java.lang.Iterable values) { - ensureAnnotationIsMutable(); - org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( - values, annotation_); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder clearAnnotation() { - annotation_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder removeAnnotation(int index) { - ensureAnnotationIsMutable(); - annotation_.remove(index); - - return this; - } - - private java.util.List typeParameters_ = java.util.Collections.emptyList(); - private void ensureTypeParametersIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { - typeParameters_ = new java.util.ArrayList(typeParameters_); - bitField0_ |= 0x00000010; - } - } - /** - * repeated int64 typeParameters = 5; - */ - public java.util.List - getTypeParametersList() { - return java.util.Collections.unmodifiableList(typeParameters_); - } - /** - * repeated int64 typeParameters = 5; - */ - public int getTypeParametersCount() { - return typeParameters_.size(); - } - /** - * repeated int64 typeParameters = 5; - */ - public long getTypeParameters(int index) { - return typeParameters_.get(index); - } - /** - * repeated int64 typeParameters = 5; - */ - public Builder setTypeParameters( - int index, long value) { - ensureTypeParametersIsMutable(); - typeParameters_.set(index, value); - - return this; - } - /** - * repeated int64 typeParameters = 5; - */ - public Builder addTypeParameters(long value) { - ensureTypeParametersIsMutable(); - typeParameters_.add(value); - - return this; - } - /** - * repeated int64 typeParameters = 5; - */ - public Builder addAllTypeParameters( - java.lang.Iterable values) { - ensureTypeParametersIsMutable(); - org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( - values, typeParameters_); - - return this; - } - /** - * repeated int64 typeParameters = 5; - */ - public Builder clearTypeParameters() { - typeParameters_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - - return this; - } - - private int expandedType_ ; - /** - * required int32 expandedType = 6; - */ - public boolean hasExpandedType() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * required int32 expandedType = 6; - */ - public int getExpandedType() { - return expandedType_; - } - /** - * required int32 expandedType = 6; - */ - public Builder setExpandedType(int value) { - bitField0_ |= 0x00000020; - expandedType_ = value; - - return this; - } - /** - * required int32 expandedType = 6; - */ - public Builder clearExpandedType() { - bitField0_ = (bitField0_ & ~0x00000020); - expandedType_ = 0; - - return this; - } - - // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeAliasCarrier) - } - - static { - defaultInstance = new PirTypeAliasCarrier(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeAliasCarrier) -} diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirTypeAliasCarrierOrBuilder.java b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirTypeAliasCarrierOrBuilder.java deleted file mode 100644 index 93fbc466a20..00000000000 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirTypeAliasCarrierOrBuilder.java +++ /dev/null @@ -1,72 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: compiler/ir/serialization.common/src/KotlinPirCarriers.proto - -package org.jetbrains.kotlin.backend.common.serialization.proto; - -public interface PirTypeAliasCarrierOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeAliasCarrier) - org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder { - - /** - * required int32 lastModified = 1; - */ - boolean hasLastModified(); - /** - * required int32 lastModified = 1; - */ - int getLastModified(); - - /** - * optional int64 parentSymbol = 2; - */ - boolean hasParentSymbol(); - /** - * optional int64 parentSymbol = 2; - */ - long getParentSymbol(); - - /** - * optional int32 origin = 3; - */ - boolean hasOrigin(); - /** - * optional int32 origin = 3; - */ - int getOrigin(); - - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - java.util.List - getAnnotationList(); - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index); - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - int getAnnotationCount(); - - /** - * repeated int64 typeParameters = 5; - */ - java.util.List getTypeParametersList(); - /** - * repeated int64 typeParameters = 5; - */ - int getTypeParametersCount(); - /** - * repeated int64 typeParameters = 5; - */ - long getTypeParameters(int index); - - /** - * required int32 expandedType = 6; - */ - boolean hasExpandedType(); - /** - * required int32 expandedType = 6; - */ - int getExpandedType(); -} \ No newline at end of file diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirTypeParameterCarrier.java b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirTypeParameterCarrier.java deleted file mode 100644 index eebef08b958..00000000000 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirTypeParameterCarrier.java +++ /dev/null @@ -1,839 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: compiler/ir/serialization.common/src/KotlinPirCarriers.proto - -package org.jetbrains.kotlin.backend.common.serialization.proto; - -/** - * Protobuf type {@code org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeParameterCarrier} - */ -public final class PirTypeParameterCarrier extends - org.jetbrains.kotlin.protobuf.GeneratedMessageLite implements - // @@protoc_insertion_point(message_implements:org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeParameterCarrier) - PirTypeParameterCarrierOrBuilder { - // Use PirTypeParameterCarrier.newBuilder() to construct. - private PirTypeParameterCarrier(org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private PirTypeParameterCarrier(boolean noInit) { this.unknownFields = org.jetbrains.kotlin.protobuf.ByteString.EMPTY;} - - private static final PirTypeParameterCarrier defaultInstance; - public static PirTypeParameterCarrier getDefaultInstance() { - return defaultInstance; - } - - public PirTypeParameterCarrier getDefaultInstanceForType() { - return defaultInstance; - } - - private final org.jetbrains.kotlin.protobuf.ByteString unknownFields; - private PirTypeParameterCarrier( - 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 8: { - bitField0_ |= 0x00000001; - lastModified_ = input.readInt32(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - parentSymbol_ = input.readInt64(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - origin_ = input.readInt32(); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - annotation_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - annotation_.add(input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.PARSER, extensionRegistry)); - break; - } - case 40: { - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { - superTypes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - superTypes_.add(input.readInt32()); - break; - } - case 42: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010) && input.getBytesUntilLimit() > 0) { - superTypes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - while (input.getBytesUntilLimit() > 0) { - superTypes_.add(input.readInt32()); - } - input.popLimit(limit); - break; - } - } - } - } catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException( - e.getMessage()).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - annotation_ = java.util.Collections.unmodifiableList(annotation_); - } - if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { - superTypes_ = java.util.Collections.unmodifiableList(superTypes_); - } - 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 PirTypeParameterCarrier parsePartialFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return new PirTypeParameterCarrier(input, extensionRegistry); - } - }; - - @java.lang.Override - public org.jetbrains.kotlin.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - public static final int LASTMODIFIED_FIELD_NUMBER = 1; - private int lastModified_; - /** - * required int32 lastModified = 1; - */ - public boolean hasLastModified() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required int32 lastModified = 1; - */ - public int getLastModified() { - return lastModified_; - } - - public static final int PARENTSYMBOL_FIELD_NUMBER = 2; - private long parentSymbol_; - /** - * optional int64 parentSymbol = 2; - */ - public boolean hasParentSymbol() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional int64 parentSymbol = 2; - */ - public long getParentSymbol() { - return parentSymbol_; - } - - public static final int ORIGIN_FIELD_NUMBER = 3; - private int origin_; - /** - * optional int32 origin = 3; - */ - public boolean hasOrigin() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int32 origin = 3; - */ - public int getOrigin() { - return origin_; - } - - public static final int ANNOTATION_FIELD_NUMBER = 4; - private java.util.List annotation_; - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public java.util.List getAnnotationList() { - return annotation_; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public java.util.List - getAnnotationOrBuilderList() { - return annotation_; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public int getAnnotationCount() { - return annotation_.size(); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index) { - return annotation_.get(index); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCallOrBuilder getAnnotationOrBuilder( - int index) { - return annotation_.get(index); - } - - public static final int SUPERTYPES_FIELD_NUMBER = 5; - private java.util.List superTypes_; - /** - * repeated int32 superTypes = 5; - */ - public java.util.List - getSuperTypesList() { - return superTypes_; - } - /** - * repeated int32 superTypes = 5; - */ - public int getSuperTypesCount() { - return superTypes_.size(); - } - /** - * repeated int32 superTypes = 5; - */ - public int getSuperTypes(int index) { - return superTypes_.get(index); - } - - private void initFields() { - lastModified_ = 0; - parentSymbol_ = 0L; - origin_ = 0; - annotation_ = java.util.Collections.emptyList(); - superTypes_ = java.util.Collections.emptyList(); - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (!hasLastModified()) { - memoizedIsInitialized = 0; - return false; - } - for (int i = 0; i < getAnnotationCount(); i++) { - if (!getAnnotation(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(org.jetbrains.kotlin.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeInt32(1, lastModified_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeInt64(2, parentSymbol_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeInt32(3, origin_); - } - for (int i = 0; i < annotation_.size(); i++) { - output.writeMessage(4, annotation_.get(i)); - } - for (int i = 0; i < superTypes_.size(); i++) { - output.writeInt32(5, superTypes_.get(i)); - } - 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 - .computeInt32Size(1, lastModified_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt64Size(2, parentSymbol_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt32Size(3, origin_); - } - for (int i = 0; i < annotation_.size(); i++) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeMessageSize(4, annotation_.get(i)); - } - { - int dataSize = 0; - for (int i = 0; i < superTypes_.size(); i++) { - dataSize += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt32SizeNoTag(superTypes_.get(i)); - } - size += dataSize; - size += 1 * getSuperTypesList().size(); - } - size += unknownFields.size(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeParameterCarrier parseFrom( - org.jetbrains.kotlin.protobuf.ByteString data) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeParameterCarrier parseFrom( - org.jetbrains.kotlin.protobuf.ByteString data, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeParameterCarrier parseFrom(byte[] data) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeParameterCarrier parseFrom( - byte[] data, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeParameterCarrier parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeParameterCarrier parseFrom( - java.io.InputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeParameterCarrier parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeParameterCarrier parseDelimitedFrom( - java.io.InputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeParameterCarrier parseFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeParameterCarrier parseFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeParameterCarrier prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - /** - * Protobuf type {@code org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeParameterCarrier} - */ - public static final class Builder extends - org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder< - org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeParameterCarrier, Builder> - implements - // @@protoc_insertion_point(builder_implements:org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeParameterCarrier) - org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeParameterCarrierOrBuilder { - // Construct using org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeParameterCarrier.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - lastModified_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - parentSymbol_ = 0L; - bitField0_ = (bitField0_ & ~0x00000002); - origin_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - annotation_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - superTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeParameterCarrier getDefaultInstanceForType() { - return org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeParameterCarrier.getDefaultInstance(); - } - - public org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeParameterCarrier build() { - org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeParameterCarrier result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeParameterCarrier buildPartial() { - org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeParameterCarrier result = new org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeParameterCarrier(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.lastModified_ = lastModified_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.parentSymbol_ = parentSymbol_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.origin_ = origin_; - if (((bitField0_ & 0x00000008) == 0x00000008)) { - annotation_ = java.util.Collections.unmodifiableList(annotation_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.annotation_ = annotation_; - if (((bitField0_ & 0x00000010) == 0x00000010)) { - superTypes_ = java.util.Collections.unmodifiableList(superTypes_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.superTypes_ = superTypes_; - result.bitField0_ = to_bitField0_; - return result; - } - - public Builder mergeFrom(org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeParameterCarrier other) { - if (other == org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeParameterCarrier.getDefaultInstance()) return this; - if (other.hasLastModified()) { - setLastModified(other.getLastModified()); - } - if (other.hasParentSymbol()) { - setParentSymbol(other.getParentSymbol()); - } - if (other.hasOrigin()) { - setOrigin(other.getOrigin()); - } - if (!other.annotation_.isEmpty()) { - if (annotation_.isEmpty()) { - annotation_ = other.annotation_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureAnnotationIsMutable(); - annotation_.addAll(other.annotation_); - } - - } - if (!other.superTypes_.isEmpty()) { - if (superTypes_.isEmpty()) { - superTypes_ = other.superTypes_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureSuperTypesIsMutable(); - superTypes_.addAll(other.superTypes_); - } - - } - setUnknownFields( - getUnknownFields().concat(other.unknownFields)); - return this; - } - - public final boolean isInitialized() { - if (!hasLastModified()) { - - return false; - } - for (int i = 0; i < getAnnotationCount(); i++) { - if (!getAnnotation(i).isInitialized()) { - - return false; - } - } - return true; - } - - public Builder mergeFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeParameterCarrier parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeParameterCarrier) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int lastModified_ ; - /** - * required int32 lastModified = 1; - */ - public boolean hasLastModified() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required int32 lastModified = 1; - */ - public int getLastModified() { - return lastModified_; - } - /** - * required int32 lastModified = 1; - */ - public Builder setLastModified(int value) { - bitField0_ |= 0x00000001; - lastModified_ = value; - - return this; - } - /** - * required int32 lastModified = 1; - */ - public Builder clearLastModified() { - bitField0_ = (bitField0_ & ~0x00000001); - lastModified_ = 0; - - return this; - } - - private long parentSymbol_ ; - /** - * optional int64 parentSymbol = 2; - */ - public boolean hasParentSymbol() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional int64 parentSymbol = 2; - */ - public long getParentSymbol() { - return parentSymbol_; - } - /** - * optional int64 parentSymbol = 2; - */ - public Builder setParentSymbol(long value) { - bitField0_ |= 0x00000002; - parentSymbol_ = value; - - return this; - } - /** - * optional int64 parentSymbol = 2; - */ - public Builder clearParentSymbol() { - bitField0_ = (bitField0_ & ~0x00000002); - parentSymbol_ = 0L; - - return this; - } - - private int origin_ ; - /** - * optional int32 origin = 3; - */ - public boolean hasOrigin() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int32 origin = 3; - */ - public int getOrigin() { - return origin_; - } - /** - * optional int32 origin = 3; - */ - public Builder setOrigin(int value) { - bitField0_ |= 0x00000004; - origin_ = value; - - return this; - } - /** - * optional int32 origin = 3; - */ - public Builder clearOrigin() { - bitField0_ = (bitField0_ & ~0x00000004); - origin_ = 0; - - return this; - } - - private java.util.List annotation_ = - java.util.Collections.emptyList(); - private void ensureAnnotationIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { - annotation_ = new java.util.ArrayList(annotation_); - bitField0_ |= 0x00000008; - } - } - - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public java.util.List getAnnotationList() { - return java.util.Collections.unmodifiableList(annotation_); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public int getAnnotationCount() { - return annotation_.size(); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index) { - return annotation_.get(index); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder setAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnnotationIsMutable(); - annotation_.set(index, value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder setAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) { - ensureAnnotationIsMutable(); - annotation_.set(index, builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation(org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnnotationIsMutable(); - annotation_.add(value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnnotationIsMutable(); - annotation_.add(index, value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation( - org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) { - ensureAnnotationIsMutable(); - annotation_.add(builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) { - ensureAnnotationIsMutable(); - annotation_.add(index, builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAllAnnotation( - java.lang.Iterable values) { - ensureAnnotationIsMutable(); - org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( - values, annotation_); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder clearAnnotation() { - annotation_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder removeAnnotation(int index) { - ensureAnnotationIsMutable(); - annotation_.remove(index); - - return this; - } - - private java.util.List superTypes_ = java.util.Collections.emptyList(); - private void ensureSuperTypesIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { - superTypes_ = new java.util.ArrayList(superTypes_); - bitField0_ |= 0x00000010; - } - } - /** - * repeated int32 superTypes = 5; - */ - public java.util.List - getSuperTypesList() { - return java.util.Collections.unmodifiableList(superTypes_); - } - /** - * repeated int32 superTypes = 5; - */ - public int getSuperTypesCount() { - return superTypes_.size(); - } - /** - * repeated int32 superTypes = 5; - */ - public int getSuperTypes(int index) { - return superTypes_.get(index); - } - /** - * repeated int32 superTypes = 5; - */ - public Builder setSuperTypes( - int index, int value) { - ensureSuperTypesIsMutable(); - superTypes_.set(index, value); - - return this; - } - /** - * repeated int32 superTypes = 5; - */ - public Builder addSuperTypes(int value) { - ensureSuperTypesIsMutable(); - superTypes_.add(value); - - return this; - } - /** - * repeated int32 superTypes = 5; - */ - public Builder addAllSuperTypes( - java.lang.Iterable values) { - ensureSuperTypesIsMutable(); - org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( - values, superTypes_); - - return this; - } - /** - * repeated int32 superTypes = 5; - */ - public Builder clearSuperTypes() { - superTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - - return this; - } - - // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeParameterCarrier) - } - - static { - defaultInstance = new PirTypeParameterCarrier(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeParameterCarrier) -} diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirTypeParameterCarrierOrBuilder.java b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirTypeParameterCarrierOrBuilder.java deleted file mode 100644 index ae57e9b45ab..00000000000 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirTypeParameterCarrierOrBuilder.java +++ /dev/null @@ -1,63 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: compiler/ir/serialization.common/src/KotlinPirCarriers.proto - -package org.jetbrains.kotlin.backend.common.serialization.proto; - -public interface PirTypeParameterCarrierOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.backend.common.serialization.proto.PirTypeParameterCarrier) - org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder { - - /** - * required int32 lastModified = 1; - */ - boolean hasLastModified(); - /** - * required int32 lastModified = 1; - */ - int getLastModified(); - - /** - * optional int64 parentSymbol = 2; - */ - boolean hasParentSymbol(); - /** - * optional int64 parentSymbol = 2; - */ - long getParentSymbol(); - - /** - * optional int32 origin = 3; - */ - boolean hasOrigin(); - /** - * optional int32 origin = 3; - */ - int getOrigin(); - - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - java.util.List - getAnnotationList(); - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index); - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - int getAnnotationCount(); - - /** - * repeated int32 superTypes = 5; - */ - java.util.List getSuperTypesList(); - /** - * repeated int32 superTypes = 5; - */ - int getSuperTypesCount(); - /** - * repeated int32 superTypes = 5; - */ - int getSuperTypes(int index); -} \ No newline at end of file diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirValueParameterCarrier.java b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirValueParameterCarrier.java deleted file mode 100644 index 624c80dfe69..00000000000 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirValueParameterCarrier.java +++ /dev/null @@ -1,912 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: compiler/ir/serialization.common/src/KotlinPirCarriers.proto - -package org.jetbrains.kotlin.backend.common.serialization.proto; - -/** - * Protobuf type {@code org.jetbrains.kotlin.backend.common.serialization.proto.PirValueParameterCarrier} - */ -public final class PirValueParameterCarrier extends - org.jetbrains.kotlin.protobuf.GeneratedMessageLite implements - // @@protoc_insertion_point(message_implements:org.jetbrains.kotlin.backend.common.serialization.proto.PirValueParameterCarrier) - PirValueParameterCarrierOrBuilder { - // Use PirValueParameterCarrier.newBuilder() to construct. - private PirValueParameterCarrier(org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder builder) { - super(builder); - this.unknownFields = builder.getUnknownFields(); - } - private PirValueParameterCarrier(boolean noInit) { this.unknownFields = org.jetbrains.kotlin.protobuf.ByteString.EMPTY;} - - private static final PirValueParameterCarrier defaultInstance; - public static PirValueParameterCarrier getDefaultInstance() { - return defaultInstance; - } - - public PirValueParameterCarrier getDefaultInstanceForType() { - return defaultInstance; - } - - private final org.jetbrains.kotlin.protobuf.ByteString unknownFields; - private PirValueParameterCarrier( - 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 8: { - bitField0_ |= 0x00000001; - lastModified_ = input.readInt32(); - break; - } - case 16: { - bitField0_ |= 0x00000002; - parentSymbol_ = input.readInt64(); - break; - } - case 24: { - bitField0_ |= 0x00000004; - origin_ = input.readInt32(); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - annotation_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - annotation_.add(input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.PARSER, extensionRegistry)); - break; - } - case 40: { - bitField0_ |= 0x00000008; - defaultValue_ = input.readInt32(); - break; - } - case 48: { - bitField0_ |= 0x00000010; - type_ = input.readInt32(); - break; - } - case 56: { - bitField0_ |= 0x00000020; - varargElementType_ = input.readInt32(); - 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_ & 0x00000008) == 0x00000008)) { - annotation_ = java.util.Collections.unmodifiableList(annotation_); - } - try { - unknownFieldsCodedOutput.flush(); - } catch (java.io.IOException e) { - // Should not happen - } finally { - unknownFields = unknownFieldsOutput.toByteString(); - } - makeExtensionsImmutable(); - } - } - public static org.jetbrains.kotlin.protobuf.Parser PARSER = - new org.jetbrains.kotlin.protobuf.AbstractParser() { - public PirValueParameterCarrier parsePartialFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return new PirValueParameterCarrier(input, extensionRegistry); - } - }; - - @java.lang.Override - public org.jetbrains.kotlin.protobuf.Parser getParserForType() { - return PARSER; - } - - private int bitField0_; - public static final int LASTMODIFIED_FIELD_NUMBER = 1; - private int lastModified_; - /** - * required int32 lastModified = 1; - */ - public boolean hasLastModified() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required int32 lastModified = 1; - */ - public int getLastModified() { - return lastModified_; - } - - public static final int PARENTSYMBOL_FIELD_NUMBER = 2; - private long parentSymbol_; - /** - * optional int64 parentSymbol = 2; - */ - public boolean hasParentSymbol() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional int64 parentSymbol = 2; - */ - public long getParentSymbol() { - return parentSymbol_; - } - - public static final int ORIGIN_FIELD_NUMBER = 3; - private int origin_; - /** - * optional int32 origin = 3; - */ - public boolean hasOrigin() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int32 origin = 3; - */ - public int getOrigin() { - return origin_; - } - - public static final int ANNOTATION_FIELD_NUMBER = 4; - private java.util.List annotation_; - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public java.util.List getAnnotationList() { - return annotation_; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public java.util.List - getAnnotationOrBuilderList() { - return annotation_; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public int getAnnotationCount() { - return annotation_.size(); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index) { - return annotation_.get(index); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCallOrBuilder getAnnotationOrBuilder( - int index) { - return annotation_.get(index); - } - - public static final int DEFAULTVALUE_FIELD_NUMBER = 5; - private int defaultValue_; - /** - * optional int32 defaultValue = 5; - */ - public boolean hasDefaultValue() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - /** - * optional int32 defaultValue = 5; - */ - public int getDefaultValue() { - return defaultValue_; - } - - public static final int TYPE_FIELD_NUMBER = 6; - private int type_; - /** - * required int32 type = 6; - */ - public boolean hasType() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * required int32 type = 6; - */ - public int getType() { - return type_; - } - - public static final int VARARGELEMENTTYPE_FIELD_NUMBER = 7; - private int varargElementType_; - /** - * optional int32 varargElementType = 7; - */ - public boolean hasVarargElementType() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * optional int32 varargElementType = 7; - */ - public int getVarargElementType() { - return varargElementType_; - } - - private void initFields() { - lastModified_ = 0; - parentSymbol_ = 0L; - origin_ = 0; - annotation_ = java.util.Collections.emptyList(); - defaultValue_ = 0; - type_ = 0; - varargElementType_ = 0; - } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - if (!hasLastModified()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasType()) { - memoizedIsInitialized = 0; - return false; - } - for (int i = 0; i < getAnnotationCount(); i++) { - if (!getAnnotation(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(org.jetbrains.kotlin.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeInt32(1, lastModified_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeInt64(2, parentSymbol_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeInt32(3, origin_); - } - for (int i = 0; i < annotation_.size(); i++) { - output.writeMessage(4, annotation_.get(i)); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeInt32(5, defaultValue_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeInt32(6, type_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeInt32(7, varargElementType_); - } - 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 - .computeInt32Size(1, lastModified_); - } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt64Size(2, parentSymbol_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt32Size(3, origin_); - } - for (int i = 0; i < annotation_.size(); i++) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeMessageSize(4, annotation_.get(i)); - } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt32Size(5, defaultValue_); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt32Size(6, type_); - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - size += org.jetbrains.kotlin.protobuf.CodedOutputStream - .computeInt32Size(7, varargElementType_); - } - size += unknownFields.size(); - memoizedSerializedSize = size; - return size; - } - - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirValueParameterCarrier parseFrom( - org.jetbrains.kotlin.protobuf.ByteString data) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirValueParameterCarrier parseFrom( - org.jetbrains.kotlin.protobuf.ByteString data, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirValueParameterCarrier parseFrom(byte[] data) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirValueParameterCarrier parseFrom( - byte[] data, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirValueParameterCarrier parseFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirValueParameterCarrier parseFrom( - java.io.InputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirValueParameterCarrier parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirValueParameterCarrier parseDelimitedFrom( - java.io.InputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseDelimitedFrom(input, extensionRegistry); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirValueParameterCarrier parseFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input) - throws java.io.IOException { - return PARSER.parseFrom(input); - } - public static org.jetbrains.kotlin.backend.common.serialization.proto.PirValueParameterCarrier parseFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return PARSER.parseFrom(input, extensionRegistry); - } - - public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder(org.jetbrains.kotlin.backend.common.serialization.proto.PirValueParameterCarrier prototype) { - return newBuilder().mergeFrom(prototype); - } - public Builder toBuilder() { return newBuilder(this); } - - /** - * Protobuf type {@code org.jetbrains.kotlin.backend.common.serialization.proto.PirValueParameterCarrier} - */ - public static final class Builder extends - org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder< - org.jetbrains.kotlin.backend.common.serialization.proto.PirValueParameterCarrier, Builder> - implements - // @@protoc_insertion_point(builder_implements:org.jetbrains.kotlin.backend.common.serialization.proto.PirValueParameterCarrier) - org.jetbrains.kotlin.backend.common.serialization.proto.PirValueParameterCarrierOrBuilder { - // Construct using org.jetbrains.kotlin.backend.common.serialization.proto.PirValueParameterCarrier.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - } - private static Builder create() { - return new Builder(); - } - - public Builder clear() { - super.clear(); - lastModified_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - parentSymbol_ = 0L; - bitField0_ = (bitField0_ & ~0x00000002); - origin_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - annotation_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - defaultValue_ = 0; - bitField0_ = (bitField0_ & ~0x00000010); - type_ = 0; - bitField0_ = (bitField0_ & ~0x00000020); - varargElementType_ = 0; - bitField0_ = (bitField0_ & ~0x00000040); - return this; - } - - public Builder clone() { - return create().mergeFrom(buildPartial()); - } - - public org.jetbrains.kotlin.backend.common.serialization.proto.PirValueParameterCarrier getDefaultInstanceForType() { - return org.jetbrains.kotlin.backend.common.serialization.proto.PirValueParameterCarrier.getDefaultInstance(); - } - - public org.jetbrains.kotlin.backend.common.serialization.proto.PirValueParameterCarrier build() { - org.jetbrains.kotlin.backend.common.serialization.proto.PirValueParameterCarrier result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public org.jetbrains.kotlin.backend.common.serialization.proto.PirValueParameterCarrier buildPartial() { - org.jetbrains.kotlin.backend.common.serialization.proto.PirValueParameterCarrier result = new org.jetbrains.kotlin.backend.common.serialization.proto.PirValueParameterCarrier(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; - } - result.lastModified_ = lastModified_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.parentSymbol_ = parentSymbol_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.origin_ = origin_; - if (((bitField0_ & 0x00000008) == 0x00000008)) { - annotation_ = java.util.Collections.unmodifiableList(annotation_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.annotation_ = annotation_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000008; - } - result.defaultValue_ = defaultValue_; - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x00000010; - } - result.type_ = type_; - if (((from_bitField0_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x00000020; - } - result.varargElementType_ = varargElementType_; - result.bitField0_ = to_bitField0_; - return result; - } - - public Builder mergeFrom(org.jetbrains.kotlin.backend.common.serialization.proto.PirValueParameterCarrier other) { - if (other == org.jetbrains.kotlin.backend.common.serialization.proto.PirValueParameterCarrier.getDefaultInstance()) return this; - if (other.hasLastModified()) { - setLastModified(other.getLastModified()); - } - if (other.hasParentSymbol()) { - setParentSymbol(other.getParentSymbol()); - } - if (other.hasOrigin()) { - setOrigin(other.getOrigin()); - } - if (!other.annotation_.isEmpty()) { - if (annotation_.isEmpty()) { - annotation_ = other.annotation_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureAnnotationIsMutable(); - annotation_.addAll(other.annotation_); - } - - } - if (other.hasDefaultValue()) { - setDefaultValue(other.getDefaultValue()); - } - if (other.hasType()) { - setType(other.getType()); - } - if (other.hasVarargElementType()) { - setVarargElementType(other.getVarargElementType()); - } - setUnknownFields( - getUnknownFields().concat(other.unknownFields)); - return this; - } - - public final boolean isInitialized() { - if (!hasLastModified()) { - - return false; - } - if (!hasType()) { - - return false; - } - for (int i = 0; i < getAnnotationCount(); i++) { - if (!getAnnotation(i).isInitialized()) { - - return false; - } - } - return true; - } - - public Builder mergeFrom( - org.jetbrains.kotlin.protobuf.CodedInputStream input, - org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - org.jetbrains.kotlin.backend.common.serialization.proto.PirValueParameterCarrier parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.jetbrains.kotlin.backend.common.serialization.proto.PirValueParameterCarrier) e.getUnfinishedMessage(); - throw e; - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int lastModified_ ; - /** - * required int32 lastModified = 1; - */ - public boolean hasLastModified() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - /** - * required int32 lastModified = 1; - */ - public int getLastModified() { - return lastModified_; - } - /** - * required int32 lastModified = 1; - */ - public Builder setLastModified(int value) { - bitField0_ |= 0x00000001; - lastModified_ = value; - - return this; - } - /** - * required int32 lastModified = 1; - */ - public Builder clearLastModified() { - bitField0_ = (bitField0_ & ~0x00000001); - lastModified_ = 0; - - return this; - } - - private long parentSymbol_ ; - /** - * optional int64 parentSymbol = 2; - */ - public boolean hasParentSymbol() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - /** - * optional int64 parentSymbol = 2; - */ - public long getParentSymbol() { - return parentSymbol_; - } - /** - * optional int64 parentSymbol = 2; - */ - public Builder setParentSymbol(long value) { - bitField0_ |= 0x00000002; - parentSymbol_ = value; - - return this; - } - /** - * optional int64 parentSymbol = 2; - */ - public Builder clearParentSymbol() { - bitField0_ = (bitField0_ & ~0x00000002); - parentSymbol_ = 0L; - - return this; - } - - private int origin_ ; - /** - * optional int32 origin = 3; - */ - public boolean hasOrigin() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - /** - * optional int32 origin = 3; - */ - public int getOrigin() { - return origin_; - } - /** - * optional int32 origin = 3; - */ - public Builder setOrigin(int value) { - bitField0_ |= 0x00000004; - origin_ = value; - - return this; - } - /** - * optional int32 origin = 3; - */ - public Builder clearOrigin() { - bitField0_ = (bitField0_ & ~0x00000004); - origin_ = 0; - - return this; - } - - private java.util.List annotation_ = - java.util.Collections.emptyList(); - private void ensureAnnotationIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { - annotation_ = new java.util.ArrayList(annotation_); - bitField0_ |= 0x00000008; - } - } - - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public java.util.List getAnnotationList() { - return java.util.Collections.unmodifiableList(annotation_); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public int getAnnotationCount() { - return annotation_.size(); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index) { - return annotation_.get(index); - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder setAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnnotationIsMutable(); - annotation_.set(index, value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder setAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) { - ensureAnnotationIsMutable(); - annotation_.set(index, builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation(org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnnotationIsMutable(); - annotation_.add(value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall value) { - if (value == null) { - throw new NullPointerException(); - } - ensureAnnotationIsMutable(); - annotation_.add(index, value); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation( - org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) { - ensureAnnotationIsMutable(); - annotation_.add(builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAnnotation( - int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall.Builder builderForValue) { - ensureAnnotationIsMutable(); - annotation_.add(index, builderForValue.build()); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder addAllAnnotation( - java.lang.Iterable values) { - ensureAnnotationIsMutable(); - org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll( - values, annotation_); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder clearAnnotation() { - annotation_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - - return this; - } - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - public Builder removeAnnotation(int index) { - ensureAnnotationIsMutable(); - annotation_.remove(index); - - return this; - } - - private int defaultValue_ ; - /** - * optional int32 defaultValue = 5; - */ - public boolean hasDefaultValue() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - /** - * optional int32 defaultValue = 5; - */ - public int getDefaultValue() { - return defaultValue_; - } - /** - * optional int32 defaultValue = 5; - */ - public Builder setDefaultValue(int value) { - bitField0_ |= 0x00000010; - defaultValue_ = value; - - return this; - } - /** - * optional int32 defaultValue = 5; - */ - public Builder clearDefaultValue() { - bitField0_ = (bitField0_ & ~0x00000010); - defaultValue_ = 0; - - return this; - } - - private int type_ ; - /** - * required int32 type = 6; - */ - public boolean hasType() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - /** - * required int32 type = 6; - */ - public int getType() { - return type_; - } - /** - * required int32 type = 6; - */ - public Builder setType(int value) { - bitField0_ |= 0x00000020; - type_ = value; - - return this; - } - /** - * required int32 type = 6; - */ - public Builder clearType() { - bitField0_ = (bitField0_ & ~0x00000020); - type_ = 0; - - return this; - } - - private int varargElementType_ ; - /** - * optional int32 varargElementType = 7; - */ - public boolean hasVarargElementType() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - /** - * optional int32 varargElementType = 7; - */ - public int getVarargElementType() { - return varargElementType_; - } - /** - * optional int32 varargElementType = 7; - */ - public Builder setVarargElementType(int value) { - bitField0_ |= 0x00000040; - varargElementType_ = value; - - return this; - } - /** - * optional int32 varargElementType = 7; - */ - public Builder clearVarargElementType() { - bitField0_ = (bitField0_ & ~0x00000040); - varargElementType_ = 0; - - return this; - } - - // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.backend.common.serialization.proto.PirValueParameterCarrier) - } - - static { - defaultInstance = new PirValueParameterCarrier(true); - defaultInstance.initFields(); - } - - // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.PirValueParameterCarrier) -} diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirValueParameterCarrierOrBuilder.java b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirValueParameterCarrierOrBuilder.java deleted file mode 100644 index 32c51685c1f..00000000000 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/proto/PirValueParameterCarrierOrBuilder.java +++ /dev/null @@ -1,77 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: compiler/ir/serialization.common/src/KotlinPirCarriers.proto - -package org.jetbrains.kotlin.backend.common.serialization.proto; - -public interface PirValueParameterCarrierOrBuilder extends - // @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.backend.common.serialization.proto.PirValueParameterCarrier) - org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder { - - /** - * required int32 lastModified = 1; - */ - boolean hasLastModified(); - /** - * required int32 lastModified = 1; - */ - int getLastModified(); - - /** - * optional int64 parentSymbol = 2; - */ - boolean hasParentSymbol(); - /** - * optional int64 parentSymbol = 2; - */ - long getParentSymbol(); - - /** - * optional int32 origin = 3; - */ - boolean hasOrigin(); - /** - * optional int32 origin = 3; - */ - int getOrigin(); - - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - java.util.List - getAnnotationList(); - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall getAnnotation(int index); - /** - * repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall annotation = 4; - */ - int getAnnotationCount(); - - /** - * optional int32 defaultValue = 5; - */ - boolean hasDefaultValue(); - /** - * optional int32 defaultValue = 5; - */ - int getDefaultValue(); - - /** - * required int32 type = 6; - */ - boolean hasType(); - /** - * required int32 type = 6; - */ - int getType(); - - /** - * optional int32 varargElementType = 7; - */ - boolean hasVarargElementType(); - /** - * optional int32 varargElementType = 7; - */ - int getVarargElementType(); -} \ No newline at end of file diff --git a/compiler/ir/serialization.js/build.gradle.kts b/compiler/ir/serialization.js/build.gradle.kts index 2bd83759fee..018fad9123a 100644 --- a/compiler/ir/serialization.js/build.gradle.kts +++ b/compiler/ir/serialization.js/build.gradle.kts @@ -7,7 +7,6 @@ dependencies { api(project(":compiler:ir.psi2ir")) api(project(":compiler:ir.serialization.common")) api(project(":js:js.frontend")) - api(project(":compiler:ir.tree.persistent")) implementation(project(":compiler:ir.backend.common")) compileOnly(project(":kotlin-reflect-api")) diff --git a/js/js.tests/test/org/jetbrains/kotlin/benchmarks/GenerateIrRuntime.kt b/js/js.tests/test/org/jetbrains/kotlin/benchmarks/GenerateIrRuntime.kt index b2ed7a26806..7e77f28a106 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/benchmarks/GenerateIrRuntime.kt +++ b/js/js.tests/test/org/jetbrains/kotlin/benchmarks/GenerateIrRuntime.kt @@ -40,7 +40,7 @@ import org.jetbrains.kotlin.ir.backend.js.lower.serialization.ir.JsIrModuleSeria import org.jetbrains.kotlin.ir.backend.js.lower.serialization.ir.JsManglerDesc import org.jetbrains.kotlin.ir.backend.js.transformers.irToJs.IrModuleToJsTransformer import org.jetbrains.kotlin.ir.declarations.IrModuleFragment -import org.jetbrains.kotlin.ir.declarations.persistent.PersistentIrFactory +import org.jetbrains.kotlin.ir.declarations.impl.IrFactoryImpl import org.jetbrains.kotlin.ir.descriptors.IrBuiltInsOverDescriptors import org.jetbrains.kotlin.ir.util.ExternalDependenciesGenerator import org.jetbrains.kotlin.ir.util.IrMessageLogger @@ -465,7 +465,7 @@ class GenerateIrRuntime { private fun doPsi2Ir(files: List, analysisResult: AnalysisResult): IrModuleFragment { val psi2Ir = Psi2IrTranslator(languageVersionSettings, Psi2IrConfiguration()) - val symbolTable = SymbolTable(IdSignatureDescriptor(JsManglerDesc), PersistentIrFactory()) + val symbolTable = SymbolTable(IdSignatureDescriptor(JsManglerDesc), IrFactoryImpl) val psi2IrContext = psi2Ir.createGeneratorContext(analysisResult.moduleDescriptor, analysisResult.bindingContext, symbolTable) val irLinker = JsIrLinker( @@ -544,7 +544,7 @@ class GenerateIrRuntime { private fun doDeserializeIrModule(moduleDescriptor: ModuleDescriptorImpl): DeserializedModuleInfo { val mangler = JsManglerDesc val signaturer = IdSignatureDescriptor(mangler) - val symbolTable = SymbolTable(signaturer, PersistentIrFactory()) + val symbolTable = SymbolTable(signaturer, IrFactoryImpl) val typeTranslator = TypeTranslatorImpl(symbolTable, languageVersionSettings, moduleDescriptor) val irBuiltIns = IrBuiltInsOverDescriptors(moduleDescriptor.builtIns, typeTranslator, symbolTable) @@ -569,7 +569,7 @@ class GenerateIrRuntime { val moduleDescriptor = doDeserializeModuleMetadata(moduleRef) val mangler = JsManglerDesc val signaturer = IdSignatureDescriptor(mangler) - val symbolTable = SymbolTable(signaturer, PersistentIrFactory()) + val symbolTable = SymbolTable(signaturer, IrFactoryImpl) val typeTranslator = TypeTranslatorImpl(symbolTable, languageVersionSettings, moduleDescriptor) val irBuiltIns = IrBuiltInsOverDescriptors(moduleDescriptor.builtIns, typeTranslator, symbolTable) diff --git a/settings.gradle b/settings.gradle index 4b7896c2227..e13618674fc 100644 --- a/settings.gradle +++ b/settings.gradle @@ -127,8 +127,6 @@ include ":benchmarks", ":compiler:cli-common", ":compiler:ir.tree", ":compiler:ir.tree.impl", - ":compiler:ir.tree.persistent", - ":compiler:ir.tree.persistent:generator", ":compiler:ir.psi2ir", ":compiler:ir.ir2cfg", ":compiler:ir.backend.common", @@ -584,8 +582,6 @@ project(':kotlin-compiler-runner').projectDir = "$rootDir/compiler/compiler-runn project(':kotlin-ant').projectDir = "$rootDir/ant" as File project(':compiler:ir.tree').projectDir = "$rootDir/compiler/ir/ir.tree" as File project(':compiler:ir.tree.impl').projectDir = "$rootDir/compiler/ir/ir.tree.impl" as File -project(':compiler:ir.tree.persistent').projectDir = "$rootDir/compiler/ir/ir.tree.persistent" as File -project(':compiler:ir.tree.persistent:generator').projectDir = "$rootDir/compiler/ir/ir.tree.persistent/generator" as File project(':compiler:ir.psi2ir').projectDir = "$rootDir/compiler/ir/ir.psi2ir" as File project(':compiler:ir.ir2cfg').projectDir = "$rootDir/compiler/ir/ir.ir2cfg" as File project(':compiler:ir.backend.common').projectDir = "$rootDir/compiler/ir/backend.common" as File