Reformat IR tree declarations and implementations

Most of the changes are to the incorrect formatting introduced in
d1fd1da56f.
This commit is contained in:
Alexander Udalov
2020-10-06 14:21:40 +02:00
parent b47e0e861b
commit 06f1bd6101
37 changed files with 719 additions and 716 deletions
@@ -237,7 +237,9 @@ object IrFactoryImpl : IrFactory {
isNoinline: Boolean, isNoinline: Boolean,
isHidden: Boolean isHidden: Boolean
): IrValueParameter = ): IrValueParameter =
IrValueParameterImpl(startOffset, endOffset, origin, symbol, name, index, type, varargElementType, isCrossinline, isNoinline, isHidden) IrValueParameterImpl(
startOffset, endOffset, origin, symbol, name, index, type, varargElementType, isCrossinline, isNoinline, isHidden
)
override fun createExpressionBody( override fun createExpressionBody(
startOffset: Int, startOffset: Int,
@@ -18,16 +18,15 @@ package org.jetbrains.kotlin.ir.declarations.impl
import org.jetbrains.kotlin.descriptors.TypeParameterDescriptor import org.jetbrains.kotlin.descriptors.TypeParameterDescriptor
import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI
import org.jetbrains.kotlin.ir.declarations.IrFactory
import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin import org.jetbrains.kotlin.ir.declarations.IrDeclarationOrigin
import org.jetbrains.kotlin.ir.declarations.IrDeclarationParent import org.jetbrains.kotlin.ir.declarations.IrDeclarationParent
import org.jetbrains.kotlin.ir.declarations.IrFactory
import org.jetbrains.kotlin.ir.declarations.IrTypeParameter import org.jetbrains.kotlin.ir.declarations.IrTypeParameter
import org.jetbrains.kotlin.ir.expressions.IrConstructorCall import org.jetbrains.kotlin.ir.expressions.IrConstructorCall
import org.jetbrains.kotlin.ir.symbols.IrTypeParameterSymbol import org.jetbrains.kotlin.ir.symbols.IrTypeParameterSymbol
import org.jetbrains.kotlin.ir.types.IrType import org.jetbrains.kotlin.ir.types.IrType
import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.name.Name
import org.jetbrains.kotlin.types.Variance import org.jetbrains.kotlin.types.Variance
import org.jetbrains.kotlin.utils.SmartList
class IrTypeParameterImpl( class IrTypeParameterImpl(
override val startOffset: Int, override val startOffset: Int,
@@ -239,7 +239,9 @@ object PersistentIrFactory : IrFactory {
isNoinline: Boolean, isNoinline: Boolean,
isHidden: Boolean isHidden: Boolean
): IrValueParameter = ): IrValueParameter =
PersistentIrValueParameter(startOffset, endOffset, origin, symbol, name, index, type, varargElementType, isCrossinline, isNoinline, isHidden) PersistentIrValueParameter(
startOffset, endOffset, origin, symbol, name, index, type, varargElementType, isCrossinline, isNoinline, isHidden
)
override fun createExpressionBody( override fun createExpressionBody(
startOffset: Int, startOffset: Int,
@@ -29,7 +29,6 @@ import org.jetbrains.kotlin.ir.symbols.IrTypeParameterSymbol
import org.jetbrains.kotlin.ir.types.IrType import org.jetbrains.kotlin.ir.types.IrType
import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.name.Name
import org.jetbrains.kotlin.types.Variance import org.jetbrains.kotlin.types.Variance
import org.jetbrains.kotlin.utils.SmartList
internal class PersistentIrTypeParameter( internal class PersistentIrTypeParameter(
override val startOffset: Int, override val startOffset: Int,
@@ -32,6 +32,7 @@ abstract class IrValueParameter : IrValueDeclaration(), IrSymbolDeclaration<IrVa
abstract var varargElementType: IrType? abstract var varargElementType: IrType?
abstract val isCrossinline: Boolean abstract val isCrossinline: Boolean
abstract val isNoinline: Boolean abstract val isNoinline: Boolean
// if true parameter is not included into IdSignature. // if true parameter is not included into IdSignature.
// Skipping hidden params makes IrFunction be look similar to FE. // Skipping hidden params makes IrFunction be look similar to FE.
// NOTE: it is introduced to fix KT-40980 because more clear solution was not possible to implement. // NOTE: it is introduced to fix KT-40980 because more clear solution was not possible to implement.
@@ -50,7 +50,8 @@ class IrFileImpl(
get() = fileEntry.maxOffset get() = fileEntry.maxOffset
@ObsoleteDescriptorBasedAPI @ObsoleteDescriptorBasedAPI
override val packageFragmentDescriptor: PackageFragmentDescriptor get() = symbol.descriptor override val packageFragmentDescriptor: PackageFragmentDescriptor
get() = symbol.descriptor
override val declarations: MutableList<IrDeclaration> = ArrayList() override val declarations: MutableList<IrDeclaration> = ArrayList()
@@ -14,7 +14,6 @@ import org.jetbrains.kotlin.ir.util.DeclarationStubGenerator
import org.jetbrains.kotlin.ir.util.ReferenceSymbolTable import org.jetbrains.kotlin.ir.util.ReferenceSymbolTable
import org.jetbrains.kotlin.ir.util.SymbolTable import org.jetbrains.kotlin.ir.util.SymbolTable
class IrLazySymbolTable(private val originalTable: SymbolTable) : ReferenceSymbolTable by originalTable { class IrLazySymbolTable(private val originalTable: SymbolTable) : ReferenceSymbolTable by originalTable {
/*Don't force builtins class linking before unbound symbols linking: otherwise stdlib compilation will failed*/ /*Don't force builtins class linking before unbound symbols linking: otherwise stdlib compilation will failed*/