[IR] Cleanup ir serialization
This commit is contained in:
@@ -32,7 +32,6 @@ interface Mapping {
|
||||
}
|
||||
|
||||
abstract val keys: Set<K>
|
||||
abstract val values: Collection<V>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +41,7 @@ interface DelegateFactory {
|
||||
fun <K : IrDeclaration, V : Collection<IrDeclaration>> newDeclarationToDeclarationCollectionMapping(): Mapping.Delegate<K, V>
|
||||
}
|
||||
|
||||
private object DefaultDelegateFactory : DelegateFactory {
|
||||
object DefaultDelegateFactory : DelegateFactory {
|
||||
override fun <K : IrDeclaration, V : IrDeclaration> newDeclarationToDeclarationMapping(): Mapping.Delegate<K, V> = newMappingImpl()
|
||||
|
||||
override fun <K : IrDeclaration, V : Collection<IrDeclaration>> newDeclarationToDeclarationCollectionMapping(): Mapping.Delegate<K, V> = newMappingImpl()
|
||||
@@ -64,9 +63,6 @@ private object DefaultDelegateFactory : DelegateFactory {
|
||||
|
||||
override val keys: Set<K>
|
||||
get() = map.keys
|
||||
|
||||
override val values: Collection<V>
|
||||
get() = map.values
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,9 +13,10 @@ import org.jetbrains.kotlin.descriptors.ClassDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.ModuleDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.PropertyDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.SimpleFunctionDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.impl.EmptyPackageFragmentDescriptor
|
||||
import org.jetbrains.kotlin.incremental.components.NoLookupLocation
|
||||
import org.jetbrains.kotlin.ir.*
|
||||
import org.jetbrains.kotlin.ir.IrBuiltIns
|
||||
import org.jetbrains.kotlin.ir.IrElement
|
||||
import org.jetbrains.kotlin.ir.UNDEFINED_OFFSET
|
||||
import org.jetbrains.kotlin.ir.backend.js.codegen.JsGenerationGranularity
|
||||
import org.jetbrains.kotlin.ir.backend.js.ir.JsIrBuilder
|
||||
import org.jetbrains.kotlin.ir.backend.js.lower.JsInnerClassesSupport
|
||||
@@ -24,7 +25,6 @@ import org.jetbrains.kotlin.ir.backend.js.utils.OperatorNames
|
||||
import org.jetbrains.kotlin.ir.builders.declarations.addFunction
|
||||
import org.jetbrains.kotlin.ir.declarations.*
|
||||
import org.jetbrains.kotlin.ir.declarations.impl.IrExternalPackageFragmentImpl
|
||||
import org.jetbrains.kotlin.ir.declarations.impl.IrFileImpl
|
||||
import org.jetbrains.kotlin.ir.expressions.IrCall
|
||||
import org.jetbrains.kotlin.ir.expressions.IrExpression
|
||||
import org.jetbrains.kotlin.ir.symbols.IrClassSymbol
|
||||
@@ -34,7 +34,9 @@ import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol
|
||||
import org.jetbrains.kotlin.ir.symbols.impl.DescriptorlessExternalPackageFragmentSymbol
|
||||
import org.jetbrains.kotlin.ir.types.*
|
||||
import org.jetbrains.kotlin.ir.types.impl.IrDynamicTypeImpl
|
||||
import org.jetbrains.kotlin.ir.util.*
|
||||
import org.jetbrains.kotlin.ir.util.SymbolTable
|
||||
import org.jetbrains.kotlin.ir.util.kotlinPackageFqn
|
||||
import org.jetbrains.kotlin.ir.util.render
|
||||
import org.jetbrains.kotlin.js.config.ErrorTolerancePolicy
|
||||
import org.jetbrains.kotlin.js.config.JSConfigurationKeys
|
||||
import org.jetbrains.kotlin.js.config.RuntimeDiagnostic
|
||||
@@ -58,7 +60,7 @@ class JsIrBackendContext(
|
||||
val baseClassIntoMetadata: Boolean = false,
|
||||
val safeExternalBoolean: Boolean = false,
|
||||
val safeExternalBooleanDiagnostic: RuntimeDiagnostic? = null,
|
||||
override val mapping: JsMapping = JsMapping(symbolTable.irFactory),
|
||||
override val mapping: JsMapping = JsMapping(),
|
||||
val granularity: JsGenerationGranularity = JsGenerationGranularity.WHOLE_PROGRAM,
|
||||
val icCompatibleIr2Js: Boolean = false,
|
||||
) : JsCommonBackendContext {
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* 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.backend.common.DefaultDelegateFactory
|
||||
import org.jetbrains.kotlin.backend.common.DefaultMapping
|
||||
import org.jetbrains.kotlin.ir.declarations.*
|
||||
|
||||
class JsMapping : DefaultMapping() {
|
||||
val outerThisFieldSymbols = DefaultDelegateFactory.newDeclarationToDeclarationMapping<IrClass, IrField>()
|
||||
val innerClassConstructors = DefaultDelegateFactory.newDeclarationToDeclarationMapping<IrConstructor, IrConstructor>()
|
||||
val originalInnerClassPrimaryConstructorByClass = DefaultDelegateFactory.newDeclarationToDeclarationMapping<IrClass, IrConstructor>()
|
||||
val secondaryConstructorToDelegate = DefaultDelegateFactory.newDeclarationToDeclarationMapping<IrConstructor, IrSimpleFunction>()
|
||||
val secondaryConstructorToFactory = DefaultDelegateFactory.newDeclarationToDeclarationMapping<IrConstructor, IrSimpleFunction>()
|
||||
val objectToGetInstanceFunction = DefaultDelegateFactory.newDeclarationToDeclarationMapping<IrClass, IrSimpleFunction>()
|
||||
val objectToInstanceField = DefaultDelegateFactory.newDeclarationToDeclarationMapping<IrClass, IrField>()
|
||||
val classToSyntheticPrimaryConstructor = DefaultDelegateFactory.newDeclarationToDeclarationMapping<IrClass, IrConstructor>()
|
||||
val privateMemberToCorrespondingStatic = DefaultDelegateFactory.newDeclarationToDeclarationMapping<IrFunction, IrSimpleFunction>()
|
||||
|
||||
val constructorToInitFunction = DefaultDelegateFactory.newDeclarationToDeclarationMapping<IrConstructor, IrSimpleFunction>()
|
||||
|
||||
val enumEntryToGetInstanceFun = DefaultDelegateFactory.newDeclarationToDeclarationMapping<IrEnumEntry, IrSimpleFunction>()
|
||||
val enumEntryToInstanceField = DefaultDelegateFactory.newDeclarationToDeclarationMapping<IrEnumEntry, IrField>()
|
||||
val enumConstructorToNewConstructor = DefaultDelegateFactory.newDeclarationToDeclarationMapping<IrConstructor, IrConstructor>()
|
||||
val enumClassToCorrespondingEnumEntry = DefaultDelegateFactory.newDeclarationToDeclarationMapping<IrClass, IrEnumEntry>()
|
||||
val enumConstructorOldToNewValueParameters = DefaultDelegateFactory.newDeclarationToDeclarationMapping<IrValueDeclaration, IrValueParameter>()
|
||||
val enumEntryToCorrespondingField = DefaultDelegateFactory.newDeclarationToDeclarationMapping<IrEnumEntry, IrField>()
|
||||
val fieldToEnumEntry = DefaultDelegateFactory.newDeclarationToDeclarationMapping<IrField, IrEnumEntry>()
|
||||
val enumClassToInitEntryInstancesFun = DefaultDelegateFactory.newDeclarationToDeclarationMapping<IrClass, IrSimpleFunction>()
|
||||
|
||||
val suspendFunctionsToFunctionWithContinuations =
|
||||
DefaultDelegateFactory.newDeclarationToDeclarationMapping<IrSimpleFunction, IrSimpleFunction>()
|
||||
|
||||
val suspendArityStore = DefaultDelegateFactory.newDeclarationToDeclarationCollectionMapping<IrClass, Collection<IrSimpleFunction>>()
|
||||
|
||||
// Wasm mappings
|
||||
val wasmJsInteropFunctionToWrapper =
|
||||
DefaultDelegateFactory.newDeclarationToDeclarationMapping<IrSimpleFunction, IrSimpleFunction>()
|
||||
|
||||
val wasmNestedExternalToNewTopLevelFunction =
|
||||
DefaultDelegateFactory.newDeclarationToDeclarationMapping<IrFunction, IrSimpleFunction>()
|
||||
|
||||
val wasmExternalObjectToGetInstanceFunction =
|
||||
DefaultDelegateFactory.newDeclarationToDeclarationMapping<IrClass, IrSimpleFunction>()
|
||||
|
||||
val wasmExternalClassToInstanceCheck =
|
||||
DefaultDelegateFactory.newDeclarationToDeclarationMapping<IrClass, IrSimpleFunction>()
|
||||
}
|
||||
@@ -315,13 +315,9 @@ fun interface CacheExecutor {
|
||||
)
|
||||
}
|
||||
|
||||
private fun File.md5(additional: Iterable<ULong> = emptyList()): ULong {
|
||||
private fun File.md5(): ULong {
|
||||
val md5 = MessageDigest.getInstance("MD5")
|
||||
|
||||
for (ul in additional) {
|
||||
md5.update(ul.toLong().toByteArray())
|
||||
}
|
||||
|
||||
fun File.process(prefix: String = "") {
|
||||
if (isDirectory) {
|
||||
this.listFiles()!!.sortedBy { it.name }.forEach {
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ class WasmBackendContext(
|
||||
)
|
||||
}
|
||||
|
||||
override val mapping = JsMapping(irFactory)
|
||||
override val mapping = JsMapping()
|
||||
|
||||
override val coroutineSymbols =
|
||||
JsCommonCoroutineSymbols(symbolTable, module,this)
|
||||
|
||||
@@ -5,15 +5,9 @@
|
||||
|
||||
package org.jetbrains.kotlin.ir.declarations
|
||||
|
||||
import org.jetbrains.kotlin.ir.IrElement
|
||||
import org.jetbrains.kotlin.ir.expressions.IrBody
|
||||
import org.jetbrains.kotlin.ir.util.IdSignature
|
||||
|
||||
open class StageController(open val currentStage: Int = 0) {
|
||||
open fun lazyLower(declaration: IrDeclaration) {}
|
||||
|
||||
open fun lazyLower(body: IrBody) {}
|
||||
|
||||
open fun <T> withStage(stage: Int, fn: () -> T): T = fn()
|
||||
|
||||
open val bodiesEnabled: Boolean get() = true
|
||||
@@ -24,8 +18,6 @@ open class StageController(open val currentStage: Int = 0) {
|
||||
|
||||
open fun <T> bodyLowering(fn: () -> T): T = fn()
|
||||
|
||||
open fun canModify(element: IrElement): Boolean = true
|
||||
|
||||
open fun <T> unrestrictDeclarationListsAccess(fn: () -> T): T = fn()
|
||||
|
||||
open fun canAccessDeclarationsOf(irClass: IrClass): Boolean = true
|
||||
|
||||
@@ -41,7 +41,6 @@ message FileLocalIdSignature {
|
||||
required int32 container = 1;
|
||||
required int64 local_id = 2;
|
||||
optional int32 debug_info = 3;
|
||||
optional int32 file = 101;
|
||||
}
|
||||
|
||||
message CompositeSignature {
|
||||
@@ -57,12 +56,6 @@ message LocalSignature {
|
||||
|
||||
message FileSignature {}
|
||||
|
||||
message LoweredIdSignature {
|
||||
required int32 parent_signature = 1;
|
||||
required int32 stage = 2;
|
||||
required int32 index = 3;
|
||||
}
|
||||
|
||||
message IdSignature {
|
||||
oneof idSig {
|
||||
CommonIdSignature public_sig = 1;
|
||||
@@ -72,9 +65,6 @@ message IdSignature {
|
||||
CompositeSignature composite_sig = 5;
|
||||
LocalSignature local_sig = 6;
|
||||
FileSignature file_sig = 7;
|
||||
|
||||
// JS IC related stuff below. Proto indices 100+ were chosen due to compatibility considerations.
|
||||
LoweredIdSignature ic_sig = 101;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,12 +130,6 @@ message IrBlock {
|
||||
optional int32 origin_name = 2;
|
||||
}
|
||||
|
||||
message IrReturnableBlock {
|
||||
repeated IrStatement statement = 1;
|
||||
optional int32 origin_name = 2;
|
||||
optional int64 inline_function_symbol = 3;
|
||||
}
|
||||
|
||||
message MemberAccessCommon {
|
||||
optional IrExpression dispatch_receiver = 1;
|
||||
optional IrExpression extension_receiver = 2;
|
||||
@@ -174,10 +158,6 @@ message IrFunctionReference {
|
||||
optional int64 reflection_target_symbol = 4;
|
||||
}
|
||||
|
||||
message IrRawFunctionReference {
|
||||
required int64 symbol = 1;
|
||||
}
|
||||
|
||||
message IrLocalDelegatedPropertyReference {
|
||||
required int64 delegate = 1;
|
||||
optional int64 getter = 2;
|
||||
@@ -284,11 +264,6 @@ message IrReturn {
|
||||
required IrExpression value = 2;
|
||||
}
|
||||
|
||||
message IrReturnableBlockReturn {
|
||||
required uint32 upCnt = 1;
|
||||
required IrExpression value = 2;
|
||||
}
|
||||
|
||||
message IrSetField {
|
||||
required FieldAccessCommon field_access = 1;
|
||||
required IrExpression value = 2;
|
||||
@@ -450,10 +425,6 @@ message IrOperation {
|
||||
// Error code
|
||||
IrErrorExpression error_expression = 34;
|
||||
IrErrorCallExpression error_call_expression = 35;
|
||||
|
||||
IrRawFunctionReference raw_function_reference = 136;
|
||||
IrReturnableBlock returnable_block = 137;
|
||||
IrReturnableBlockReturn returnable_block_return = 138;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -546,15 +517,12 @@ message IrValueParameter {
|
||||
required int64 name_type = 2;
|
||||
optional int32 vararg_element_type = 3;
|
||||
optional int32 default_value = 4;
|
||||
optional int32 index = 105;
|
||||
}
|
||||
|
||||
message IrTypeParameter {
|
||||
required IrDeclarationBase base = 1;
|
||||
required int32 name = 2;
|
||||
repeated int32 super_type = 3 [packed=true];
|
||||
optional int32 index = 104;
|
||||
optional bool isGlobal = 105;
|
||||
}
|
||||
|
||||
message IrClass {
|
||||
@@ -653,8 +621,3 @@ message IrInlineClassRepresentation {
|
||||
required int32 underlying_property_name = 1;
|
||||
required int32 underlying_property_type = 2;
|
||||
}
|
||||
|
||||
message PirBodyCarrier {
|
||||
required int32 last_modified = 1;
|
||||
optional int64 container_field_symbol = 2;
|
||||
}
|
||||
|
||||
-7
@@ -15,7 +15,6 @@ import org.jetbrains.kotlin.backend.common.serialization.proto.FileLocalIdSignat
|
||||
import org.jetbrains.kotlin.backend.common.serialization.proto.FileSignature as ProtoFileSignature
|
||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature as ProtoIdSignature
|
||||
import org.jetbrains.kotlin.backend.common.serialization.proto.LocalSignature as ProtoLocalSignature
|
||||
import org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature as ProtoLoweredIdSignature
|
||||
|
||||
class IdSignatureDeserializer(private val libraryFile: IrLibraryFile, fileSymbol: IrFileSymbol?) {
|
||||
|
||||
@@ -63,10 +62,6 @@ class IdSignatureDeserializer(private val libraryFile: IrLibraryFile, fileSymbol
|
||||
return IdSignature.ScopeLocalDeclaration(proto)
|
||||
}
|
||||
|
||||
private fun deserializeLoweredDeclarationSignature(proto: ProtoLoweredIdSignature): IdSignature.LoweredDeclarationSignature {
|
||||
return IdSignature.LoweredDeclarationSignature(deserializeIdSignature(proto.parentSignature), proto.stage, proto.index)
|
||||
}
|
||||
|
||||
private fun deserializeCompositeIdSignature(proto: ProtoCompositeSignature): IdSignature.CompositeSignature {
|
||||
val containerSig = deserializeIdSignature(proto.containerSig)
|
||||
val innerSig = deserializeIdSignature(proto.innerSig)
|
||||
@@ -92,8 +87,6 @@ class IdSignatureDeserializer(private val libraryFile: IrLibraryFile, fileSymbol
|
||||
ProtoIdSignature.IdSigCase.COMPOSITE_SIG -> deserializeCompositeIdSignature(proto.compositeSig)
|
||||
ProtoIdSignature.IdSigCase.LOCAL_SIG -> deserializeLocalIdSignature(proto.localSig)
|
||||
ProtoIdSignature.IdSigCase.FILE_SIG -> deserializeFileIdSignature(proto.fileSig)
|
||||
// IR IC part
|
||||
ProtoIdSignature.IdSigCase.IC_SIG -> deserializeLoweredDeclarationSignature(proto.icSig)
|
||||
else -> error("Unexpected IdSignature kind: ${proto.idSigCase}")
|
||||
}
|
||||
}
|
||||
|
||||
+13
-76
@@ -8,7 +8,6 @@ package org.jetbrains.kotlin.backend.common.serialization
|
||||
import org.jetbrains.kotlin.backend.common.serialization.encodings.*
|
||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrConst.ValueCase.*
|
||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrOperation.OperationCase.*
|
||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn
|
||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement.StatementCase
|
||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrVarargElement.VarargElementCase
|
||||
import org.jetbrains.kotlin.ir.IrBuiltIns
|
||||
@@ -19,7 +18,6 @@ import org.jetbrains.kotlin.ir.descriptors.*
|
||||
import org.jetbrains.kotlin.ir.expressions.*
|
||||
import org.jetbrains.kotlin.ir.expressions.impl.*
|
||||
import org.jetbrains.kotlin.ir.symbols.*
|
||||
import org.jetbrains.kotlin.ir.symbols.impl.IrReturnableBlockSymbolImpl
|
||||
import org.jetbrains.kotlin.ir.types.*
|
||||
import org.jetbrains.kotlin.ir.types.impl.*
|
||||
import org.jetbrains.kotlin.ir.util.parentAsClass
|
||||
@@ -53,9 +51,7 @@ import org.jetbrains.kotlin.backend.common.serialization.proto.IrInstanceInitial
|
||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrLocalDelegatedPropertyReference as ProtoLocalDelegatedPropertyReference
|
||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrOperation as ProtoOperation
|
||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrPropertyReference as ProtoPropertyReference
|
||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference as ProtoRawFunctionReference
|
||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrReturn as ProtoReturn
|
||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock as ProtoReturnableBlock
|
||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrSetField as ProtoSetField
|
||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrSetValue as ProtoSetValue
|
||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrSpreadElement as ProtoSpreadElement
|
||||
@@ -80,9 +76,6 @@ class IrBodyDeserializer(
|
||||
private val irFactory: IrFactory,
|
||||
private val libraryFile: IrLibraryFile,
|
||||
private val declarationDeserializer: IrDeclarationDeserializer,
|
||||
private val statementOriginIndex: Map<String, IrStatementOrigin>,
|
||||
private val allowErrorStatementOrigins: Boolean, // TODO: support InlinerExpressionLocationHint
|
||||
private val allowErrorLoopIndices: Boolean, // TODO: fix lowerings, which reference out-of-scope loops
|
||||
) {
|
||||
|
||||
private val fileLoops = mutableMapOf<Int, IrLoop>()
|
||||
@@ -164,40 +157,6 @@ class IrBodyDeserializer(
|
||||
return IrBlockImpl(start, end, type, origin, statements)
|
||||
}
|
||||
|
||||
private val returnableBlockStack = ArrayDeque<IrReturnableBlockSymbol>()
|
||||
|
||||
private inline fun <T> withReturnableBlock(symbol: IrReturnableBlockSymbol, fn: () -> T): T {
|
||||
returnableBlockStack.addLast(symbol)
|
||||
try {
|
||||
return fn()
|
||||
} finally {
|
||||
returnableBlockStack.removeLast()
|
||||
}
|
||||
}
|
||||
|
||||
private fun cntToReturnableBlockSymbol(upCnt: Int) = if (upCnt > returnableBlockStack.size) {
|
||||
// TODO: fix lowerings
|
||||
IrReturnableBlockSymbolImpl()
|
||||
} else returnableBlockStack[returnableBlockStack.size - upCnt]
|
||||
|
||||
private fun deserializeReturnableBlock(proto: ProtoReturnableBlock, start: Int, end: Int, type: IrType): IrReturnableBlock {
|
||||
|
||||
val symbol = IrReturnableBlockSymbolImpl()
|
||||
|
||||
val inlineFunctionSymbol = if (proto.hasInlineFunctionSymbol()) {
|
||||
declarationDeserializer.deserializeIrSymbolAndRemap(proto.inlineFunctionSymbol) as IrFunctionSymbol
|
||||
} else null
|
||||
|
||||
val statements = withReturnableBlock(symbol) {
|
||||
proto.statementList.map {
|
||||
deserializeStatement(it) as IrStatement
|
||||
}
|
||||
}
|
||||
|
||||
val origin = if (proto.hasOriginName()) deserializeIrStatementOrigin(proto.originName) else null
|
||||
return IrReturnableBlockImpl(start, end, type, symbol, origin, statements, inlineFunctionSymbol)
|
||||
}
|
||||
|
||||
private fun deserializeMemberAccessCommon(access: IrMemberAccessExpression<*>, proto: ProtoMemberAccessCommon) {
|
||||
|
||||
proto.valueArgumentList.mapIndexed { i, arg ->
|
||||
@@ -281,7 +240,7 @@ class IrBodyDeserializer(
|
||||
return deserializeConstructorCall(proto, 0, 0, irType).also { irType.irConstructorCall = it }
|
||||
}
|
||||
|
||||
fun deserializeConstructorCall(proto: ProtoConstructorCall, start: Int, end: Int, type: IrType): IrConstructorCall {
|
||||
private fun deserializeConstructorCall(proto: ProtoConstructorCall, start: Int, end: Int, type: IrType): IrConstructorCall {
|
||||
val symbol = declarationDeserializer.deserializeIrSymbolAndRemap(proto.symbol) as IrConstructorSymbol
|
||||
return IrConstructorCallImpl(
|
||||
start, end, type,
|
||||
@@ -429,14 +388,6 @@ class IrBodyDeserializer(
|
||||
return callable
|
||||
}
|
||||
|
||||
private fun deserializeRawFunctionReference(
|
||||
proto: ProtoRawFunctionReference,
|
||||
start: Int, end: Int, type: IrType
|
||||
): IrRawFunctionReference {
|
||||
val symbol = declarationDeserializer.deserializeIrSymbolAndRemap(proto.symbol) as IrFunctionSymbol
|
||||
return IrRawFunctionReferenceImpl(start, end, type, symbol)
|
||||
}
|
||||
|
||||
private fun deserializeGetClass(proto: ProtoGetClass, start: Int, end: Int, type: IrType): IrGetClass {
|
||||
val argument = deserializeExpression(proto.argument)
|
||||
return IrGetClassImpl(start, end, type, argument)
|
||||
@@ -547,12 +498,6 @@ class IrBodyDeserializer(
|
||||
return IrReturnImpl(start, end, builtIns.nothingType, symbol, value)
|
||||
}
|
||||
|
||||
private fun deserializeReturnableBlockReturn(proto: IrReturnableBlockReturn, start: Int, end: Int): IrReturn {
|
||||
val symbol = cntToReturnableBlockSymbol(proto.upCnt)
|
||||
val value = deserializeExpression(proto.value)
|
||||
return IrReturnImpl(start, end, builtIns.nothingType, symbol, value)
|
||||
}
|
||||
|
||||
private fun deserializeSetField(proto: ProtoSetField, start: Int, end: Int): IrSetField {
|
||||
val access = proto.fieldAccess
|
||||
val symbol = declarationDeserializer.deserializeIrSymbolAndRemap(access.symbol) as IrFieldSymbol
|
||||
@@ -776,13 +721,7 @@ class IrBodyDeserializer(
|
||||
private fun deserializeBreak(proto: ProtoBreak, start: Int, end: Int, type: IrType): IrBreak {
|
||||
val label = if (proto.hasLabel()) libraryFile.string(proto.label) else null
|
||||
val loopId = proto.loopId
|
||||
val loop = deserializeLoopHeader(loopId) {
|
||||
if (allowErrorLoopIndices) {
|
||||
IrWhileLoopImpl(-1, -1, builtIns.unitType, null)
|
||||
} else {
|
||||
error("break clause before loop header")
|
||||
}
|
||||
}
|
||||
val loop = deserializeLoopHeader(loopId) { error("break clause before loop header") }
|
||||
val irBreak = IrBreakImpl(start, end, type, loop)
|
||||
irBreak.label = label
|
||||
|
||||
@@ -792,13 +731,7 @@ class IrBodyDeserializer(
|
||||
private fun deserializeContinue(proto: ProtoContinue, start: Int, end: Int, type: IrType): IrContinue {
|
||||
val label = if (proto.hasLabel()) libraryFile.string(proto.label) else null
|
||||
val loopId = proto.loopId
|
||||
val loop = deserializeLoopHeader(loopId) {
|
||||
if (allowErrorLoopIndices) {
|
||||
IrWhileLoopImpl(-1, -1, builtIns.unitType, null)
|
||||
} else {
|
||||
error("break clause before loop header")
|
||||
}
|
||||
}
|
||||
val loop = deserializeLoopHeader(loopId) { error("break clause before loop header") }
|
||||
val irContinue = IrContinueImpl(start, end, type, loop)
|
||||
irContinue.label = label
|
||||
|
||||
@@ -874,9 +807,6 @@ class IrBodyDeserializer(
|
||||
ERROR_EXPRESSION -> deserializeErrorExpression(proto.errorExpression, start, end, type)
|
||||
ERROR_CALL_EXPRESSION -> deserializeErrorCallExpression(proto.errorCallExpression, start, end, type)
|
||||
OPERATION_NOT_SET -> error("Expression deserialization not implemented: ${proto.operationCase}")
|
||||
RAW_FUNCTION_REFERENCE -> deserializeRawFunctionReference(proto.rawFunctionReference, start, end, type)
|
||||
RETURNABLE_BLOCK -> deserializeReturnableBlock(proto.returnableBlock, start, end, type)
|
||||
RETURNABLE_BLOCK_RETURN -> deserializeReturnableBlockReturn(proto.returnableBlockReturn, start, end)
|
||||
}
|
||||
|
||||
fun deserializeExpression(proto: ProtoExpression): IrExpression {
|
||||
@@ -890,16 +820,23 @@ class IrBodyDeserializer(
|
||||
return expression
|
||||
}
|
||||
|
||||
fun deserializeIrStatementOrigin(protoName: Int): IrStatementOrigin {
|
||||
private fun deserializeIrStatementOrigin(protoName: Int): IrStatementOrigin {
|
||||
return libraryFile.string(protoName).let {
|
||||
val componentPrefix = "COMPONENT_"
|
||||
when {
|
||||
it.startsWith(componentPrefix) -> {
|
||||
IrStatementOrigin.COMPONENT_N.withIndex(it.removePrefix(componentPrefix).toInt())
|
||||
}
|
||||
else -> statementOriginIndex[it] ?: if (allowErrorStatementOrigins) object :
|
||||
IrStatementOriginImpl(it) {} else error("Unexpected statement origin: $it")
|
||||
else -> statementOriginIndex[it] ?: error("Unexpected statement origin: $it")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
private val allKnownStatementOrigins = IrStatementOrigin::class.nestedClasses.toList()
|
||||
|
||||
private val statementOriginIndex =
|
||||
allKnownStatementOrigins.mapNotNull { it.objectInstance as? IrStatementOriginImpl }.associateBy { it.debugName }
|
||||
}
|
||||
}
|
||||
+73
-114
@@ -61,31 +61,17 @@ class IrDeclarationDeserializer(
|
||||
private val symbolTable: SymbolTable,
|
||||
val irFactory: IrFactory,
|
||||
private val libraryFile: IrLibraryFile,
|
||||
private val parent: IrDeclarationParent,
|
||||
parent: IrDeclarationParent,
|
||||
val allowErrorNodes: Boolean,
|
||||
private val deserializeInlineFunctions: Boolean,
|
||||
private var deserializeBodies: Boolean,
|
||||
val symbolDeserializer: IrSymbolDeserializer,
|
||||
private val platformFakeOverrideClassFilter: FakeOverrideClassFilter,
|
||||
private val fakeOverrideBuilder: FakeOverrideBuilder,
|
||||
private val skipMutableState: Boolean = false,
|
||||
additionalStatementOriginIndex: Map<String, IrStatementOrigin> = emptyMap(),
|
||||
allowErrorStatementOrigins: Boolean = false,
|
||||
private val compatibilityMode: CompatibilityMode,
|
||||
private val allowRedeclaration: Boolean = false,
|
||||
allowErrorLoopIndices: Boolean = false,
|
||||
) {
|
||||
|
||||
val bodyDeserializer = IrBodyDeserializer(
|
||||
builtIns,
|
||||
allowErrorNodes,
|
||||
irFactory,
|
||||
libraryFile,
|
||||
this,
|
||||
statementOriginIndex + additionalStatementOriginIndex,
|
||||
allowErrorStatementOrigins,
|
||||
allowErrorLoopIndices,
|
||||
)
|
||||
private val bodyDeserializer = IrBodyDeserializer(builtIns, allowErrorNodes, irFactory, libraryFile, this)
|
||||
|
||||
private fun deserializeName(index: Int): Name {
|
||||
val name = libraryFile.string(index)
|
||||
@@ -238,12 +224,8 @@ class IrDeclarationDeserializer(
|
||||
deserializeIrDeclarationOrigin(proto.originName), proto.flags
|
||||
)
|
||||
// avoid duplicate annotations for local variables
|
||||
if (!allowRedeclaration || result.annotations.isEmpty()) {
|
||||
result.annotations = deserializeAnnotations(proto.annotationList)
|
||||
}
|
||||
if (!skipMutableState) {
|
||||
result.parent = currentParent
|
||||
}
|
||||
result.annotations = deserializeAnnotations(proto.annotationList)
|
||||
result.parent = currentParent
|
||||
return result
|
||||
} finally {
|
||||
eraseDelegatedSymbol(s)
|
||||
@@ -312,10 +294,9 @@ class IrDeclarationDeserializer(
|
||||
}
|
||||
}
|
||||
|
||||
fun deserializeIrClass(proto: ProtoClass): IrClass =
|
||||
private fun deserializeIrClass(proto: ProtoClass): IrClass =
|
||||
withDeserializedIrDeclarationBase(proto.base) { symbol, signature, startOffset, endOffset, origin, fcode ->
|
||||
checkSymbolType<IrClassSymbol>(symbol)
|
||||
if (allowRedeclaration && symbol.isBound) return symbol.owner
|
||||
|
||||
val flags = ClassFlags.decode(fcode)
|
||||
symbolTable.declareClass(signature, { symbol }) {
|
||||
@@ -335,35 +316,33 @@ class IrDeclarationDeserializer(
|
||||
flags.isFun,
|
||||
)
|
||||
}.usingParent {
|
||||
if (!skipMutableState) {
|
||||
typeParameters = deserializeTypeParameters(proto.typeParameterList, true)
|
||||
typeParameters = deserializeTypeParameters(proto.typeParameterList, true)
|
||||
|
||||
superTypes = proto.superTypeList.map { deserializeIrType(it) }
|
||||
superTypes = proto.superTypeList.map { deserializeIrType(it) }
|
||||
|
||||
withExternalValue(isExternal) {
|
||||
val oldDeclarations = declarations.toSet()
|
||||
proto.declarationList
|
||||
.filterNot { isSkippableFakeOverride(it, this) }
|
||||
// On JVM, deserialization may fill bodies of existing declarations, so avoid adding duplicates.
|
||||
.mapNotNullTo(declarations) { declProto -> deserializeDeclaration(declProto).takeIf { it !in oldDeclarations } }
|
||||
}
|
||||
|
||||
thisReceiver = deserializeIrValueParameter(proto.thisReceiver, -1)
|
||||
|
||||
inlineClassRepresentation = when {
|
||||
!flags.isInline -> null
|
||||
proto.hasInlineClassRepresentation() -> deserializeInlineClassRepresentation(proto.inlineClassRepresentation)
|
||||
else -> computeMissingInlineClassRepresentationForCompatibility(this)
|
||||
}
|
||||
|
||||
sealedSubclasses = proto.sealedSubclassList.map { deserializeIrSymbol(it) as IrClassSymbol }
|
||||
|
||||
fakeOverrideBuilder.enqueueClass(this, signature, compatibilityMode)
|
||||
withExternalValue(isExternal) {
|
||||
val oldDeclarations = declarations.toSet()
|
||||
proto.declarationList
|
||||
.filterNot { isSkippableFakeOverride(it, this) }
|
||||
// On JVM, deserialization may fill bodies of existing declarations, so avoid adding duplicates.
|
||||
.mapNotNullTo(declarations) { declProto -> deserializeDeclaration(declProto).takeIf { it !in oldDeclarations } }
|
||||
}
|
||||
|
||||
thisReceiver = deserializeIrValueParameter(proto.thisReceiver, -1)
|
||||
|
||||
inlineClassRepresentation = when {
|
||||
!flags.isInline -> null
|
||||
proto.hasInlineClassRepresentation() -> deserializeInlineClassRepresentation(proto.inlineClassRepresentation)
|
||||
else -> computeMissingInlineClassRepresentationForCompatibility(this)
|
||||
}
|
||||
|
||||
sealedSubclasses = proto.sealedSubclassList.map { deserializeIrSymbol(it) as IrClassSymbol }
|
||||
|
||||
fakeOverrideBuilder.enqueueClass(this, signature, compatibilityMode)
|
||||
}
|
||||
}
|
||||
|
||||
fun deserializeInlineClassRepresentation(proto: ProtoIrInlineClassRepresentation): InlineClassRepresentation<IrSimpleType> =
|
||||
private fun deserializeInlineClassRepresentation(proto: ProtoIrInlineClassRepresentation): InlineClassRepresentation<IrSimpleType> =
|
||||
InlineClassRepresentation(
|
||||
deserializeName(proto.underlyingPropertyName),
|
||||
deserializeIrType(proto.underlyingPropertyType) as IrSimpleType,
|
||||
@@ -395,9 +374,7 @@ class IrDeclarationDeserializer(
|
||||
origin
|
||||
)
|
||||
}.usingParent {
|
||||
if (!skipMutableState) {
|
||||
typeParameters = deserializeTypeParameters(proto.typeParameterList, true)
|
||||
}
|
||||
typeParameters = deserializeTypeParameters(proto.typeParameterList, true)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -522,25 +499,23 @@ class IrDeclarationDeserializer(
|
||||
): T = withDeserializedIrDeclarationBase(proto.base) { symbol, idSig, startOffset, endOffset, origin, fcode ->
|
||||
symbolTable.withScope(symbol) {
|
||||
block(checkSymbolType(symbol), idSig, startOffset, endOffset, origin, fcode).usingParent {
|
||||
if (!skipMutableState) {
|
||||
typeParameters = deserializeTypeParameters(proto.typeParameterList, false)
|
||||
val nameType = BinaryNameAndType.decode(proto.nameType)
|
||||
returnType = deserializeIrType(nameType.typeIndex)
|
||||
typeParameters = deserializeTypeParameters(proto.typeParameterList, false)
|
||||
val nameType = BinaryNameAndType.decode(proto.nameType)
|
||||
returnType = deserializeIrType(nameType.typeIndex)
|
||||
|
||||
withBodyGuard {
|
||||
valueParameters = deserializeValueParameters(proto.valueParameterList)
|
||||
dispatchReceiverParameter =
|
||||
if (proto.hasDispatchReceiver()) deserializeIrValueParameter(proto.dispatchReceiver, -1)
|
||||
else null
|
||||
extensionReceiverParameter =
|
||||
if (proto.hasExtensionReceiver()) deserializeIrValueParameter(proto.extensionReceiver, -1)
|
||||
else null
|
||||
contextReceiverParametersCount =
|
||||
if (proto.hasContextReceiverParametersCount()) proto.contextReceiverParametersCount else 0
|
||||
body =
|
||||
if (proto.hasBody()) deserializeStatementBody(proto.body) as IrBody?
|
||||
else null
|
||||
}
|
||||
withBodyGuard {
|
||||
valueParameters = deserializeValueParameters(proto.valueParameterList)
|
||||
dispatchReceiverParameter =
|
||||
if (proto.hasDispatchReceiver()) deserializeIrValueParameter(proto.dispatchReceiver, -1)
|
||||
else null
|
||||
extensionReceiverParameter =
|
||||
if (proto.hasExtensionReceiver()) deserializeIrValueParameter(proto.extensionReceiver, -1)
|
||||
else null
|
||||
contextReceiverParametersCount =
|
||||
if (proto.hasContextReceiverParametersCount()) proto.contextReceiverParametersCount else 0
|
||||
body =
|
||||
if (proto.hasBody()) deserializeStatementBody(proto.body) as IrBody?
|
||||
else null
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -549,7 +524,6 @@ class IrDeclarationDeserializer(
|
||||
internal fun deserializeIrFunction(proto: ProtoFunction): IrSimpleFunction {
|
||||
return withDeserializedIrFunctionBase(proto.base) { symbol, idSig, startOffset, endOffset, origin, fcode ->
|
||||
checkSymbolType<IrSimpleFunctionSymbol>(symbol)
|
||||
if (allowRedeclaration && symbol.isBound) return symbol.owner
|
||||
|
||||
val flags = FunctionFlags.decode(fcode)
|
||||
symbolTable.declareSimpleFunction(idSig, { symbol }) {
|
||||
@@ -583,7 +557,7 @@ class IrDeclarationDeserializer(
|
||||
val flags = LocalVariableFlags.decode(fcode)
|
||||
val nameType = BinaryNameAndType.decode(proto.nameType)
|
||||
|
||||
(if (allowRedeclaration && symbol.isBound) symbol.owner else IrVariableImpl(
|
||||
IrVariableImpl(
|
||||
startOffset, endOffset, origin,
|
||||
symbol,
|
||||
deserializeName(nameType.nameIndex),
|
||||
@@ -591,7 +565,7 @@ class IrDeclarationDeserializer(
|
||||
flags.isVar,
|
||||
flags.isConst,
|
||||
flags.isLateinit
|
||||
)).apply {
|
||||
).apply {
|
||||
if (proto.hasInitializer())
|
||||
initializer = bodyDeserializer.deserializeExpression(proto.initializer)
|
||||
}
|
||||
@@ -602,12 +576,10 @@ class IrDeclarationDeserializer(
|
||||
symbolTable.declareEnumEntry(uniqId, { checkSymbolType(symbol) }) {
|
||||
irFactory.createEnumEntry(startOffset, endOffset, origin, it, deserializeName(proto.name))
|
||||
}.apply {
|
||||
if (!skipMutableState) {
|
||||
if (proto.hasCorrespondingClass())
|
||||
correspondingClass = deserializeIrClass(proto.correspondingClass)
|
||||
if (proto.hasInitializer())
|
||||
initializerExpression = deserializeExpressionBody(proto.initializer)
|
||||
}
|
||||
if (proto.hasCorrespondingClass())
|
||||
correspondingClass = deserializeIrClass(proto.correspondingClass)
|
||||
if (proto.hasInitializer())
|
||||
initializerExpression = deserializeExpressionBody(proto.initializer)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -646,7 +618,7 @@ class IrDeclarationDeserializer(
|
||||
val type = deserializeIrType(nameType.typeIndex)
|
||||
val flags = FieldFlags.decode(fcode)
|
||||
|
||||
val field = if (allowRedeclaration && symbol.isBound) symbol.owner else symbolTable.declareField(uniqId, { symbol }) {
|
||||
val field = symbolTable.declareField(uniqId, { symbol }) {
|
||||
irFactory.createField(
|
||||
startOffset, endOffset, origin,
|
||||
it,
|
||||
@@ -677,7 +649,7 @@ class IrDeclarationDeserializer(
|
||||
val flags = LocalVariableFlags.decode(fcode)
|
||||
val nameAndType = BinaryNameAndType.decode(proto.nameType)
|
||||
|
||||
val prop = if (allowRedeclaration && symbol.isBound) symbol.owner else irFactory.createLocalDelegatedProperty(
|
||||
val prop = irFactory.createLocalDelegatedProperty(
|
||||
startOffset, endOffset, origin,
|
||||
symbol,
|
||||
deserializeName(nameAndType.nameIndex),
|
||||
@@ -685,23 +657,19 @@ class IrDeclarationDeserializer(
|
||||
flags.isVar
|
||||
)
|
||||
|
||||
if (!skipMutableState) {
|
||||
prop.apply {
|
||||
delegate = deserializeIrVariable(proto.delegate)
|
||||
getter = deserializeIrFunction(proto.getter)
|
||||
if (proto.hasSetter())
|
||||
setter = deserializeIrFunction(proto.setter)
|
||||
}
|
||||
prop.apply {
|
||||
delegate = deserializeIrVariable(proto.delegate)
|
||||
getter = deserializeIrFunction(proto.getter)
|
||||
if (proto.hasSetter())
|
||||
setter = deserializeIrFunction(proto.setter)
|
||||
}
|
||||
|
||||
prop
|
||||
}
|
||||
|
||||
private fun deserializeIrProperty(proto: ProtoProperty): IrProperty =
|
||||
withDeserializedIrDeclarationBase(proto.base) { symbol, uniqId, startOffset, endOffset, origin, fcode ->
|
||||
checkSymbolType<IrPropertySymbol>(symbol)
|
||||
val flags = PropertyFlags.decode(fcode)
|
||||
val prop = if (allowRedeclaration && symbol.isBound) symbol.owner else symbolTable.declareProperty(uniqId, { symbol }) {
|
||||
val prop = symbolTable.declareProperty(uniqId, { symbol }) {
|
||||
irFactory.createProperty(
|
||||
startOffset, endOffset, origin,
|
||||
it,
|
||||
@@ -718,43 +686,34 @@ class IrDeclarationDeserializer(
|
||||
)
|
||||
}
|
||||
|
||||
if (!skipMutableState) {
|
||||
prop.apply {
|
||||
withExternalValue(isExternal) {
|
||||
if (proto.hasGetter()) {
|
||||
getter = deserializeIrFunction(proto.getter).also {
|
||||
it.correspondingPropertySymbol = symbol
|
||||
}
|
||||
prop.apply {
|
||||
withExternalValue(isExternal) {
|
||||
if (proto.hasGetter()) {
|
||||
getter = deserializeIrFunction(proto.getter).also {
|
||||
it.correspondingPropertySymbol = symbol
|
||||
}
|
||||
if (proto.hasSetter()) {
|
||||
setter = deserializeIrFunction(proto.setter).also {
|
||||
it.correspondingPropertySymbol = symbol
|
||||
}
|
||||
}
|
||||
if (proto.hasSetter()) {
|
||||
setter = deserializeIrFunction(proto.setter).also {
|
||||
it.correspondingPropertySymbol = symbol
|
||||
}
|
||||
if (proto.hasBackingField()) {
|
||||
backingField = deserializeIrField(proto.backingField).also {
|
||||
it.correspondingPropertySymbol = symbol
|
||||
}
|
||||
}
|
||||
if (proto.hasBackingField()) {
|
||||
backingField = deserializeIrField(proto.backingField).also {
|
||||
it.correspondingPropertySymbol = symbol
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
prop
|
||||
}
|
||||
|
||||
companion object {
|
||||
private val allKnownDeclarationOrigins = IrDeclarationOrigin::class.nestedClasses.toList()
|
||||
private val declarationOriginIndex =
|
||||
allKnownDeclarationOrigins.map { it.objectInstance as IrDeclarationOriginImpl }.associateBy { it.name }
|
||||
|
||||
|
||||
private val allKnownStatementOrigins = IrStatementOrigin::class.nestedClasses.toList()
|
||||
private val statementOriginIndex =
|
||||
allKnownStatementOrigins.mapNotNull { it.objectInstance as? IrStatementOriginImpl }.associateBy { it.debugName }
|
||||
}
|
||||
|
||||
fun deserializeIrDeclarationOrigin(protoName: Int): IrDeclarationOriginImpl {
|
||||
private fun deserializeIrDeclarationOrigin(protoName: Int): IrDeclarationOriginImpl {
|
||||
val originName = libraryFile.string(protoName)
|
||||
return declarationOriginIndex[originName] ?: object : IrDeclarationOriginImpl(originName) {}
|
||||
}
|
||||
@@ -767,9 +726,9 @@ class IrDeclarationDeserializer(
|
||||
IR_CLASS -> deserializeIrClass(proto.irClass)
|
||||
IR_FUNCTION -> deserializeIrFunction(proto.irFunction)
|
||||
IR_PROPERTY -> deserializeIrProperty(proto.irProperty)
|
||||
IR_TYPE_PARAMETER -> deserializeIrTypeParameter(proto.irTypeParameter, proto.irTypeParameter.index, proto.irTypeParameter.isGlobal)
|
||||
IR_TYPE_PARAMETER -> error("") // deserializeIrTypeParameter(proto.irTypeParameter, proto.irTypeParameter.index, proto.irTypeParameter.isGlobal)
|
||||
IR_VARIABLE -> deserializeIrVariable(proto.irVariable)
|
||||
IR_VALUE_PARAMETER -> deserializeIrValueParameter(proto.irValueParameter, proto.irValueParameter.index)
|
||||
IR_VALUE_PARAMETER -> error("") // deserializeIrValueParameter(proto.irValueParameter, proto.irValueParameter.index)
|
||||
IR_ENUM_ENTRY -> deserializeIrEnumEntry(proto.irEnumEntry)
|
||||
IR_LOCAL_DELEGATED_PROPERTY -> deserializeIrLocalDelegatedProperty(proto.irLocalDelegatedProperty)
|
||||
IR_TYPE_ALIAS -> deserializeIrTypeAlias(proto.irTypeAlias)
|
||||
|
||||
+72
-210
@@ -30,7 +30,6 @@ import org.jetbrains.kotlin.library.impl.IrMemoryStringWriter
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.types.Variance
|
||||
import java.io.File
|
||||
import java.nio.file.Path
|
||||
import org.jetbrains.kotlin.backend.common.serialization.proto.AccessorIdSignature as ProtoAccessorIdSignature
|
||||
import org.jetbrains.kotlin.backend.common.serialization.proto.Actual as ProtoActual
|
||||
import org.jetbrains.kotlin.backend.common.serialization.proto.CommonIdSignature as ProtoCommonIdSignature
|
||||
@@ -87,10 +86,7 @@ import org.jetbrains.kotlin.backend.common.serialization.proto.IrLocalDelegatedP
|
||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrOperation as ProtoOperation
|
||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrProperty as ProtoProperty
|
||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrPropertyReference as ProtoPropertyReference
|
||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference as ProtoRawFunctionReference
|
||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrReturn as ProtoReturn
|
||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock as ProtoReturnableBlock
|
||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn as ProtoReturnableBlockReturn
|
||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrSetField as ProtoSetField
|
||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrSetValue as ProtoSetValue
|
||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType as ProtoSimpleType
|
||||
@@ -115,7 +111,6 @@ import org.jetbrains.kotlin.backend.common.serialization.proto.IrWhen as ProtoWh
|
||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrWhile as ProtoWhile
|
||||
import org.jetbrains.kotlin.backend.common.serialization.proto.LocalSignature as ProtoLocalSignature
|
||||
import org.jetbrains.kotlin.backend.common.serialization.proto.Loop as ProtoLoop
|
||||
import org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature as ProtoLoweredIdSignature
|
||||
import org.jetbrains.kotlin.backend.common.serialization.proto.MemberAccessCommon as ProtoMemberAccessCommon
|
||||
import org.jetbrains.kotlin.backend.common.serialization.proto.NullableIrExpression as ProtoNullableIrExpression
|
||||
|
||||
@@ -126,9 +121,6 @@ open class IrFileSerializer(
|
||||
private val compatibilityMode: CompatibilityMode,
|
||||
private val bodiesOnlyForInlines: Boolean = false,
|
||||
private val skipExpects: Boolean = false,
|
||||
// required for JS IC caches
|
||||
private val skipMutableState: Boolean = false,
|
||||
private val allowErrorStatementOrigins: Boolean = false, // TODO: support InlinerExpressionLocationHint
|
||||
private val addDebugInfo: Boolean = true,
|
||||
private val normalizeAbsolutePaths: Boolean = false,
|
||||
private val sourceBaseDirs: Collection<String>
|
||||
@@ -179,22 +171,22 @@ open class IrFileSerializer(
|
||||
}
|
||||
}
|
||||
|
||||
fun serializeIrExpressionBody(expression: IrExpression): Int {
|
||||
private fun serializeIrExpressionBody(expression: IrExpression): Int {
|
||||
protoBodyArray.add(XStatementOrExpression.XExpression(serializeExpression(expression)))
|
||||
return protoBodyArray.size - 1
|
||||
}
|
||||
|
||||
fun serializeIrStatementBody(statement: IrElement): Int {
|
||||
private fun serializeIrStatementBody(statement: IrElement): Int {
|
||||
protoBodyArray.add(XStatementOrExpression.XStatement(serializeStatement(statement)))
|
||||
return protoBodyArray.size - 1
|
||||
}
|
||||
|
||||
/* ------- Common fields ---------------------------------------------------- */
|
||||
|
||||
fun serializeIrDeclarationOrigin(origin: IrDeclarationOrigin): Int = serializeString((origin as IrDeclarationOriginImpl).name)
|
||||
private fun serializeIrDeclarationOrigin(origin: IrDeclarationOrigin): Int = serializeString((origin as IrDeclarationOriginImpl).name)
|
||||
|
||||
private fun serializeIrStatementOrigin(origin: IrStatementOrigin): Int =
|
||||
serializeString((origin as? IrStatementOriginImpl)?.debugName ?: if (allowErrorStatementOrigins) "error_origin" else error("Unable to serialize origin ${origin.javaClass.name}"))
|
||||
serializeString((origin as? IrStatementOriginImpl)?.debugName ?: error("Unable to serialize origin ${origin.javaClass.name}"))
|
||||
|
||||
private fun serializeCoordinates(start: Int, end: Int): Long = BinaryCoordinates.encode(start, end)
|
||||
|
||||
@@ -280,16 +272,6 @@ open class IrFileSerializer(
|
||||
return proto.build()
|
||||
}
|
||||
|
||||
private fun serializeLoweredDeclarationSignature(signature: IdSignature.LoweredDeclarationSignature): ProtoLoweredIdSignature {
|
||||
val proto = ProtoLoweredIdSignature.newBuilder()
|
||||
|
||||
proto.parentSignature = protoIdSignature(signature.original)
|
||||
proto.stage = signature.stage
|
||||
proto.index = signature.index
|
||||
|
||||
return proto.build()
|
||||
}
|
||||
|
||||
private fun serializeIdSignature(idSignature: IdSignature): ProtoIdSignature {
|
||||
val proto = ProtoIdSignature.newBuilder()
|
||||
when (idSignature) {
|
||||
@@ -300,9 +282,8 @@ open class IrFileSerializer(
|
||||
is IdSignature.CompositeSignature -> proto.compositeSig = serializeCompositeSignature(idSignature)
|
||||
is IdSignature.LocalSignature -> proto.localSig = serializeLocalSignature(idSignature)
|
||||
is IdSignature.FileSignature -> proto.fileSig = serializeFileSignature(idSignature)
|
||||
// IR IC part
|
||||
is IdSignature.LoweredDeclarationSignature -> proto.icSig = serializeLoweredDeclarationSignature(idSignature)
|
||||
is IdSignature.SpecialFakeOverrideSignature -> {}
|
||||
is IdSignature.LoweredDeclarationSignature -> error("LoweredDeclarationSignature is not expected here")
|
||||
}
|
||||
return proto.build()
|
||||
}
|
||||
@@ -312,7 +293,7 @@ open class IrFileSerializer(
|
||||
return protoIdSignature(idSig)
|
||||
}
|
||||
|
||||
fun protoIdSignature(idSig: IdSignature): Int {
|
||||
private fun protoIdSignature(idSig: IdSignature): Int {
|
||||
return protoIdSignatureMap.getOrPut(idSig) {
|
||||
protoIdSignatureArray.add(serializeIdSignature(idSig))
|
||||
protoIdSignatureArray.size - 1
|
||||
@@ -364,7 +345,7 @@ open class IrFileSerializer(
|
||||
}
|
||||
}
|
||||
|
||||
fun serializeIrSymbol(symbol: IrSymbol): Long {
|
||||
private fun serializeIrSymbol(symbol: IrSymbol): Long {
|
||||
val symbolKind = protoSymbolKind(symbol)
|
||||
|
||||
val signatureId = when {
|
||||
@@ -380,10 +361,10 @@ open class IrFileSerializer(
|
||||
|
||||
/* ------- IrTypes ---------------------------------------------------------- */
|
||||
|
||||
protected fun serializeAnnotations(annotations: List<IrConstructorCall>) =
|
||||
private fun serializeAnnotations(annotations: List<IrConstructorCall>) =
|
||||
annotations.map { serializeConstructorCall(it) }
|
||||
|
||||
protected fun serializeFqName(fqName: String): List<Int> = fqName.split(".").map(::serializeString)
|
||||
private fun serializeFqName(fqName: String): List<Int> = fqName.split(".").map(::serializeString)
|
||||
|
||||
private fun serializeIrStarProjection() = BinaryTypeProjection.STAR_CODE
|
||||
|
||||
@@ -405,9 +386,7 @@ open class IrFileSerializer(
|
||||
.setClassifier(serializeIrSymbol(type.classifier))
|
||||
.setHasQuestionMark(type.hasQuestionMark)
|
||||
type.abbreviation?.let { ta ->
|
||||
serializeIrTypeAbbreviation(ta)?.let { pta ->
|
||||
proto.setAbbreviation(pta)
|
||||
}
|
||||
proto.setAbbreviation(serializeIrTypeAbbreviation(ta))
|
||||
}
|
||||
type.arguments.forEach {
|
||||
proto.addArgument(serializeTypeArgument(it))
|
||||
@@ -415,23 +394,15 @@ open class IrFileSerializer(
|
||||
return proto.build()
|
||||
}
|
||||
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
private fun isTypeAbbreviationAccessibleHere(typeAbbreviation: IrTypeAbbreviation): Boolean {
|
||||
return !skipMutableState
|
||||
}
|
||||
|
||||
private fun serializeIrTypeAbbreviation(typeAbbreviation: IrTypeAbbreviation): ProtoTypeAbbreviation? {
|
||||
if (isTypeAbbreviationAccessibleHere(typeAbbreviation)) {
|
||||
val proto = ProtoTypeAbbreviation.newBuilder()
|
||||
.addAllAnnotation(serializeAnnotations(typeAbbreviation.annotations))
|
||||
.setTypeAlias(serializeIrSymbol(typeAbbreviation.typeAlias))
|
||||
.setHasQuestionMark(typeAbbreviation.hasQuestionMark)
|
||||
typeAbbreviation.arguments.forEach {
|
||||
proto.addArgument(serializeTypeArgument(it))
|
||||
}
|
||||
return proto.build()
|
||||
private fun serializeIrTypeAbbreviation(typeAbbreviation: IrTypeAbbreviation): ProtoTypeAbbreviation {
|
||||
val proto = ProtoTypeAbbreviation.newBuilder()
|
||||
.addAllAnnotation(serializeAnnotations(typeAbbreviation.annotations))
|
||||
.setTypeAlias(serializeIrSymbol(typeAbbreviation.typeAlias))
|
||||
.setHasQuestionMark(typeAbbreviation.hasQuestionMark)
|
||||
typeAbbreviation.arguments.forEach {
|
||||
proto.addArgument(serializeTypeArgument(it))
|
||||
}
|
||||
return null
|
||||
return proto.build()
|
||||
}
|
||||
|
||||
private fun serializeDynamicType(type: IrDynamicType): ProtoDynamicType = ProtoDynamicType.newBuilder()
|
||||
@@ -519,7 +490,7 @@ open class IrFileSerializer(
|
||||
type = (this as? IrTypeProjection)?.type?.toIrTypeKey
|
||||
)
|
||||
|
||||
fun serializeIrType(type: IrType) = protoTypeMap.getOrPut(type.toIrTypeKey) {
|
||||
private fun serializeIrType(type: IrType) = protoTypeMap.getOrPut(type.toIrTypeKey) {
|
||||
protoTypeArray.add(serializeIrTypeData(type))
|
||||
protoTypeArray.size - 1
|
||||
}
|
||||
@@ -543,34 +514,6 @@ open class IrFileSerializer(
|
||||
return proto.build()
|
||||
}
|
||||
|
||||
private val returnableBlockStack = ArrayDeque<IrBlock>()
|
||||
|
||||
private fun <T> withBlock(block: IrReturnableBlock, fn: () -> T): T {
|
||||
returnableBlockStack.addLast(block)
|
||||
try {
|
||||
return fn()
|
||||
} finally {
|
||||
returnableBlockStack.removeLast()
|
||||
}
|
||||
}
|
||||
|
||||
private fun serializeReturnableBlock(returnableBlock: IrReturnableBlock): ProtoReturnableBlock = withBlock(returnableBlock) {
|
||||
val proto = ProtoReturnableBlock.newBuilder()
|
||||
|
||||
returnableBlock.origin?.let { proto.setOriginName(serializeIrStatementOrigin(it)) }
|
||||
|
||||
returnableBlock.statements.forEach {
|
||||
proto.addStatement(serializeStatement(it))
|
||||
}
|
||||
|
||||
// TODO: decided how should file reference be stored in IC cache
|
||||
// returnableBlock.inlineFunctionSymbol?.let {
|
||||
// proto.inlineFunctionSymbol = serializeIrSymbol(it)
|
||||
// }
|
||||
|
||||
proto.build()
|
||||
}
|
||||
|
||||
private fun serializeBlock(block: IrBlock): ProtoBlock {
|
||||
val proto = ProtoBlock.newBuilder()
|
||||
|
||||
@@ -654,7 +597,7 @@ open class IrFileSerializer(
|
||||
return proto.build()
|
||||
}
|
||||
|
||||
fun serializeConstructorCall(call: IrConstructorCall): ProtoConstructorCall =
|
||||
private fun serializeConstructorCall(call: IrConstructorCall): ProtoConstructorCall =
|
||||
ProtoConstructorCall.newBuilder().apply {
|
||||
symbol = serializeIrSymbol(call.symbol)
|
||||
constructorTypeArgumentsCount = call.constructorTypeArgumentsCount
|
||||
@@ -680,13 +623,6 @@ open class IrFileSerializer(
|
||||
return proto.build()
|
||||
}
|
||||
|
||||
private fun serializeRawFunctionReference(rawReference: IrRawFunctionReference): ProtoRawFunctionReference {
|
||||
val proto = ProtoRawFunctionReference.newBuilder()
|
||||
.setSymbol(serializeIrSymbol(rawReference.symbol))
|
||||
|
||||
return proto.build()
|
||||
}
|
||||
|
||||
private fun serializeIrLocalDelegatedPropertyReference(
|
||||
callable: IrLocalDelegatedPropertyReference
|
||||
): ProtoLocalDelegatedPropertyReference {
|
||||
@@ -806,22 +742,10 @@ open class IrFileSerializer(
|
||||
}
|
||||
|
||||
private fun serializeReturn(operation: ProtoOperation.Builder, expression: IrReturn) {
|
||||
if (expression.returnTargetSymbol is IrReturnableBlockSymbol) {
|
||||
val targetBlock = expression.returnTargetSymbol.owner
|
||||
|
||||
var t = returnableBlockStack.size - 1
|
||||
while (t >= 0 && returnableBlockStack[t] != targetBlock) --t
|
||||
|
||||
val proto = ProtoReturnableBlockReturn.newBuilder()
|
||||
.setUpCnt(returnableBlockStack.size - t)
|
||||
.setValue(serializeExpression(expression.value))
|
||||
operation.returnableBlockReturn = proto.build()
|
||||
} else {
|
||||
val proto = ProtoReturn.newBuilder()
|
||||
.setReturnTarget(serializeIrSymbol(expression.returnTargetSymbol))
|
||||
.setValue(serializeExpression(expression.value))
|
||||
operation.`return` = proto.build()
|
||||
}
|
||||
val proto = ProtoReturn.newBuilder()
|
||||
.setReturnTarget(serializeIrSymbol(expression.returnTargetSymbol))
|
||||
.setValue(serializeExpression(expression.value))
|
||||
operation.`return` = proto.build()
|
||||
}
|
||||
|
||||
private fun serializeSetField(expression: IrSetField): ProtoSetField =
|
||||
@@ -951,7 +875,7 @@ open class IrFileSerializer(
|
||||
|
||||
val proto = ProtoLoop.newBuilder()
|
||||
.setCondition(serializeExpression(expression.condition)).apply {
|
||||
expression.origin?.let { setOriginName(serializeIrStatementOrigin(it)) }
|
||||
expression.origin?.let { originName = serializeIrStatementOrigin(it) }
|
||||
}
|
||||
|
||||
expression.label?.let {
|
||||
@@ -1085,7 +1009,6 @@ open class IrFileSerializer(
|
||||
|
||||
// TODO: make me a visitor.
|
||||
when (expression) {
|
||||
is IrReturnableBlock -> operationProto.returnableBlock = serializeReturnableBlock(expression)
|
||||
is IrBlock -> operationProto.block = serializeBlock(expression)
|
||||
is IrBreak -> operationProto.`break` = serializeBreak(expression)
|
||||
is IrClassReference -> operationProto.classReference = serializeClassReference(expression)
|
||||
@@ -1121,7 +1044,6 @@ open class IrFileSerializer(
|
||||
is IrDynamicOperatorExpression -> operationProto.dynamicOperator = serializeDynamicOperatorExpression(expression)
|
||||
is IrErrorCallExpression -> operationProto.errorCallExpression = serializeErrorCallExpression(expression)
|
||||
is IrErrorExpression -> operationProto.errorExpression = serializeErrorExpression(expression)
|
||||
is IrRawFunctionReference -> operationProto.rawFunctionReference = serializeRawFunctionReference(expression)
|
||||
else -> {
|
||||
TODO("Expression serialization not implemented yet: ${expression.render()}.")
|
||||
}
|
||||
@@ -1189,12 +1111,8 @@ open class IrFileSerializer(
|
||||
.setBase(serializeIrDeclarationBase(parameter, ValueParameterFlags.encode(parameter)))
|
||||
.setNameType(serializeNameAndType(parameter.name, parameter.type))
|
||||
|
||||
if (!skipMutableState) {
|
||||
parameter.varargElementType?.let { proto.setVarargElementType(serializeIrType(it)) }
|
||||
parameter.defaultValue?.let { proto.setDefaultValue(serializeIrExpressionBody(it.expression)) }
|
||||
} else {
|
||||
proto.index = parameter.index
|
||||
}
|
||||
parameter.varargElementType?.let { proto.setVarargElementType(serializeIrType(it)) }
|
||||
parameter.defaultValue?.let { proto.setDefaultValue(serializeIrExpressionBody(it.expression)) }
|
||||
|
||||
return proto.build()
|
||||
}
|
||||
@@ -1207,11 +1125,6 @@ open class IrFileSerializer(
|
||||
proto.addSuperType(serializeIrType(it))
|
||||
}
|
||||
|
||||
if (skipMutableState) {
|
||||
proto.index = parameter.index
|
||||
proto.isGlobal = true // parameter.parent is IrClass
|
||||
}
|
||||
|
||||
return proto.build()
|
||||
}
|
||||
|
||||
@@ -1220,23 +1133,21 @@ open class IrFileSerializer(
|
||||
.setBase(serializeIrDeclarationBase(function, flags))
|
||||
.setNameType(serializeNameAndType(function.name, function.returnType))
|
||||
|
||||
if (!skipMutableState) {
|
||||
function.typeParameters.forEach {
|
||||
proto.addTypeParameter(serializeIrTypeParameter(it))
|
||||
}
|
||||
function.dispatchReceiverParameter?.let { proto.setDispatchReceiver(serializeIrValueParameter(it)) }
|
||||
function.extensionReceiverParameter?.let { proto.setExtensionReceiver(serializeIrValueParameter(it)) }
|
||||
val contextReceiverParametersCount = function.contextReceiverParametersCount
|
||||
if (contextReceiverParametersCount > 0) {
|
||||
proto.setContextReceiverParametersCount(contextReceiverParametersCount)
|
||||
}
|
||||
function.valueParameters.forEach {
|
||||
proto.addValueParameter(serializeIrValueParameter(it))
|
||||
}
|
||||
function.typeParameters.forEach {
|
||||
proto.addTypeParameter(serializeIrTypeParameter(it))
|
||||
}
|
||||
function.dispatchReceiverParameter?.let { proto.setDispatchReceiver(serializeIrValueParameter(it)) }
|
||||
function.extensionReceiverParameter?.let { proto.setExtensionReceiver(serializeIrValueParameter(it)) }
|
||||
val contextReceiverParametersCount = function.contextReceiverParametersCount
|
||||
if (contextReceiverParametersCount > 0) {
|
||||
proto.contextReceiverParametersCount = contextReceiverParametersCount
|
||||
}
|
||||
function.valueParameters.forEach {
|
||||
proto.addValueParameter(serializeIrValueParameter(it))
|
||||
}
|
||||
|
||||
if (!bodiesOnlyForInlines || function.isInline) {
|
||||
function.body?.let { proto.body = serializeIrStatementBody(it) }
|
||||
}
|
||||
if (!bodiesOnlyForInlines || function.isInline) {
|
||||
function.body?.let { proto.body = serializeIrStatementBody(it) }
|
||||
}
|
||||
|
||||
return proto.build()
|
||||
@@ -1262,9 +1173,7 @@ open class IrFileSerializer(
|
||||
val proto = ProtoAnonymousInit.newBuilder()
|
||||
.setBase(serializeIrDeclarationBase(declaration, null))
|
||||
|
||||
if (!skipMutableState) {
|
||||
proto.setBody(serializeIrStatementBody(declaration.body))
|
||||
}
|
||||
proto.body = serializeIrStatementBody(declaration.body)
|
||||
|
||||
return proto.build()
|
||||
}
|
||||
@@ -1274,11 +1183,9 @@ open class IrFileSerializer(
|
||||
.setBase(serializeIrDeclarationBase(variable, LocalVariableFlags.encode(variable)))
|
||||
.setNameType(serializeNameAndType(variable.name, variable.type))
|
||||
|
||||
if (!skipMutableState) {
|
||||
proto.delegate = serializeIrVariable(variable.delegate)
|
||||
proto.getter = serializeIrFunction(variable.getter)
|
||||
variable.setter?.let { proto.setSetter(serializeIrFunction(it)) }
|
||||
}
|
||||
proto.delegate = serializeIrVariable(variable.delegate)
|
||||
proto.getter = serializeIrFunction(variable.getter)
|
||||
variable.setter?.let { proto.setSetter(serializeIrFunction(it)) }
|
||||
|
||||
return proto.build()
|
||||
}
|
||||
@@ -1288,11 +1195,9 @@ open class IrFileSerializer(
|
||||
.setBase(serializeIrDeclarationBase(property, PropertyFlags.encode(property)))
|
||||
.setName(serializeName(property.name))
|
||||
|
||||
if (!skipMutableState) {
|
||||
property.backingField?.let { proto.backingField = serializeIrField(it) }
|
||||
property.getter?.let { proto.getter = serializeIrFunction(it) }
|
||||
property.setter?.let { proto.setter = serializeIrFunction(it) }
|
||||
}
|
||||
property.backingField?.let { proto.backingField = serializeIrField(it) }
|
||||
property.getter?.let { proto.getter = serializeIrFunction(it) }
|
||||
property.setter?.let { proto.setter = serializeIrFunction(it) }
|
||||
|
||||
return proto.build()
|
||||
}
|
||||
@@ -1301,8 +1206,7 @@ open class IrFileSerializer(
|
||||
val proto = ProtoField.newBuilder()
|
||||
.setBase(serializeIrDeclarationBase(field, FieldFlags.encode(field)))
|
||||
.setNameType(serializeNameAndType(field.name, field.type))
|
||||
if (!skipMutableState &&
|
||||
!(bodiesOnlyForInlines &&
|
||||
if (!(bodiesOnlyForInlines &&
|
||||
(field.parent as? IrDeclarationWithVisibility)?.visibility != DescriptorVisibilities.LOCAL &&
|
||||
(field.initializer?.expression !is IrConst<*>))
|
||||
) {
|
||||
@@ -1314,7 +1218,7 @@ open class IrFileSerializer(
|
||||
return proto.build()
|
||||
}
|
||||
|
||||
fun serializeIrVariable(variable: IrVariable): ProtoVariable {
|
||||
private fun serializeIrVariable(variable: IrVariable): ProtoVariable {
|
||||
val proto = ProtoVariable.newBuilder()
|
||||
.setBase(serializeIrDeclarationBase(variable, LocalVariableFlags.encode(variable)))
|
||||
.setNameType(serializeNameAndType(variable.name, variable.type))
|
||||
@@ -1322,7 +1226,7 @@ open class IrFileSerializer(
|
||||
return proto.build()
|
||||
}
|
||||
|
||||
protected fun serializeIrClass(clazz: IrClass): ProtoClass {
|
||||
private fun serializeIrClass(clazz: IrClass): ProtoClass {
|
||||
val proto = ProtoClass.newBuilder()
|
||||
.setBase(serializeIrDeclarationBase(clazz, ClassFlags.encode(clazz)))
|
||||
.setName(serializeName(clazz.name))
|
||||
@@ -1332,30 +1236,28 @@ open class IrFileSerializer(
|
||||
proto.inlineClassRepresentation = serializeInlineClassRepresentation(representation)
|
||||
}
|
||||
|
||||
if (!skipMutableState) {
|
||||
clazz.declarations.forEach {
|
||||
if (memberNeedsSerialization(it)) proto.addDeclaration(serializeDeclaration(it))
|
||||
}
|
||||
clazz.declarations.forEach {
|
||||
if (memberNeedsSerialization(it)) proto.addDeclaration(serializeDeclaration(it))
|
||||
}
|
||||
|
||||
clazz.typeParameters.forEach {
|
||||
proto.addTypeParameter(serializeIrTypeParameter(it))
|
||||
}
|
||||
clazz.typeParameters.forEach {
|
||||
proto.addTypeParameter(serializeIrTypeParameter(it))
|
||||
}
|
||||
|
||||
clazz.thisReceiver?.let { proto.thisReceiver = serializeIrValueParameter(it) }
|
||||
clazz.thisReceiver?.let { proto.thisReceiver = serializeIrValueParameter(it) }
|
||||
|
||||
clazz.superTypes.forEach {
|
||||
proto.addSuperType(serializeIrType(it))
|
||||
}
|
||||
clazz.superTypes.forEach {
|
||||
proto.addSuperType(serializeIrType(it))
|
||||
}
|
||||
|
||||
clazz.sealedSubclasses.forEach {
|
||||
proto.addSealedSubclass(serializeIrSymbol(it))
|
||||
}
|
||||
clazz.sealedSubclasses.forEach {
|
||||
proto.addSealedSubclass(serializeIrSymbol(it))
|
||||
}
|
||||
|
||||
return proto.build()
|
||||
}
|
||||
|
||||
fun serializeInlineClassRepresentation(representation: InlineClassRepresentation<IrSimpleType>): ProtoIrInlineClassRepresentation =
|
||||
private fun serializeInlineClassRepresentation(representation: InlineClassRepresentation<IrSimpleType>): ProtoIrInlineClassRepresentation =
|
||||
ProtoIrInlineClassRepresentation.newBuilder().apply {
|
||||
underlyingPropertyName = serializeName(representation.underlyingPropertyName)
|
||||
// TODO: consider not writing type if the property is public, similarly to metadata
|
||||
@@ -1365,13 +1267,11 @@ open class IrFileSerializer(
|
||||
private fun serializeIrTypeAlias(typeAlias: IrTypeAlias): ProtoTypeAlias {
|
||||
val proto = ProtoTypeAlias.newBuilder()
|
||||
|
||||
proto.setBase(serializeIrDeclarationBase(typeAlias, TypeAliasFlags.encode(typeAlias)))
|
||||
.setNameType(serializeNameAndType(typeAlias.name, typeAlias.expandedType))
|
||||
proto.setBase(serializeIrDeclarationBase(typeAlias, TypeAliasFlags.encode(typeAlias))).nameType =
|
||||
serializeNameAndType(typeAlias.name, typeAlias.expandedType)
|
||||
|
||||
typeAlias.typeParameters.forEach {
|
||||
if (!skipMutableState) {
|
||||
proto.addTypeParameter(serializeIrTypeParameter(it))
|
||||
}
|
||||
proto.addTypeParameter(serializeIrTypeParameter(it))
|
||||
}
|
||||
|
||||
return proto.build()
|
||||
@@ -1388,13 +1288,11 @@ open class IrFileSerializer(
|
||||
.setBase(serializeIrDeclarationBase(enumEntry, null))
|
||||
.setName(serializeName(enumEntry.name))
|
||||
|
||||
if (!skipMutableState) {
|
||||
enumEntry.initializerExpression?.let {
|
||||
proto.initializer = serializeIrExpressionBody(it.expression)
|
||||
}
|
||||
enumEntry.correspondingClass?.let {
|
||||
proto.correspondingClass = serializeIrClass(it)
|
||||
}
|
||||
enumEntry.initializerExpression?.let {
|
||||
proto.initializer = serializeIrExpressionBody(it.expression)
|
||||
}
|
||||
enumEntry.correspondingClass?.let {
|
||||
proto.correspondingClass = serializeIrClass(it)
|
||||
}
|
||||
return proto.build()
|
||||
}
|
||||
@@ -1495,42 +1393,6 @@ open class IrFileSerializer(
|
||||
}
|
||||
}
|
||||
|
||||
fun serializeDeclarationsForIC(file: IrFile, declarations: Iterable<IrDeclaration>): SerializedIrFile {
|
||||
val proto = ProtoFile.newBuilder()
|
||||
.setFileEntry(serializeFileEntry(file.fileEntry))
|
||||
.addAllFqName(serializeFqName(file.fqName.asString()))
|
||||
|
||||
val topLevelDeclarations = mutableListOf<SerializedDeclaration>()
|
||||
|
||||
for (declaration in declarations) {
|
||||
val byteArray = serializeDeclaration(declaration).toByteArray()
|
||||
val idSig = declarationTable.signatureByDeclaration(declaration, compatibleMode = false)
|
||||
|
||||
// TODO: keep order similar
|
||||
// ^ TODO what does that mean?
|
||||
val sigIndex = protoIdSignatureMap[idSig]
|
||||
?: if (declaration is IrErrorDeclaration) protoIdSignature(idSig) else error("Not found ID for $idSig (${declaration.render()})")
|
||||
|
||||
topLevelDeclarations.add(TopLevelDeclaration(sigIndex, idSig.toString(), byteArray))
|
||||
}
|
||||
|
||||
topLevelDeclarations.forEach {
|
||||
proto.addDeclarationId(it.id)
|
||||
}
|
||||
|
||||
return SerializedIrFile(
|
||||
proto.build().toByteArray(),
|
||||
file.fqName.asString(),
|
||||
file.path,
|
||||
IrMemoryArrayWriter(protoTypeArray.map { it.toByteArray() }).writeIntoMemory(),
|
||||
IrMemoryArrayWriter(protoIdSignatureArray.map { it.toByteArray() }).writeIntoMemory(),
|
||||
IrMemoryArrayWriter(protoStringArray.map { it.toByteArray() }).writeIntoMemory(),
|
||||
IrMemoryArrayWriter(protoBodyArray.map { it.toByteArray() }).writeIntoMemory(),
|
||||
IrMemoryDeclarationWriter(topLevelDeclarations).writeIntoMemory(),
|
||||
debugInfo = null
|
||||
)
|
||||
}
|
||||
|
||||
fun serializeIrFile(file: IrFile): SerializedIrFile {
|
||||
var result: SerializedIrFile? = null
|
||||
|
||||
|
||||
+4
-6
@@ -25,12 +25,12 @@ class IrSymbolDeserializer(
|
||||
val actuals: List<Actual>,
|
||||
val enqueueLocalTopLevelDeclaration: (IdSignature) -> Unit,
|
||||
val handleExpectActualMapping: (IdSignature, IrSymbol) -> IrSymbol,
|
||||
private val enqueueAllDeclarations: Boolean = false,
|
||||
val deserializedSymbols: MutableMap<IdSignature, IrSymbol> = mutableMapOf(), // Per-file signature cache. TODO: do we really need it?
|
||||
val symbolProcessor: IrSymbolDeserializer.(IrSymbol, IdSignature) -> IrSymbol = { s, _ -> s },
|
||||
val deserializePublicSymbol: (IdSignature, BinarySymbolData.SymbolKind) -> IrSymbol,
|
||||
val deserializePublicSymbol: (IdSignature, BinarySymbolData.SymbolKind) -> IrSymbol
|
||||
) {
|
||||
|
||||
val deserializedSymbols: MutableMap<IdSignature, IrSymbol> = mutableMapOf()
|
||||
|
||||
fun deserializeIrSymbol(idSig: IdSignature, symbolKind: BinarySymbolData.SymbolKind): IrSymbol {
|
||||
return deserializedSymbols.getOrPut(idSig) {
|
||||
val symbol = referenceDeserializedSymbol(symbolKind, idSig)
|
||||
@@ -56,9 +56,7 @@ class IrSymbolDeserializer(
|
||||
private fun deserializeIrSymbolData(idSignature: IdSignature, symbolKind: BinarySymbolData.SymbolKind): IrSymbol {
|
||||
if (!idSignature.isPubliclyVisible) {
|
||||
return deserializedSymbols.getOrPut(idSignature) {
|
||||
if (enqueueAllDeclarations) {
|
||||
enqueueLocalTopLevelDeclaration(idSignature)
|
||||
} else if (idSignature.hasTopLevel) {
|
||||
if (idSignature.hasTopLevel) {
|
||||
enqueueLocalTopLevelDeclaration(idSignature.topLevelSignature())
|
||||
}
|
||||
referenceDeserializedSymbol(symbolKind, idSignature)
|
||||
|
||||
+1
-1
@@ -571,4 +571,4 @@ public final class AccessorIdSignature extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.AccessorIdSignature)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -425,4 +425,4 @@ public final class Actual extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.Actual)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -713,4 +713,4 @@ public final class CommonIdSignature extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.CommonIdSignature)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -425,4 +425,4 @@ public final class CompositeSignature extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.CompositeSignature)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -534,4 +534,4 @@ public final class FieldAccessCommon extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.FieldAccessCommon)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -574,4 +574,4 @@ public final class FileEntry extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.FileEntry)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-70
@@ -68,11 +68,6 @@ public final class FileLocalIdSignature extends
|
||||
debugInfo_ = input.readInt32();
|
||||
break;
|
||||
}
|
||||
case 808: {
|
||||
bitField0_ |= 0x00000008;
|
||||
file_ = input.readInt32();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
|
||||
@@ -152,26 +147,10 @@ public final class FileLocalIdSignature extends
|
||||
return debugInfo_;
|
||||
}
|
||||
|
||||
public static final int FILE_FIELD_NUMBER = 101;
|
||||
private int file_;
|
||||
/**
|
||||
* <code>optional int32 file = 101;</code>
|
||||
*/
|
||||
public boolean hasFile() {
|
||||
return ((bitField0_ & 0x00000008) == 0x00000008);
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 file = 101;</code>
|
||||
*/
|
||||
public int getFile() {
|
||||
return file_;
|
||||
}
|
||||
|
||||
private void initFields() {
|
||||
container_ = 0;
|
||||
localId_ = 0L;
|
||||
debugInfo_ = 0;
|
||||
file_ = 0;
|
||||
}
|
||||
private byte memoizedIsInitialized = -1;
|
||||
public final boolean isInitialized() {
|
||||
@@ -203,9 +182,6 @@ public final class FileLocalIdSignature extends
|
||||
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
||||
output.writeInt32(3, debugInfo_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000008) == 0x00000008)) {
|
||||
output.writeInt32(101, file_);
|
||||
}
|
||||
output.writeRawBytes(unknownFields);
|
||||
}
|
||||
|
||||
@@ -227,10 +203,6 @@ public final class FileLocalIdSignature extends
|
||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||
.computeInt32Size(3, debugInfo_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000008) == 0x00000008)) {
|
||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||
.computeInt32Size(101, file_);
|
||||
}
|
||||
size += unknownFields.size();
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
@@ -331,8 +303,6 @@ public final class FileLocalIdSignature extends
|
||||
bitField0_ = (bitField0_ & ~0x00000002);
|
||||
debugInfo_ = 0;
|
||||
bitField0_ = (bitField0_ & ~0x00000004);
|
||||
file_ = 0;
|
||||
bitField0_ = (bitField0_ & ~0x00000008);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -368,10 +338,6 @@ public final class FileLocalIdSignature extends
|
||||
to_bitField0_ |= 0x00000004;
|
||||
}
|
||||
result.debugInfo_ = debugInfo_;
|
||||
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
|
||||
to_bitField0_ |= 0x00000008;
|
||||
}
|
||||
result.file_ = file_;
|
||||
result.bitField0_ = to_bitField0_;
|
||||
return result;
|
||||
}
|
||||
@@ -387,9 +353,6 @@ public final class FileLocalIdSignature extends
|
||||
if (other.hasDebugInfo()) {
|
||||
setDebugInfo(other.getDebugInfo());
|
||||
}
|
||||
if (other.hasFile()) {
|
||||
setFile(other.getFile());
|
||||
}
|
||||
setUnknownFields(
|
||||
getUnknownFields().concat(other.unknownFields));
|
||||
return this;
|
||||
@@ -522,38 +485,6 @@ public final class FileLocalIdSignature extends
|
||||
return this;
|
||||
}
|
||||
|
||||
private int file_ ;
|
||||
/**
|
||||
* <code>optional int32 file = 101;</code>
|
||||
*/
|
||||
public boolean hasFile() {
|
||||
return ((bitField0_ & 0x00000008) == 0x00000008);
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 file = 101;</code>
|
||||
*/
|
||||
public int getFile() {
|
||||
return file_;
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 file = 101;</code>
|
||||
*/
|
||||
public Builder setFile(int value) {
|
||||
bitField0_ |= 0x00000008;
|
||||
file_ = value;
|
||||
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 file = 101;</code>
|
||||
*/
|
||||
public Builder clearFile() {
|
||||
bitField0_ = (bitField0_ & ~0x00000008);
|
||||
file_ = 0;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.backend.common.serialization.proto.FileLocalIdSignature)
|
||||
}
|
||||
|
||||
@@ -563,4 +494,4 @@ public final class FileLocalIdSignature extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.FileLocalIdSignature)
|
||||
}
|
||||
}
|
||||
|
||||
-9
@@ -33,13 +33,4 @@ public interface FileLocalIdSignatureOrBuilder extends
|
||||
* <code>optional int32 debug_info = 3;</code>
|
||||
*/
|
||||
int getDebugInfo();
|
||||
|
||||
/**
|
||||
* <code>optional int32 file = 101;</code>
|
||||
*/
|
||||
boolean hasFile();
|
||||
/**
|
||||
* <code>optional int32 file = 101;</code>
|
||||
*/
|
||||
int getFile();
|
||||
}
|
||||
+1
-1
@@ -265,4 +265,4 @@ public final class FileSignature extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.FileSignature)
|
||||
}
|
||||
}
|
||||
|
||||
-36
@@ -1,36 +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 IcDeclarationSignatureOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.backend.common.serialization.proto.IcDeclarationSignature)
|
||||
org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <code>required int32 parent_signature = 1;</code>
|
||||
*/
|
||||
boolean hasParentSignature();
|
||||
/**
|
||||
* <code>required int32 parent_signature = 1;</code>
|
||||
*/
|
||||
int getParentSignature();
|
||||
|
||||
/**
|
||||
* <code>required int32 stage = 2;</code>
|
||||
*/
|
||||
boolean hasStage();
|
||||
/**
|
||||
* <code>required int32 stage = 2;</code>
|
||||
*/
|
||||
int getStage();
|
||||
|
||||
/**
|
||||
* <code>required int32 index = 3;</code>
|
||||
*/
|
||||
boolean hasIndex();
|
||||
/**
|
||||
* <code>required int32 index = 3;</code>
|
||||
*/
|
||||
int getIndex();
|
||||
}
|
||||
+1
-155
@@ -136,19 +136,6 @@ public final class IdSignature extends
|
||||
idSigCase_ = 7;
|
||||
break;
|
||||
}
|
||||
case 810: {
|
||||
org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature.Builder subBuilder = null;
|
||||
if (idSigCase_ == 101) {
|
||||
subBuilder = ((org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature) idSig_).toBuilder();
|
||||
}
|
||||
idSig_ = input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature.PARSER, extensionRegistry);
|
||||
if (subBuilder != null) {
|
||||
subBuilder.mergeFrom((org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature) idSig_);
|
||||
idSig_ = subBuilder.buildPartial();
|
||||
}
|
||||
idSigCase_ = 101;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
|
||||
@@ -194,7 +181,6 @@ public final class IdSignature extends
|
||||
COMPOSITE_SIG(5),
|
||||
LOCAL_SIG(6),
|
||||
FILE_SIG(7),
|
||||
IC_SIG(101),
|
||||
IDSIG_NOT_SET(0);
|
||||
private int value = 0;
|
||||
private IdSigCase(int value) {
|
||||
@@ -209,7 +195,6 @@ public final class IdSignature extends
|
||||
case 5: return COMPOSITE_SIG;
|
||||
case 6: return LOCAL_SIG;
|
||||
case 7: return FILE_SIG;
|
||||
case 101: return IC_SIG;
|
||||
case 0: return IDSIG_NOT_SET;
|
||||
default: throw new java.lang.IllegalArgumentException(
|
||||
"Value is undefined for this oneof enum.");
|
||||
@@ -345,31 +330,6 @@ public final class IdSignature extends
|
||||
return org.jetbrains.kotlin.backend.common.serialization.proto.FileSignature.getDefaultInstance();
|
||||
}
|
||||
|
||||
public static final int IC_SIG_FIELD_NUMBER = 101;
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature ic_sig = 101;</code>
|
||||
*
|
||||
* <pre>
|
||||
* JS IC related stuff below. Proto indices 100+ were chosen due to compatibility considerations.
|
||||
* </pre>
|
||||
*/
|
||||
public boolean hasIcSig() {
|
||||
return idSigCase_ == 101;
|
||||
}
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature ic_sig = 101;</code>
|
||||
*
|
||||
* <pre>
|
||||
* JS IC related stuff below. Proto indices 100+ were chosen due to compatibility considerations.
|
||||
* </pre>
|
||||
*/
|
||||
public org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature getIcSig() {
|
||||
if (idSigCase_ == 101) {
|
||||
return (org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature) idSig_;
|
||||
}
|
||||
return org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature.getDefaultInstance();
|
||||
}
|
||||
|
||||
private void initFields() {
|
||||
}
|
||||
private byte memoizedIsInitialized = -1;
|
||||
@@ -396,12 +356,6 @@ public final class IdSignature extends
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (hasIcSig()) {
|
||||
if (!getIcSig().isInitialized()) {
|
||||
memoizedIsInitialized = 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
memoizedIsInitialized = 1;
|
||||
return true;
|
||||
}
|
||||
@@ -431,9 +385,6 @@ public final class IdSignature extends
|
||||
if (idSigCase_ == 7) {
|
||||
output.writeMessage(7, (org.jetbrains.kotlin.backend.common.serialization.proto.FileSignature) idSig_);
|
||||
}
|
||||
if (idSigCase_ == 101) {
|
||||
output.writeMessage(101, (org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature) idSig_);
|
||||
}
|
||||
output.writeRawBytes(unknownFields);
|
||||
}
|
||||
|
||||
@@ -472,10 +423,6 @@ public final class IdSignature extends
|
||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||
.computeMessageSize(7, (org.jetbrains.kotlin.backend.common.serialization.proto.FileSignature) idSig_);
|
||||
}
|
||||
if (idSigCase_ == 101) {
|
||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||
.computeMessageSize(101, (org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature) idSig_);
|
||||
}
|
||||
size += unknownFields.size();
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
@@ -616,9 +563,6 @@ public final class IdSignature extends
|
||||
if (idSigCase_ == 7) {
|
||||
result.idSig_ = idSig_;
|
||||
}
|
||||
if (idSigCase_ == 101) {
|
||||
result.idSig_ = idSig_;
|
||||
}
|
||||
result.bitField0_ = to_bitField0_;
|
||||
result.idSigCase_ = idSigCase_;
|
||||
return result;
|
||||
@@ -655,10 +599,6 @@ public final class IdSignature extends
|
||||
mergeFileSig(other.getFileSig());
|
||||
break;
|
||||
}
|
||||
case IC_SIG: {
|
||||
mergeIcSig(other.getIcSig());
|
||||
break;
|
||||
}
|
||||
case IDSIG_NOT_SET: {
|
||||
break;
|
||||
}
|
||||
@@ -687,12 +627,6 @@ public final class IdSignature extends
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (hasIcSig()) {
|
||||
if (!getIcSig().isInitialized()) {
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1149,94 +1083,6 @@ public final class IdSignature extends
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature ic_sig = 101;</code>
|
||||
*
|
||||
* <pre>
|
||||
* JS IC related stuff below. Proto indices 100+ were chosen due to compatibility considerations.
|
||||
* </pre>
|
||||
*/
|
||||
public boolean hasIcSig() {
|
||||
return idSigCase_ == 101;
|
||||
}
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature ic_sig = 101;</code>
|
||||
*
|
||||
* <pre>
|
||||
* JS IC related stuff below. Proto indices 100+ were chosen due to compatibility considerations.
|
||||
* </pre>
|
||||
*/
|
||||
public org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature getIcSig() {
|
||||
if (idSigCase_ == 101) {
|
||||
return (org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature) idSig_;
|
||||
}
|
||||
return org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature.getDefaultInstance();
|
||||
}
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature ic_sig = 101;</code>
|
||||
*
|
||||
* <pre>
|
||||
* JS IC related stuff below. Proto indices 100+ were chosen due to compatibility considerations.
|
||||
* </pre>
|
||||
*/
|
||||
public Builder setIcSig(org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
idSig_ = value;
|
||||
|
||||
idSigCase_ = 101;
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature ic_sig = 101;</code>
|
||||
*
|
||||
* <pre>
|
||||
* JS IC related stuff below. Proto indices 100+ were chosen due to compatibility considerations.
|
||||
* </pre>
|
||||
*/
|
||||
public Builder setIcSig(
|
||||
org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature.Builder builderForValue) {
|
||||
idSig_ = builderForValue.build();
|
||||
|
||||
idSigCase_ = 101;
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature ic_sig = 101;</code>
|
||||
*
|
||||
* <pre>
|
||||
* JS IC related stuff below. Proto indices 100+ were chosen due to compatibility considerations.
|
||||
* </pre>
|
||||
*/
|
||||
public Builder mergeIcSig(org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature value) {
|
||||
if (idSigCase_ == 101 &&
|
||||
idSig_ != org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature.getDefaultInstance()) {
|
||||
idSig_ = org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature.newBuilder((org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature) idSig_)
|
||||
.mergeFrom(value).buildPartial();
|
||||
} else {
|
||||
idSig_ = value;
|
||||
}
|
||||
|
||||
idSigCase_ = 101;
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature ic_sig = 101;</code>
|
||||
*
|
||||
* <pre>
|
||||
* JS IC related stuff below. Proto indices 100+ were chosen due to compatibility considerations.
|
||||
* </pre>
|
||||
*/
|
||||
public Builder clearIcSig() {
|
||||
if (idSigCase_ == 101) {
|
||||
idSigCase_ = 0;
|
||||
idSig_ = null;
|
||||
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature)
|
||||
}
|
||||
|
||||
@@ -1246,4 +1092,4 @@ public final class IdSignature extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature)
|
||||
}
|
||||
}
|
||||
|
||||
-17
@@ -69,21 +69,4 @@ public interface IdSignatureOrBuilder extends
|
||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.FileSignature file_sig = 7;</code>
|
||||
*/
|
||||
org.jetbrains.kotlin.backend.common.serialization.proto.FileSignature getFileSig();
|
||||
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature ic_sig = 101;</code>
|
||||
*
|
||||
* <pre>
|
||||
* JS IC related stuff below. Proto indices 100+ were chosen due to compatibility considerations.
|
||||
* </pre>
|
||||
*/
|
||||
boolean hasIcSig();
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature ic_sig = 101;</code>
|
||||
*
|
||||
* <pre>
|
||||
* JS IC related stuff below. Proto indices 100+ were chosen due to compatibility considerations.
|
||||
* </pre>
|
||||
*/
|
||||
org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature getIcSig();
|
||||
}
|
||||
+1
-1
@@ -469,4 +469,4 @@ public final class IrAnonymousInit extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrAnonymousInit)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -548,4 +548,4 @@ public final class IrBlock extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrBlock)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -476,4 +476,4 @@ public final class IrBlockBody extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrBlockBody)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -513,4 +513,4 @@ public final class IrBranch extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrBranch)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -417,4 +417,4 @@ public final class IrBreak extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrBreak)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -607,4 +607,4 @@ public final class IrCall extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrCall)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -513,4 +513,4 @@ public final class IrCatch extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrCatch)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1423,4 +1423,4 @@ public final class IrClass extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrClass)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -425,4 +425,4 @@ public final class IrClassReference extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrClassReference)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -548,4 +548,4 @@ public final class IrComposite extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrComposite)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1104,4 +1104,4 @@ public final class IrConst extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrConst)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -392,4 +392,4 @@ public final class IrConstructor extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructor)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -615,4 +615,4 @@ public final class IrConstructorCall extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrConstructorCall)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -417,4 +417,4 @@ public final class IrContinue extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrContinue)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1906,4 +1906,4 @@ public final class IrDeclaration extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclaration)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -779,4 +779,4 @@ public final class IrDeclarationBase extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclarationBase)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-6
@@ -1,8 +1,3 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: compiler/ir/serialization.common/src/KotlinIr.proto
|
||||
|
||||
@@ -465,4 +460,4 @@ public final class IrDefinitelyNotNullType extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrDefinitelyNotNullType)
|
||||
}
|
||||
}
|
||||
|
||||
-5
@@ -1,8 +1,3 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: compiler/ir/serialization.common/src/KotlinIr.proto
|
||||
|
||||
|
||||
+1
-1
@@ -469,4 +469,4 @@ public final class IrDelegatingConstructorCall extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrDelegatingConstructorCall)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -392,4 +392,4 @@ public final class IrDoWhile extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrDoWhile)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -469,4 +469,4 @@ public final class IrDynamicMemberExpression extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrDynamicMemberExpression)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -995,4 +995,4 @@ public final class IrDynamicOperatorExpression extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrDynamicOperatorExpression)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -476,4 +476,4 @@ public final class IrDynamicType extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrDynamicType)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -469,4 +469,4 @@ public final class IrEnumConstructorCall extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrEnumConstructorCall)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -655,4 +655,4 @@ public final class IrEnumEntry extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrEnumEntry)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -673,4 +673,4 @@ public final class IrErrorCallExpression extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrErrorCallExpression)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -348,4 +348,4 @@ public final class IrErrorDeclaration extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrErrorDeclaration)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -348,4 +348,4 @@ public final class IrErrorExpression extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrErrorExpression)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -476,4 +476,4 @@ public final class IrErrorType extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrErrorType)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -546,4 +546,4 @@ public final class IrExpression extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -538,4 +538,4 @@ public final class IrField extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrField)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1264,4 +1264,4 @@ public final class IrFile extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrFile)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -584,4 +584,4 @@ public final class IrFunction extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrFunction)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1257,4 +1257,4 @@ public final class IrFunctionBase extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionBase)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -469,4 +469,4 @@ public final class IrFunctionExpression extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionExpression)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -607,4 +607,4 @@ public final class IrFunctionReference extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrFunctionReference)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -392,4 +392,4 @@ public final class IrGetClass extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrGetClass)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -348,4 +348,4 @@ public final class IrGetEnumValue extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrGetEnumValue)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -461,4 +461,4 @@ public final class IrGetField extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrGetField)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -348,4 +348,4 @@ public final class IrGetObject extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrGetObject)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -417,4 +417,4 @@ public final class IrGetValue extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrGetValue)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -425,4 +425,4 @@ public final class IrInlineClassRepresentation extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrInlineClassRepresentation)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -348,4 +348,4 @@ public final class IrInstanceInitializerCall extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrInstanceInitializerCall)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -820,4 +820,4 @@ public final class IrLocalDelegatedProperty extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrLocalDelegatedProperty)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -632,4 +632,4 @@ public final class IrLocalDelegatedPropertyReference extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrLocalDelegatedPropertyReference)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-367
@@ -514,45 +514,6 @@ public final class IrOperation extends
|
||||
operationCase_ = 35;
|
||||
break;
|
||||
}
|
||||
case 1090: {
|
||||
org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference.Builder subBuilder = null;
|
||||
if (operationCase_ == 136) {
|
||||
subBuilder = ((org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference) operation_).toBuilder();
|
||||
}
|
||||
operation_ = input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference.PARSER, extensionRegistry);
|
||||
if (subBuilder != null) {
|
||||
subBuilder.mergeFrom((org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference) operation_);
|
||||
operation_ = subBuilder.buildPartial();
|
||||
}
|
||||
operationCase_ = 136;
|
||||
break;
|
||||
}
|
||||
case 1098: {
|
||||
org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock.Builder subBuilder = null;
|
||||
if (operationCase_ == 137) {
|
||||
subBuilder = ((org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock) operation_).toBuilder();
|
||||
}
|
||||
operation_ = input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock.PARSER, extensionRegistry);
|
||||
if (subBuilder != null) {
|
||||
subBuilder.mergeFrom((org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock) operation_);
|
||||
operation_ = subBuilder.buildPartial();
|
||||
}
|
||||
operationCase_ = 137;
|
||||
break;
|
||||
}
|
||||
case 1106: {
|
||||
org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn.Builder subBuilder = null;
|
||||
if (operationCase_ == 138) {
|
||||
subBuilder = ((org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn) operation_).toBuilder();
|
||||
}
|
||||
operation_ = input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn.PARSER, extensionRegistry);
|
||||
if (subBuilder != null) {
|
||||
subBuilder.mergeFrom((org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn) operation_);
|
||||
operation_ = subBuilder.buildPartial();
|
||||
}
|
||||
operationCase_ = 138;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
|
||||
@@ -627,9 +588,6 @@ public final class IrOperation extends
|
||||
FUNCTION_EXPRESSION(33),
|
||||
ERROR_EXPRESSION(34),
|
||||
ERROR_CALL_EXPRESSION(35),
|
||||
RAW_FUNCTION_REFERENCE(136),
|
||||
RETURNABLE_BLOCK(137),
|
||||
RETURNABLE_BLOCK_RETURN(138),
|
||||
OPERATION_NOT_SET(0);
|
||||
private int value = 0;
|
||||
private OperationCase(int value) {
|
||||
@@ -672,9 +630,6 @@ public final class IrOperation extends
|
||||
case 33: return FUNCTION_EXPRESSION;
|
||||
case 34: return ERROR_EXPRESSION;
|
||||
case 35: return ERROR_CALL_EXPRESSION;
|
||||
case 136: return RAW_FUNCTION_REFERENCE;
|
||||
case 137: return RETURNABLE_BLOCK;
|
||||
case 138: return RETURNABLE_BLOCK_RETURN;
|
||||
case 0: return OPERATION_NOT_SET;
|
||||
default: throw new java.lang.IllegalArgumentException(
|
||||
"Value is undefined for this oneof enum.");
|
||||
@@ -1294,57 +1249,6 @@ public final class IrOperation extends
|
||||
return org.jetbrains.kotlin.backend.common.serialization.proto.IrErrorCallExpression.getDefaultInstance();
|
||||
}
|
||||
|
||||
public static final int RAW_FUNCTION_REFERENCE_FIELD_NUMBER = 136;
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference raw_function_reference = 136;</code>
|
||||
*/
|
||||
public boolean hasRawFunctionReference() {
|
||||
return operationCase_ == 136;
|
||||
}
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference raw_function_reference = 136;</code>
|
||||
*/
|
||||
public org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference getRawFunctionReference() {
|
||||
if (operationCase_ == 136) {
|
||||
return (org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference) operation_;
|
||||
}
|
||||
return org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference.getDefaultInstance();
|
||||
}
|
||||
|
||||
public static final int RETURNABLE_BLOCK_FIELD_NUMBER = 137;
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock returnable_block = 137;</code>
|
||||
*/
|
||||
public boolean hasReturnableBlock() {
|
||||
return operationCase_ == 137;
|
||||
}
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock returnable_block = 137;</code>
|
||||
*/
|
||||
public org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock getReturnableBlock() {
|
||||
if (operationCase_ == 137) {
|
||||
return (org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock) operation_;
|
||||
}
|
||||
return org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock.getDefaultInstance();
|
||||
}
|
||||
|
||||
public static final int RETURNABLE_BLOCK_RETURN_FIELD_NUMBER = 138;
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn returnable_block_return = 138;</code>
|
||||
*/
|
||||
public boolean hasReturnableBlockReturn() {
|
||||
return operationCase_ == 138;
|
||||
}
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn returnable_block_return = 138;</code>
|
||||
*/
|
||||
public org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn getReturnableBlockReturn() {
|
||||
if (operationCase_ == 138) {
|
||||
return (org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn) operation_;
|
||||
}
|
||||
return org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn.getDefaultInstance();
|
||||
}
|
||||
|
||||
private void initFields() {
|
||||
}
|
||||
private byte memoizedIsInitialized = -1;
|
||||
@@ -1557,24 +1461,6 @@ public final class IrOperation extends
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (hasRawFunctionReference()) {
|
||||
if (!getRawFunctionReference().isInitialized()) {
|
||||
memoizedIsInitialized = 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (hasReturnableBlock()) {
|
||||
if (!getReturnableBlock().isInitialized()) {
|
||||
memoizedIsInitialized = 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (hasReturnableBlockReturn()) {
|
||||
if (!getReturnableBlockReturn().isInitialized()) {
|
||||
memoizedIsInitialized = 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
memoizedIsInitialized = 1;
|
||||
return true;
|
||||
}
|
||||
@@ -1687,15 +1573,6 @@ public final class IrOperation extends
|
||||
if (operationCase_ == 35) {
|
||||
output.writeMessage(35, (org.jetbrains.kotlin.backend.common.serialization.proto.IrErrorCallExpression) operation_);
|
||||
}
|
||||
if (operationCase_ == 136) {
|
||||
output.writeMessage(136, (org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference) operation_);
|
||||
}
|
||||
if (operationCase_ == 137) {
|
||||
output.writeMessage(137, (org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock) operation_);
|
||||
}
|
||||
if (operationCase_ == 138) {
|
||||
output.writeMessage(138, (org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn) operation_);
|
||||
}
|
||||
output.writeRawBytes(unknownFields);
|
||||
}
|
||||
|
||||
@@ -1845,18 +1722,6 @@ public final class IrOperation extends
|
||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||
.computeMessageSize(35, (org.jetbrains.kotlin.backend.common.serialization.proto.IrErrorCallExpression) operation_);
|
||||
}
|
||||
if (operationCase_ == 136) {
|
||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||
.computeMessageSize(136, (org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference) operation_);
|
||||
}
|
||||
if (operationCase_ == 137) {
|
||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||
.computeMessageSize(137, (org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock) operation_);
|
||||
}
|
||||
if (operationCase_ == 138) {
|
||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||
.computeMessageSize(138, (org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn) operation_);
|
||||
}
|
||||
size += unknownFields.size();
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
@@ -2088,15 +1953,6 @@ public final class IrOperation extends
|
||||
if (operationCase_ == 35) {
|
||||
result.operation_ = operation_;
|
||||
}
|
||||
if (operationCase_ == 136) {
|
||||
result.operation_ = operation_;
|
||||
}
|
||||
if (operationCase_ == 137) {
|
||||
result.operation_ = operation_;
|
||||
}
|
||||
if (operationCase_ == 138) {
|
||||
result.operation_ = operation_;
|
||||
}
|
||||
result.bitField0_ = to_bitField0_;
|
||||
result.bitField1_ = to_bitField1_;
|
||||
result.operationCase_ = operationCase_;
|
||||
@@ -2246,18 +2102,6 @@ public final class IrOperation extends
|
||||
mergeErrorCallExpression(other.getErrorCallExpression());
|
||||
break;
|
||||
}
|
||||
case RAW_FUNCTION_REFERENCE: {
|
||||
mergeRawFunctionReference(other.getRawFunctionReference());
|
||||
break;
|
||||
}
|
||||
case RETURNABLE_BLOCK: {
|
||||
mergeReturnableBlock(other.getReturnableBlock());
|
||||
break;
|
||||
}
|
||||
case RETURNABLE_BLOCK_RETURN: {
|
||||
mergeReturnableBlockReturn(other.getReturnableBlockReturn());
|
||||
break;
|
||||
}
|
||||
case OPERATION_NOT_SET: {
|
||||
break;
|
||||
}
|
||||
@@ -2472,24 +2316,6 @@ public final class IrOperation extends
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (hasRawFunctionReference()) {
|
||||
if (!getRawFunctionReference().isInitialized()) {
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (hasReturnableBlock()) {
|
||||
if (!getReturnableBlock().isInitialized()) {
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (hasReturnableBlockReturn()) {
|
||||
if (!getReturnableBlockReturn().isInitialized()) {
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -4791,198 +4617,6 @@ public final class IrOperation extends
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference raw_function_reference = 136;</code>
|
||||
*/
|
||||
public boolean hasRawFunctionReference() {
|
||||
return operationCase_ == 136;
|
||||
}
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference raw_function_reference = 136;</code>
|
||||
*/
|
||||
public org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference getRawFunctionReference() {
|
||||
if (operationCase_ == 136) {
|
||||
return (org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference) operation_;
|
||||
}
|
||||
return org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference.getDefaultInstance();
|
||||
}
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference raw_function_reference = 136;</code>
|
||||
*/
|
||||
public Builder setRawFunctionReference(org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
operation_ = value;
|
||||
|
||||
operationCase_ = 136;
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference raw_function_reference = 136;</code>
|
||||
*/
|
||||
public Builder setRawFunctionReference(
|
||||
org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference.Builder builderForValue) {
|
||||
operation_ = builderForValue.build();
|
||||
|
||||
operationCase_ = 136;
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference raw_function_reference = 136;</code>
|
||||
*/
|
||||
public Builder mergeRawFunctionReference(org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference value) {
|
||||
if (operationCase_ == 136 &&
|
||||
operation_ != org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference.getDefaultInstance()) {
|
||||
operation_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference.newBuilder((org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference) operation_)
|
||||
.mergeFrom(value).buildPartial();
|
||||
} else {
|
||||
operation_ = value;
|
||||
}
|
||||
|
||||
operationCase_ = 136;
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference raw_function_reference = 136;</code>
|
||||
*/
|
||||
public Builder clearRawFunctionReference() {
|
||||
if (operationCase_ == 136) {
|
||||
operationCase_ = 0;
|
||||
operation_ = null;
|
||||
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock returnable_block = 137;</code>
|
||||
*/
|
||||
public boolean hasReturnableBlock() {
|
||||
return operationCase_ == 137;
|
||||
}
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock returnable_block = 137;</code>
|
||||
*/
|
||||
public org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock getReturnableBlock() {
|
||||
if (operationCase_ == 137) {
|
||||
return (org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock) operation_;
|
||||
}
|
||||
return org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock.getDefaultInstance();
|
||||
}
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock returnable_block = 137;</code>
|
||||
*/
|
||||
public Builder setReturnableBlock(org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
operation_ = value;
|
||||
|
||||
operationCase_ = 137;
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock returnable_block = 137;</code>
|
||||
*/
|
||||
public Builder setReturnableBlock(
|
||||
org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock.Builder builderForValue) {
|
||||
operation_ = builderForValue.build();
|
||||
|
||||
operationCase_ = 137;
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock returnable_block = 137;</code>
|
||||
*/
|
||||
public Builder mergeReturnableBlock(org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock value) {
|
||||
if (operationCase_ == 137 &&
|
||||
operation_ != org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock.getDefaultInstance()) {
|
||||
operation_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock.newBuilder((org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock) operation_)
|
||||
.mergeFrom(value).buildPartial();
|
||||
} else {
|
||||
operation_ = value;
|
||||
}
|
||||
|
||||
operationCase_ = 137;
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock returnable_block = 137;</code>
|
||||
*/
|
||||
public Builder clearReturnableBlock() {
|
||||
if (operationCase_ == 137) {
|
||||
operationCase_ = 0;
|
||||
operation_ = null;
|
||||
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn returnable_block_return = 138;</code>
|
||||
*/
|
||||
public boolean hasReturnableBlockReturn() {
|
||||
return operationCase_ == 138;
|
||||
}
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn returnable_block_return = 138;</code>
|
||||
*/
|
||||
public org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn getReturnableBlockReturn() {
|
||||
if (operationCase_ == 138) {
|
||||
return (org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn) operation_;
|
||||
}
|
||||
return org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn.getDefaultInstance();
|
||||
}
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn returnable_block_return = 138;</code>
|
||||
*/
|
||||
public Builder setReturnableBlockReturn(org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
operation_ = value;
|
||||
|
||||
operationCase_ = 138;
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn returnable_block_return = 138;</code>
|
||||
*/
|
||||
public Builder setReturnableBlockReturn(
|
||||
org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn.Builder builderForValue) {
|
||||
operation_ = builderForValue.build();
|
||||
|
||||
operationCase_ = 138;
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn returnable_block_return = 138;</code>
|
||||
*/
|
||||
public Builder mergeReturnableBlockReturn(org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn value) {
|
||||
if (operationCase_ == 138 &&
|
||||
operation_ != org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn.getDefaultInstance()) {
|
||||
operation_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn.newBuilder((org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn) operation_)
|
||||
.mergeFrom(value).buildPartial();
|
||||
} else {
|
||||
operation_ = value;
|
||||
}
|
||||
|
||||
operationCase_ = 138;
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn returnable_block_return = 138;</code>
|
||||
*/
|
||||
public Builder clearReturnableBlockReturn() {
|
||||
if (operationCase_ == 138) {
|
||||
operationCase_ = 0;
|
||||
operation_ = null;
|
||||
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrOperation)
|
||||
}
|
||||
|
||||
@@ -4992,4 +4626,4 @@ public final class IrOperation extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrOperation)
|
||||
}
|
||||
}
|
||||
|
||||
-27
@@ -329,31 +329,4 @@ public interface IrOperationOrBuilder extends
|
||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrErrorCallExpression error_call_expression = 35;</code>
|
||||
*/
|
||||
org.jetbrains.kotlin.backend.common.serialization.proto.IrErrorCallExpression getErrorCallExpression();
|
||||
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference raw_function_reference = 136;</code>
|
||||
*/
|
||||
boolean hasRawFunctionReference();
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference raw_function_reference = 136;</code>
|
||||
*/
|
||||
org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference getRawFunctionReference();
|
||||
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock returnable_block = 137;</code>
|
||||
*/
|
||||
boolean hasReturnableBlock();
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock returnable_block = 137;</code>
|
||||
*/
|
||||
org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock getReturnableBlock();
|
||||
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn returnable_block_return = 138;</code>
|
||||
*/
|
||||
boolean hasReturnableBlockReturn();
|
||||
/**
|
||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn returnable_block_return = 138;</code>
|
||||
*/
|
||||
org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn getReturnableBlockReturn();
|
||||
}
|
||||
+1
-1
@@ -820,4 +820,4 @@ public final class IrProperty extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrProperty)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -745,4 +745,4 @@ public final class IrPropertyReference extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrPropertyReference)
|
||||
}
|
||||
}
|
||||
|
||||
-351
@@ -1,351 +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.IrRawFunctionReference}
|
||||
*/
|
||||
public final class IrRawFunctionReference extends
|
||||
org.jetbrains.kotlin.protobuf.GeneratedMessageLite implements
|
||||
// @@protoc_insertion_point(message_implements:org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference)
|
||||
IrRawFunctionReferenceOrBuilder {
|
||||
// Use IrRawFunctionReference.newBuilder() to construct.
|
||||
private IrRawFunctionReference(org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder builder) {
|
||||
super(builder);
|
||||
this.unknownFields = builder.getUnknownFields();
|
||||
}
|
||||
private IrRawFunctionReference(boolean noInit) { this.unknownFields = org.jetbrains.kotlin.protobuf.ByteString.EMPTY;}
|
||||
|
||||
private static final IrRawFunctionReference defaultInstance;
|
||||
public static IrRawFunctionReference getDefaultInstance() {
|
||||
return defaultInstance;
|
||||
}
|
||||
|
||||
public IrRawFunctionReference getDefaultInstanceForType() {
|
||||
return defaultInstance;
|
||||
}
|
||||
|
||||
private final org.jetbrains.kotlin.protobuf.ByteString unknownFields;
|
||||
private IrRawFunctionReference(
|
||||
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;
|
||||
symbol_ = 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<IrRawFunctionReference> PARSER =
|
||||
new org.jetbrains.kotlin.protobuf.AbstractParser<IrRawFunctionReference>() {
|
||||
public IrRawFunctionReference parsePartialFrom(
|
||||
org.jetbrains.kotlin.protobuf.CodedInputStream input,
|
||||
org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
|
||||
return new IrRawFunctionReference(input, extensionRegistry);
|
||||
}
|
||||
};
|
||||
|
||||
@java.lang.Override
|
||||
public org.jetbrains.kotlin.protobuf.Parser<IrRawFunctionReference> getParserForType() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
private int bitField0_;
|
||||
public static final int SYMBOL_FIELD_NUMBER = 1;
|
||||
private long symbol_;
|
||||
/**
|
||||
* <code>required int64 symbol = 1;</code>
|
||||
*/
|
||||
public boolean hasSymbol() {
|
||||
return ((bitField0_ & 0x00000001) == 0x00000001);
|
||||
}
|
||||
/**
|
||||
* <code>required int64 symbol = 1;</code>
|
||||
*/
|
||||
public long getSymbol() {
|
||||
return symbol_;
|
||||
}
|
||||
|
||||
private void initFields() {
|
||||
symbol_ = 0L;
|
||||
}
|
||||
private byte memoizedIsInitialized = -1;
|
||||
public final boolean isInitialized() {
|
||||
byte isInitialized = memoizedIsInitialized;
|
||||
if (isInitialized == 1) return true;
|
||||
if (isInitialized == 0) return false;
|
||||
|
||||
if (!hasSymbol()) {
|
||||
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.writeInt64(1, symbol_);
|
||||
}
|
||||
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
|
||||
.computeInt64Size(1, symbol_);
|
||||
}
|
||||
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.IrRawFunctionReference 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.IrRawFunctionReference 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.IrRawFunctionReference parseFrom(byte[] data)
|
||||
throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference 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.IrRawFunctionReference parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return PARSER.parseFrom(input);
|
||||
}
|
||||
public static org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference 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.IrRawFunctionReference parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return PARSER.parseDelimitedFrom(input);
|
||||
}
|
||||
public static org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference 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.IrRawFunctionReference parseFrom(
|
||||
org.jetbrains.kotlin.protobuf.CodedInputStream input)
|
||||
throws java.io.IOException {
|
||||
return PARSER.parseFrom(input);
|
||||
}
|
||||
public static org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference 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.IrRawFunctionReference prototype) {
|
||||
return newBuilder().mergeFrom(prototype);
|
||||
}
|
||||
public Builder toBuilder() { return newBuilder(this); }
|
||||
|
||||
/**
|
||||
* Protobuf type {@code org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder<
|
||||
org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference, Builder>
|
||||
implements
|
||||
// @@protoc_insertion_point(builder_implements:org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference)
|
||||
org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReferenceOrBuilder {
|
||||
// Construct using org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference.newBuilder()
|
||||
private Builder() {
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
|
||||
private void maybeForceBuilderInitialization() {
|
||||
}
|
||||
private static Builder create() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public Builder clear() {
|
||||
super.clear();
|
||||
symbol_ = 0L;
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder clone() {
|
||||
return create().mergeFrom(buildPartial());
|
||||
}
|
||||
|
||||
public org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference getDefaultInstanceForType() {
|
||||
return org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference.getDefaultInstance();
|
||||
}
|
||||
|
||||
public org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference build() {
|
||||
org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference result = buildPartial();
|
||||
if (!result.isInitialized()) {
|
||||
throw newUninitializedMessageException(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference buildPartial() {
|
||||
org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference result = new org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference(this);
|
||||
int from_bitField0_ = bitField0_;
|
||||
int to_bitField0_ = 0;
|
||||
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
|
||||
to_bitField0_ |= 0x00000001;
|
||||
}
|
||||
result.symbol_ = symbol_;
|
||||
result.bitField0_ = to_bitField0_;
|
||||
return result;
|
||||
}
|
||||
|
||||
public Builder mergeFrom(org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference other) {
|
||||
if (other == org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference.getDefaultInstance()) return this;
|
||||
if (other.hasSymbol()) {
|
||||
setSymbol(other.getSymbol());
|
||||
}
|
||||
setUnknownFields(
|
||||
getUnknownFields().concat(other.unknownFields));
|
||||
return this;
|
||||
}
|
||||
|
||||
public final boolean isInitialized() {
|
||||
if (!hasSymbol()) {
|
||||
|
||||
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.IrRawFunctionReference parsedMessage = null;
|
||||
try {
|
||||
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
|
||||
parsedMessage = (org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference) e.getUnfinishedMessage();
|
||||
throw e;
|
||||
} finally {
|
||||
if (parsedMessage != null) {
|
||||
mergeFrom(parsedMessage);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
private int bitField0_;
|
||||
|
||||
private long symbol_ ;
|
||||
/**
|
||||
* <code>required int64 symbol = 1;</code>
|
||||
*/
|
||||
public boolean hasSymbol() {
|
||||
return ((bitField0_ & 0x00000001) == 0x00000001);
|
||||
}
|
||||
/**
|
||||
* <code>required int64 symbol = 1;</code>
|
||||
*/
|
||||
public long getSymbol() {
|
||||
return symbol_;
|
||||
}
|
||||
/**
|
||||
* <code>required int64 symbol = 1;</code>
|
||||
*/
|
||||
public Builder setSymbol(long value) {
|
||||
bitField0_ |= 0x00000001;
|
||||
symbol_ = value;
|
||||
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>required int64 symbol = 1;</code>
|
||||
*/
|
||||
public Builder clearSymbol() {
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
symbol_ = 0L;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference)
|
||||
}
|
||||
|
||||
static {
|
||||
defaultInstance = new IrRawFunctionReference(true);
|
||||
defaultInstance.initFields();
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference)
|
||||
}
|
||||
-18
@@ -1,18 +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 IrRawFunctionReferenceOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.backend.common.serialization.proto.IrRawFunctionReference)
|
||||
org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <code>required int64 symbol = 1;</code>
|
||||
*/
|
||||
boolean hasSymbol();
|
||||
/**
|
||||
* <code>required int64 symbol = 1;</code>
|
||||
*/
|
||||
long getSymbol();
|
||||
}
|
||||
+1
-1
@@ -469,4 +469,4 @@ public final class IrReturn extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrReturn)
|
||||
}
|
||||
}
|
||||
|
||||
-620
@@ -1,620 +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.IrReturnableBlock}
|
||||
*/
|
||||
public final class IrReturnableBlock extends
|
||||
org.jetbrains.kotlin.protobuf.GeneratedMessageLite implements
|
||||
// @@protoc_insertion_point(message_implements:org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock)
|
||||
IrReturnableBlockOrBuilder {
|
||||
// Use IrReturnableBlock.newBuilder() to construct.
|
||||
private IrReturnableBlock(org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder builder) {
|
||||
super(builder);
|
||||
this.unknownFields = builder.getUnknownFields();
|
||||
}
|
||||
private IrReturnableBlock(boolean noInit) { this.unknownFields = org.jetbrains.kotlin.protobuf.ByteString.EMPTY;}
|
||||
|
||||
private static final IrReturnableBlock defaultInstance;
|
||||
public static IrReturnableBlock getDefaultInstance() {
|
||||
return defaultInstance;
|
||||
}
|
||||
|
||||
public IrReturnableBlock getDefaultInstanceForType() {
|
||||
return defaultInstance;
|
||||
}
|
||||
|
||||
private final org.jetbrains.kotlin.protobuf.ByteString unknownFields;
|
||||
private IrReturnableBlock(
|
||||
org.jetbrains.kotlin.protobuf.CodedInputStream input,
|
||||
org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
|
||||
initFields();
|
||||
int mutable_bitField0_ = 0;
|
||||
org.jetbrains.kotlin.protobuf.ByteString.Output unknownFieldsOutput =
|
||||
org.jetbrains.kotlin.protobuf.ByteString.newOutput();
|
||||
org.jetbrains.kotlin.protobuf.CodedOutputStream unknownFieldsCodedOutput =
|
||||
org.jetbrains.kotlin.protobuf.CodedOutputStream.newInstance(
|
||||
unknownFieldsOutput, 1);
|
||||
try {
|
||||
boolean done = false;
|
||||
while (!done) {
|
||||
int tag = input.readTag();
|
||||
switch (tag) {
|
||||
case 0:
|
||||
done = true;
|
||||
break;
|
||||
default: {
|
||||
if (!parseUnknownField(input, unknownFieldsCodedOutput,
|
||||
extensionRegistry, tag)) {
|
||||
done = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 10: {
|
||||
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
|
||||
statement_ = new java.util.ArrayList<org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement>();
|
||||
mutable_bitField0_ |= 0x00000001;
|
||||
}
|
||||
statement_.add(input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement.PARSER, extensionRegistry));
|
||||
break;
|
||||
}
|
||||
case 16: {
|
||||
bitField0_ |= 0x00000001;
|
||||
originName_ = input.readInt32();
|
||||
break;
|
||||
}
|
||||
case 24: {
|
||||
bitField0_ |= 0x00000002;
|
||||
inlineFunctionSymbol_ = 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_ & 0x00000001) == 0x00000001)) {
|
||||
statement_ = java.util.Collections.unmodifiableList(statement_);
|
||||
}
|
||||
try {
|
||||
unknownFieldsCodedOutput.flush();
|
||||
} catch (java.io.IOException e) {
|
||||
// Should not happen
|
||||
} finally {
|
||||
unknownFields = unknownFieldsOutput.toByteString();
|
||||
}
|
||||
makeExtensionsImmutable();
|
||||
}
|
||||
}
|
||||
public static org.jetbrains.kotlin.protobuf.Parser<IrReturnableBlock> PARSER =
|
||||
new org.jetbrains.kotlin.protobuf.AbstractParser<IrReturnableBlock>() {
|
||||
public IrReturnableBlock parsePartialFrom(
|
||||
org.jetbrains.kotlin.protobuf.CodedInputStream input,
|
||||
org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
|
||||
return new IrReturnableBlock(input, extensionRegistry);
|
||||
}
|
||||
};
|
||||
|
||||
@java.lang.Override
|
||||
public org.jetbrains.kotlin.protobuf.Parser<IrReturnableBlock> getParserForType() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
private int bitField0_;
|
||||
public static final int STATEMENT_FIELD_NUMBER = 1;
|
||||
private java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement> statement_;
|
||||
/**
|
||||
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement statement = 1;</code>
|
||||
*/
|
||||
public java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement> getStatementList() {
|
||||
return statement_;
|
||||
}
|
||||
/**
|
||||
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement statement = 1;</code>
|
||||
*/
|
||||
public java.util.List<? extends org.jetbrains.kotlin.backend.common.serialization.proto.IrStatementOrBuilder>
|
||||
getStatementOrBuilderList() {
|
||||
return statement_;
|
||||
}
|
||||
/**
|
||||
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement statement = 1;</code>
|
||||
*/
|
||||
public int getStatementCount() {
|
||||
return statement_.size();
|
||||
}
|
||||
/**
|
||||
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement statement = 1;</code>
|
||||
*/
|
||||
public org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement getStatement(int index) {
|
||||
return statement_.get(index);
|
||||
}
|
||||
/**
|
||||
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement statement = 1;</code>
|
||||
*/
|
||||
public org.jetbrains.kotlin.backend.common.serialization.proto.IrStatementOrBuilder getStatementOrBuilder(
|
||||
int index) {
|
||||
return statement_.get(index);
|
||||
}
|
||||
|
||||
public static final int ORIGIN_NAME_FIELD_NUMBER = 2;
|
||||
private int originName_;
|
||||
/**
|
||||
* <code>optional int32 origin_name = 2;</code>
|
||||
*/
|
||||
public boolean hasOriginName() {
|
||||
return ((bitField0_ & 0x00000001) == 0x00000001);
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 origin_name = 2;</code>
|
||||
*/
|
||||
public int getOriginName() {
|
||||
return originName_;
|
||||
}
|
||||
|
||||
public static final int INLINE_FUNCTION_SYMBOL_FIELD_NUMBER = 3;
|
||||
private long inlineFunctionSymbol_;
|
||||
/**
|
||||
* <code>optional int64 inline_function_symbol = 3;</code>
|
||||
*/
|
||||
public boolean hasInlineFunctionSymbol() {
|
||||
return ((bitField0_ & 0x00000002) == 0x00000002);
|
||||
}
|
||||
/**
|
||||
* <code>optional int64 inline_function_symbol = 3;</code>
|
||||
*/
|
||||
public long getInlineFunctionSymbol() {
|
||||
return inlineFunctionSymbol_;
|
||||
}
|
||||
|
||||
private void initFields() {
|
||||
statement_ = java.util.Collections.emptyList();
|
||||
originName_ = 0;
|
||||
inlineFunctionSymbol_ = 0L;
|
||||
}
|
||||
private byte memoizedIsInitialized = -1;
|
||||
public final boolean isInitialized() {
|
||||
byte isInitialized = memoizedIsInitialized;
|
||||
if (isInitialized == 1) return true;
|
||||
if (isInitialized == 0) return false;
|
||||
|
||||
for (int i = 0; i < getStatementCount(); i++) {
|
||||
if (!getStatement(i).isInitialized()) {
|
||||
memoizedIsInitialized = 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
memoizedIsInitialized = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
public void writeTo(org.jetbrains.kotlin.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
getSerializedSize();
|
||||
for (int i = 0; i < statement_.size(); i++) {
|
||||
output.writeMessage(1, statement_.get(i));
|
||||
}
|
||||
if (((bitField0_ & 0x00000001) == 0x00000001)) {
|
||||
output.writeInt32(2, originName_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
||||
output.writeInt64(3, inlineFunctionSymbol_);
|
||||
}
|
||||
output.writeRawBytes(unknownFields);
|
||||
}
|
||||
|
||||
private int memoizedSerializedSize = -1;
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSerializedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
for (int i = 0; i < statement_.size(); i++) {
|
||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||
.computeMessageSize(1, statement_.get(i));
|
||||
}
|
||||
if (((bitField0_ & 0x00000001) == 0x00000001)) {
|
||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||
.computeInt32Size(2, originName_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||
.computeInt64Size(3, inlineFunctionSymbol_);
|
||||
}
|
||||
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.IrReturnableBlock 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.IrReturnableBlock 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.IrReturnableBlock parseFrom(byte[] data)
|
||||
throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock 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.IrReturnableBlock parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return PARSER.parseFrom(input);
|
||||
}
|
||||
public static org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock 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.IrReturnableBlock parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return PARSER.parseDelimitedFrom(input);
|
||||
}
|
||||
public static org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock 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.IrReturnableBlock parseFrom(
|
||||
org.jetbrains.kotlin.protobuf.CodedInputStream input)
|
||||
throws java.io.IOException {
|
||||
return PARSER.parseFrom(input);
|
||||
}
|
||||
public static org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock 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.IrReturnableBlock prototype) {
|
||||
return newBuilder().mergeFrom(prototype);
|
||||
}
|
||||
public Builder toBuilder() { return newBuilder(this); }
|
||||
|
||||
/**
|
||||
* Protobuf type {@code org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder<
|
||||
org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock, Builder>
|
||||
implements
|
||||
// @@protoc_insertion_point(builder_implements:org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock)
|
||||
org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockOrBuilder {
|
||||
// Construct using org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock.newBuilder()
|
||||
private Builder() {
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
|
||||
private void maybeForceBuilderInitialization() {
|
||||
}
|
||||
private static Builder create() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public Builder clear() {
|
||||
super.clear();
|
||||
statement_ = java.util.Collections.emptyList();
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
originName_ = 0;
|
||||
bitField0_ = (bitField0_ & ~0x00000002);
|
||||
inlineFunctionSymbol_ = 0L;
|
||||
bitField0_ = (bitField0_ & ~0x00000004);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder clone() {
|
||||
return create().mergeFrom(buildPartial());
|
||||
}
|
||||
|
||||
public org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock getDefaultInstanceForType() {
|
||||
return org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock.getDefaultInstance();
|
||||
}
|
||||
|
||||
public org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock build() {
|
||||
org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock result = buildPartial();
|
||||
if (!result.isInitialized()) {
|
||||
throw newUninitializedMessageException(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock buildPartial() {
|
||||
org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock result = new org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock(this);
|
||||
int from_bitField0_ = bitField0_;
|
||||
int to_bitField0_ = 0;
|
||||
if (((bitField0_ & 0x00000001) == 0x00000001)) {
|
||||
statement_ = java.util.Collections.unmodifiableList(statement_);
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
}
|
||||
result.statement_ = statement_;
|
||||
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
|
||||
to_bitField0_ |= 0x00000001;
|
||||
}
|
||||
result.originName_ = originName_;
|
||||
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
|
||||
to_bitField0_ |= 0x00000002;
|
||||
}
|
||||
result.inlineFunctionSymbol_ = inlineFunctionSymbol_;
|
||||
result.bitField0_ = to_bitField0_;
|
||||
return result;
|
||||
}
|
||||
|
||||
public Builder mergeFrom(org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock other) {
|
||||
if (other == org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock.getDefaultInstance()) return this;
|
||||
if (!other.statement_.isEmpty()) {
|
||||
if (statement_.isEmpty()) {
|
||||
statement_ = other.statement_;
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
} else {
|
||||
ensureStatementIsMutable();
|
||||
statement_.addAll(other.statement_);
|
||||
}
|
||||
|
||||
}
|
||||
if (other.hasOriginName()) {
|
||||
setOriginName(other.getOriginName());
|
||||
}
|
||||
if (other.hasInlineFunctionSymbol()) {
|
||||
setInlineFunctionSymbol(other.getInlineFunctionSymbol());
|
||||
}
|
||||
setUnknownFields(
|
||||
getUnknownFields().concat(other.unknownFields));
|
||||
return this;
|
||||
}
|
||||
|
||||
public final boolean isInitialized() {
|
||||
for (int i = 0; i < getStatementCount(); i++) {
|
||||
if (!getStatement(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.IrReturnableBlock parsedMessage = null;
|
||||
try {
|
||||
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
|
||||
parsedMessage = (org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock) e.getUnfinishedMessage();
|
||||
throw e;
|
||||
} finally {
|
||||
if (parsedMessage != null) {
|
||||
mergeFrom(parsedMessage);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
private int bitField0_;
|
||||
|
||||
private java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement> statement_ =
|
||||
java.util.Collections.emptyList();
|
||||
private void ensureStatementIsMutable() {
|
||||
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
|
||||
statement_ = new java.util.ArrayList<org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement>(statement_);
|
||||
bitField0_ |= 0x00000001;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement statement = 1;</code>
|
||||
*/
|
||||
public java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement> getStatementList() {
|
||||
return java.util.Collections.unmodifiableList(statement_);
|
||||
}
|
||||
/**
|
||||
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement statement = 1;</code>
|
||||
*/
|
||||
public int getStatementCount() {
|
||||
return statement_.size();
|
||||
}
|
||||
/**
|
||||
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement statement = 1;</code>
|
||||
*/
|
||||
public org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement getStatement(int index) {
|
||||
return statement_.get(index);
|
||||
}
|
||||
/**
|
||||
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement statement = 1;</code>
|
||||
*/
|
||||
public Builder setStatement(
|
||||
int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureStatementIsMutable();
|
||||
statement_.set(index, value);
|
||||
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement statement = 1;</code>
|
||||
*/
|
||||
public Builder setStatement(
|
||||
int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement.Builder builderForValue) {
|
||||
ensureStatementIsMutable();
|
||||
statement_.set(index, builderForValue.build());
|
||||
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement statement = 1;</code>
|
||||
*/
|
||||
public Builder addStatement(org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureStatementIsMutable();
|
||||
statement_.add(value);
|
||||
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement statement = 1;</code>
|
||||
*/
|
||||
public Builder addStatement(
|
||||
int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
ensureStatementIsMutable();
|
||||
statement_.add(index, value);
|
||||
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement statement = 1;</code>
|
||||
*/
|
||||
public Builder addStatement(
|
||||
org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement.Builder builderForValue) {
|
||||
ensureStatementIsMutable();
|
||||
statement_.add(builderForValue.build());
|
||||
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement statement = 1;</code>
|
||||
*/
|
||||
public Builder addStatement(
|
||||
int index, org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement.Builder builderForValue) {
|
||||
ensureStatementIsMutable();
|
||||
statement_.add(index, builderForValue.build());
|
||||
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement statement = 1;</code>
|
||||
*/
|
||||
public Builder addAllStatement(
|
||||
java.lang.Iterable<? extends org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement> values) {
|
||||
ensureStatementIsMutable();
|
||||
org.jetbrains.kotlin.protobuf.AbstractMessageLite.Builder.addAll(
|
||||
values, statement_);
|
||||
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement statement = 1;</code>
|
||||
*/
|
||||
public Builder clearStatement() {
|
||||
statement_ = java.util.Collections.emptyList();
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement statement = 1;</code>
|
||||
*/
|
||||
public Builder removeStatement(int index) {
|
||||
ensureStatementIsMutable();
|
||||
statement_.remove(index);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
private int originName_ ;
|
||||
/**
|
||||
* <code>optional int32 origin_name = 2;</code>
|
||||
*/
|
||||
public boolean hasOriginName() {
|
||||
return ((bitField0_ & 0x00000002) == 0x00000002);
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 origin_name = 2;</code>
|
||||
*/
|
||||
public int getOriginName() {
|
||||
return originName_;
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 origin_name = 2;</code>
|
||||
*/
|
||||
public Builder setOriginName(int value) {
|
||||
bitField0_ |= 0x00000002;
|
||||
originName_ = value;
|
||||
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 origin_name = 2;</code>
|
||||
*/
|
||||
public Builder clearOriginName() {
|
||||
bitField0_ = (bitField0_ & ~0x00000002);
|
||||
originName_ = 0;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
private long inlineFunctionSymbol_ ;
|
||||
/**
|
||||
* <code>optional int64 inline_function_symbol = 3;</code>
|
||||
*/
|
||||
public boolean hasInlineFunctionSymbol() {
|
||||
return ((bitField0_ & 0x00000004) == 0x00000004);
|
||||
}
|
||||
/**
|
||||
* <code>optional int64 inline_function_symbol = 3;</code>
|
||||
*/
|
||||
public long getInlineFunctionSymbol() {
|
||||
return inlineFunctionSymbol_;
|
||||
}
|
||||
/**
|
||||
* <code>optional int64 inline_function_symbol = 3;</code>
|
||||
*/
|
||||
public Builder setInlineFunctionSymbol(long value) {
|
||||
bitField0_ |= 0x00000004;
|
||||
inlineFunctionSymbol_ = value;
|
||||
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional int64 inline_function_symbol = 3;</code>
|
||||
*/
|
||||
public Builder clearInlineFunctionSymbol() {
|
||||
bitField0_ = (bitField0_ & ~0x00000004);
|
||||
inlineFunctionSymbol_ = 0L;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock)
|
||||
}
|
||||
|
||||
static {
|
||||
defaultInstance = new IrReturnableBlock(true);
|
||||
defaultInstance.initFields();
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock)
|
||||
}
|
||||
-41
@@ -1,41 +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 IrReturnableBlockOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlock)
|
||||
org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement statement = 1;</code>
|
||||
*/
|
||||
java.util.List<org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement>
|
||||
getStatementList();
|
||||
/**
|
||||
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement statement = 1;</code>
|
||||
*/
|
||||
org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement getStatement(int index);
|
||||
/**
|
||||
* <code>repeated .org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement statement = 1;</code>
|
||||
*/
|
||||
int getStatementCount();
|
||||
|
||||
/**
|
||||
* <code>optional int32 origin_name = 2;</code>
|
||||
*/
|
||||
boolean hasOriginName();
|
||||
/**
|
||||
* <code>optional int32 origin_name = 2;</code>
|
||||
*/
|
||||
int getOriginName();
|
||||
|
||||
/**
|
||||
* <code>optional int64 inline_function_symbol = 3;</code>
|
||||
*/
|
||||
boolean hasInlineFunctionSymbol();
|
||||
/**
|
||||
* <code>optional int64 inline_function_symbol = 3;</code>
|
||||
*/
|
||||
long getInlineFunctionSymbol();
|
||||
}
|
||||
-472
@@ -1,472 +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.IrReturnableBlockReturn}
|
||||
*/
|
||||
public final class IrReturnableBlockReturn extends
|
||||
org.jetbrains.kotlin.protobuf.GeneratedMessageLite implements
|
||||
// @@protoc_insertion_point(message_implements:org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn)
|
||||
IrReturnableBlockReturnOrBuilder {
|
||||
// Use IrReturnableBlockReturn.newBuilder() to construct.
|
||||
private IrReturnableBlockReturn(org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder builder) {
|
||||
super(builder);
|
||||
this.unknownFields = builder.getUnknownFields();
|
||||
}
|
||||
private IrReturnableBlockReturn(boolean noInit) { this.unknownFields = org.jetbrains.kotlin.protobuf.ByteString.EMPTY;}
|
||||
|
||||
private static final IrReturnableBlockReturn defaultInstance;
|
||||
public static IrReturnableBlockReturn getDefaultInstance() {
|
||||
return defaultInstance;
|
||||
}
|
||||
|
||||
public IrReturnableBlockReturn getDefaultInstanceForType() {
|
||||
return defaultInstance;
|
||||
}
|
||||
|
||||
private final org.jetbrains.kotlin.protobuf.ByteString unknownFields;
|
||||
private IrReturnableBlockReturn(
|
||||
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;
|
||||
upCnt_ = input.readUInt32();
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression.Builder subBuilder = null;
|
||||
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
||||
subBuilder = value_.toBuilder();
|
||||
}
|
||||
value_ = input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression.PARSER, extensionRegistry);
|
||||
if (subBuilder != null) {
|
||||
subBuilder.mergeFrom(value_);
|
||||
value_ = subBuilder.buildPartial();
|
||||
}
|
||||
bitField0_ |= 0x00000002;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
|
||||
throw e.setUnfinishedMessage(this);
|
||||
} catch (java.io.IOException e) {
|
||||
throw new org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException(
|
||||
e.getMessage()).setUnfinishedMessage(this);
|
||||
} finally {
|
||||
try {
|
||||
unknownFieldsCodedOutput.flush();
|
||||
} catch (java.io.IOException e) {
|
||||
// Should not happen
|
||||
} finally {
|
||||
unknownFields = unknownFieldsOutput.toByteString();
|
||||
}
|
||||
makeExtensionsImmutable();
|
||||
}
|
||||
}
|
||||
public static org.jetbrains.kotlin.protobuf.Parser<IrReturnableBlockReturn> PARSER =
|
||||
new org.jetbrains.kotlin.protobuf.AbstractParser<IrReturnableBlockReturn>() {
|
||||
public IrReturnableBlockReturn parsePartialFrom(
|
||||
org.jetbrains.kotlin.protobuf.CodedInputStream input,
|
||||
org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
|
||||
return new IrReturnableBlockReturn(input, extensionRegistry);
|
||||
}
|
||||
};
|
||||
|
||||
@java.lang.Override
|
||||
public org.jetbrains.kotlin.protobuf.Parser<IrReturnableBlockReturn> getParserForType() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
private int bitField0_;
|
||||
public static final int UPCNT_FIELD_NUMBER = 1;
|
||||
private int upCnt_;
|
||||
/**
|
||||
* <code>required uint32 upCnt = 1;</code>
|
||||
*/
|
||||
public boolean hasUpCnt() {
|
||||
return ((bitField0_ & 0x00000001) == 0x00000001);
|
||||
}
|
||||
/**
|
||||
* <code>required uint32 upCnt = 1;</code>
|
||||
*/
|
||||
public int getUpCnt() {
|
||||
return upCnt_;
|
||||
}
|
||||
|
||||
public static final int VALUE_FIELD_NUMBER = 2;
|
||||
private org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression value_;
|
||||
/**
|
||||
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression value = 2;</code>
|
||||
*/
|
||||
public boolean hasValue() {
|
||||
return ((bitField0_ & 0x00000002) == 0x00000002);
|
||||
}
|
||||
/**
|
||||
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression value = 2;</code>
|
||||
*/
|
||||
public org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression getValue() {
|
||||
return value_;
|
||||
}
|
||||
|
||||
private void initFields() {
|
||||
upCnt_ = 0;
|
||||
value_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression.getDefaultInstance();
|
||||
}
|
||||
private byte memoizedIsInitialized = -1;
|
||||
public final boolean isInitialized() {
|
||||
byte isInitialized = memoizedIsInitialized;
|
||||
if (isInitialized == 1) return true;
|
||||
if (isInitialized == 0) return false;
|
||||
|
||||
if (!hasUpCnt()) {
|
||||
memoizedIsInitialized = 0;
|
||||
return false;
|
||||
}
|
||||
if (!hasValue()) {
|
||||
memoizedIsInitialized = 0;
|
||||
return false;
|
||||
}
|
||||
if (!getValue().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.writeUInt32(1, upCnt_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
||||
output.writeMessage(2, value_);
|
||||
}
|
||||
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
|
||||
.computeUInt32Size(1, upCnt_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||
.computeMessageSize(2, value_);
|
||||
}
|
||||
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.IrReturnableBlockReturn 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.IrReturnableBlockReturn 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.IrReturnableBlockReturn parseFrom(byte[] data)
|
||||
throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn 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.IrReturnableBlockReturn parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return PARSER.parseFrom(input);
|
||||
}
|
||||
public static org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn 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.IrReturnableBlockReturn parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return PARSER.parseDelimitedFrom(input);
|
||||
}
|
||||
public static org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn 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.IrReturnableBlockReturn parseFrom(
|
||||
org.jetbrains.kotlin.protobuf.CodedInputStream input)
|
||||
throws java.io.IOException {
|
||||
return PARSER.parseFrom(input);
|
||||
}
|
||||
public static org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn 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.IrReturnableBlockReturn prototype) {
|
||||
return newBuilder().mergeFrom(prototype);
|
||||
}
|
||||
public Builder toBuilder() { return newBuilder(this); }
|
||||
|
||||
/**
|
||||
* Protobuf type {@code org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder<
|
||||
org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn, Builder>
|
||||
implements
|
||||
// @@protoc_insertion_point(builder_implements:org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn)
|
||||
org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturnOrBuilder {
|
||||
// Construct using org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn.newBuilder()
|
||||
private Builder() {
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
|
||||
private void maybeForceBuilderInitialization() {
|
||||
}
|
||||
private static Builder create() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public Builder clear() {
|
||||
super.clear();
|
||||
upCnt_ = 0;
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
value_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression.getDefaultInstance();
|
||||
bitField0_ = (bitField0_ & ~0x00000002);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder clone() {
|
||||
return create().mergeFrom(buildPartial());
|
||||
}
|
||||
|
||||
public org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn getDefaultInstanceForType() {
|
||||
return org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn.getDefaultInstance();
|
||||
}
|
||||
|
||||
public org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn build() {
|
||||
org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn result = buildPartial();
|
||||
if (!result.isInitialized()) {
|
||||
throw newUninitializedMessageException(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn buildPartial() {
|
||||
org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn result = new org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn(this);
|
||||
int from_bitField0_ = bitField0_;
|
||||
int to_bitField0_ = 0;
|
||||
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
|
||||
to_bitField0_ |= 0x00000001;
|
||||
}
|
||||
result.upCnt_ = upCnt_;
|
||||
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
|
||||
to_bitField0_ |= 0x00000002;
|
||||
}
|
||||
result.value_ = value_;
|
||||
result.bitField0_ = to_bitField0_;
|
||||
return result;
|
||||
}
|
||||
|
||||
public Builder mergeFrom(org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn other) {
|
||||
if (other == org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn.getDefaultInstance()) return this;
|
||||
if (other.hasUpCnt()) {
|
||||
setUpCnt(other.getUpCnt());
|
||||
}
|
||||
if (other.hasValue()) {
|
||||
mergeValue(other.getValue());
|
||||
}
|
||||
setUnknownFields(
|
||||
getUnknownFields().concat(other.unknownFields));
|
||||
return this;
|
||||
}
|
||||
|
||||
public final boolean isInitialized() {
|
||||
if (!hasUpCnt()) {
|
||||
|
||||
return false;
|
||||
}
|
||||
if (!hasValue()) {
|
||||
|
||||
return false;
|
||||
}
|
||||
if (!getValue().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.IrReturnableBlockReturn parsedMessage = null;
|
||||
try {
|
||||
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
|
||||
parsedMessage = (org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn) e.getUnfinishedMessage();
|
||||
throw e;
|
||||
} finally {
|
||||
if (parsedMessage != null) {
|
||||
mergeFrom(parsedMessage);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
private int bitField0_;
|
||||
|
||||
private int upCnt_ ;
|
||||
/**
|
||||
* <code>required uint32 upCnt = 1;</code>
|
||||
*/
|
||||
public boolean hasUpCnt() {
|
||||
return ((bitField0_ & 0x00000001) == 0x00000001);
|
||||
}
|
||||
/**
|
||||
* <code>required uint32 upCnt = 1;</code>
|
||||
*/
|
||||
public int getUpCnt() {
|
||||
return upCnt_;
|
||||
}
|
||||
/**
|
||||
* <code>required uint32 upCnt = 1;</code>
|
||||
*/
|
||||
public Builder setUpCnt(int value) {
|
||||
bitField0_ |= 0x00000001;
|
||||
upCnt_ = value;
|
||||
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>required uint32 upCnt = 1;</code>
|
||||
*/
|
||||
public Builder clearUpCnt() {
|
||||
bitField0_ = (bitField0_ & ~0x00000001);
|
||||
upCnt_ = 0;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
private org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression value_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression.getDefaultInstance();
|
||||
/**
|
||||
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression value = 2;</code>
|
||||
*/
|
||||
public boolean hasValue() {
|
||||
return ((bitField0_ & 0x00000002) == 0x00000002);
|
||||
}
|
||||
/**
|
||||
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression value = 2;</code>
|
||||
*/
|
||||
public org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression getValue() {
|
||||
return value_;
|
||||
}
|
||||
/**
|
||||
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression value = 2;</code>
|
||||
*/
|
||||
public Builder setValue(org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
value_ = value;
|
||||
|
||||
bitField0_ |= 0x00000002;
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression value = 2;</code>
|
||||
*/
|
||||
public Builder setValue(
|
||||
org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression.Builder builderForValue) {
|
||||
value_ = builderForValue.build();
|
||||
|
||||
bitField0_ |= 0x00000002;
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression value = 2;</code>
|
||||
*/
|
||||
public Builder mergeValue(org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression value) {
|
||||
if (((bitField0_ & 0x00000002) == 0x00000002) &&
|
||||
value_ != org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression.getDefaultInstance()) {
|
||||
value_ =
|
||||
org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression.newBuilder(value_).mergeFrom(value).buildPartial();
|
||||
} else {
|
||||
value_ = value;
|
||||
}
|
||||
|
||||
bitField0_ |= 0x00000002;
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression value = 2;</code>
|
||||
*/
|
||||
public Builder clearValue() {
|
||||
value_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression.getDefaultInstance();
|
||||
|
||||
bitField0_ = (bitField0_ & ~0x00000002);
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn)
|
||||
}
|
||||
|
||||
static {
|
||||
defaultInstance = new IrReturnableBlockReturn(true);
|
||||
defaultInstance.initFields();
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn)
|
||||
}
|
||||
-27
@@ -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 IrReturnableBlockReturnOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.backend.common.serialization.proto.IrReturnableBlockReturn)
|
||||
org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder {
|
||||
|
||||
/**
|
||||
* <code>required uint32 upCnt = 1;</code>
|
||||
*/
|
||||
boolean hasUpCnt();
|
||||
/**
|
||||
* <code>required uint32 upCnt = 1;</code>
|
||||
*/
|
||||
int getUpCnt();
|
||||
|
||||
/**
|
||||
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression value = 2;</code>
|
||||
*/
|
||||
boolean hasValue();
|
||||
/**
|
||||
* <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression value = 2;</code>
|
||||
*/
|
||||
org.jetbrains.kotlin.backend.common.serialization.proto.IrExpression getValue();
|
||||
}
|
||||
+1
-1
@@ -582,4 +582,4 @@ public final class IrSetField extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrSetField)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -538,4 +538,4 @@ public final class IrSetValue extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrSetValue)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -942,4 +942,4 @@ public final class IrSimpleType extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -469,4 +469,4 @@ public final class IrSpreadElement extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrSpreadElement)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1137,4 +1137,4 @@ public final class IrStatement extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrStatement)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -476,4 +476,4 @@ public final class IrStringConcat extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrStringConcat)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -358,4 +358,4 @@ public final class IrSyntheticBody extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrSyntheticBody)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -57,4 +57,4 @@ public enum IrSyntheticBodyKind
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(enum_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrSyntheticBodyKind)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -392,4 +392,4 @@ public final class IrThrow extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrThrow)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -717,4 +717,4 @@ public final class IrTry extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrTry)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -796,4 +796,4 @@ public final class IrType extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrType)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -825,4 +825,4 @@ public final class IrTypeAbbreviation extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAbbreviation)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -677,4 +677,4 @@ public final class IrTypeAlias extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeAlias)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -556,4 +556,4 @@ public final class IrTypeOp extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeOp)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -138,4 +138,4 @@ public enum IrTypeOperator
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(enum_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeOperator)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-139
@@ -92,16 +92,6 @@ public final class IrTypeParameter extends
|
||||
input.popLimit(limit);
|
||||
break;
|
||||
}
|
||||
case 832: {
|
||||
bitField0_ |= 0x00000004;
|
||||
index_ = input.readInt32();
|
||||
break;
|
||||
}
|
||||
case 840: {
|
||||
bitField0_ |= 0x00000008;
|
||||
isGlobal_ = input.readBool();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
|
||||
@@ -192,42 +182,10 @@ public final class IrTypeParameter extends
|
||||
}
|
||||
private int superTypeMemoizedSerializedSize = -1;
|
||||
|
||||
public static final int INDEX_FIELD_NUMBER = 104;
|
||||
private int index_;
|
||||
/**
|
||||
* <code>optional int32 index = 104;</code>
|
||||
*/
|
||||
public boolean hasIndex() {
|
||||
return ((bitField0_ & 0x00000004) == 0x00000004);
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 index = 104;</code>
|
||||
*/
|
||||
public int getIndex() {
|
||||
return index_;
|
||||
}
|
||||
|
||||
public static final int ISGLOBAL_FIELD_NUMBER = 105;
|
||||
private boolean isGlobal_;
|
||||
/**
|
||||
* <code>optional bool isGlobal = 105;</code>
|
||||
*/
|
||||
public boolean hasIsGlobal() {
|
||||
return ((bitField0_ & 0x00000008) == 0x00000008);
|
||||
}
|
||||
/**
|
||||
* <code>optional bool isGlobal = 105;</code>
|
||||
*/
|
||||
public boolean getIsGlobal() {
|
||||
return isGlobal_;
|
||||
}
|
||||
|
||||
private void initFields() {
|
||||
base_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclarationBase.getDefaultInstance();
|
||||
name_ = 0;
|
||||
superType_ = java.util.Collections.emptyList();
|
||||
index_ = 0;
|
||||
isGlobal_ = false;
|
||||
}
|
||||
private byte memoizedIsInitialized = -1;
|
||||
public final boolean isInitialized() {
|
||||
@@ -267,12 +225,6 @@ public final class IrTypeParameter extends
|
||||
for (int i = 0; i < superType_.size(); i++) {
|
||||
output.writeInt32NoTag(superType_.get(i));
|
||||
}
|
||||
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
||||
output.writeInt32(104, index_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000008) == 0x00000008)) {
|
||||
output.writeBool(105, isGlobal_);
|
||||
}
|
||||
output.writeRawBytes(unknownFields);
|
||||
}
|
||||
|
||||
@@ -304,14 +256,6 @@ public final class IrTypeParameter extends
|
||||
}
|
||||
superTypeMemoizedSerializedSize = dataSize;
|
||||
}
|
||||
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||
.computeInt32Size(104, index_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000008) == 0x00000008)) {
|
||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||
.computeBoolSize(105, isGlobal_);
|
||||
}
|
||||
size += unknownFields.size();
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
@@ -412,10 +356,6 @@ public final class IrTypeParameter extends
|
||||
bitField0_ = (bitField0_ & ~0x00000002);
|
||||
superType_ = java.util.Collections.emptyList();
|
||||
bitField0_ = (bitField0_ & ~0x00000004);
|
||||
index_ = 0;
|
||||
bitField0_ = (bitField0_ & ~0x00000008);
|
||||
isGlobal_ = false;
|
||||
bitField0_ = (bitField0_ & ~0x00000010);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -452,14 +392,6 @@ public final class IrTypeParameter extends
|
||||
bitField0_ = (bitField0_ & ~0x00000004);
|
||||
}
|
||||
result.superType_ = superType_;
|
||||
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
|
||||
to_bitField0_ |= 0x00000004;
|
||||
}
|
||||
result.index_ = index_;
|
||||
if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
|
||||
to_bitField0_ |= 0x00000008;
|
||||
}
|
||||
result.isGlobal_ = isGlobal_;
|
||||
result.bitField0_ = to_bitField0_;
|
||||
return result;
|
||||
}
|
||||
@@ -482,12 +414,6 @@ public final class IrTypeParameter extends
|
||||
}
|
||||
|
||||
}
|
||||
if (other.hasIndex()) {
|
||||
setIndex(other.getIndex());
|
||||
}
|
||||
if (other.hasIsGlobal()) {
|
||||
setIsGlobal(other.getIsGlobal());
|
||||
}
|
||||
setUnknownFields(
|
||||
getUnknownFields().concat(other.unknownFields));
|
||||
return this;
|
||||
@@ -686,70 +612,6 @@ public final class IrTypeParameter extends
|
||||
return this;
|
||||
}
|
||||
|
||||
private int index_ ;
|
||||
/**
|
||||
* <code>optional int32 index = 104;</code>
|
||||
*/
|
||||
public boolean hasIndex() {
|
||||
return ((bitField0_ & 0x00000008) == 0x00000008);
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 index = 104;</code>
|
||||
*/
|
||||
public int getIndex() {
|
||||
return index_;
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 index = 104;</code>
|
||||
*/
|
||||
public Builder setIndex(int value) {
|
||||
bitField0_ |= 0x00000008;
|
||||
index_ = value;
|
||||
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 index = 104;</code>
|
||||
*/
|
||||
public Builder clearIndex() {
|
||||
bitField0_ = (bitField0_ & ~0x00000008);
|
||||
index_ = 0;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
private boolean isGlobal_ ;
|
||||
/**
|
||||
* <code>optional bool isGlobal = 105;</code>
|
||||
*/
|
||||
public boolean hasIsGlobal() {
|
||||
return ((bitField0_ & 0x00000010) == 0x00000010);
|
||||
}
|
||||
/**
|
||||
* <code>optional bool isGlobal = 105;</code>
|
||||
*/
|
||||
public boolean getIsGlobal() {
|
||||
return isGlobal_;
|
||||
}
|
||||
/**
|
||||
* <code>optional bool isGlobal = 105;</code>
|
||||
*/
|
||||
public Builder setIsGlobal(boolean value) {
|
||||
bitField0_ |= 0x00000010;
|
||||
isGlobal_ = value;
|
||||
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional bool isGlobal = 105;</code>
|
||||
*/
|
||||
public Builder clearIsGlobal() {
|
||||
bitField0_ = (bitField0_ & ~0x00000010);
|
||||
isGlobal_ = false;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeParameter)
|
||||
}
|
||||
|
||||
@@ -759,4 +621,4 @@ public final class IrTypeParameter extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrTypeParameter)
|
||||
}
|
||||
}
|
||||
|
||||
-18
@@ -37,22 +37,4 @@ public interface IrTypeParameterOrBuilder extends
|
||||
* <code>repeated int32 super_type = 3 [packed = true];</code>
|
||||
*/
|
||||
int getSuperType(int index);
|
||||
|
||||
/**
|
||||
* <code>optional int32 index = 104;</code>
|
||||
*/
|
||||
boolean hasIndex();
|
||||
/**
|
||||
* <code>optional int32 index = 104;</code>
|
||||
*/
|
||||
int getIndex();
|
||||
|
||||
/**
|
||||
* <code>optional bool isGlobal = 105;</code>
|
||||
*/
|
||||
boolean hasIsGlobal();
|
||||
/**
|
||||
* <code>optional bool isGlobal = 105;</code>
|
||||
*/
|
||||
boolean getIsGlobal();
|
||||
}
|
||||
+1
-70
@@ -81,11 +81,6 @@ public final class IrValueParameter extends
|
||||
defaultValue_ = input.readInt32();
|
||||
break;
|
||||
}
|
||||
case 840: {
|
||||
bitField0_ |= 0x00000010;
|
||||
index_ = input.readInt32();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
|
||||
@@ -180,27 +175,11 @@ public final class IrValueParameter extends
|
||||
return defaultValue_;
|
||||
}
|
||||
|
||||
public static final int INDEX_FIELD_NUMBER = 105;
|
||||
private int index_;
|
||||
/**
|
||||
* <code>optional int32 index = 105;</code>
|
||||
*/
|
||||
public boolean hasIndex() {
|
||||
return ((bitField0_ & 0x00000010) == 0x00000010);
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 index = 105;</code>
|
||||
*/
|
||||
public int getIndex() {
|
||||
return index_;
|
||||
}
|
||||
|
||||
private void initFields() {
|
||||
base_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclarationBase.getDefaultInstance();
|
||||
nameType_ = 0L;
|
||||
varargElementType_ = 0;
|
||||
defaultValue_ = 0;
|
||||
index_ = 0;
|
||||
}
|
||||
private byte memoizedIsInitialized = -1;
|
||||
public final boolean isInitialized() {
|
||||
@@ -239,9 +218,6 @@ public final class IrValueParameter extends
|
||||
if (((bitField0_ & 0x00000008) == 0x00000008)) {
|
||||
output.writeInt32(4, defaultValue_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000010) == 0x00000010)) {
|
||||
output.writeInt32(105, index_);
|
||||
}
|
||||
output.writeRawBytes(unknownFields);
|
||||
}
|
||||
|
||||
@@ -267,10 +243,6 @@ public final class IrValueParameter extends
|
||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||
.computeInt32Size(4, defaultValue_);
|
||||
}
|
||||
if (((bitField0_ & 0x00000010) == 0x00000010)) {
|
||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||
.computeInt32Size(105, index_);
|
||||
}
|
||||
size += unknownFields.size();
|
||||
memoizedSerializedSize = size;
|
||||
return size;
|
||||
@@ -373,8 +345,6 @@ public final class IrValueParameter extends
|
||||
bitField0_ = (bitField0_ & ~0x00000004);
|
||||
defaultValue_ = 0;
|
||||
bitField0_ = (bitField0_ & ~0x00000008);
|
||||
index_ = 0;
|
||||
bitField0_ = (bitField0_ & ~0x00000010);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -414,10 +384,6 @@ public final class IrValueParameter extends
|
||||
to_bitField0_ |= 0x00000008;
|
||||
}
|
||||
result.defaultValue_ = defaultValue_;
|
||||
if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
|
||||
to_bitField0_ |= 0x00000010;
|
||||
}
|
||||
result.index_ = index_;
|
||||
result.bitField0_ = to_bitField0_;
|
||||
return result;
|
||||
}
|
||||
@@ -436,9 +402,6 @@ public final class IrValueParameter extends
|
||||
if (other.hasDefaultValue()) {
|
||||
setDefaultValue(other.getDefaultValue());
|
||||
}
|
||||
if (other.hasIndex()) {
|
||||
setIndex(other.getIndex());
|
||||
}
|
||||
setUnknownFields(
|
||||
getUnknownFields().concat(other.unknownFields));
|
||||
return this;
|
||||
@@ -635,38 +598,6 @@ public final class IrValueParameter extends
|
||||
return this;
|
||||
}
|
||||
|
||||
private int index_ ;
|
||||
/**
|
||||
* <code>optional int32 index = 105;</code>
|
||||
*/
|
||||
public boolean hasIndex() {
|
||||
return ((bitField0_ & 0x00000010) == 0x00000010);
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 index = 105;</code>
|
||||
*/
|
||||
public int getIndex() {
|
||||
return index_;
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 index = 105;</code>
|
||||
*/
|
||||
public Builder setIndex(int value) {
|
||||
bitField0_ |= 0x00000010;
|
||||
index_ = value;
|
||||
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <code>optional int32 index = 105;</code>
|
||||
*/
|
||||
public Builder clearIndex() {
|
||||
bitField0_ = (bitField0_ & ~0x00000010);
|
||||
index_ = 0;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrValueParameter)
|
||||
}
|
||||
|
||||
@@ -676,4 +607,4 @@ public final class IrValueParameter extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrValueParameter)
|
||||
}
|
||||
}
|
||||
|
||||
-9
@@ -42,13 +42,4 @@ public interface IrValueParameterOrBuilder extends
|
||||
* <code>optional int32 default_value = 4;</code>
|
||||
*/
|
||||
int getDefaultValue();
|
||||
|
||||
/**
|
||||
* <code>optional int32 index = 105;</code>
|
||||
*/
|
||||
boolean hasIndex();
|
||||
/**
|
||||
* <code>optional int32 index = 105;</code>
|
||||
*/
|
||||
int getIndex();
|
||||
}
|
||||
+1
-1
@@ -556,4 +556,4 @@ public final class IrVararg extends
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.IrVararg)
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user