Partially revert "[IR] Hide constructors of implementation classes behind factory functions"
To restore binary compatibility with a compiler plugin used in one of user projects. #KT-66636 Fixed
This commit is contained in:
committed by
Space Team
parent
e007153ae6
commit
6af930fc0e
+5
-27
@@ -10,47 +10,25 @@ import org.jetbrains.kotlin.ir.declarations.IrAttributeContainer
|
||||
import org.jetbrains.kotlin.ir.expressions.IrComposite
|
||||
import org.jetbrains.kotlin.ir.expressions.IrStatementOrigin
|
||||
import org.jetbrains.kotlin.ir.types.IrType
|
||||
import org.jetbrains.kotlin.ir.util.IrElementConstructorIndicator
|
||||
|
||||
class IrCompositeImpl internal constructor(
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
constructorIndicator: IrElementConstructorIndicator?,
|
||||
class IrCompositeImpl(
|
||||
override val startOffset: Int,
|
||||
override val endOffset: Int,
|
||||
override var type: IrType,
|
||||
override var origin: IrStatementOrigin?,
|
||||
override var origin: IrStatementOrigin? = null,
|
||||
) : IrComposite() {
|
||||
override val statements: MutableList<IrStatement> = ArrayList(2)
|
||||
|
||||
override var attributeOwnerId: IrAttributeContainer = this
|
||||
override var originalBeforeInline: IrAttributeContainer? = null
|
||||
}
|
||||
|
||||
fun IrCompositeImpl(
|
||||
startOffset: Int,
|
||||
endOffset: Int,
|
||||
type: IrType,
|
||||
origin: IrStatementOrigin? = null,
|
||||
) = IrCompositeImpl(
|
||||
constructorIndicator = null,
|
||||
startOffset = startOffset,
|
||||
endOffset = endOffset,
|
||||
type = type,
|
||||
origin = origin,
|
||||
)
|
||||
|
||||
fun IrCompositeImpl(
|
||||
constructor(
|
||||
startOffset: Int,
|
||||
endOffset: Int,
|
||||
type: IrType,
|
||||
origin: IrStatementOrigin?,
|
||||
statements: List<IrStatement>,
|
||||
) = IrCompositeImpl(
|
||||
constructorIndicator = null,
|
||||
startOffset = startOffset,
|
||||
endOffset = endOffset,
|
||||
type = type,
|
||||
origin = origin,
|
||||
).apply {
|
||||
) : this(startOffset, endOffset, type, origin) {
|
||||
this.statements.addAll(statements)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,32 +10,14 @@ import org.jetbrains.kotlin.ir.expressions.IrExpression
|
||||
import org.jetbrains.kotlin.ir.expressions.IrReturn
|
||||
import org.jetbrains.kotlin.ir.symbols.IrReturnTargetSymbol
|
||||
import org.jetbrains.kotlin.ir.types.IrType
|
||||
import org.jetbrains.kotlin.ir.util.IrElementConstructorIndicator
|
||||
|
||||
class IrReturnImpl internal constructor(
|
||||
@Suppress("UNUSED_PARAMETER")
|
||||
constructorIndicator: IrElementConstructorIndicator?,
|
||||
class IrReturnImpl(
|
||||
override val startOffset: Int,
|
||||
override val endOffset: Int,
|
||||
override var type: IrType,
|
||||
override var returnTargetSymbol: IrReturnTargetSymbol,
|
||||
override var value: IrExpression,
|
||||
override var value: IrExpression
|
||||
) : IrReturn() {
|
||||
override var attributeOwnerId: IrAttributeContainer = this
|
||||
override var originalBeforeInline: IrAttributeContainer? = null
|
||||
}
|
||||
|
||||
fun IrReturnImpl(
|
||||
startOffset: Int,
|
||||
endOffset: Int,
|
||||
type: IrType,
|
||||
returnTargetSymbol: IrReturnTargetSymbol,
|
||||
value: IrExpression,
|
||||
) = IrReturnImpl(
|
||||
constructorIndicator = null,
|
||||
startOffset = startOffset,
|
||||
endOffset = endOffset,
|
||||
type = type,
|
||||
returnTargetSymbol = returnTargetSymbol,
|
||||
value = value,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user