[IR] Autogenerate IrPropertyImpl

^KT-65773 In Progress
This commit is contained in:
Wojciech Litewka
2024-02-16 12:43:42 +01:00
committed by Space Team
parent 541a0f4bec
commit 87f5d3901c
4 changed files with 29 additions and 20 deletions
@@ -23,6 +23,8 @@ abstract class IrProperty : IrDeclarationBase(), IrPossiblyExternalDeclaration,
abstract override val symbol: IrPropertySymbol abstract override val symbol: IrPropertySymbol
abstract override var overriddenSymbols: List<IrPropertySymbol>
abstract var isVar: Boolean abstract var isVar: Boolean
abstract var isConst: Boolean abstract var isConst: Boolean
@@ -1,8 +1,13 @@
/* /*
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors. * Copyright 2010-2024 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. * 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 package org.jetbrains.kotlin.ir.declarations.impl
import org.jetbrains.kotlin.descriptors.DescriptorVisibility import org.jetbrains.kotlin.descriptors.DescriptorVisibility
@@ -20,32 +25,35 @@ class IrPropertyImpl @IrImplementationDetail constructor(
override val startOffset: Int, override val startOffset: Int,
override val endOffset: Int, override val endOffset: Int,
override var origin: IrDeclarationOrigin, override var origin: IrDeclarationOrigin,
override val symbol: IrPropertySymbol, override val factory: IrFactory,
override var name: Name, override var name: Name,
override var isExternal: Boolean,
override var visibility: DescriptorVisibility, override var visibility: DescriptorVisibility,
override var modality: Modality, override var modality: Modality,
override val containerSource: DeserializedContainerSource?,
override val symbol: IrPropertySymbol,
override var isVar: Boolean, override var isVar: Boolean,
override var isConst: Boolean, override var isConst: Boolean,
override var isLateinit: Boolean, override var isLateinit: Boolean,
override var isDelegated: Boolean, override var isDelegated: Boolean,
override var isExternal: Boolean, override var isExpect: Boolean,
override var isExpect: Boolean = false,
override var isFakeOverride: Boolean, override var isFakeOverride: Boolean,
override var containerSource: DeserializedContainerSource?,
override val factory: IrFactory,
) : IrProperty() { ) : IrProperty() {
override var annotations: List<IrConstructorCall> = emptyList()
init { override lateinit var parent: IrDeclarationParent
symbol.bind(this)
} override var metadata: MetadataSource? = null
override var attributeOwnerId: IrAttributeContainer = this
override var originalBeforeInline: IrAttributeContainer? = null
@ObsoleteDescriptorBasedAPI @ObsoleteDescriptorBasedAPI
override val descriptor: PropertyDescriptor override val descriptor: PropertyDescriptor
get() = symbol.descriptor get() = symbol.descriptor
override lateinit var parent: IrDeclarationParent override var overriddenSymbols: List<IrPropertySymbol> = emptyList()
override var annotations: List<IrConstructorCall> = emptyList()
override var backingField: IrField? = null override var backingField: IrField? = null
@@ -53,11 +61,7 @@ class IrPropertyImpl @IrImplementationDetail constructor(
override var setter: IrSimpleFunction? = null override var setter: IrSimpleFunction? = null
override var overriddenSymbols: List<IrPropertySymbol> = emptyList() init {
symbol.bind(this)
override var metadata: MetadataSource? = null }
override var attributeOwnerId: IrAttributeContainer = this
override var originalBeforeInline: IrAttributeContainer? = null
} }
@@ -53,7 +53,7 @@ object ImplementationConfigurator : AbstractIrTreeImplementationConfigurator() {
} }
impl(property) { impl(property) {
implementation.doPrint = false defaultNull("backingField", "getter", "setter")
} }
impl(propertyWithLateBinding) { impl(propertyWithLateBinding) {
implementation.doPrint = false implementation.doPrint = false
@@ -505,6 +505,9 @@ object IrTree : AbstractTreeBuilder() {
+descriptor("PropertyDescriptor") +descriptor("PropertyDescriptor")
+symbol(propertySymbolType) +symbol(propertySymbolType)
+listField("overriddenSymbols", propertySymbolType, mutability = Var) {
skipInIrFactory()
}
+field("isVar", boolean) +field("isVar", boolean)
+field("isConst", boolean) +field("isConst", boolean)
+field("isLateinit", boolean) +field("isLateinit", boolean)