[IR] Autogenerate IrFunctionImpl
^KT-65773 In Progress
This commit is contained in:
committed by
Space Team
parent
518aee693e
commit
d5b78c0cdc
@@ -18,6 +18,8 @@ import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
|
||||
abstract class IrSimpleFunction : IrFunction(), IrOverridableDeclaration<IrSimpleFunctionSymbol>, IrAttributeContainer {
|
||||
abstract override val symbol: IrSimpleFunctionSymbol
|
||||
|
||||
abstract override var overriddenSymbols: List<IrSimpleFunctionSymbol>
|
||||
|
||||
abstract var isTailrec: Boolean
|
||||
|
||||
abstract var isSuspend: Boolean
|
||||
|
||||
+31
-26
@@ -3,6 +3,11 @@
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
// This file was generated automatically. See compiler/ir/ir.tree/tree-generator/ReadMe.md.
|
||||
// DO NOT MODIFY IT MANUALLY.
|
||||
|
||||
@file:Suppress("DuplicatedCode", "unused")
|
||||
|
||||
package org.jetbrains.kotlin.ir.declarations.impl
|
||||
|
||||
import org.jetbrains.kotlin.descriptors.DescriptorVisibility
|
||||
@@ -19,58 +24,58 @@ import org.jetbrains.kotlin.ir.types.IrType
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedContainerSource
|
||||
|
||||
// IMPORTANT: This class is used in the Compose IDE plugin (platform 233).
|
||||
// Don't rename it or change its constructor's signature so as not to break binary compatibility when an older version of
|
||||
// the Compose IDE plugin is used with a newer version of the Kotlin IDE plugin that vendors the updated compiler version.
|
||||
class IrFunctionImpl @IrImplementationDetail constructor(
|
||||
override val startOffset: Int,
|
||||
override val endOffset: Int,
|
||||
override var origin: IrDeclarationOrigin,
|
||||
override val symbol: IrSimpleFunctionSymbol,
|
||||
override val factory: IrFactory,
|
||||
override var name: Name,
|
||||
override var visibility: DescriptorVisibility,
|
||||
override var modality: Modality,
|
||||
override var isInline: Boolean,
|
||||
override var isExternal: Boolean,
|
||||
override var visibility: DescriptorVisibility,
|
||||
override val containerSource: DeserializedContainerSource?,
|
||||
override var isInline: Boolean,
|
||||
override var isExpect: Boolean,
|
||||
override var modality: Modality,
|
||||
override val symbol: IrSimpleFunctionSymbol,
|
||||
override var isTailrec: Boolean,
|
||||
override var isSuspend: Boolean,
|
||||
override var isFakeOverride: Boolean,
|
||||
override var isOperator: Boolean,
|
||||
override var isInfix: Boolean,
|
||||
override var isExpect: Boolean,
|
||||
override var isFakeOverride: Boolean = origin == IrDeclarationOrigin.FAKE_OVERRIDE,
|
||||
override var containerSource: DeserializedContainerSource? = null,
|
||||
override val factory: IrFactory = IrFactoryImpl,
|
||||
) : IrSimpleFunction() {
|
||||
override var annotations: List<IrConstructorCall> = emptyList()
|
||||
|
||||
override lateinit var parent: IrDeclarationParent
|
||||
|
||||
override var typeParameters: List<IrTypeParameter> = emptyList()
|
||||
|
||||
override var metadata: MetadataSource? = null
|
||||
|
||||
@ObsoleteDescriptorBasedAPI
|
||||
override val descriptor: FunctionDescriptor
|
||||
get() = symbol.descriptor
|
||||
|
||||
init {
|
||||
symbol.bind(this)
|
||||
}
|
||||
|
||||
override lateinit var parent: IrDeclarationParent
|
||||
override var annotations: List<IrConstructorCall> = emptyList()
|
||||
|
||||
override var typeParameters: List<IrTypeParameter> = emptyList()
|
||||
override lateinit var returnType: IrType
|
||||
|
||||
override var dispatchReceiverParameter: IrValueParameter? = null
|
||||
|
||||
override var extensionReceiverParameter: IrValueParameter? = null
|
||||
|
||||
override var valueParameters: List<IrValueParameter> = emptyList()
|
||||
|
||||
override var contextReceiverParametersCount: Int = 0
|
||||
|
||||
override lateinit var returnType: IrType
|
||||
|
||||
override var body: IrBody? = null
|
||||
|
||||
override var metadata: MetadataSource? = null
|
||||
override var attributeOwnerId: IrAttributeContainer = this
|
||||
|
||||
override var originalBeforeInline: IrAttributeContainer? = null
|
||||
|
||||
override var overriddenSymbols: List<IrSimpleFunctionSymbol> = emptyList()
|
||||
|
||||
override var attributeOwnerId: IrAttributeContainer = this
|
||||
override var originalBeforeInline: IrAttributeContainer? = null
|
||||
|
||||
override var correspondingPropertySymbol: IrPropertySymbol? = null
|
||||
}
|
||||
|
||||
init {
|
||||
symbol.bind(this)
|
||||
}
|
||||
}
|
||||
|
||||
+5
-2
@@ -16,8 +16,11 @@ object ImplementationConfigurator : AbstractIrTreeImplementationConfigurator() {
|
||||
isLateinit("body")
|
||||
}
|
||||
|
||||
impl(simpleFunction) {
|
||||
implementation.doPrint = false
|
||||
impl(simpleFunction, "IrFunctionImpl") {
|
||||
defaultEmptyList("valueParameters")
|
||||
defaultNull("dispatchReceiverParameter", "extensionReceiverParameter", "body", "correspondingPropertySymbol")
|
||||
default("contextReceiverParametersCount", "0")
|
||||
isLateinit("returnType")
|
||||
}
|
||||
impl(functionWithLateBinding) {
|
||||
implementation.doPrint = false
|
||||
|
||||
@@ -555,6 +555,9 @@ object IrTree : AbstractTreeBuilder() {
|
||||
parent(attributeContainer)
|
||||
|
||||
+symbol(simpleFunctionSymbolType)
|
||||
+listField("overriddenSymbols", simpleFunctionSymbolType, mutability = Var) {
|
||||
skipInIrFactory()
|
||||
}
|
||||
+field("isTailrec", boolean)
|
||||
+field("isSuspend", boolean)
|
||||
+isFakeOverrideField()
|
||||
|
||||
Reference in New Issue
Block a user