[IR] Reorder parameters in IrFactory#createLocalDelegatedProperty
This is to prepare for IrFactory auto-generation (KT-59308).
This commit is contained in:
committed by
Space Team
parent
a7c1f53af8
commit
5b8b3644fc
+7
-7
@@ -1293,13 +1293,13 @@ class Fir2IrDeclarationStorage(
|
|||||||
val origin = IrDeclarationOrigin.DEFINED
|
val origin = IrDeclarationOrigin.DEFINED
|
||||||
val irProperty = property.convertWithOffsets { startOffset, endOffset ->
|
val irProperty = property.convertWithOffsets { startOffset, endOffset ->
|
||||||
irFactory.createLocalDelegatedProperty(
|
irFactory.createLocalDelegatedProperty(
|
||||||
startOffset,
|
startOffset = startOffset,
|
||||||
endOffset,
|
endOffset = endOffset,
|
||||||
origin,
|
origin = origin,
|
||||||
IrLocalDelegatedPropertySymbolImpl(),
|
name = property.name,
|
||||||
property.name,
|
symbol = IrLocalDelegatedPropertySymbolImpl(),
|
||||||
type,
|
type = type,
|
||||||
property.isVar
|
isVar = property.isVar
|
||||||
)
|
)
|
||||||
}.apply {
|
}.apply {
|
||||||
parent = irParent
|
parent = irParent
|
||||||
|
|||||||
@@ -129,8 +129,8 @@ interface IrFactory {
|
|||||||
startOffset: Int,
|
startOffset: Int,
|
||||||
endOffset: Int,
|
endOffset: Int,
|
||||||
origin: IrDeclarationOrigin,
|
origin: IrDeclarationOrigin,
|
||||||
symbol: IrLocalDelegatedPropertySymbol,
|
|
||||||
name: Name,
|
name: Name,
|
||||||
|
symbol: IrLocalDelegatedPropertySymbol,
|
||||||
type: IrType,
|
type: IrType,
|
||||||
isVar: Boolean,
|
isVar: Boolean,
|
||||||
): IrLocalDelegatedProperty
|
): IrLocalDelegatedProperty
|
||||||
|
|||||||
@@ -158,8 +158,8 @@ abstract class AbstractIrFactoryImpl : IrFactory {
|
|||||||
startOffset: Int,
|
startOffset: Int,
|
||||||
endOffset: Int,
|
endOffset: Int,
|
||||||
origin: IrDeclarationOrigin,
|
origin: IrDeclarationOrigin,
|
||||||
symbol: IrLocalDelegatedPropertySymbol,
|
|
||||||
name: Name,
|
name: Name,
|
||||||
|
symbol: IrLocalDelegatedPropertySymbol,
|
||||||
type: IrType,
|
type: IrType,
|
||||||
isVar: Boolean,
|
isVar: Boolean,
|
||||||
): IrLocalDelegatedProperty =
|
): IrLocalDelegatedProperty =
|
||||||
|
|||||||
+2
-2
@@ -238,8 +238,8 @@ class IrFactoryImplForJsIC(override val stageController: StageController) : Abst
|
|||||||
startOffset: Int,
|
startOffset: Int,
|
||||||
endOffset: Int,
|
endOffset: Int,
|
||||||
origin: IrDeclarationOrigin,
|
origin: IrDeclarationOrigin,
|
||||||
symbol: IrLocalDelegatedPropertySymbol,
|
|
||||||
name: Name,
|
name: Name,
|
||||||
|
symbol: IrLocalDelegatedPropertySymbol,
|
||||||
type: IrType,
|
type: IrType,
|
||||||
isVar: Boolean
|
isVar: Boolean
|
||||||
): IrLocalDelegatedProperty {
|
): IrLocalDelegatedProperty {
|
||||||
@@ -247,8 +247,8 @@ class IrFactoryImplForJsIC(override val stageController: StageController) : Abst
|
|||||||
startOffset,
|
startOffset,
|
||||||
endOffset,
|
endOffset,
|
||||||
origin,
|
origin,
|
||||||
symbol,
|
|
||||||
name,
|
name,
|
||||||
|
symbol,
|
||||||
type,
|
type,
|
||||||
isVar,
|
isVar,
|
||||||
).register()
|
).register()
|
||||||
|
|||||||
@@ -283,12 +283,13 @@ open class DeepCopyIrTreeWithSymbols(
|
|||||||
|
|
||||||
override fun visitLocalDelegatedProperty(declaration: IrLocalDelegatedProperty): IrLocalDelegatedProperty =
|
override fun visitLocalDelegatedProperty(declaration: IrLocalDelegatedProperty): IrLocalDelegatedProperty =
|
||||||
declaration.factory.createLocalDelegatedProperty(
|
declaration.factory.createLocalDelegatedProperty(
|
||||||
declaration.startOffset, declaration.endOffset,
|
startOffset = declaration.startOffset,
|
||||||
mapDeclarationOrigin(declaration.origin),
|
endOffset = declaration.endOffset,
|
||||||
symbolRemapper.getDeclaredLocalDelegatedProperty(declaration.symbol),
|
origin = mapDeclarationOrigin(declaration.origin),
|
||||||
declaration.name,
|
name = declaration.name,
|
||||||
declaration.type.remapType(),
|
symbol = symbolRemapper.getDeclaredLocalDelegatedProperty(declaration.symbol),
|
||||||
declaration.isVar
|
type = declaration.type.remapType(),
|
||||||
|
isVar = declaration.isVar,
|
||||||
).apply {
|
).apply {
|
||||||
transformAnnotations(declaration)
|
transformAnnotations(declaration)
|
||||||
delegate = declaration.delegate.transform()
|
delegate = declaration.delegate.transform()
|
||||||
|
|||||||
@@ -1144,7 +1144,13 @@ open class SymbolTable(
|
|||||||
type: IrType,
|
type: IrType,
|
||||||
factory: (IrLocalDelegatedPropertySymbol) -> IrLocalDelegatedProperty = {
|
factory: (IrLocalDelegatedPropertySymbol) -> IrLocalDelegatedProperty = {
|
||||||
irFactory.createLocalDelegatedProperty(
|
irFactory.createLocalDelegatedProperty(
|
||||||
startOffset, endOffset, origin, it, nameProvider.nameForDeclaration(descriptor), type, descriptor.isVar
|
startOffset = startOffset,
|
||||||
|
endOffset = endOffset,
|
||||||
|
origin = origin,
|
||||||
|
name = nameProvider.nameForDeclaration(descriptor),
|
||||||
|
symbol = it,
|
||||||
|
type = type,
|
||||||
|
isVar = descriptor.isVar
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
): IrLocalDelegatedProperty =
|
): IrLocalDelegatedProperty =
|
||||||
|
|||||||
+7
-5
@@ -728,11 +728,13 @@ class IrDeclarationDeserializer(
|
|||||||
val nameAndType = BinaryNameAndType.decode(proto.nameType)
|
val nameAndType = BinaryNameAndType.decode(proto.nameType)
|
||||||
|
|
||||||
val prop = irFactory.createLocalDelegatedProperty(
|
val prop = irFactory.createLocalDelegatedProperty(
|
||||||
startOffset, endOffset, origin,
|
startOffset = startOffset,
|
||||||
symbol.checkSymbolType(fallbackSymbolKind = null),
|
endOffset = endOffset,
|
||||||
deserializeName(nameAndType.nameIndex),
|
origin = origin,
|
||||||
deserializeIrType(nameAndType.typeIndex),
|
name = deserializeName(nameAndType.nameIndex),
|
||||||
flags.isVar
|
symbol = symbol.checkSymbolType(fallbackSymbolKind = null),
|
||||||
|
type = deserializeIrType(nameAndType.typeIndex),
|
||||||
|
isVar = flags.isVar,
|
||||||
)
|
)
|
||||||
|
|
||||||
prop.apply {
|
prop.apply {
|
||||||
|
|||||||
Reference in New Issue
Block a user