diff --git a/compiler/ir/ir.tree/gen/org/jetbrains/kotlin/ir/expressions/IrBlockBody.kt b/compiler/ir/ir.tree/gen/org/jetbrains/kotlin/ir/expressions/IrBlockBody.kt index 54ce577b56f..023c9981639 100644 --- a/compiler/ir/ir.tree/gen/org/jetbrains/kotlin/ir/expressions/IrBlockBody.kt +++ b/compiler/ir/ir.tree/gen/org/jetbrains/kotlin/ir/expressions/IrBlockBody.kt @@ -8,7 +8,6 @@ package org.jetbrains.kotlin.ir.expressions -import org.jetbrains.kotlin.ir.declarations.IrFactory import org.jetbrains.kotlin.ir.util.transformInPlace import org.jetbrains.kotlin.ir.visitors.IrElementTransformer import org.jetbrains.kotlin.ir.visitors.IrElementVisitor @@ -17,8 +16,6 @@ import org.jetbrains.kotlin.ir.visitors.IrElementVisitor * Generated from: [org.jetbrains.kotlin.ir.generator.IrTree.blockBody] */ abstract class IrBlockBody : IrBody(), IrStatementContainer { - abstract val factory: IrFactory - override fun accept(visitor: IrElementVisitor, data: D): R = visitor.visitBlockBody(this, data) diff --git a/compiler/ir/ir.tree/gen/org/jetbrains/kotlin/ir/expressions/IrExpressionBody.kt b/compiler/ir/ir.tree/gen/org/jetbrains/kotlin/ir/expressions/IrExpressionBody.kt index b0c85da4ef3..eadbd30c766 100644 --- a/compiler/ir/ir.tree/gen/org/jetbrains/kotlin/ir/expressions/IrExpressionBody.kt +++ b/compiler/ir/ir.tree/gen/org/jetbrains/kotlin/ir/expressions/IrExpressionBody.kt @@ -8,7 +8,6 @@ package org.jetbrains.kotlin.ir.expressions -import org.jetbrains.kotlin.ir.declarations.IrFactory import org.jetbrains.kotlin.ir.visitors.IrElementTransformer import org.jetbrains.kotlin.ir.visitors.IrElementVisitor @@ -16,8 +15,6 @@ import org.jetbrains.kotlin.ir.visitors.IrElementVisitor * Generated from: [org.jetbrains.kotlin.ir.generator.IrTree.expressionBody] */ abstract class IrExpressionBody : IrBody() { - abstract val factory: IrFactory - abstract var expression: IrExpression override fun accept(visitor: IrElementVisitor, data: D): R = diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/expressions/impl/IrBlockBodyImpl.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/expressions/impl/IrBlockBodyImpl.kt index 5aa53b17e58..38ebf5dc25c 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/expressions/impl/IrBlockBodyImpl.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/expressions/impl/IrBlockBodyImpl.kt @@ -7,8 +7,6 @@ package org.jetbrains.kotlin.ir.expressions.impl import org.jetbrains.kotlin.ir.IrImplementationDetail import org.jetbrains.kotlin.ir.IrStatement -import org.jetbrains.kotlin.ir.declarations.IrFactory -import org.jetbrains.kotlin.ir.declarations.impl.IrFactoryImpl import org.jetbrains.kotlin.ir.expressions.IrBlockBody class IrBlockBodyImpl @IrImplementationDetail constructor( @@ -16,7 +14,4 @@ class IrBlockBodyImpl @IrImplementationDetail constructor( override val endOffset: Int ) : IrBlockBody() { override val statements: MutableList = ArrayList(2) - - override val factory: IrFactory - get() = IrFactoryImpl } diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/expressions/impl/IrExpressionBodyImpl.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/expressions/impl/IrExpressionBodyImpl.kt index 295cb785f87..0dd8d12e759 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/expressions/impl/IrExpressionBodyImpl.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/expressions/impl/IrExpressionBodyImpl.kt @@ -1,24 +1,11 @@ /* - * 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. */ package org.jetbrains.kotlin.ir.expressions.impl import org.jetbrains.kotlin.ir.IrImplementationDetail -import org.jetbrains.kotlin.ir.declarations.IrFactory -import org.jetbrains.kotlin.ir.declarations.impl.IrFactoryImpl import org.jetbrains.kotlin.ir.expressions.IrExpression import org.jetbrains.kotlin.ir.expressions.IrExpressionBody @@ -26,8 +13,4 @@ class IrExpressionBodyImpl @IrImplementationDetail constructor( override val startOffset: Int, override val endOffset: Int, override var expression: IrExpression, -) : IrExpressionBody() { - - override val factory: IrFactory - get() = IrFactoryImpl -} +) : IrExpressionBody() diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/DeepCopyIrTreeWithSymbols.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/DeepCopyIrTreeWithSymbols.kt index 13112ddf6f2..eb2f4496dd1 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/DeepCopyIrTreeWithSymbols.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/DeepCopyIrTreeWithSymbols.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2020 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. */ @@ -417,10 +417,10 @@ open class DeepCopyIrTreeWithSymbols( throw IllegalArgumentException("Unsupported body type: $body") override fun visitExpressionBody(body: IrExpressionBody): IrExpressionBody = - body.factory.createExpressionBody(body.expression.transform()) + IrFactoryImpl.createExpressionBody(body.expression.transform()) override fun visitBlockBody(body: IrBlockBody): IrBlockBody = - body.factory.createBlockBody( + IrFactoryImpl.createBlockBody( body.startOffset, body.endOffset, body.statements.memoryOptimizedMap { it.transform() } ) diff --git a/compiler/ir/ir.tree/tree-generator/src/org/jetbrains/kotlin/ir/generator/IrTree.kt b/compiler/ir/ir.tree/tree-generator/src/org/jetbrains/kotlin/ir/generator/IrTree.kt index 350e9489539..ae56f28d723 100644 --- a/compiler/ir/ir.tree/tree-generator/src/org/jetbrains/kotlin/ir/generator/IrTree.kt +++ b/compiler/ir/ir.tree/tree-generator/src/org/jetbrains/kotlin/ir/generator/IrTree.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2021 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. */ @@ -704,7 +704,6 @@ object IrTree : AbstractTreeBuilder() { parent(body) - +factory +field("expression", expression) { useFieldInIrFactory() } @@ -715,8 +714,6 @@ object IrTree : AbstractTreeBuilder() { parent(body) parent(statementContainer) - - +factory } val declarationReference: Element by element(Expression) { parent(expression)