[IR] Autogenerate IrVariableImpl
^KT-65773 In Progress
This commit is contained in:
committed by
Space Team
parent
222268b6f9
commit
fde3ea14ae
+15
-21
@@ -1,19 +1,13 @@
|
||||
/*
|
||||
* Copyright 2010-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// 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.VariableDescriptor
|
||||
@@ -37,15 +31,14 @@ class IrVariableImpl(
|
||||
override var type: IrType,
|
||||
override var isVar: Boolean,
|
||||
override var isConst: Boolean,
|
||||
override var isLateinit: Boolean
|
||||
override var isLateinit: Boolean,
|
||||
) : IrVariable() {
|
||||
override lateinit var parent: IrDeclarationParent
|
||||
|
||||
override var annotations: List<IrConstructorCall> = emptyList()
|
||||
|
||||
init {
|
||||
symbol.bind(this)
|
||||
}
|
||||
override lateinit var parent: IrDeclarationParent
|
||||
|
||||
override val factory: IrFactory
|
||||
get() = error("Create IrVariableImpl directly")
|
||||
|
||||
@ObsoleteDescriptorBasedAPI
|
||||
override val descriptor: VariableDescriptor
|
||||
@@ -53,6 +46,7 @@ class IrVariableImpl(
|
||||
|
||||
override var initializer: IrExpression? = null
|
||||
|
||||
override val factory: IrFactory
|
||||
get() = error("Create IrVariableImpl directly")
|
||||
init {
|
||||
symbol.bind(this)
|
||||
}
|
||||
}
|
||||
|
||||
+9
-1
@@ -5,6 +5,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.ir.generator
|
||||
|
||||
import org.jetbrains.kotlin.generators.tree.ImplementationKind
|
||||
import org.jetbrains.kotlin.generators.tree.ArbitraryImportable
|
||||
import org.jetbrains.kotlin.generators.tree.ClassRef
|
||||
import org.jetbrains.kotlin.generators.tree.ImportCollector
|
||||
@@ -75,7 +76,14 @@ object ImplementationConfigurator : AbstractIrTreeImplementationConfigurator() {
|
||||
}
|
||||
|
||||
impl(variable) {
|
||||
implementation.doPrint = false
|
||||
implementation.putImplementationOptInInConstructor = false
|
||||
implementation.constructorParameterOrderOverride =
|
||||
listOf("startOffset", "endOffset", "origin", "symbol", "name", "type", "isVar", "isConst", "isLateinit")
|
||||
defaultNull("initializer")
|
||||
default("factory") {
|
||||
value = "error(\"Create IrVariableImpl directly\")"
|
||||
withGetter = true
|
||||
}
|
||||
}
|
||||
|
||||
impl(`class`) {
|
||||
|
||||
Reference in New Issue
Block a user