[IR] Cleanup ir serialization
This commit is contained in:
@@ -32,7 +32,6 @@ interface Mapping {
|
|||||||
}
|
}
|
||||||
|
|
||||||
abstract val keys: Set<K>
|
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>
|
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 : IrDeclaration> newDeclarationToDeclarationMapping(): Mapping.Delegate<K, V> = newMappingImpl()
|
||||||
|
|
||||||
override fun <K : IrDeclaration, V : Collection<IrDeclaration>> newDeclarationToDeclarationCollectionMapping(): 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>
|
override val keys: Set<K>
|
||||||
get() = map.keys
|
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.ModuleDescriptor
|
||||||
import org.jetbrains.kotlin.descriptors.PropertyDescriptor
|
import org.jetbrains.kotlin.descriptors.PropertyDescriptor
|
||||||
import org.jetbrains.kotlin.descriptors.SimpleFunctionDescriptor
|
import org.jetbrains.kotlin.descriptors.SimpleFunctionDescriptor
|
||||||
import org.jetbrains.kotlin.descriptors.impl.EmptyPackageFragmentDescriptor
|
|
||||||
import org.jetbrains.kotlin.incremental.components.NoLookupLocation
|
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.codegen.JsGenerationGranularity
|
||||||
import org.jetbrains.kotlin.ir.backend.js.ir.JsIrBuilder
|
import org.jetbrains.kotlin.ir.backend.js.ir.JsIrBuilder
|
||||||
import org.jetbrains.kotlin.ir.backend.js.lower.JsInnerClassesSupport
|
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.builders.declarations.addFunction
|
||||||
import org.jetbrains.kotlin.ir.declarations.*
|
import org.jetbrains.kotlin.ir.declarations.*
|
||||||
import org.jetbrains.kotlin.ir.declarations.impl.IrExternalPackageFragmentImpl
|
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.IrCall
|
||||||
import org.jetbrains.kotlin.ir.expressions.IrExpression
|
import org.jetbrains.kotlin.ir.expressions.IrExpression
|
||||||
import org.jetbrains.kotlin.ir.symbols.IrClassSymbol
|
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.symbols.impl.DescriptorlessExternalPackageFragmentSymbol
|
||||||
import org.jetbrains.kotlin.ir.types.*
|
import org.jetbrains.kotlin.ir.types.*
|
||||||
import org.jetbrains.kotlin.ir.types.impl.IrDynamicTypeImpl
|
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.ErrorTolerancePolicy
|
||||||
import org.jetbrains.kotlin.js.config.JSConfigurationKeys
|
import org.jetbrains.kotlin.js.config.JSConfigurationKeys
|
||||||
import org.jetbrains.kotlin.js.config.RuntimeDiagnostic
|
import org.jetbrains.kotlin.js.config.RuntimeDiagnostic
|
||||||
@@ -58,7 +60,7 @@ class JsIrBackendContext(
|
|||||||
val baseClassIntoMetadata: Boolean = false,
|
val baseClassIntoMetadata: Boolean = false,
|
||||||
val safeExternalBoolean: Boolean = false,
|
val safeExternalBoolean: Boolean = false,
|
||||||
val safeExternalBooleanDiagnostic: RuntimeDiagnostic? = null,
|
val safeExternalBooleanDiagnostic: RuntimeDiagnostic? = null,
|
||||||
override val mapping: JsMapping = JsMapping(symbolTable.irFactory),
|
override val mapping: JsMapping = JsMapping(),
|
||||||
val granularity: JsGenerationGranularity = JsGenerationGranularity.WHOLE_PROGRAM,
|
val granularity: JsGenerationGranularity = JsGenerationGranularity.WHOLE_PROGRAM,
|
||||||
val icCompatibleIr2Js: Boolean = false,
|
val icCompatibleIr2Js: Boolean = false,
|
||||||
) : JsCommonBackendContext {
|
) : 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")
|
val md5 = MessageDigest.getInstance("MD5")
|
||||||
|
|
||||||
for (ul in additional) {
|
|
||||||
md5.update(ul.toLong().toByteArray())
|
|
||||||
}
|
|
||||||
|
|
||||||
fun File.process(prefix: String = "") {
|
fun File.process(prefix: String = "") {
|
||||||
if (isDirectory) {
|
if (isDirectory) {
|
||||||
this.listFiles()!!.sortedBy { it.name }.forEach {
|
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 =
|
override val coroutineSymbols =
|
||||||
JsCommonCoroutineSymbols(symbolTable, module,this)
|
JsCommonCoroutineSymbols(symbolTable, module,this)
|
||||||
|
|||||||
@@ -5,15 +5,9 @@
|
|||||||
|
|
||||||
package org.jetbrains.kotlin.ir.declarations
|
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
|
import org.jetbrains.kotlin.ir.util.IdSignature
|
||||||
|
|
||||||
open class StageController(open val currentStage: Int = 0) {
|
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 fun <T> withStage(stage: Int, fn: () -> T): T = fn()
|
||||||
|
|
||||||
open val bodiesEnabled: Boolean get() = true
|
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 <T> bodyLowering(fn: () -> T): T = fn()
|
||||||
|
|
||||||
open fun canModify(element: IrElement): Boolean = true
|
|
||||||
|
|
||||||
open fun <T> unrestrictDeclarationListsAccess(fn: () -> T): T = fn()
|
open fun <T> unrestrictDeclarationListsAccess(fn: () -> T): T = fn()
|
||||||
|
|
||||||
open fun canAccessDeclarationsOf(irClass: IrClass): Boolean = true
|
open fun canAccessDeclarationsOf(irClass: IrClass): Boolean = true
|
||||||
|
|||||||
@@ -41,7 +41,6 @@ message FileLocalIdSignature {
|
|||||||
required int32 container = 1;
|
required int32 container = 1;
|
||||||
required int64 local_id = 2;
|
required int64 local_id = 2;
|
||||||
optional int32 debug_info = 3;
|
optional int32 debug_info = 3;
|
||||||
optional int32 file = 101;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
message CompositeSignature {
|
message CompositeSignature {
|
||||||
@@ -57,12 +56,6 @@ message LocalSignature {
|
|||||||
|
|
||||||
message FileSignature {}
|
message FileSignature {}
|
||||||
|
|
||||||
message LoweredIdSignature {
|
|
||||||
required int32 parent_signature = 1;
|
|
||||||
required int32 stage = 2;
|
|
||||||
required int32 index = 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
message IdSignature {
|
message IdSignature {
|
||||||
oneof idSig {
|
oneof idSig {
|
||||||
CommonIdSignature public_sig = 1;
|
CommonIdSignature public_sig = 1;
|
||||||
@@ -72,9 +65,6 @@ message IdSignature {
|
|||||||
CompositeSignature composite_sig = 5;
|
CompositeSignature composite_sig = 5;
|
||||||
LocalSignature local_sig = 6;
|
LocalSignature local_sig = 6;
|
||||||
FileSignature file_sig = 7;
|
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;
|
optional int32 origin_name = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message IrReturnableBlock {
|
|
||||||
repeated IrStatement statement = 1;
|
|
||||||
optional int32 origin_name = 2;
|
|
||||||
optional int64 inline_function_symbol = 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
message MemberAccessCommon {
|
message MemberAccessCommon {
|
||||||
optional IrExpression dispatch_receiver = 1;
|
optional IrExpression dispatch_receiver = 1;
|
||||||
optional IrExpression extension_receiver = 2;
|
optional IrExpression extension_receiver = 2;
|
||||||
@@ -174,10 +158,6 @@ message IrFunctionReference {
|
|||||||
optional int64 reflection_target_symbol = 4;
|
optional int64 reflection_target_symbol = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
message IrRawFunctionReference {
|
|
||||||
required int64 symbol = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
message IrLocalDelegatedPropertyReference {
|
message IrLocalDelegatedPropertyReference {
|
||||||
required int64 delegate = 1;
|
required int64 delegate = 1;
|
||||||
optional int64 getter = 2;
|
optional int64 getter = 2;
|
||||||
@@ -284,11 +264,6 @@ message IrReturn {
|
|||||||
required IrExpression value = 2;
|
required IrExpression value = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message IrReturnableBlockReturn {
|
|
||||||
required uint32 upCnt = 1;
|
|
||||||
required IrExpression value = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
message IrSetField {
|
message IrSetField {
|
||||||
required FieldAccessCommon field_access = 1;
|
required FieldAccessCommon field_access = 1;
|
||||||
required IrExpression value = 2;
|
required IrExpression value = 2;
|
||||||
@@ -450,10 +425,6 @@ message IrOperation {
|
|||||||
// Error code
|
// Error code
|
||||||
IrErrorExpression error_expression = 34;
|
IrErrorExpression error_expression = 34;
|
||||||
IrErrorCallExpression error_call_expression = 35;
|
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;
|
required int64 name_type = 2;
|
||||||
optional int32 vararg_element_type = 3;
|
optional int32 vararg_element_type = 3;
|
||||||
optional int32 default_value = 4;
|
optional int32 default_value = 4;
|
||||||
optional int32 index = 105;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
message IrTypeParameter {
|
message IrTypeParameter {
|
||||||
required IrDeclarationBase base = 1;
|
required IrDeclarationBase base = 1;
|
||||||
required int32 name = 2;
|
required int32 name = 2;
|
||||||
repeated int32 super_type = 3 [packed=true];
|
repeated int32 super_type = 3 [packed=true];
|
||||||
optional int32 index = 104;
|
|
||||||
optional bool isGlobal = 105;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
message IrClass {
|
message IrClass {
|
||||||
@@ -653,8 +621,3 @@ message IrInlineClassRepresentation {
|
|||||||
required int32 underlying_property_name = 1;
|
required int32 underlying_property_name = 1;
|
||||||
required int32 underlying_property_type = 2;
|
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.FileSignature as ProtoFileSignature
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature as ProtoIdSignature
|
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.LocalSignature as ProtoLocalSignature
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature as ProtoLoweredIdSignature
|
|
||||||
|
|
||||||
class IdSignatureDeserializer(private val libraryFile: IrLibraryFile, fileSymbol: IrFileSymbol?) {
|
class IdSignatureDeserializer(private val libraryFile: IrLibraryFile, fileSymbol: IrFileSymbol?) {
|
||||||
|
|
||||||
@@ -63,10 +62,6 @@ class IdSignatureDeserializer(private val libraryFile: IrLibraryFile, fileSymbol
|
|||||||
return IdSignature.ScopeLocalDeclaration(proto)
|
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 {
|
private fun deserializeCompositeIdSignature(proto: ProtoCompositeSignature): IdSignature.CompositeSignature {
|
||||||
val containerSig = deserializeIdSignature(proto.containerSig)
|
val containerSig = deserializeIdSignature(proto.containerSig)
|
||||||
val innerSig = deserializeIdSignature(proto.innerSig)
|
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.COMPOSITE_SIG -> deserializeCompositeIdSignature(proto.compositeSig)
|
||||||
ProtoIdSignature.IdSigCase.LOCAL_SIG -> deserializeLocalIdSignature(proto.localSig)
|
ProtoIdSignature.IdSigCase.LOCAL_SIG -> deserializeLocalIdSignature(proto.localSig)
|
||||||
ProtoIdSignature.IdSigCase.FILE_SIG -> deserializeFileIdSignature(proto.fileSig)
|
ProtoIdSignature.IdSigCase.FILE_SIG -> deserializeFileIdSignature(proto.fileSig)
|
||||||
// IR IC part
|
|
||||||
ProtoIdSignature.IdSigCase.IC_SIG -> deserializeLoweredDeclarationSignature(proto.icSig)
|
|
||||||
else -> error("Unexpected IdSignature kind: ${proto.idSigCase}")
|
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.encodings.*
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrConst.ValueCase.*
|
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.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.IrStatement.StatementCase
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrVarargElement.VarargElementCase
|
import org.jetbrains.kotlin.backend.common.serialization.proto.IrVarargElement.VarargElementCase
|
||||||
import org.jetbrains.kotlin.ir.IrBuiltIns
|
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.*
|
||||||
import org.jetbrains.kotlin.ir.expressions.impl.*
|
import org.jetbrains.kotlin.ir.expressions.impl.*
|
||||||
import org.jetbrains.kotlin.ir.symbols.*
|
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.*
|
||||||
import org.jetbrains.kotlin.ir.types.impl.*
|
import org.jetbrains.kotlin.ir.types.impl.*
|
||||||
import org.jetbrains.kotlin.ir.util.parentAsClass
|
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.IrLocalDelegatedPropertyReference as ProtoLocalDelegatedPropertyReference
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrOperation as ProtoOperation
|
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.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.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.IrSetField as ProtoSetField
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrSetValue as ProtoSetValue
|
import org.jetbrains.kotlin.backend.common.serialization.proto.IrSetValue as ProtoSetValue
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrSpreadElement as ProtoSpreadElement
|
import org.jetbrains.kotlin.backend.common.serialization.proto.IrSpreadElement as ProtoSpreadElement
|
||||||
@@ -80,9 +76,6 @@ class IrBodyDeserializer(
|
|||||||
private val irFactory: IrFactory,
|
private val irFactory: IrFactory,
|
||||||
private val libraryFile: IrLibraryFile,
|
private val libraryFile: IrLibraryFile,
|
||||||
private val declarationDeserializer: IrDeclarationDeserializer,
|
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>()
|
private val fileLoops = mutableMapOf<Int, IrLoop>()
|
||||||
@@ -164,40 +157,6 @@ class IrBodyDeserializer(
|
|||||||
return IrBlockImpl(start, end, type, origin, statements)
|
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) {
|
private fun deserializeMemberAccessCommon(access: IrMemberAccessExpression<*>, proto: ProtoMemberAccessCommon) {
|
||||||
|
|
||||||
proto.valueArgumentList.mapIndexed { i, arg ->
|
proto.valueArgumentList.mapIndexed { i, arg ->
|
||||||
@@ -281,7 +240,7 @@ class IrBodyDeserializer(
|
|||||||
return deserializeConstructorCall(proto, 0, 0, irType).also { irType.irConstructorCall = it }
|
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
|
val symbol = declarationDeserializer.deserializeIrSymbolAndRemap(proto.symbol) as IrConstructorSymbol
|
||||||
return IrConstructorCallImpl(
|
return IrConstructorCallImpl(
|
||||||
start, end, type,
|
start, end, type,
|
||||||
@@ -429,14 +388,6 @@ class IrBodyDeserializer(
|
|||||||
return callable
|
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 {
|
private fun deserializeGetClass(proto: ProtoGetClass, start: Int, end: Int, type: IrType): IrGetClass {
|
||||||
val argument = deserializeExpression(proto.argument)
|
val argument = deserializeExpression(proto.argument)
|
||||||
return IrGetClassImpl(start, end, type, argument)
|
return IrGetClassImpl(start, end, type, argument)
|
||||||
@@ -547,12 +498,6 @@ class IrBodyDeserializer(
|
|||||||
return IrReturnImpl(start, end, builtIns.nothingType, symbol, value)
|
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 {
|
private fun deserializeSetField(proto: ProtoSetField, start: Int, end: Int): IrSetField {
|
||||||
val access = proto.fieldAccess
|
val access = proto.fieldAccess
|
||||||
val symbol = declarationDeserializer.deserializeIrSymbolAndRemap(access.symbol) as IrFieldSymbol
|
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 {
|
private fun deserializeBreak(proto: ProtoBreak, start: Int, end: Int, type: IrType): IrBreak {
|
||||||
val label = if (proto.hasLabel()) libraryFile.string(proto.label) else null
|
val label = if (proto.hasLabel()) libraryFile.string(proto.label) else null
|
||||||
val loopId = proto.loopId
|
val loopId = proto.loopId
|
||||||
val loop = deserializeLoopHeader(loopId) {
|
val loop = deserializeLoopHeader(loopId) { error("break clause before loop header") }
|
||||||
if (allowErrorLoopIndices) {
|
|
||||||
IrWhileLoopImpl(-1, -1, builtIns.unitType, null)
|
|
||||||
} else {
|
|
||||||
error("break clause before loop header")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
val irBreak = IrBreakImpl(start, end, type, loop)
|
val irBreak = IrBreakImpl(start, end, type, loop)
|
||||||
irBreak.label = label
|
irBreak.label = label
|
||||||
|
|
||||||
@@ -792,13 +731,7 @@ class IrBodyDeserializer(
|
|||||||
private fun deserializeContinue(proto: ProtoContinue, start: Int, end: Int, type: IrType): IrContinue {
|
private fun deserializeContinue(proto: ProtoContinue, start: Int, end: Int, type: IrType): IrContinue {
|
||||||
val label = if (proto.hasLabel()) libraryFile.string(proto.label) else null
|
val label = if (proto.hasLabel()) libraryFile.string(proto.label) else null
|
||||||
val loopId = proto.loopId
|
val loopId = proto.loopId
|
||||||
val loop = deserializeLoopHeader(loopId) {
|
val loop = deserializeLoopHeader(loopId) { error("break clause before loop header") }
|
||||||
if (allowErrorLoopIndices) {
|
|
||||||
IrWhileLoopImpl(-1, -1, builtIns.unitType, null)
|
|
||||||
} else {
|
|
||||||
error("break clause before loop header")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
val irContinue = IrContinueImpl(start, end, type, loop)
|
val irContinue = IrContinueImpl(start, end, type, loop)
|
||||||
irContinue.label = label
|
irContinue.label = label
|
||||||
|
|
||||||
@@ -874,9 +807,6 @@ class IrBodyDeserializer(
|
|||||||
ERROR_EXPRESSION -> deserializeErrorExpression(proto.errorExpression, start, end, type)
|
ERROR_EXPRESSION -> deserializeErrorExpression(proto.errorExpression, start, end, type)
|
||||||
ERROR_CALL_EXPRESSION -> deserializeErrorCallExpression(proto.errorCallExpression, start, end, type)
|
ERROR_CALL_EXPRESSION -> deserializeErrorCallExpression(proto.errorCallExpression, start, end, type)
|
||||||
OPERATION_NOT_SET -> error("Expression deserialization not implemented: ${proto.operationCase}")
|
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 {
|
fun deserializeExpression(proto: ProtoExpression): IrExpression {
|
||||||
@@ -890,16 +820,23 @@ class IrBodyDeserializer(
|
|||||||
return expression
|
return expression
|
||||||
}
|
}
|
||||||
|
|
||||||
fun deserializeIrStatementOrigin(protoName: Int): IrStatementOrigin {
|
private fun deserializeIrStatementOrigin(protoName: Int): IrStatementOrigin {
|
||||||
return libraryFile.string(protoName).let {
|
return libraryFile.string(protoName).let {
|
||||||
val componentPrefix = "COMPONENT_"
|
val componentPrefix = "COMPONENT_"
|
||||||
when {
|
when {
|
||||||
it.startsWith(componentPrefix) -> {
|
it.startsWith(componentPrefix) -> {
|
||||||
IrStatementOrigin.COMPONENT_N.withIndex(it.removePrefix(componentPrefix).toInt())
|
IrStatementOrigin.COMPONENT_N.withIndex(it.removePrefix(componentPrefix).toInt())
|
||||||
}
|
}
|
||||||
else -> statementOriginIndex[it] ?: if (allowErrorStatementOrigins) object :
|
else -> statementOriginIndex[it] ?: error("Unexpected statement origin: $it")
|
||||||
IrStatementOriginImpl(it) {} else 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,
|
private val symbolTable: SymbolTable,
|
||||||
val irFactory: IrFactory,
|
val irFactory: IrFactory,
|
||||||
private val libraryFile: IrLibraryFile,
|
private val libraryFile: IrLibraryFile,
|
||||||
private val parent: IrDeclarationParent,
|
parent: IrDeclarationParent,
|
||||||
val allowErrorNodes: Boolean,
|
val allowErrorNodes: Boolean,
|
||||||
private val deserializeInlineFunctions: Boolean,
|
private val deserializeInlineFunctions: Boolean,
|
||||||
private var deserializeBodies: Boolean,
|
private var deserializeBodies: Boolean,
|
||||||
val symbolDeserializer: IrSymbolDeserializer,
|
val symbolDeserializer: IrSymbolDeserializer,
|
||||||
private val platformFakeOverrideClassFilter: FakeOverrideClassFilter,
|
private val platformFakeOverrideClassFilter: FakeOverrideClassFilter,
|
||||||
private val fakeOverrideBuilder: FakeOverrideBuilder,
|
private val fakeOverrideBuilder: FakeOverrideBuilder,
|
||||||
private val skipMutableState: Boolean = false,
|
|
||||||
additionalStatementOriginIndex: Map<String, IrStatementOrigin> = emptyMap(),
|
|
||||||
allowErrorStatementOrigins: Boolean = false,
|
|
||||||
private val compatibilityMode: CompatibilityMode,
|
private val compatibilityMode: CompatibilityMode,
|
||||||
private val allowRedeclaration: Boolean = false,
|
|
||||||
allowErrorLoopIndices: Boolean = false,
|
|
||||||
) {
|
) {
|
||||||
|
|
||||||
val bodyDeserializer = IrBodyDeserializer(
|
private val bodyDeserializer = IrBodyDeserializer(builtIns, allowErrorNodes, irFactory, libraryFile, this)
|
||||||
builtIns,
|
|
||||||
allowErrorNodes,
|
|
||||||
irFactory,
|
|
||||||
libraryFile,
|
|
||||||
this,
|
|
||||||
statementOriginIndex + additionalStatementOriginIndex,
|
|
||||||
allowErrorStatementOrigins,
|
|
||||||
allowErrorLoopIndices,
|
|
||||||
)
|
|
||||||
|
|
||||||
private fun deserializeName(index: Int): Name {
|
private fun deserializeName(index: Int): Name {
|
||||||
val name = libraryFile.string(index)
|
val name = libraryFile.string(index)
|
||||||
@@ -238,12 +224,8 @@ class IrDeclarationDeserializer(
|
|||||||
deserializeIrDeclarationOrigin(proto.originName), proto.flags
|
deserializeIrDeclarationOrigin(proto.originName), proto.flags
|
||||||
)
|
)
|
||||||
// avoid duplicate annotations for local variables
|
// avoid duplicate annotations for local variables
|
||||||
if (!allowRedeclaration || result.annotations.isEmpty()) {
|
result.annotations = deserializeAnnotations(proto.annotationList)
|
||||||
result.annotations = deserializeAnnotations(proto.annotationList)
|
result.parent = currentParent
|
||||||
}
|
|
||||||
if (!skipMutableState) {
|
|
||||||
result.parent = currentParent
|
|
||||||
}
|
|
||||||
return result
|
return result
|
||||||
} finally {
|
} finally {
|
||||||
eraseDelegatedSymbol(s)
|
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 ->
|
withDeserializedIrDeclarationBase(proto.base) { symbol, signature, startOffset, endOffset, origin, fcode ->
|
||||||
checkSymbolType<IrClassSymbol>(symbol)
|
checkSymbolType<IrClassSymbol>(symbol)
|
||||||
if (allowRedeclaration && symbol.isBound) return symbol.owner
|
|
||||||
|
|
||||||
val flags = ClassFlags.decode(fcode)
|
val flags = ClassFlags.decode(fcode)
|
||||||
symbolTable.declareClass(signature, { symbol }) {
|
symbolTable.declareClass(signature, { symbol }) {
|
||||||
@@ -335,35 +316,33 @@ class IrDeclarationDeserializer(
|
|||||||
flags.isFun,
|
flags.isFun,
|
||||||
)
|
)
|
||||||
}.usingParent {
|
}.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) {
|
withExternalValue(isExternal) {
|
||||||
val oldDeclarations = declarations.toSet()
|
val oldDeclarations = declarations.toSet()
|
||||||
proto.declarationList
|
proto.declarationList
|
||||||
.filterNot { isSkippableFakeOverride(it, this) }
|
.filterNot { isSkippableFakeOverride(it, this) }
|
||||||
// On JVM, deserialization may fill bodies of existing declarations, so avoid adding duplicates.
|
// On JVM, deserialization may fill bodies of existing declarations, so avoid adding duplicates.
|
||||||
.mapNotNullTo(declarations) { declProto -> deserializeDeclaration(declProto).takeIf { it !in oldDeclarations } }
|
.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)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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(
|
InlineClassRepresentation(
|
||||||
deserializeName(proto.underlyingPropertyName),
|
deserializeName(proto.underlyingPropertyName),
|
||||||
deserializeIrType(proto.underlyingPropertyType) as IrSimpleType,
|
deserializeIrType(proto.underlyingPropertyType) as IrSimpleType,
|
||||||
@@ -395,9 +374,7 @@ class IrDeclarationDeserializer(
|
|||||||
origin
|
origin
|
||||||
)
|
)
|
||||||
}.usingParent {
|
}.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 ->
|
): T = withDeserializedIrDeclarationBase(proto.base) { symbol, idSig, startOffset, endOffset, origin, fcode ->
|
||||||
symbolTable.withScope(symbol) {
|
symbolTable.withScope(symbol) {
|
||||||
block(checkSymbolType(symbol), idSig, startOffset, endOffset, origin, fcode).usingParent {
|
block(checkSymbolType(symbol), idSig, startOffset, endOffset, origin, fcode).usingParent {
|
||||||
if (!skipMutableState) {
|
typeParameters = deserializeTypeParameters(proto.typeParameterList, false)
|
||||||
typeParameters = deserializeTypeParameters(proto.typeParameterList, false)
|
val nameType = BinaryNameAndType.decode(proto.nameType)
|
||||||
val nameType = BinaryNameAndType.decode(proto.nameType)
|
returnType = deserializeIrType(nameType.typeIndex)
|
||||||
returnType = deserializeIrType(nameType.typeIndex)
|
|
||||||
|
|
||||||
withBodyGuard {
|
withBodyGuard {
|
||||||
valueParameters = deserializeValueParameters(proto.valueParameterList)
|
valueParameters = deserializeValueParameters(proto.valueParameterList)
|
||||||
dispatchReceiverParameter =
|
dispatchReceiverParameter =
|
||||||
if (proto.hasDispatchReceiver()) deserializeIrValueParameter(proto.dispatchReceiver, -1)
|
if (proto.hasDispatchReceiver()) deserializeIrValueParameter(proto.dispatchReceiver, -1)
|
||||||
else null
|
else null
|
||||||
extensionReceiverParameter =
|
extensionReceiverParameter =
|
||||||
if (proto.hasExtensionReceiver()) deserializeIrValueParameter(proto.extensionReceiver, -1)
|
if (proto.hasExtensionReceiver()) deserializeIrValueParameter(proto.extensionReceiver, -1)
|
||||||
else null
|
else null
|
||||||
contextReceiverParametersCount =
|
contextReceiverParametersCount =
|
||||||
if (proto.hasContextReceiverParametersCount()) proto.contextReceiverParametersCount else 0
|
if (proto.hasContextReceiverParametersCount()) proto.contextReceiverParametersCount else 0
|
||||||
body =
|
body =
|
||||||
if (proto.hasBody()) deserializeStatementBody(proto.body) as IrBody?
|
if (proto.hasBody()) deserializeStatementBody(proto.body) as IrBody?
|
||||||
else null
|
else null
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -549,7 +524,6 @@ class IrDeclarationDeserializer(
|
|||||||
internal fun deserializeIrFunction(proto: ProtoFunction): IrSimpleFunction {
|
internal fun deserializeIrFunction(proto: ProtoFunction): IrSimpleFunction {
|
||||||
return withDeserializedIrFunctionBase(proto.base) { symbol, idSig, startOffset, endOffset, origin, fcode ->
|
return withDeserializedIrFunctionBase(proto.base) { symbol, idSig, startOffset, endOffset, origin, fcode ->
|
||||||
checkSymbolType<IrSimpleFunctionSymbol>(symbol)
|
checkSymbolType<IrSimpleFunctionSymbol>(symbol)
|
||||||
if (allowRedeclaration && symbol.isBound) return symbol.owner
|
|
||||||
|
|
||||||
val flags = FunctionFlags.decode(fcode)
|
val flags = FunctionFlags.decode(fcode)
|
||||||
symbolTable.declareSimpleFunction(idSig, { symbol }) {
|
symbolTable.declareSimpleFunction(idSig, { symbol }) {
|
||||||
@@ -583,7 +557,7 @@ class IrDeclarationDeserializer(
|
|||||||
val flags = LocalVariableFlags.decode(fcode)
|
val flags = LocalVariableFlags.decode(fcode)
|
||||||
val nameType = BinaryNameAndType.decode(proto.nameType)
|
val nameType = BinaryNameAndType.decode(proto.nameType)
|
||||||
|
|
||||||
(if (allowRedeclaration && symbol.isBound) symbol.owner else IrVariableImpl(
|
IrVariableImpl(
|
||||||
startOffset, endOffset, origin,
|
startOffset, endOffset, origin,
|
||||||
symbol,
|
symbol,
|
||||||
deserializeName(nameType.nameIndex),
|
deserializeName(nameType.nameIndex),
|
||||||
@@ -591,7 +565,7 @@ class IrDeclarationDeserializer(
|
|||||||
flags.isVar,
|
flags.isVar,
|
||||||
flags.isConst,
|
flags.isConst,
|
||||||
flags.isLateinit
|
flags.isLateinit
|
||||||
)).apply {
|
).apply {
|
||||||
if (proto.hasInitializer())
|
if (proto.hasInitializer())
|
||||||
initializer = bodyDeserializer.deserializeExpression(proto.initializer)
|
initializer = bodyDeserializer.deserializeExpression(proto.initializer)
|
||||||
}
|
}
|
||||||
@@ -602,12 +576,10 @@ class IrDeclarationDeserializer(
|
|||||||
symbolTable.declareEnumEntry(uniqId, { checkSymbolType(symbol) }) {
|
symbolTable.declareEnumEntry(uniqId, { checkSymbolType(symbol) }) {
|
||||||
irFactory.createEnumEntry(startOffset, endOffset, origin, it, deserializeName(proto.name))
|
irFactory.createEnumEntry(startOffset, endOffset, origin, it, deserializeName(proto.name))
|
||||||
}.apply {
|
}.apply {
|
||||||
if (!skipMutableState) {
|
if (proto.hasCorrespondingClass())
|
||||||
if (proto.hasCorrespondingClass())
|
correspondingClass = deserializeIrClass(proto.correspondingClass)
|
||||||
correspondingClass = deserializeIrClass(proto.correspondingClass)
|
if (proto.hasInitializer())
|
||||||
if (proto.hasInitializer())
|
initializerExpression = deserializeExpressionBody(proto.initializer)
|
||||||
initializerExpression = deserializeExpressionBody(proto.initializer)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -646,7 +618,7 @@ class IrDeclarationDeserializer(
|
|||||||
val type = deserializeIrType(nameType.typeIndex)
|
val type = deserializeIrType(nameType.typeIndex)
|
||||||
val flags = FieldFlags.decode(fcode)
|
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(
|
irFactory.createField(
|
||||||
startOffset, endOffset, origin,
|
startOffset, endOffset, origin,
|
||||||
it,
|
it,
|
||||||
@@ -677,7 +649,7 @@ class IrDeclarationDeserializer(
|
|||||||
val flags = LocalVariableFlags.decode(fcode)
|
val flags = LocalVariableFlags.decode(fcode)
|
||||||
val nameAndType = BinaryNameAndType.decode(proto.nameType)
|
val nameAndType = BinaryNameAndType.decode(proto.nameType)
|
||||||
|
|
||||||
val prop = if (allowRedeclaration && symbol.isBound) symbol.owner else irFactory.createLocalDelegatedProperty(
|
val prop = irFactory.createLocalDelegatedProperty(
|
||||||
startOffset, endOffset, origin,
|
startOffset, endOffset, origin,
|
||||||
symbol,
|
symbol,
|
||||||
deserializeName(nameAndType.nameIndex),
|
deserializeName(nameAndType.nameIndex),
|
||||||
@@ -685,23 +657,19 @@ class IrDeclarationDeserializer(
|
|||||||
flags.isVar
|
flags.isVar
|
||||||
)
|
)
|
||||||
|
|
||||||
if (!skipMutableState) {
|
prop.apply {
|
||||||
prop.apply {
|
delegate = deserializeIrVariable(proto.delegate)
|
||||||
delegate = deserializeIrVariable(proto.delegate)
|
getter = deserializeIrFunction(proto.getter)
|
||||||
getter = deserializeIrFunction(proto.getter)
|
if (proto.hasSetter())
|
||||||
if (proto.hasSetter())
|
setter = deserializeIrFunction(proto.setter)
|
||||||
setter = deserializeIrFunction(proto.setter)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
prop
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun deserializeIrProperty(proto: ProtoProperty): IrProperty =
|
private fun deserializeIrProperty(proto: ProtoProperty): IrProperty =
|
||||||
withDeserializedIrDeclarationBase(proto.base) { symbol, uniqId, startOffset, endOffset, origin, fcode ->
|
withDeserializedIrDeclarationBase(proto.base) { symbol, uniqId, startOffset, endOffset, origin, fcode ->
|
||||||
checkSymbolType<IrPropertySymbol>(symbol)
|
checkSymbolType<IrPropertySymbol>(symbol)
|
||||||
val flags = PropertyFlags.decode(fcode)
|
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(
|
irFactory.createProperty(
|
||||||
startOffset, endOffset, origin,
|
startOffset, endOffset, origin,
|
||||||
it,
|
it,
|
||||||
@@ -718,43 +686,34 @@ class IrDeclarationDeserializer(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!skipMutableState) {
|
prop.apply {
|
||||||
prop.apply {
|
withExternalValue(isExternal) {
|
||||||
withExternalValue(isExternal) {
|
if (proto.hasGetter()) {
|
||||||
if (proto.hasGetter()) {
|
getter = deserializeIrFunction(proto.getter).also {
|
||||||
getter = deserializeIrFunction(proto.getter).also {
|
it.correspondingPropertySymbol = symbol
|
||||||
it.correspondingPropertySymbol = symbol
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (proto.hasSetter()) {
|
}
|
||||||
setter = deserializeIrFunction(proto.setter).also {
|
if (proto.hasSetter()) {
|
||||||
it.correspondingPropertySymbol = symbol
|
setter = deserializeIrFunction(proto.setter).also {
|
||||||
}
|
it.correspondingPropertySymbol = symbol
|
||||||
}
|
}
|
||||||
if (proto.hasBackingField()) {
|
}
|
||||||
backingField = deserializeIrField(proto.backingField).also {
|
if (proto.hasBackingField()) {
|
||||||
it.correspondingPropertySymbol = symbol
|
backingField = deserializeIrField(proto.backingField).also {
|
||||||
}
|
it.correspondingPropertySymbol = symbol
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
prop
|
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private val allKnownDeclarationOrigins = IrDeclarationOrigin::class.nestedClasses.toList()
|
private val allKnownDeclarationOrigins = IrDeclarationOrigin::class.nestedClasses.toList()
|
||||||
private val declarationOriginIndex =
|
private val declarationOriginIndex =
|
||||||
allKnownDeclarationOrigins.map { it.objectInstance as IrDeclarationOriginImpl }.associateBy { it.name }
|
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)
|
val originName = libraryFile.string(protoName)
|
||||||
return declarationOriginIndex[originName] ?: object : IrDeclarationOriginImpl(originName) {}
|
return declarationOriginIndex[originName] ?: object : IrDeclarationOriginImpl(originName) {}
|
||||||
}
|
}
|
||||||
@@ -767,9 +726,9 @@ class IrDeclarationDeserializer(
|
|||||||
IR_CLASS -> deserializeIrClass(proto.irClass)
|
IR_CLASS -> deserializeIrClass(proto.irClass)
|
||||||
IR_FUNCTION -> deserializeIrFunction(proto.irFunction)
|
IR_FUNCTION -> deserializeIrFunction(proto.irFunction)
|
||||||
IR_PROPERTY -> deserializeIrProperty(proto.irProperty)
|
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_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_ENUM_ENTRY -> deserializeIrEnumEntry(proto.irEnumEntry)
|
||||||
IR_LOCAL_DELEGATED_PROPERTY -> deserializeIrLocalDelegatedProperty(proto.irLocalDelegatedProperty)
|
IR_LOCAL_DELEGATED_PROPERTY -> deserializeIrLocalDelegatedProperty(proto.irLocalDelegatedProperty)
|
||||||
IR_TYPE_ALIAS -> deserializeIrTypeAlias(proto.irTypeAlias)
|
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.name.Name
|
||||||
import org.jetbrains.kotlin.types.Variance
|
import org.jetbrains.kotlin.types.Variance
|
||||||
import java.io.File
|
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.AccessorIdSignature as ProtoAccessorIdSignature
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.Actual as ProtoActual
|
import org.jetbrains.kotlin.backend.common.serialization.proto.Actual as ProtoActual
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.CommonIdSignature as ProtoCommonIdSignature
|
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.IrOperation as ProtoOperation
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrProperty as ProtoProperty
|
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.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.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.IrSetField as ProtoSetField
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrSetValue as ProtoSetValue
|
import org.jetbrains.kotlin.backend.common.serialization.proto.IrSetValue as ProtoSetValue
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IrSimpleType as ProtoSimpleType
|
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.IrWhile as ProtoWhile
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.LocalSignature as ProtoLocalSignature
|
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.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.MemberAccessCommon as ProtoMemberAccessCommon
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.NullableIrExpression as ProtoNullableIrExpression
|
import org.jetbrains.kotlin.backend.common.serialization.proto.NullableIrExpression as ProtoNullableIrExpression
|
||||||
|
|
||||||
@@ -126,9 +121,6 @@ open class IrFileSerializer(
|
|||||||
private val compatibilityMode: CompatibilityMode,
|
private val compatibilityMode: CompatibilityMode,
|
||||||
private val bodiesOnlyForInlines: Boolean = false,
|
private val bodiesOnlyForInlines: Boolean = false,
|
||||||
private val skipExpects: 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 addDebugInfo: Boolean = true,
|
||||||
private val normalizeAbsolutePaths: Boolean = false,
|
private val normalizeAbsolutePaths: Boolean = false,
|
||||||
private val sourceBaseDirs: Collection<String>
|
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)))
|
protoBodyArray.add(XStatementOrExpression.XExpression(serializeExpression(expression)))
|
||||||
return protoBodyArray.size - 1
|
return protoBodyArray.size - 1
|
||||||
}
|
}
|
||||||
|
|
||||||
fun serializeIrStatementBody(statement: IrElement): Int {
|
private fun serializeIrStatementBody(statement: IrElement): Int {
|
||||||
protoBodyArray.add(XStatementOrExpression.XStatement(serializeStatement(statement)))
|
protoBodyArray.add(XStatementOrExpression.XStatement(serializeStatement(statement)))
|
||||||
return protoBodyArray.size - 1
|
return protoBodyArray.size - 1
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ------- Common fields ---------------------------------------------------- */
|
/* ------- 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 =
|
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)
|
private fun serializeCoordinates(start: Int, end: Int): Long = BinaryCoordinates.encode(start, end)
|
||||||
|
|
||||||
@@ -280,16 +272,6 @@ open class IrFileSerializer(
|
|||||||
return proto.build()
|
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 {
|
private fun serializeIdSignature(idSignature: IdSignature): ProtoIdSignature {
|
||||||
val proto = ProtoIdSignature.newBuilder()
|
val proto = ProtoIdSignature.newBuilder()
|
||||||
when (idSignature) {
|
when (idSignature) {
|
||||||
@@ -300,9 +282,8 @@ open class IrFileSerializer(
|
|||||||
is IdSignature.CompositeSignature -> proto.compositeSig = serializeCompositeSignature(idSignature)
|
is IdSignature.CompositeSignature -> proto.compositeSig = serializeCompositeSignature(idSignature)
|
||||||
is IdSignature.LocalSignature -> proto.localSig = serializeLocalSignature(idSignature)
|
is IdSignature.LocalSignature -> proto.localSig = serializeLocalSignature(idSignature)
|
||||||
is IdSignature.FileSignature -> proto.fileSig = serializeFileSignature(idSignature)
|
is IdSignature.FileSignature -> proto.fileSig = serializeFileSignature(idSignature)
|
||||||
// IR IC part
|
|
||||||
is IdSignature.LoweredDeclarationSignature -> proto.icSig = serializeLoweredDeclarationSignature(idSignature)
|
|
||||||
is IdSignature.SpecialFakeOverrideSignature -> {}
|
is IdSignature.SpecialFakeOverrideSignature -> {}
|
||||||
|
is IdSignature.LoweredDeclarationSignature -> error("LoweredDeclarationSignature is not expected here")
|
||||||
}
|
}
|
||||||
return proto.build()
|
return proto.build()
|
||||||
}
|
}
|
||||||
@@ -312,7 +293,7 @@ open class IrFileSerializer(
|
|||||||
return protoIdSignature(idSig)
|
return protoIdSignature(idSig)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun protoIdSignature(idSig: IdSignature): Int {
|
private fun protoIdSignature(idSig: IdSignature): Int {
|
||||||
return protoIdSignatureMap.getOrPut(idSig) {
|
return protoIdSignatureMap.getOrPut(idSig) {
|
||||||
protoIdSignatureArray.add(serializeIdSignature(idSig))
|
protoIdSignatureArray.add(serializeIdSignature(idSig))
|
||||||
protoIdSignatureArray.size - 1
|
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 symbolKind = protoSymbolKind(symbol)
|
||||||
|
|
||||||
val signatureId = when {
|
val signatureId = when {
|
||||||
@@ -380,10 +361,10 @@ open class IrFileSerializer(
|
|||||||
|
|
||||||
/* ------- IrTypes ---------------------------------------------------------- */
|
/* ------- IrTypes ---------------------------------------------------------- */
|
||||||
|
|
||||||
protected fun serializeAnnotations(annotations: List<IrConstructorCall>) =
|
private fun serializeAnnotations(annotations: List<IrConstructorCall>) =
|
||||||
annotations.map { serializeConstructorCall(it) }
|
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
|
private fun serializeIrStarProjection() = BinaryTypeProjection.STAR_CODE
|
||||||
|
|
||||||
@@ -405,9 +386,7 @@ open class IrFileSerializer(
|
|||||||
.setClassifier(serializeIrSymbol(type.classifier))
|
.setClassifier(serializeIrSymbol(type.classifier))
|
||||||
.setHasQuestionMark(type.hasQuestionMark)
|
.setHasQuestionMark(type.hasQuestionMark)
|
||||||
type.abbreviation?.let { ta ->
|
type.abbreviation?.let { ta ->
|
||||||
serializeIrTypeAbbreviation(ta)?.let { pta ->
|
proto.setAbbreviation(serializeIrTypeAbbreviation(ta))
|
||||||
proto.setAbbreviation(pta)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
type.arguments.forEach {
|
type.arguments.forEach {
|
||||||
proto.addArgument(serializeTypeArgument(it))
|
proto.addArgument(serializeTypeArgument(it))
|
||||||
@@ -415,23 +394,15 @@ open class IrFileSerializer(
|
|||||||
return proto.build()
|
return proto.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
@Suppress("UNUSED_PARAMETER")
|
private fun serializeIrTypeAbbreviation(typeAbbreviation: IrTypeAbbreviation): ProtoTypeAbbreviation {
|
||||||
private fun isTypeAbbreviationAccessibleHere(typeAbbreviation: IrTypeAbbreviation): Boolean {
|
val proto = ProtoTypeAbbreviation.newBuilder()
|
||||||
return !skipMutableState
|
.addAllAnnotation(serializeAnnotations(typeAbbreviation.annotations))
|
||||||
}
|
.setTypeAlias(serializeIrSymbol(typeAbbreviation.typeAlias))
|
||||||
|
.setHasQuestionMark(typeAbbreviation.hasQuestionMark)
|
||||||
private fun serializeIrTypeAbbreviation(typeAbbreviation: IrTypeAbbreviation): ProtoTypeAbbreviation? {
|
typeAbbreviation.arguments.forEach {
|
||||||
if (isTypeAbbreviationAccessibleHere(typeAbbreviation)) {
|
proto.addArgument(serializeTypeArgument(it))
|
||||||
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()
|
|
||||||
}
|
}
|
||||||
return null
|
return proto.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun serializeDynamicType(type: IrDynamicType): ProtoDynamicType = ProtoDynamicType.newBuilder()
|
private fun serializeDynamicType(type: IrDynamicType): ProtoDynamicType = ProtoDynamicType.newBuilder()
|
||||||
@@ -519,7 +490,7 @@ open class IrFileSerializer(
|
|||||||
type = (this as? IrTypeProjection)?.type?.toIrTypeKey
|
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.add(serializeIrTypeData(type))
|
||||||
protoTypeArray.size - 1
|
protoTypeArray.size - 1
|
||||||
}
|
}
|
||||||
@@ -543,34 +514,6 @@ open class IrFileSerializer(
|
|||||||
return proto.build()
|
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 {
|
private fun serializeBlock(block: IrBlock): ProtoBlock {
|
||||||
val proto = ProtoBlock.newBuilder()
|
val proto = ProtoBlock.newBuilder()
|
||||||
|
|
||||||
@@ -654,7 +597,7 @@ open class IrFileSerializer(
|
|||||||
return proto.build()
|
return proto.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun serializeConstructorCall(call: IrConstructorCall): ProtoConstructorCall =
|
private fun serializeConstructorCall(call: IrConstructorCall): ProtoConstructorCall =
|
||||||
ProtoConstructorCall.newBuilder().apply {
|
ProtoConstructorCall.newBuilder().apply {
|
||||||
symbol = serializeIrSymbol(call.symbol)
|
symbol = serializeIrSymbol(call.symbol)
|
||||||
constructorTypeArgumentsCount = call.constructorTypeArgumentsCount
|
constructorTypeArgumentsCount = call.constructorTypeArgumentsCount
|
||||||
@@ -680,13 +623,6 @@ open class IrFileSerializer(
|
|||||||
return proto.build()
|
return proto.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun serializeRawFunctionReference(rawReference: IrRawFunctionReference): ProtoRawFunctionReference {
|
|
||||||
val proto = ProtoRawFunctionReference.newBuilder()
|
|
||||||
.setSymbol(serializeIrSymbol(rawReference.symbol))
|
|
||||||
|
|
||||||
return proto.build()
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun serializeIrLocalDelegatedPropertyReference(
|
private fun serializeIrLocalDelegatedPropertyReference(
|
||||||
callable: IrLocalDelegatedPropertyReference
|
callable: IrLocalDelegatedPropertyReference
|
||||||
): ProtoLocalDelegatedPropertyReference {
|
): ProtoLocalDelegatedPropertyReference {
|
||||||
@@ -806,22 +742,10 @@ open class IrFileSerializer(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun serializeReturn(operation: ProtoOperation.Builder, expression: IrReturn) {
|
private fun serializeReturn(operation: ProtoOperation.Builder, expression: IrReturn) {
|
||||||
if (expression.returnTargetSymbol is IrReturnableBlockSymbol) {
|
val proto = ProtoReturn.newBuilder()
|
||||||
val targetBlock = expression.returnTargetSymbol.owner
|
.setReturnTarget(serializeIrSymbol(expression.returnTargetSymbol))
|
||||||
|
.setValue(serializeExpression(expression.value))
|
||||||
var t = returnableBlockStack.size - 1
|
operation.`return` = proto.build()
|
||||||
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()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun serializeSetField(expression: IrSetField): ProtoSetField =
|
private fun serializeSetField(expression: IrSetField): ProtoSetField =
|
||||||
@@ -951,7 +875,7 @@ open class IrFileSerializer(
|
|||||||
|
|
||||||
val proto = ProtoLoop.newBuilder()
|
val proto = ProtoLoop.newBuilder()
|
||||||
.setCondition(serializeExpression(expression.condition)).apply {
|
.setCondition(serializeExpression(expression.condition)).apply {
|
||||||
expression.origin?.let { setOriginName(serializeIrStatementOrigin(it)) }
|
expression.origin?.let { originName = serializeIrStatementOrigin(it) }
|
||||||
}
|
}
|
||||||
|
|
||||||
expression.label?.let {
|
expression.label?.let {
|
||||||
@@ -1085,7 +1009,6 @@ open class IrFileSerializer(
|
|||||||
|
|
||||||
// TODO: make me a visitor.
|
// TODO: make me a visitor.
|
||||||
when (expression) {
|
when (expression) {
|
||||||
is IrReturnableBlock -> operationProto.returnableBlock = serializeReturnableBlock(expression)
|
|
||||||
is IrBlock -> operationProto.block = serializeBlock(expression)
|
is IrBlock -> operationProto.block = serializeBlock(expression)
|
||||||
is IrBreak -> operationProto.`break` = serializeBreak(expression)
|
is IrBreak -> operationProto.`break` = serializeBreak(expression)
|
||||||
is IrClassReference -> operationProto.classReference = serializeClassReference(expression)
|
is IrClassReference -> operationProto.classReference = serializeClassReference(expression)
|
||||||
@@ -1121,7 +1044,6 @@ open class IrFileSerializer(
|
|||||||
is IrDynamicOperatorExpression -> operationProto.dynamicOperator = serializeDynamicOperatorExpression(expression)
|
is IrDynamicOperatorExpression -> operationProto.dynamicOperator = serializeDynamicOperatorExpression(expression)
|
||||||
is IrErrorCallExpression -> operationProto.errorCallExpression = serializeErrorCallExpression(expression)
|
is IrErrorCallExpression -> operationProto.errorCallExpression = serializeErrorCallExpression(expression)
|
||||||
is IrErrorExpression -> operationProto.errorExpression = serializeErrorExpression(expression)
|
is IrErrorExpression -> operationProto.errorExpression = serializeErrorExpression(expression)
|
||||||
is IrRawFunctionReference -> operationProto.rawFunctionReference = serializeRawFunctionReference(expression)
|
|
||||||
else -> {
|
else -> {
|
||||||
TODO("Expression serialization not implemented yet: ${expression.render()}.")
|
TODO("Expression serialization not implemented yet: ${expression.render()}.")
|
||||||
}
|
}
|
||||||
@@ -1189,12 +1111,8 @@ open class IrFileSerializer(
|
|||||||
.setBase(serializeIrDeclarationBase(parameter, ValueParameterFlags.encode(parameter)))
|
.setBase(serializeIrDeclarationBase(parameter, ValueParameterFlags.encode(parameter)))
|
||||||
.setNameType(serializeNameAndType(parameter.name, parameter.type))
|
.setNameType(serializeNameAndType(parameter.name, parameter.type))
|
||||||
|
|
||||||
if (!skipMutableState) {
|
parameter.varargElementType?.let { proto.setVarargElementType(serializeIrType(it)) }
|
||||||
parameter.varargElementType?.let { proto.setVarargElementType(serializeIrType(it)) }
|
parameter.defaultValue?.let { proto.setDefaultValue(serializeIrExpressionBody(it.expression)) }
|
||||||
parameter.defaultValue?.let { proto.setDefaultValue(serializeIrExpressionBody(it.expression)) }
|
|
||||||
} else {
|
|
||||||
proto.index = parameter.index
|
|
||||||
}
|
|
||||||
|
|
||||||
return proto.build()
|
return proto.build()
|
||||||
}
|
}
|
||||||
@@ -1207,11 +1125,6 @@ open class IrFileSerializer(
|
|||||||
proto.addSuperType(serializeIrType(it))
|
proto.addSuperType(serializeIrType(it))
|
||||||
}
|
}
|
||||||
|
|
||||||
if (skipMutableState) {
|
|
||||||
proto.index = parameter.index
|
|
||||||
proto.isGlobal = true // parameter.parent is IrClass
|
|
||||||
}
|
|
||||||
|
|
||||||
return proto.build()
|
return proto.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1220,23 +1133,21 @@ open class IrFileSerializer(
|
|||||||
.setBase(serializeIrDeclarationBase(function, flags))
|
.setBase(serializeIrDeclarationBase(function, flags))
|
||||||
.setNameType(serializeNameAndType(function.name, function.returnType))
|
.setNameType(serializeNameAndType(function.name, function.returnType))
|
||||||
|
|
||||||
if (!skipMutableState) {
|
function.typeParameters.forEach {
|
||||||
function.typeParameters.forEach {
|
proto.addTypeParameter(serializeIrTypeParameter(it))
|
||||||
proto.addTypeParameter(serializeIrTypeParameter(it))
|
}
|
||||||
}
|
function.dispatchReceiverParameter?.let { proto.setDispatchReceiver(serializeIrValueParameter(it)) }
|
||||||
function.dispatchReceiverParameter?.let { proto.setDispatchReceiver(serializeIrValueParameter(it)) }
|
function.extensionReceiverParameter?.let { proto.setExtensionReceiver(serializeIrValueParameter(it)) }
|
||||||
function.extensionReceiverParameter?.let { proto.setExtensionReceiver(serializeIrValueParameter(it)) }
|
val contextReceiverParametersCount = function.contextReceiverParametersCount
|
||||||
val contextReceiverParametersCount = function.contextReceiverParametersCount
|
if (contextReceiverParametersCount > 0) {
|
||||||
if (contextReceiverParametersCount > 0) {
|
proto.contextReceiverParametersCount = contextReceiverParametersCount
|
||||||
proto.setContextReceiverParametersCount(contextReceiverParametersCount)
|
}
|
||||||
}
|
function.valueParameters.forEach {
|
||||||
function.valueParameters.forEach {
|
proto.addValueParameter(serializeIrValueParameter(it))
|
||||||
proto.addValueParameter(serializeIrValueParameter(it))
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (!bodiesOnlyForInlines || function.isInline) {
|
if (!bodiesOnlyForInlines || function.isInline) {
|
||||||
function.body?.let { proto.body = serializeIrStatementBody(it) }
|
function.body?.let { proto.body = serializeIrStatementBody(it) }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return proto.build()
|
return proto.build()
|
||||||
@@ -1262,9 +1173,7 @@ open class IrFileSerializer(
|
|||||||
val proto = ProtoAnonymousInit.newBuilder()
|
val proto = ProtoAnonymousInit.newBuilder()
|
||||||
.setBase(serializeIrDeclarationBase(declaration, null))
|
.setBase(serializeIrDeclarationBase(declaration, null))
|
||||||
|
|
||||||
if (!skipMutableState) {
|
proto.body = serializeIrStatementBody(declaration.body)
|
||||||
proto.setBody(serializeIrStatementBody(declaration.body))
|
|
||||||
}
|
|
||||||
|
|
||||||
return proto.build()
|
return proto.build()
|
||||||
}
|
}
|
||||||
@@ -1274,11 +1183,9 @@ open class IrFileSerializer(
|
|||||||
.setBase(serializeIrDeclarationBase(variable, LocalVariableFlags.encode(variable)))
|
.setBase(serializeIrDeclarationBase(variable, LocalVariableFlags.encode(variable)))
|
||||||
.setNameType(serializeNameAndType(variable.name, variable.type))
|
.setNameType(serializeNameAndType(variable.name, variable.type))
|
||||||
|
|
||||||
if (!skipMutableState) {
|
proto.delegate = serializeIrVariable(variable.delegate)
|
||||||
proto.delegate = serializeIrVariable(variable.delegate)
|
proto.getter = serializeIrFunction(variable.getter)
|
||||||
proto.getter = serializeIrFunction(variable.getter)
|
variable.setter?.let { proto.setSetter(serializeIrFunction(it)) }
|
||||||
variable.setter?.let { proto.setSetter(serializeIrFunction(it)) }
|
|
||||||
}
|
|
||||||
|
|
||||||
return proto.build()
|
return proto.build()
|
||||||
}
|
}
|
||||||
@@ -1288,11 +1195,9 @@ open class IrFileSerializer(
|
|||||||
.setBase(serializeIrDeclarationBase(property, PropertyFlags.encode(property)))
|
.setBase(serializeIrDeclarationBase(property, PropertyFlags.encode(property)))
|
||||||
.setName(serializeName(property.name))
|
.setName(serializeName(property.name))
|
||||||
|
|
||||||
if (!skipMutableState) {
|
property.backingField?.let { proto.backingField = serializeIrField(it) }
|
||||||
property.backingField?.let { proto.backingField = serializeIrField(it) }
|
property.getter?.let { proto.getter = serializeIrFunction(it) }
|
||||||
property.getter?.let { proto.getter = serializeIrFunction(it) }
|
property.setter?.let { proto.setter = serializeIrFunction(it) }
|
||||||
property.setter?.let { proto.setter = serializeIrFunction(it) }
|
|
||||||
}
|
|
||||||
|
|
||||||
return proto.build()
|
return proto.build()
|
||||||
}
|
}
|
||||||
@@ -1301,8 +1206,7 @@ open class IrFileSerializer(
|
|||||||
val proto = ProtoField.newBuilder()
|
val proto = ProtoField.newBuilder()
|
||||||
.setBase(serializeIrDeclarationBase(field, FieldFlags.encode(field)))
|
.setBase(serializeIrDeclarationBase(field, FieldFlags.encode(field)))
|
||||||
.setNameType(serializeNameAndType(field.name, field.type))
|
.setNameType(serializeNameAndType(field.name, field.type))
|
||||||
if (!skipMutableState &&
|
if (!(bodiesOnlyForInlines &&
|
||||||
!(bodiesOnlyForInlines &&
|
|
||||||
(field.parent as? IrDeclarationWithVisibility)?.visibility != DescriptorVisibilities.LOCAL &&
|
(field.parent as? IrDeclarationWithVisibility)?.visibility != DescriptorVisibilities.LOCAL &&
|
||||||
(field.initializer?.expression !is IrConst<*>))
|
(field.initializer?.expression !is IrConst<*>))
|
||||||
) {
|
) {
|
||||||
@@ -1314,7 +1218,7 @@ open class IrFileSerializer(
|
|||||||
return proto.build()
|
return proto.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun serializeIrVariable(variable: IrVariable): ProtoVariable {
|
private fun serializeIrVariable(variable: IrVariable): ProtoVariable {
|
||||||
val proto = ProtoVariable.newBuilder()
|
val proto = ProtoVariable.newBuilder()
|
||||||
.setBase(serializeIrDeclarationBase(variable, LocalVariableFlags.encode(variable)))
|
.setBase(serializeIrDeclarationBase(variable, LocalVariableFlags.encode(variable)))
|
||||||
.setNameType(serializeNameAndType(variable.name, variable.type))
|
.setNameType(serializeNameAndType(variable.name, variable.type))
|
||||||
@@ -1322,7 +1226,7 @@ open class IrFileSerializer(
|
|||||||
return proto.build()
|
return proto.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
protected fun serializeIrClass(clazz: IrClass): ProtoClass {
|
private fun serializeIrClass(clazz: IrClass): ProtoClass {
|
||||||
val proto = ProtoClass.newBuilder()
|
val proto = ProtoClass.newBuilder()
|
||||||
.setBase(serializeIrDeclarationBase(clazz, ClassFlags.encode(clazz)))
|
.setBase(serializeIrDeclarationBase(clazz, ClassFlags.encode(clazz)))
|
||||||
.setName(serializeName(clazz.name))
|
.setName(serializeName(clazz.name))
|
||||||
@@ -1332,30 +1236,28 @@ open class IrFileSerializer(
|
|||||||
proto.inlineClassRepresentation = serializeInlineClassRepresentation(representation)
|
proto.inlineClassRepresentation = serializeInlineClassRepresentation(representation)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!skipMutableState) {
|
clazz.declarations.forEach {
|
||||||
clazz.declarations.forEach {
|
if (memberNeedsSerialization(it)) proto.addDeclaration(serializeDeclaration(it))
|
||||||
if (memberNeedsSerialization(it)) proto.addDeclaration(serializeDeclaration(it))
|
}
|
||||||
}
|
|
||||||
|
|
||||||
clazz.typeParameters.forEach {
|
clazz.typeParameters.forEach {
|
||||||
proto.addTypeParameter(serializeIrTypeParameter(it))
|
proto.addTypeParameter(serializeIrTypeParameter(it))
|
||||||
}
|
}
|
||||||
|
|
||||||
clazz.thisReceiver?.let { proto.thisReceiver = serializeIrValueParameter(it) }
|
clazz.thisReceiver?.let { proto.thisReceiver = serializeIrValueParameter(it) }
|
||||||
|
|
||||||
clazz.superTypes.forEach {
|
clazz.superTypes.forEach {
|
||||||
proto.addSuperType(serializeIrType(it))
|
proto.addSuperType(serializeIrType(it))
|
||||||
}
|
}
|
||||||
|
|
||||||
clazz.sealedSubclasses.forEach {
|
clazz.sealedSubclasses.forEach {
|
||||||
proto.addSealedSubclass(serializeIrSymbol(it))
|
proto.addSealedSubclass(serializeIrSymbol(it))
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return proto.build()
|
return proto.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun serializeInlineClassRepresentation(representation: InlineClassRepresentation<IrSimpleType>): ProtoIrInlineClassRepresentation =
|
private fun serializeInlineClassRepresentation(representation: InlineClassRepresentation<IrSimpleType>): ProtoIrInlineClassRepresentation =
|
||||||
ProtoIrInlineClassRepresentation.newBuilder().apply {
|
ProtoIrInlineClassRepresentation.newBuilder().apply {
|
||||||
underlyingPropertyName = serializeName(representation.underlyingPropertyName)
|
underlyingPropertyName = serializeName(representation.underlyingPropertyName)
|
||||||
// TODO: consider not writing type if the property is public, similarly to metadata
|
// 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 {
|
private fun serializeIrTypeAlias(typeAlias: IrTypeAlias): ProtoTypeAlias {
|
||||||
val proto = ProtoTypeAlias.newBuilder()
|
val proto = ProtoTypeAlias.newBuilder()
|
||||||
|
|
||||||
proto.setBase(serializeIrDeclarationBase(typeAlias, TypeAliasFlags.encode(typeAlias)))
|
proto.setBase(serializeIrDeclarationBase(typeAlias, TypeAliasFlags.encode(typeAlias))).nameType =
|
||||||
.setNameType(serializeNameAndType(typeAlias.name, typeAlias.expandedType))
|
serializeNameAndType(typeAlias.name, typeAlias.expandedType)
|
||||||
|
|
||||||
typeAlias.typeParameters.forEach {
|
typeAlias.typeParameters.forEach {
|
||||||
if (!skipMutableState) {
|
proto.addTypeParameter(serializeIrTypeParameter(it))
|
||||||
proto.addTypeParameter(serializeIrTypeParameter(it))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return proto.build()
|
return proto.build()
|
||||||
@@ -1388,13 +1288,11 @@ open class IrFileSerializer(
|
|||||||
.setBase(serializeIrDeclarationBase(enumEntry, null))
|
.setBase(serializeIrDeclarationBase(enumEntry, null))
|
||||||
.setName(serializeName(enumEntry.name))
|
.setName(serializeName(enumEntry.name))
|
||||||
|
|
||||||
if (!skipMutableState) {
|
enumEntry.initializerExpression?.let {
|
||||||
enumEntry.initializerExpression?.let {
|
proto.initializer = serializeIrExpressionBody(it.expression)
|
||||||
proto.initializer = serializeIrExpressionBody(it.expression)
|
}
|
||||||
}
|
enumEntry.correspondingClass?.let {
|
||||||
enumEntry.correspondingClass?.let {
|
proto.correspondingClass = serializeIrClass(it)
|
||||||
proto.correspondingClass = serializeIrClass(it)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return proto.build()
|
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 {
|
fun serializeIrFile(file: IrFile): SerializedIrFile {
|
||||||
var result: SerializedIrFile? = null
|
var result: SerializedIrFile? = null
|
||||||
|
|
||||||
|
|||||||
+4
-6
@@ -25,12 +25,12 @@ class IrSymbolDeserializer(
|
|||||||
val actuals: List<Actual>,
|
val actuals: List<Actual>,
|
||||||
val enqueueLocalTopLevelDeclaration: (IdSignature) -> Unit,
|
val enqueueLocalTopLevelDeclaration: (IdSignature) -> Unit,
|
||||||
val handleExpectActualMapping: (IdSignature, IrSymbol) -> IrSymbol,
|
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 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 {
|
fun deserializeIrSymbol(idSig: IdSignature, symbolKind: BinarySymbolData.SymbolKind): IrSymbol {
|
||||||
return deserializedSymbols.getOrPut(idSig) {
|
return deserializedSymbols.getOrPut(idSig) {
|
||||||
val symbol = referenceDeserializedSymbol(symbolKind, idSig)
|
val symbol = referenceDeserializedSymbol(symbolKind, idSig)
|
||||||
@@ -56,9 +56,7 @@ class IrSymbolDeserializer(
|
|||||||
private fun deserializeIrSymbolData(idSignature: IdSignature, symbolKind: BinarySymbolData.SymbolKind): IrSymbol {
|
private fun deserializeIrSymbolData(idSignature: IdSignature, symbolKind: BinarySymbolData.SymbolKind): IrSymbol {
|
||||||
if (!idSignature.isPubliclyVisible) {
|
if (!idSignature.isPubliclyVisible) {
|
||||||
return deserializedSymbols.getOrPut(idSignature) {
|
return deserializedSymbols.getOrPut(idSignature) {
|
||||||
if (enqueueAllDeclarations) {
|
if (idSignature.hasTopLevel) {
|
||||||
enqueueLocalTopLevelDeclaration(idSignature)
|
|
||||||
} else if (idSignature.hasTopLevel) {
|
|
||||||
enqueueLocalTopLevelDeclaration(idSignature.topLevelSignature())
|
enqueueLocalTopLevelDeclaration(idSignature.topLevelSignature())
|
||||||
}
|
}
|
||||||
referenceDeserializedSymbol(symbolKind, idSignature)
|
referenceDeserializedSymbol(symbolKind, idSignature)
|
||||||
|
|||||||
-69
@@ -68,11 +68,6 @@ public final class FileLocalIdSignature extends
|
|||||||
debugInfo_ = input.readInt32();
|
debugInfo_ = input.readInt32();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 808: {
|
|
||||||
bitField0_ |= 0x00000008;
|
|
||||||
file_ = input.readInt32();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
|
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
|
||||||
@@ -152,26 +147,10 @@ public final class FileLocalIdSignature extends
|
|||||||
return debugInfo_;
|
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() {
|
private void initFields() {
|
||||||
container_ = 0;
|
container_ = 0;
|
||||||
localId_ = 0L;
|
localId_ = 0L;
|
||||||
debugInfo_ = 0;
|
debugInfo_ = 0;
|
||||||
file_ = 0;
|
|
||||||
}
|
}
|
||||||
private byte memoizedIsInitialized = -1;
|
private byte memoizedIsInitialized = -1;
|
||||||
public final boolean isInitialized() {
|
public final boolean isInitialized() {
|
||||||
@@ -203,9 +182,6 @@ public final class FileLocalIdSignature extends
|
|||||||
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
||||||
output.writeInt32(3, debugInfo_);
|
output.writeInt32(3, debugInfo_);
|
||||||
}
|
}
|
||||||
if (((bitField0_ & 0x00000008) == 0x00000008)) {
|
|
||||||
output.writeInt32(101, file_);
|
|
||||||
}
|
|
||||||
output.writeRawBytes(unknownFields);
|
output.writeRawBytes(unknownFields);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -227,10 +203,6 @@ public final class FileLocalIdSignature extends
|
|||||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||||
.computeInt32Size(3, debugInfo_);
|
.computeInt32Size(3, debugInfo_);
|
||||||
}
|
}
|
||||||
if (((bitField0_ & 0x00000008) == 0x00000008)) {
|
|
||||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
|
||||||
.computeInt32Size(101, file_);
|
|
||||||
}
|
|
||||||
size += unknownFields.size();
|
size += unknownFields.size();
|
||||||
memoizedSerializedSize = size;
|
memoizedSerializedSize = size;
|
||||||
return size;
|
return size;
|
||||||
@@ -331,8 +303,6 @@ public final class FileLocalIdSignature extends
|
|||||||
bitField0_ = (bitField0_ & ~0x00000002);
|
bitField0_ = (bitField0_ & ~0x00000002);
|
||||||
debugInfo_ = 0;
|
debugInfo_ = 0;
|
||||||
bitField0_ = (bitField0_ & ~0x00000004);
|
bitField0_ = (bitField0_ & ~0x00000004);
|
||||||
file_ = 0;
|
|
||||||
bitField0_ = (bitField0_ & ~0x00000008);
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -368,10 +338,6 @@ public final class FileLocalIdSignature extends
|
|||||||
to_bitField0_ |= 0x00000004;
|
to_bitField0_ |= 0x00000004;
|
||||||
}
|
}
|
||||||
result.debugInfo_ = debugInfo_;
|
result.debugInfo_ = debugInfo_;
|
||||||
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
|
|
||||||
to_bitField0_ |= 0x00000008;
|
|
||||||
}
|
|
||||||
result.file_ = file_;
|
|
||||||
result.bitField0_ = to_bitField0_;
|
result.bitField0_ = to_bitField0_;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -387,9 +353,6 @@ public final class FileLocalIdSignature extends
|
|||||||
if (other.hasDebugInfo()) {
|
if (other.hasDebugInfo()) {
|
||||||
setDebugInfo(other.getDebugInfo());
|
setDebugInfo(other.getDebugInfo());
|
||||||
}
|
}
|
||||||
if (other.hasFile()) {
|
|
||||||
setFile(other.getFile());
|
|
||||||
}
|
|
||||||
setUnknownFields(
|
setUnknownFields(
|
||||||
getUnknownFields().concat(other.unknownFields));
|
getUnknownFields().concat(other.unknownFields));
|
||||||
return this;
|
return this;
|
||||||
@@ -522,38 +485,6 @@ public final class FileLocalIdSignature extends
|
|||||||
return this;
|
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)
|
// @@protoc_insertion_point(builder_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>
|
* <code>optional int32 debug_info = 3;</code>
|
||||||
*/
|
*/
|
||||||
int getDebugInfo();
|
int getDebugInfo();
|
||||||
|
|
||||||
/**
|
|
||||||
* <code>optional int32 file = 101;</code>
|
|
||||||
*/
|
|
||||||
boolean hasFile();
|
|
||||||
/**
|
|
||||||
* <code>optional int32 file = 101;</code>
|
|
||||||
*/
|
|
||||||
int getFile();
|
|
||||||
}
|
}
|
||||||
-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();
|
|
||||||
}
|
|
||||||
-154
@@ -136,19 +136,6 @@ public final class IdSignature extends
|
|||||||
idSigCase_ = 7;
|
idSigCase_ = 7;
|
||||||
break;
|
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) {
|
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
|
||||||
@@ -194,7 +181,6 @@ public final class IdSignature extends
|
|||||||
COMPOSITE_SIG(5),
|
COMPOSITE_SIG(5),
|
||||||
LOCAL_SIG(6),
|
LOCAL_SIG(6),
|
||||||
FILE_SIG(7),
|
FILE_SIG(7),
|
||||||
IC_SIG(101),
|
|
||||||
IDSIG_NOT_SET(0);
|
IDSIG_NOT_SET(0);
|
||||||
private int value = 0;
|
private int value = 0;
|
||||||
private IdSigCase(int value) {
|
private IdSigCase(int value) {
|
||||||
@@ -209,7 +195,6 @@ public final class IdSignature extends
|
|||||||
case 5: return COMPOSITE_SIG;
|
case 5: return COMPOSITE_SIG;
|
||||||
case 6: return LOCAL_SIG;
|
case 6: return LOCAL_SIG;
|
||||||
case 7: return FILE_SIG;
|
case 7: return FILE_SIG;
|
||||||
case 101: return IC_SIG;
|
|
||||||
case 0: return IDSIG_NOT_SET;
|
case 0: return IDSIG_NOT_SET;
|
||||||
default: throw new java.lang.IllegalArgumentException(
|
default: throw new java.lang.IllegalArgumentException(
|
||||||
"Value is undefined for this oneof enum.");
|
"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();
|
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 void initFields() {
|
||||||
}
|
}
|
||||||
private byte memoizedIsInitialized = -1;
|
private byte memoizedIsInitialized = -1;
|
||||||
@@ -396,12 +356,6 @@ public final class IdSignature extends
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (hasIcSig()) {
|
|
||||||
if (!getIcSig().isInitialized()) {
|
|
||||||
memoizedIsInitialized = 0;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
memoizedIsInitialized = 1;
|
memoizedIsInitialized = 1;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -431,9 +385,6 @@ public final class IdSignature extends
|
|||||||
if (idSigCase_ == 7) {
|
if (idSigCase_ == 7) {
|
||||||
output.writeMessage(7, (org.jetbrains.kotlin.backend.common.serialization.proto.FileSignature) idSig_);
|
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);
|
output.writeRawBytes(unknownFields);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -472,10 +423,6 @@ public final class IdSignature extends
|
|||||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||||
.computeMessageSize(7, (org.jetbrains.kotlin.backend.common.serialization.proto.FileSignature) idSig_);
|
.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();
|
size += unknownFields.size();
|
||||||
memoizedSerializedSize = size;
|
memoizedSerializedSize = size;
|
||||||
return size;
|
return size;
|
||||||
@@ -616,9 +563,6 @@ public final class IdSignature extends
|
|||||||
if (idSigCase_ == 7) {
|
if (idSigCase_ == 7) {
|
||||||
result.idSig_ = idSig_;
|
result.idSig_ = idSig_;
|
||||||
}
|
}
|
||||||
if (idSigCase_ == 101) {
|
|
||||||
result.idSig_ = idSig_;
|
|
||||||
}
|
|
||||||
result.bitField0_ = to_bitField0_;
|
result.bitField0_ = to_bitField0_;
|
||||||
result.idSigCase_ = idSigCase_;
|
result.idSigCase_ = idSigCase_;
|
||||||
return result;
|
return result;
|
||||||
@@ -655,10 +599,6 @@ public final class IdSignature extends
|
|||||||
mergeFileSig(other.getFileSig());
|
mergeFileSig(other.getFileSig());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case IC_SIG: {
|
|
||||||
mergeIcSig(other.getIcSig());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case IDSIG_NOT_SET: {
|
case IDSIG_NOT_SET: {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -687,12 +627,6 @@ public final class IdSignature extends
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (hasIcSig()) {
|
|
||||||
if (!getIcSig().isInitialized()) {
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1149,94 +1083,6 @@ public final class IdSignature extends
|
|||||||
return this;
|
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)
|
// @@protoc_insertion_point(builder_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>
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.FileSignature file_sig = 7;</code>
|
||||||
*/
|
*/
|
||||||
org.jetbrains.kotlin.backend.common.serialization.proto.FileSignature getFileSig();
|
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();
|
|
||||||
}
|
}
|
||||||
-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!
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||||
// source: compiler/ir/serialization.common/src/KotlinIr.proto
|
// source: compiler/ir/serialization.common/src/KotlinIr.proto
|
||||||
|
|
||||||
|
|||||||
-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!
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||||
// source: compiler/ir/serialization.common/src/KotlinIr.proto
|
// source: compiler/ir/serialization.common/src/KotlinIr.proto
|
||||||
|
|
||||||
|
|||||||
-366
@@ -514,45 +514,6 @@ public final class IrOperation extends
|
|||||||
operationCase_ = 35;
|
operationCase_ = 35;
|
||||||
break;
|
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) {
|
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
|
||||||
@@ -627,9 +588,6 @@ public final class IrOperation extends
|
|||||||
FUNCTION_EXPRESSION(33),
|
FUNCTION_EXPRESSION(33),
|
||||||
ERROR_EXPRESSION(34),
|
ERROR_EXPRESSION(34),
|
||||||
ERROR_CALL_EXPRESSION(35),
|
ERROR_CALL_EXPRESSION(35),
|
||||||
RAW_FUNCTION_REFERENCE(136),
|
|
||||||
RETURNABLE_BLOCK(137),
|
|
||||||
RETURNABLE_BLOCK_RETURN(138),
|
|
||||||
OPERATION_NOT_SET(0);
|
OPERATION_NOT_SET(0);
|
||||||
private int value = 0;
|
private int value = 0;
|
||||||
private OperationCase(int value) {
|
private OperationCase(int value) {
|
||||||
@@ -672,9 +630,6 @@ public final class IrOperation extends
|
|||||||
case 33: return FUNCTION_EXPRESSION;
|
case 33: return FUNCTION_EXPRESSION;
|
||||||
case 34: return ERROR_EXPRESSION;
|
case 34: return ERROR_EXPRESSION;
|
||||||
case 35: return ERROR_CALL_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;
|
case 0: return OPERATION_NOT_SET;
|
||||||
default: throw new java.lang.IllegalArgumentException(
|
default: throw new java.lang.IllegalArgumentException(
|
||||||
"Value is undefined for this oneof enum.");
|
"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();
|
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 void initFields() {
|
||||||
}
|
}
|
||||||
private byte memoizedIsInitialized = -1;
|
private byte memoizedIsInitialized = -1;
|
||||||
@@ -1557,24 +1461,6 @@ public final class IrOperation extends
|
|||||||
return false;
|
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;
|
memoizedIsInitialized = 1;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -1687,15 +1573,6 @@ public final class IrOperation extends
|
|||||||
if (operationCase_ == 35) {
|
if (operationCase_ == 35) {
|
||||||
output.writeMessage(35, (org.jetbrains.kotlin.backend.common.serialization.proto.IrErrorCallExpression) operation_);
|
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);
|
output.writeRawBytes(unknownFields);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1845,18 +1722,6 @@ public final class IrOperation extends
|
|||||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||||
.computeMessageSize(35, (org.jetbrains.kotlin.backend.common.serialization.proto.IrErrorCallExpression) operation_);
|
.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();
|
size += unknownFields.size();
|
||||||
memoizedSerializedSize = size;
|
memoizedSerializedSize = size;
|
||||||
return size;
|
return size;
|
||||||
@@ -2088,15 +1953,6 @@ public final class IrOperation extends
|
|||||||
if (operationCase_ == 35) {
|
if (operationCase_ == 35) {
|
||||||
result.operation_ = operation_;
|
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.bitField0_ = to_bitField0_;
|
||||||
result.bitField1_ = to_bitField1_;
|
result.bitField1_ = to_bitField1_;
|
||||||
result.operationCase_ = operationCase_;
|
result.operationCase_ = operationCase_;
|
||||||
@@ -2246,18 +2102,6 @@ public final class IrOperation extends
|
|||||||
mergeErrorCallExpression(other.getErrorCallExpression());
|
mergeErrorCallExpression(other.getErrorCallExpression());
|
||||||
break;
|
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: {
|
case OPERATION_NOT_SET: {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -2472,24 +2316,6 @@ public final class IrOperation extends
|
|||||||
return false;
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4791,198 +4617,6 @@ public final class IrOperation extends
|
|||||||
return this;
|
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)
|
// @@protoc_insertion_point(builder_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>
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.IrErrorCallExpression error_call_expression = 35;</code>
|
||||||
*/
|
*/
|
||||||
org.jetbrains.kotlin.backend.common.serialization.proto.IrErrorCallExpression getErrorCallExpression();
|
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();
|
|
||||||
}
|
}
|
||||||
-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();
|
|
||||||
}
|
|
||||||
-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();
|
|
||||||
}
|
|
||||||
-138
@@ -92,16 +92,6 @@ public final class IrTypeParameter extends
|
|||||||
input.popLimit(limit);
|
input.popLimit(limit);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 832: {
|
|
||||||
bitField0_ |= 0x00000004;
|
|
||||||
index_ = input.readInt32();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 840: {
|
|
||||||
bitField0_ |= 0x00000008;
|
|
||||||
isGlobal_ = input.readBool();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
|
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
|
||||||
@@ -192,42 +182,10 @@ public final class IrTypeParameter extends
|
|||||||
}
|
}
|
||||||
private int superTypeMemoizedSerializedSize = -1;
|
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() {
|
private void initFields() {
|
||||||
base_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclarationBase.getDefaultInstance();
|
base_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclarationBase.getDefaultInstance();
|
||||||
name_ = 0;
|
name_ = 0;
|
||||||
superType_ = java.util.Collections.emptyList();
|
superType_ = java.util.Collections.emptyList();
|
||||||
index_ = 0;
|
|
||||||
isGlobal_ = false;
|
|
||||||
}
|
}
|
||||||
private byte memoizedIsInitialized = -1;
|
private byte memoizedIsInitialized = -1;
|
||||||
public final boolean isInitialized() {
|
public final boolean isInitialized() {
|
||||||
@@ -267,12 +225,6 @@ public final class IrTypeParameter extends
|
|||||||
for (int i = 0; i < superType_.size(); i++) {
|
for (int i = 0; i < superType_.size(); i++) {
|
||||||
output.writeInt32NoTag(superType_.get(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);
|
output.writeRawBytes(unknownFields);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -304,14 +256,6 @@ public final class IrTypeParameter extends
|
|||||||
}
|
}
|
||||||
superTypeMemoizedSerializedSize = dataSize;
|
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();
|
size += unknownFields.size();
|
||||||
memoizedSerializedSize = size;
|
memoizedSerializedSize = size;
|
||||||
return size;
|
return size;
|
||||||
@@ -412,10 +356,6 @@ public final class IrTypeParameter extends
|
|||||||
bitField0_ = (bitField0_ & ~0x00000002);
|
bitField0_ = (bitField0_ & ~0x00000002);
|
||||||
superType_ = java.util.Collections.emptyList();
|
superType_ = java.util.Collections.emptyList();
|
||||||
bitField0_ = (bitField0_ & ~0x00000004);
|
bitField0_ = (bitField0_ & ~0x00000004);
|
||||||
index_ = 0;
|
|
||||||
bitField0_ = (bitField0_ & ~0x00000008);
|
|
||||||
isGlobal_ = false;
|
|
||||||
bitField0_ = (bitField0_ & ~0x00000010);
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -452,14 +392,6 @@ public final class IrTypeParameter extends
|
|||||||
bitField0_ = (bitField0_ & ~0x00000004);
|
bitField0_ = (bitField0_ & ~0x00000004);
|
||||||
}
|
}
|
||||||
result.superType_ = superType_;
|
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_;
|
result.bitField0_ = to_bitField0_;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -482,12 +414,6 @@ public final class IrTypeParameter extends
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (other.hasIndex()) {
|
|
||||||
setIndex(other.getIndex());
|
|
||||||
}
|
|
||||||
if (other.hasIsGlobal()) {
|
|
||||||
setIsGlobal(other.getIsGlobal());
|
|
||||||
}
|
|
||||||
setUnknownFields(
|
setUnknownFields(
|
||||||
getUnknownFields().concat(other.unknownFields));
|
getUnknownFields().concat(other.unknownFields));
|
||||||
return this;
|
return this;
|
||||||
@@ -686,70 +612,6 @@ public final class IrTypeParameter extends
|
|||||||
return this;
|
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)
|
// @@protoc_insertion_point(builder_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>
|
* <code>repeated int32 super_type = 3 [packed = true];</code>
|
||||||
*/
|
*/
|
||||||
int getSuperType(int index);
|
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();
|
|
||||||
}
|
}
|
||||||
-69
@@ -81,11 +81,6 @@ public final class IrValueParameter extends
|
|||||||
defaultValue_ = input.readInt32();
|
defaultValue_ = input.readInt32();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 840: {
|
|
||||||
bitField0_ |= 0x00000010;
|
|
||||||
index_ = input.readInt32();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
|
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
|
||||||
@@ -180,27 +175,11 @@ public final class IrValueParameter extends
|
|||||||
return defaultValue_;
|
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() {
|
private void initFields() {
|
||||||
base_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclarationBase.getDefaultInstance();
|
base_ = org.jetbrains.kotlin.backend.common.serialization.proto.IrDeclarationBase.getDefaultInstance();
|
||||||
nameType_ = 0L;
|
nameType_ = 0L;
|
||||||
varargElementType_ = 0;
|
varargElementType_ = 0;
|
||||||
defaultValue_ = 0;
|
defaultValue_ = 0;
|
||||||
index_ = 0;
|
|
||||||
}
|
}
|
||||||
private byte memoizedIsInitialized = -1;
|
private byte memoizedIsInitialized = -1;
|
||||||
public final boolean isInitialized() {
|
public final boolean isInitialized() {
|
||||||
@@ -239,9 +218,6 @@ public final class IrValueParameter extends
|
|||||||
if (((bitField0_ & 0x00000008) == 0x00000008)) {
|
if (((bitField0_ & 0x00000008) == 0x00000008)) {
|
||||||
output.writeInt32(4, defaultValue_);
|
output.writeInt32(4, defaultValue_);
|
||||||
}
|
}
|
||||||
if (((bitField0_ & 0x00000010) == 0x00000010)) {
|
|
||||||
output.writeInt32(105, index_);
|
|
||||||
}
|
|
||||||
output.writeRawBytes(unknownFields);
|
output.writeRawBytes(unknownFields);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -267,10 +243,6 @@ public final class IrValueParameter extends
|
|||||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
||||||
.computeInt32Size(4, defaultValue_);
|
.computeInt32Size(4, defaultValue_);
|
||||||
}
|
}
|
||||||
if (((bitField0_ & 0x00000010) == 0x00000010)) {
|
|
||||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
|
||||||
.computeInt32Size(105, index_);
|
|
||||||
}
|
|
||||||
size += unknownFields.size();
|
size += unknownFields.size();
|
||||||
memoizedSerializedSize = size;
|
memoizedSerializedSize = size;
|
||||||
return size;
|
return size;
|
||||||
@@ -373,8 +345,6 @@ public final class IrValueParameter extends
|
|||||||
bitField0_ = (bitField0_ & ~0x00000004);
|
bitField0_ = (bitField0_ & ~0x00000004);
|
||||||
defaultValue_ = 0;
|
defaultValue_ = 0;
|
||||||
bitField0_ = (bitField0_ & ~0x00000008);
|
bitField0_ = (bitField0_ & ~0x00000008);
|
||||||
index_ = 0;
|
|
||||||
bitField0_ = (bitField0_ & ~0x00000010);
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -414,10 +384,6 @@ public final class IrValueParameter extends
|
|||||||
to_bitField0_ |= 0x00000008;
|
to_bitField0_ |= 0x00000008;
|
||||||
}
|
}
|
||||||
result.defaultValue_ = defaultValue_;
|
result.defaultValue_ = defaultValue_;
|
||||||
if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
|
|
||||||
to_bitField0_ |= 0x00000010;
|
|
||||||
}
|
|
||||||
result.index_ = index_;
|
|
||||||
result.bitField0_ = to_bitField0_;
|
result.bitField0_ = to_bitField0_;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -436,9 +402,6 @@ public final class IrValueParameter extends
|
|||||||
if (other.hasDefaultValue()) {
|
if (other.hasDefaultValue()) {
|
||||||
setDefaultValue(other.getDefaultValue());
|
setDefaultValue(other.getDefaultValue());
|
||||||
}
|
}
|
||||||
if (other.hasIndex()) {
|
|
||||||
setIndex(other.getIndex());
|
|
||||||
}
|
|
||||||
setUnknownFields(
|
setUnknownFields(
|
||||||
getUnknownFields().concat(other.unknownFields));
|
getUnknownFields().concat(other.unknownFields));
|
||||||
return this;
|
return this;
|
||||||
@@ -635,38 +598,6 @@ public final class IrValueParameter extends
|
|||||||
return this;
|
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)
|
// @@protoc_insertion_point(builder_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>
|
* <code>optional int32 default_value = 4;</code>
|
||||||
*/
|
*/
|
||||||
int getDefaultValue();
|
int getDefaultValue();
|
||||||
|
|
||||||
/**
|
|
||||||
* <code>optional int32 index = 105;</code>
|
|
||||||
*/
|
|
||||||
boolean hasIndex();
|
|
||||||
/**
|
|
||||||
* <code>optional int32 index = 105;</code>
|
|
||||||
*/
|
|
||||||
int getIndex();
|
|
||||||
}
|
}
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||||
// source: compiler/ir/serialization.common/src/KotlinPirCarriers.proto
|
// source: compiler/ir/serialization.common/src/KotlinIr.proto
|
||||||
|
|
||||||
package org.jetbrains.kotlin.backend.common.serialization.proto;
|
package org.jetbrains.kotlin.backend.common.serialization.proto;
|
||||||
|
|
||||||
|
|||||||
-505
@@ -1,505 +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.LoweredIdSignature}
|
|
||||||
*/
|
|
||||||
public final class LoweredIdSignature extends
|
|
||||||
org.jetbrains.kotlin.protobuf.GeneratedMessageLite implements
|
|
||||||
// @@protoc_insertion_point(message_implements:org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature)
|
|
||||||
LoweredIdSignatureOrBuilder {
|
|
||||||
// Use LoweredIdSignature.newBuilder() to construct.
|
|
||||||
private LoweredIdSignature(org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder builder) {
|
|
||||||
super(builder);
|
|
||||||
this.unknownFields = builder.getUnknownFields();
|
|
||||||
}
|
|
||||||
private LoweredIdSignature(boolean noInit) { this.unknownFields = org.jetbrains.kotlin.protobuf.ByteString.EMPTY;}
|
|
||||||
|
|
||||||
private static final LoweredIdSignature defaultInstance;
|
|
||||||
public static LoweredIdSignature getDefaultInstance() {
|
|
||||||
return defaultInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
public LoweredIdSignature getDefaultInstanceForType() {
|
|
||||||
return defaultInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
private final org.jetbrains.kotlin.protobuf.ByteString unknownFields;
|
|
||||||
private LoweredIdSignature(
|
|
||||||
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;
|
|
||||||
parentSignature_ = input.readInt32();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 16: {
|
|
||||||
bitField0_ |= 0x00000002;
|
|
||||||
stage_ = input.readInt32();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 24: {
|
|
||||||
bitField0_ |= 0x00000004;
|
|
||||||
index_ = input.readInt32();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
|
|
||||||
throw e.setUnfinishedMessage(this);
|
|
||||||
} catch (java.io.IOException e) {
|
|
||||||
throw new org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException(
|
|
||||||
e.getMessage()).setUnfinishedMessage(this);
|
|
||||||
} finally {
|
|
||||||
try {
|
|
||||||
unknownFieldsCodedOutput.flush();
|
|
||||||
} catch (java.io.IOException e) {
|
|
||||||
// Should not happen
|
|
||||||
} finally {
|
|
||||||
unknownFields = unknownFieldsOutput.toByteString();
|
|
||||||
}
|
|
||||||
makeExtensionsImmutable();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public static org.jetbrains.kotlin.protobuf.Parser<LoweredIdSignature> PARSER =
|
|
||||||
new org.jetbrains.kotlin.protobuf.AbstractParser<LoweredIdSignature>() {
|
|
||||||
public LoweredIdSignature parsePartialFrom(
|
|
||||||
org.jetbrains.kotlin.protobuf.CodedInputStream input,
|
|
||||||
org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
|
|
||||||
throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
|
|
||||||
return new LoweredIdSignature(input, extensionRegistry);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
@java.lang.Override
|
|
||||||
public org.jetbrains.kotlin.protobuf.Parser<LoweredIdSignature> getParserForType() {
|
|
||||||
return PARSER;
|
|
||||||
}
|
|
||||||
|
|
||||||
private int bitField0_;
|
|
||||||
public static final int PARENT_SIGNATURE_FIELD_NUMBER = 1;
|
|
||||||
private int parentSignature_;
|
|
||||||
/**
|
|
||||||
* <code>required int32 parent_signature = 1;</code>
|
|
||||||
*/
|
|
||||||
public boolean hasParentSignature() {
|
|
||||||
return ((bitField0_ & 0x00000001) == 0x00000001);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* <code>required int32 parent_signature = 1;</code>
|
|
||||||
*/
|
|
||||||
public int getParentSignature() {
|
|
||||||
return parentSignature_;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static final int STAGE_FIELD_NUMBER = 2;
|
|
||||||
private int stage_;
|
|
||||||
/**
|
|
||||||
* <code>required int32 stage = 2;</code>
|
|
||||||
*/
|
|
||||||
public boolean hasStage() {
|
|
||||||
return ((bitField0_ & 0x00000002) == 0x00000002);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* <code>required int32 stage = 2;</code>
|
|
||||||
*/
|
|
||||||
public int getStage() {
|
|
||||||
return stage_;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static final int INDEX_FIELD_NUMBER = 3;
|
|
||||||
private int index_;
|
|
||||||
/**
|
|
||||||
* <code>required int32 index = 3;</code>
|
|
||||||
*/
|
|
||||||
public boolean hasIndex() {
|
|
||||||
return ((bitField0_ & 0x00000004) == 0x00000004);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* <code>required int32 index = 3;</code>
|
|
||||||
*/
|
|
||||||
public int getIndex() {
|
|
||||||
return index_;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void initFields() {
|
|
||||||
parentSignature_ = 0;
|
|
||||||
stage_ = 0;
|
|
||||||
index_ = 0;
|
|
||||||
}
|
|
||||||
private byte memoizedIsInitialized = -1;
|
|
||||||
public final boolean isInitialized() {
|
|
||||||
byte isInitialized = memoizedIsInitialized;
|
|
||||||
if (isInitialized == 1) return true;
|
|
||||||
if (isInitialized == 0) return false;
|
|
||||||
|
|
||||||
if (!hasParentSignature()) {
|
|
||||||
memoizedIsInitialized = 0;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (!hasStage()) {
|
|
||||||
memoizedIsInitialized = 0;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (!hasIndex()) {
|
|
||||||
memoizedIsInitialized = 0;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
memoizedIsInitialized = 1;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void writeTo(org.jetbrains.kotlin.protobuf.CodedOutputStream output)
|
|
||||||
throws java.io.IOException {
|
|
||||||
getSerializedSize();
|
|
||||||
if (((bitField0_ & 0x00000001) == 0x00000001)) {
|
|
||||||
output.writeInt32(1, parentSignature_);
|
|
||||||
}
|
|
||||||
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
|
||||||
output.writeInt32(2, stage_);
|
|
||||||
}
|
|
||||||
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
|
||||||
output.writeInt32(3, index_);
|
|
||||||
}
|
|
||||||
output.writeRawBytes(unknownFields);
|
|
||||||
}
|
|
||||||
|
|
||||||
private int memoizedSerializedSize = -1;
|
|
||||||
public int getSerializedSize() {
|
|
||||||
int size = memoizedSerializedSize;
|
|
||||||
if (size != -1) return size;
|
|
||||||
|
|
||||||
size = 0;
|
|
||||||
if (((bitField0_ & 0x00000001) == 0x00000001)) {
|
|
||||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
|
||||||
.computeInt32Size(1, parentSignature_);
|
|
||||||
}
|
|
||||||
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
|
||||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
|
||||||
.computeInt32Size(2, stage_);
|
|
||||||
}
|
|
||||||
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
|
||||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
|
||||||
.computeInt32Size(3, index_);
|
|
||||||
}
|
|
||||||
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.LoweredIdSignature 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.LoweredIdSignature 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.LoweredIdSignature parseFrom(byte[] data)
|
|
||||||
throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
|
|
||||||
return PARSER.parseFrom(data);
|
|
||||||
}
|
|
||||||
public static org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature 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.LoweredIdSignature parseFrom(java.io.InputStream input)
|
|
||||||
throws java.io.IOException {
|
|
||||||
return PARSER.parseFrom(input);
|
|
||||||
}
|
|
||||||
public static org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature 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.LoweredIdSignature parseDelimitedFrom(java.io.InputStream input)
|
|
||||||
throws java.io.IOException {
|
|
||||||
return PARSER.parseDelimitedFrom(input);
|
|
||||||
}
|
|
||||||
public static org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature 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.LoweredIdSignature parseFrom(
|
|
||||||
org.jetbrains.kotlin.protobuf.CodedInputStream input)
|
|
||||||
throws java.io.IOException {
|
|
||||||
return PARSER.parseFrom(input);
|
|
||||||
}
|
|
||||||
public static org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature 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.LoweredIdSignature prototype) {
|
|
||||||
return newBuilder().mergeFrom(prototype);
|
|
||||||
}
|
|
||||||
public Builder toBuilder() { return newBuilder(this); }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Protobuf type {@code org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature}
|
|
||||||
*/
|
|
||||||
public static final class Builder extends
|
|
||||||
org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder<
|
|
||||||
org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature, Builder>
|
|
||||||
implements
|
|
||||||
// @@protoc_insertion_point(builder_implements:org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature)
|
|
||||||
org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignatureOrBuilder {
|
|
||||||
// Construct using org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature.newBuilder()
|
|
||||||
private Builder() {
|
|
||||||
maybeForceBuilderInitialization();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void maybeForceBuilderInitialization() {
|
|
||||||
}
|
|
||||||
private static Builder create() {
|
|
||||||
return new Builder();
|
|
||||||
}
|
|
||||||
|
|
||||||
public Builder clear() {
|
|
||||||
super.clear();
|
|
||||||
parentSignature_ = 0;
|
|
||||||
bitField0_ = (bitField0_ & ~0x00000001);
|
|
||||||
stage_ = 0;
|
|
||||||
bitField0_ = (bitField0_ & ~0x00000002);
|
|
||||||
index_ = 0;
|
|
||||||
bitField0_ = (bitField0_ & ~0x00000004);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Builder clone() {
|
|
||||||
return create().mergeFrom(buildPartial());
|
|
||||||
}
|
|
||||||
|
|
||||||
public org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature getDefaultInstanceForType() {
|
|
||||||
return org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature.getDefaultInstance();
|
|
||||||
}
|
|
||||||
|
|
||||||
public org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature build() {
|
|
||||||
org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature result = buildPartial();
|
|
||||||
if (!result.isInitialized()) {
|
|
||||||
throw newUninitializedMessageException(result);
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
public org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature buildPartial() {
|
|
||||||
org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature result = new org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature(this);
|
|
||||||
int from_bitField0_ = bitField0_;
|
|
||||||
int to_bitField0_ = 0;
|
|
||||||
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
|
|
||||||
to_bitField0_ |= 0x00000001;
|
|
||||||
}
|
|
||||||
result.parentSignature_ = parentSignature_;
|
|
||||||
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
|
|
||||||
to_bitField0_ |= 0x00000002;
|
|
||||||
}
|
|
||||||
result.stage_ = stage_;
|
|
||||||
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
|
|
||||||
to_bitField0_ |= 0x00000004;
|
|
||||||
}
|
|
||||||
result.index_ = index_;
|
|
||||||
result.bitField0_ = to_bitField0_;
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Builder mergeFrom(org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature other) {
|
|
||||||
if (other == org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature.getDefaultInstance()) return this;
|
|
||||||
if (other.hasParentSignature()) {
|
|
||||||
setParentSignature(other.getParentSignature());
|
|
||||||
}
|
|
||||||
if (other.hasStage()) {
|
|
||||||
setStage(other.getStage());
|
|
||||||
}
|
|
||||||
if (other.hasIndex()) {
|
|
||||||
setIndex(other.getIndex());
|
|
||||||
}
|
|
||||||
setUnknownFields(
|
|
||||||
getUnknownFields().concat(other.unknownFields));
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public final boolean isInitialized() {
|
|
||||||
if (!hasParentSignature()) {
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (!hasStage()) {
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (!hasIndex()) {
|
|
||||||
|
|
||||||
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.LoweredIdSignature parsedMessage = null;
|
|
||||||
try {
|
|
||||||
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
|
||||||
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
|
|
||||||
parsedMessage = (org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature) e.getUnfinishedMessage();
|
|
||||||
throw e;
|
|
||||||
} finally {
|
|
||||||
if (parsedMessage != null) {
|
|
||||||
mergeFrom(parsedMessage);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
private int bitField0_;
|
|
||||||
|
|
||||||
private int parentSignature_ ;
|
|
||||||
/**
|
|
||||||
* <code>required int32 parent_signature = 1;</code>
|
|
||||||
*/
|
|
||||||
public boolean hasParentSignature() {
|
|
||||||
return ((bitField0_ & 0x00000001) == 0x00000001);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* <code>required int32 parent_signature = 1;</code>
|
|
||||||
*/
|
|
||||||
public int getParentSignature() {
|
|
||||||
return parentSignature_;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* <code>required int32 parent_signature = 1;</code>
|
|
||||||
*/
|
|
||||||
public Builder setParentSignature(int value) {
|
|
||||||
bitField0_ |= 0x00000001;
|
|
||||||
parentSignature_ = value;
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* <code>required int32 parent_signature = 1;</code>
|
|
||||||
*/
|
|
||||||
public Builder clearParentSignature() {
|
|
||||||
bitField0_ = (bitField0_ & ~0x00000001);
|
|
||||||
parentSignature_ = 0;
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
private int stage_ ;
|
|
||||||
/**
|
|
||||||
* <code>required int32 stage = 2;</code>
|
|
||||||
*/
|
|
||||||
public boolean hasStage() {
|
|
||||||
return ((bitField0_ & 0x00000002) == 0x00000002);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* <code>required int32 stage = 2;</code>
|
|
||||||
*/
|
|
||||||
public int getStage() {
|
|
||||||
return stage_;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* <code>required int32 stage = 2;</code>
|
|
||||||
*/
|
|
||||||
public Builder setStage(int value) {
|
|
||||||
bitField0_ |= 0x00000002;
|
|
||||||
stage_ = value;
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* <code>required int32 stage = 2;</code>
|
|
||||||
*/
|
|
||||||
public Builder clearStage() {
|
|
||||||
bitField0_ = (bitField0_ & ~0x00000002);
|
|
||||||
stage_ = 0;
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
private int index_ ;
|
|
||||||
/**
|
|
||||||
* <code>required int32 index = 3;</code>
|
|
||||||
*/
|
|
||||||
public boolean hasIndex() {
|
|
||||||
return ((bitField0_ & 0x00000004) == 0x00000004);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* <code>required int32 index = 3;</code>
|
|
||||||
*/
|
|
||||||
public int getIndex() {
|
|
||||||
return index_;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* <code>required int32 index = 3;</code>
|
|
||||||
*/
|
|
||||||
public Builder setIndex(int value) {
|
|
||||||
bitField0_ |= 0x00000004;
|
|
||||||
index_ = value;
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* <code>required int32 index = 3;</code>
|
|
||||||
*/
|
|
||||||
public Builder clearIndex() {
|
|
||||||
bitField0_ = (bitField0_ & ~0x00000004);
|
|
||||||
index_ = 0;
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
// @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature)
|
|
||||||
}
|
|
||||||
|
|
||||||
static {
|
|
||||||
defaultInstance = new LoweredIdSignature(true);
|
|
||||||
defaultInstance.initFields();
|
|
||||||
}
|
|
||||||
|
|
||||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature)
|
|
||||||
}
|
|
||||||
-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 LoweredIdSignatureOrBuilder extends
|
|
||||||
// @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature)
|
|
||||||
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,221 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.jetbrains.kotlin.ir.backend.js
|
|
||||||
|
|
||||||
import org.jetbrains.kotlin.backend.common.DefaultMapping
|
|
||||||
import org.jetbrains.kotlin.backend.common.DelegateFactory
|
|
||||||
import org.jetbrains.kotlin.backend.common.Mapping
|
|
||||||
import org.jetbrains.kotlin.ir.declarations.*
|
|
||||||
import org.jetbrains.kotlin.ir.symbols.IrSymbol
|
|
||||||
import org.jetbrains.kotlin.ir.util.IdSignature
|
|
||||||
import org.jetbrains.kotlin.library.impl.*
|
|
||||||
|
|
||||||
fun JsMapping(irFactory: IrFactory) = JsMapping(JsMappingState(irFactory))
|
|
||||||
|
|
||||||
class JsMapping(val state: JsMappingState) : DefaultMapping(state) {
|
|
||||||
val outerThisFieldSymbols = state.newDeclarationToDeclarationMapping<IrClass, IrField>()
|
|
||||||
val innerClassConstructors = state.newDeclarationToDeclarationMapping<IrConstructor, IrConstructor>()
|
|
||||||
val originalInnerClassPrimaryConstructorByClass = state.newDeclarationToDeclarationMapping<IrClass, IrConstructor>()
|
|
||||||
val secondaryConstructorToDelegate = state.newDeclarationToDeclarationMapping<IrConstructor, IrSimpleFunction>()
|
|
||||||
val secondaryConstructorToFactory = state.newDeclarationToDeclarationMapping<IrConstructor, IrSimpleFunction>()
|
|
||||||
val objectToGetInstanceFunction = state.newDeclarationToDeclarationMapping<IrClass, IrSimpleFunction>()
|
|
||||||
val objectToInstanceField = state.newDeclarationToDeclarationMapping<IrClass, IrField>()
|
|
||||||
val classToSyntheticPrimaryConstructor = state.newDeclarationToDeclarationMapping<IrClass, IrConstructor>()
|
|
||||||
val privateMemberToCorrespondingStatic = state.newDeclarationToDeclarationMapping<IrFunction, IrSimpleFunction>()
|
|
||||||
|
|
||||||
val constructorToInitFunction = state.newDeclarationToDeclarationMapping<IrConstructor, IrSimpleFunction>()
|
|
||||||
|
|
||||||
val enumEntryToGetInstanceFun = state.newDeclarationToDeclarationMapping<IrEnumEntry, IrSimpleFunction>()
|
|
||||||
val enumEntryToInstanceField = state.newDeclarationToDeclarationMapping<IrEnumEntry, IrField>()
|
|
||||||
val enumConstructorToNewConstructor = state.newDeclarationToDeclarationMapping<IrConstructor, IrConstructor>()
|
|
||||||
val enumClassToCorrespondingEnumEntry = state.newDeclarationToDeclarationMapping<IrClass, IrEnumEntry>()
|
|
||||||
val enumConstructorOldToNewValueParameters = state.newDeclarationToDeclarationMapping<IrValueDeclaration, IrValueParameter>()
|
|
||||||
val enumEntryToCorrespondingField = state.newDeclarationToDeclarationMapping<IrEnumEntry, IrField>()
|
|
||||||
val fieldToEnumEntry = state.newDeclarationToDeclarationMapping<IrField, IrEnumEntry>()
|
|
||||||
val enumClassToInitEntryInstancesFun = state.newDeclarationToDeclarationMapping<IrClass, IrSimpleFunction>()
|
|
||||||
|
|
||||||
val suspendFunctionsToFunctionWithContinuations =
|
|
||||||
state.newDeclarationToDeclarationMapping<IrSimpleFunction, IrSimpleFunction>()
|
|
||||||
|
|
||||||
val suspendArityStore = state.newDeclarationToDeclarationCollectionMapping<IrClass, Collection<IrSimpleFunction>>()
|
|
||||||
|
|
||||||
// Wasm mappings
|
|
||||||
val wasmJsInteropFunctionToWrapper =
|
|
||||||
state.newDeclarationToDeclarationMapping<IrSimpleFunction, IrSimpleFunction>()
|
|
||||||
|
|
||||||
val wasmNestedExternalToNewTopLevelFunction =
|
|
||||||
state.newDeclarationToDeclarationMapping<IrFunction, IrSimpleFunction>()
|
|
||||||
|
|
||||||
val wasmExternalObjectToGetInstanceFunction =
|
|
||||||
state.newDeclarationToDeclarationMapping<IrClass, IrSimpleFunction>()
|
|
||||||
|
|
||||||
val wasmExternalClassToInstanceCheck =
|
|
||||||
state.newDeclarationToDeclarationMapping<IrClass, IrSimpleFunction>()
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
class JsMappingState(val irFactory: IrFactory) : DelegateFactory {
|
|
||||||
override fun <K : IrDeclaration, V : IrDeclaration> newDeclarationToDeclarationMapping(): Mapping.Delegate<K, V> {
|
|
||||||
return JsMappingDelegate<K, V>(irFactory).also {
|
|
||||||
allMappings += it
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun <K : IrDeclaration, V : Collection<IrDeclaration>> newDeclarationToDeclarationCollectionMapping(): Mapping.Delegate<K, V> {
|
|
||||||
return JsMappingCollectionDelegate<K, V>(irFactory).also {
|
|
||||||
allMappings += it
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private val allMappings = mutableListOf<SerializableMapping>()
|
|
||||||
|
|
||||||
fun serializeMappings(declarations: Iterable<IrDeclaration>, symbolSerializer: (IrSymbol) -> Long): SerializedMappings {
|
|
||||||
return SerializedMappings(allMappings.map { mapping ->
|
|
||||||
val keys = mutableListOf<Long>()
|
|
||||||
val values = mutableListOf<ByteArray>()
|
|
||||||
declarations.forEach { d ->
|
|
||||||
mapping.serializeMapping(d, symbolSerializer)?.let { bytes ->
|
|
||||||
keys += symbolSerializer((d as IrSymbolOwner).symbol)
|
|
||||||
values += bytes
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
SerializedMapping(
|
|
||||||
IrMemoryLongArrayWriter(keys).writeIntoMemory(),
|
|
||||||
IrMemoryArrayWriter(values).writeIntoMemory(),
|
|
||||||
)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
fun mappingsDeserializer(mapping: SerializedMappings, signatureDeserializer: (Long) -> IdSignature, symbolDeserializer: (Long) -> IrSymbol): (IdSignature, IrDeclaration) -> Unit {
|
|
||||||
if (allMappings.size != mapping.mappings.size) error("Mapping size mismatch")
|
|
||||||
|
|
||||||
val index = Array<Map<IdSignature, ByteArray>>(allMappings.size) { i ->
|
|
||||||
val bytes = mapping.mappings[i]
|
|
||||||
val s = IrLongArrayMemoryReader(bytes.keys).array.map(signatureDeserializer)
|
|
||||||
val v = IrArrayMemoryReader(bytes.values).toArray()
|
|
||||||
|
|
||||||
if (s.size != v.size) error("Keys size != values size")
|
|
||||||
|
|
||||||
s.withIndex().associate { it.value to v[it.index] }
|
|
||||||
}
|
|
||||||
|
|
||||||
return { signature, declaration ->
|
|
||||||
for (i in allMappings.indices) {
|
|
||||||
index[i][signature]?.let { bytes ->
|
|
||||||
allMappings[i].loadMapping(declaration, bytes, symbolDeserializer)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class SerializedMappings(
|
|
||||||
val mappings: List<SerializedMapping>
|
|
||||||
)
|
|
||||||
|
|
||||||
class SerializedMapping(
|
|
||||||
val keys: ByteArray,
|
|
||||||
val values: ByteArray,
|
|
||||||
)
|
|
||||||
|
|
||||||
private interface SerializableMapping {
|
|
||||||
fun serializeMapping(declaration: IrDeclaration, symbolSerializer: (IrSymbol) -> Long): ByteArray?
|
|
||||||
|
|
||||||
fun loadMapping(declaration: IrDeclaration, mapping: ByteArray, symbolDeserializer: (Long) -> IrSymbol)
|
|
||||||
}
|
|
||||||
|
|
||||||
private class JsMappingDelegate<K : IrDeclaration, V : IrDeclaration>(val irFactory: IrFactory) : Mapping.Delegate<K, V>(), SerializableMapping {
|
|
||||||
|
|
||||||
private val map: MutableMap<IrSymbol, IrSymbol> = mutableMapOf()
|
|
||||||
|
|
||||||
@Suppress("UNCHECKED_CAST")
|
|
||||||
override operator fun get(key: K): V? {
|
|
||||||
irFactory.stageController.lazyLower(key)
|
|
||||||
return map[(key as IrSymbolOwner).symbol]?.owner as? V
|
|
||||||
}
|
|
||||||
|
|
||||||
override operator fun set(key: K, value: V?) {
|
|
||||||
irFactory.stageController.lazyLower(key)
|
|
||||||
if (value == null) {
|
|
||||||
map.remove((key as IrSymbolOwner).symbol)
|
|
||||||
} else {
|
|
||||||
map[(key as IrSymbolOwner).symbol] = (value as IrSymbolOwner).symbol
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun serializeMapping(declaration: IrDeclaration, symbolSerializer: (IrSymbol) -> Long): ByteArray? {
|
|
||||||
return map[(declaration as IrSymbolOwner).symbol]?.let { symbol ->
|
|
||||||
symbolSerializer(symbol).toByteArray()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun loadMapping(declaration: IrDeclaration, mapping: ByteArray, symbolDeserializer: (Long) -> IrSymbol) {
|
|
||||||
map[(declaration as IrSymbolOwner).symbol] = symbolDeserializer(mapping.toLong())
|
|
||||||
}
|
|
||||||
|
|
||||||
override val keys: Set<K>
|
|
||||||
get() = TODO("Not yet implemented")
|
|
||||||
|
|
||||||
override val values: Collection<V>
|
|
||||||
get() = TODO("Not yet implemented")
|
|
||||||
}
|
|
||||||
|
|
||||||
private class JsMappingCollectionDelegate<K : IrDeclaration, V : Collection<IrDeclaration>>(val irFactory: IrFactory) : Mapping.Delegate<K, V>(), SerializableMapping {
|
|
||||||
private val map: MutableMap<IrSymbol, Collection<IrSymbol>> = mutableMapOf()
|
|
||||||
|
|
||||||
@Suppress("UNCHECKED_CAST")
|
|
||||||
override operator fun get(key: K): V? {
|
|
||||||
irFactory.stageController.lazyLower(key)
|
|
||||||
return map[(key as IrSymbolOwner).symbol]?.map { it.owner as IrDeclaration } as? V
|
|
||||||
}
|
|
||||||
|
|
||||||
override operator fun set(key: K, value: V?) {
|
|
||||||
irFactory.stageController.lazyLower(key)
|
|
||||||
if (value == null) {
|
|
||||||
map.remove((key as IrSymbolOwner).symbol)
|
|
||||||
} else {
|
|
||||||
map[(key as IrSymbolOwner).symbol] = value.map { (it as IrSymbolOwner).symbol }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun serializeMapping(declaration: IrDeclaration, symbolSerializer: (IrSymbol) -> Long): ByteArray? {
|
|
||||||
return map[(declaration as IrSymbolOwner).symbol]?.let { symbols ->
|
|
||||||
IrMemoryLongArrayWriter(symbols.map(symbolSerializer)).writeIntoMemory()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun loadMapping(declaration: IrDeclaration, mapping: ByteArray, symbolDeserializer: (Long) -> IrSymbol) {
|
|
||||||
map[(declaration as IrSymbolOwner).symbol] = IrLongArrayMemoryReader(mapping).array.map(symbolDeserializer)
|
|
||||||
}
|
|
||||||
|
|
||||||
override val keys: Set<K>
|
|
||||||
get() = TODO("Not yet implemented")
|
|
||||||
|
|
||||||
override val values: Collection<V>
|
|
||||||
get() = TODO("Not yet implemented")
|
|
||||||
}
|
|
||||||
|
|
||||||
fun ByteArray.toLong(): Long {
|
|
||||||
var result = this[0].toLong() and 0xFFL
|
|
||||||
for (i in 1..7) {
|
|
||||||
result = (result shl 8) or (this[i].toLong() and 0xFFL)
|
|
||||||
}
|
|
||||||
return result
|
|
||||||
}
|
|
||||||
|
|
||||||
fun Long.toByteArray(): ByteArray {
|
|
||||||
val result = ByteArray(8)
|
|
||||||
|
|
||||||
var self = this
|
|
||||||
|
|
||||||
for (i in 7 downTo 0) {
|
|
||||||
result[i] = self.toByte()
|
|
||||||
self = self ushr 8
|
|
||||||
}
|
|
||||||
|
|
||||||
return result
|
|
||||||
}
|
|
||||||
@@ -168,7 +168,7 @@ fun generateIrForKlibSerialization(
|
|||||||
psi2IrContext.irBuiltIns,
|
psi2IrContext.irBuiltIns,
|
||||||
psi2IrContext.symbolTable,
|
psi2IrContext.symbolTable,
|
||||||
feContext,
|
feContext,
|
||||||
serializedIrFiles.let { ICData(it, errorPolicy.allowErrors) }
|
ICData(serializedIrFiles, errorPolicy.allowErrors)
|
||||||
)
|
)
|
||||||
|
|
||||||
sortedDependencies.map { irLinker.deserializeOnlyHeaderModule(getDescriptorByLibrary(it), it) }
|
sortedDependencies.map { irLinker.deserializeOnlyHeaderModule(getDescriptorByLibrary(it), it) }
|
||||||
|
|||||||
-4
@@ -22,8 +22,6 @@ class JsIrFileSerializer(
|
|||||||
compatibilityMode: CompatibilityMode,
|
compatibilityMode: CompatibilityMode,
|
||||||
skipExpects: Boolean,
|
skipExpects: Boolean,
|
||||||
bodiesOnlyForInlines: Boolean = false,
|
bodiesOnlyForInlines: Boolean = false,
|
||||||
icMode: Boolean = false,
|
|
||||||
allowErrorStatementOrigins: Boolean = false,
|
|
||||||
normalizeAbsolutePaths: Boolean,
|
normalizeAbsolutePaths: Boolean,
|
||||||
sourceBaseDirs: Collection<String>
|
sourceBaseDirs: Collection<String>
|
||||||
) : IrFileSerializer(
|
) : IrFileSerializer(
|
||||||
@@ -33,8 +31,6 @@ class JsIrFileSerializer(
|
|||||||
compatibilityMode,
|
compatibilityMode,
|
||||||
bodiesOnlyForInlines = bodiesOnlyForInlines,
|
bodiesOnlyForInlines = bodiesOnlyForInlines,
|
||||||
skipExpects = skipExpects,
|
skipExpects = skipExpects,
|
||||||
skipMutableState = icMode,
|
|
||||||
allowErrorStatementOrigins = allowErrorStatementOrigins,
|
|
||||||
normalizeAbsolutePaths = normalizeAbsolutePaths,
|
normalizeAbsolutePaths = normalizeAbsolutePaths,
|
||||||
sourceBaseDirs = sourceBaseDirs
|
sourceBaseDirs = sourceBaseDirs
|
||||||
) {
|
) {
|
||||||
|
|||||||
+1
-1
@@ -31,8 +31,8 @@ class JsIrModuleSerializer(
|
|||||||
messageLogger,
|
messageLogger,
|
||||||
DeclarationTable(globalDeclarationTable),
|
DeclarationTable(globalDeclarationTable),
|
||||||
expectDescriptorToSymbol,
|
expectDescriptorToSymbol,
|
||||||
skipExpects = skipExpects,
|
|
||||||
compatibilityMode = compatibilityMode,
|
compatibilityMode = compatibilityMode,
|
||||||
|
skipExpects = skipExpects,
|
||||||
normalizeAbsolutePaths = normalizeAbsolutePaths,
|
normalizeAbsolutePaths = normalizeAbsolutePaths,
|
||||||
sourceBaseDirs = sourceBaseDirs
|
sourceBaseDirs = sourceBaseDirs
|
||||||
)
|
)
|
||||||
|
|||||||
+4
-5
@@ -69,11 +69,10 @@ fun deserializeFromByteArray(
|
|||||||
fileSymbol = dummyIrFile.symbol,
|
fileSymbol = dummyIrFile.symbol,
|
||||||
/* TODO */ actuals = emptyList(),
|
/* TODO */ actuals = emptyList(),
|
||||||
enqueueLocalTopLevelDeclaration = {}, // just link to it in symbolTable
|
enqueueLocalTopLevelDeclaration = {}, // just link to it in symbolTable
|
||||||
handleExpectActualMapping = { _, _ -> TODO() },
|
handleExpectActualMapping = { _, _ -> TODO() }
|
||||||
deserializePublicSymbol = { idSignature, symbolKind ->
|
) { idSignature, symbolKind ->
|
||||||
referencePublicSymbol(symbolTable, descriptorFinder, idSignature, symbolKind)
|
referencePublicSymbol(symbolTable, descriptorFinder, idSignature, symbolKind)
|
||||||
}
|
}
|
||||||
)
|
|
||||||
|
|
||||||
val lazyIrFactory = LazyIrFactory(irBuiltIns.irFactory)
|
val lazyIrFactory = LazyIrFactory(irBuiltIns.irFactory)
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,6 @@ val PROTO_PATHS: List<ProtoPath> = listOf(
|
|||||||
ProtoPath("build-common/src/java_descriptors.proto"),
|
ProtoPath("build-common/src/java_descriptors.proto"),
|
||||||
ProtoPath("compiler/util-klib-metadata/src/KlibMetadataProtoBuf.proto"),
|
ProtoPath("compiler/util-klib-metadata/src/KlibMetadataProtoBuf.proto"),
|
||||||
ProtoPath("compiler/ir/serialization.common/src/KotlinIr.proto", false),
|
ProtoPath("compiler/ir/serialization.common/src/KotlinIr.proto", false),
|
||||||
ProtoPath("compiler/ir/serialization.common/src/KotlinPirCarriers.proto", false),
|
|
||||||
ProtoPath("compiler/ir/serialization.jvm/src/JvmIr.proto", false),
|
ProtoPath("compiler/ir/serialization.jvm/src/JvmIr.proto", false),
|
||||||
ProtoPath("plugins/kotlin-serialization/kotlin-serialization-compiler/src/class_extensions.proto", generateDebug = false)
|
ProtoPath("plugins/kotlin-serialization/kotlin-serialization-compiler/src/class_extensions.proto", generateDebug = false)
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user