IR: make subtypes of IrDeclaration classes
This commit is contained in:
@@ -31,7 +31,7 @@ class Fir2IrLazyClass(
|
|||||||
override var origin: IrDeclarationOrigin,
|
override var origin: IrDeclarationOrigin,
|
||||||
override val fir: FirRegularClass,
|
override val fir: FirRegularClass,
|
||||||
override val symbol: Fir2IrClassSymbol,
|
override val symbol: Fir2IrClassSymbol,
|
||||||
) : IrClass, AbstractFir2IrLazyDeclaration<FirRegularClass, IrClass>, Fir2IrComponents by components {
|
) : IrClass(), AbstractFir2IrLazyDeclaration<FirRegularClass, IrClass>, Fir2IrComponents by components {
|
||||||
init {
|
init {
|
||||||
symbol.bind(this)
|
symbol.bind(this)
|
||||||
classifierStorage.preCacheTypeParameters(fir)
|
classifierStorage.preCacheTypeParameters(fir)
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ class Fir2IrLazyConstructor(
|
|||||||
override var origin: IrDeclarationOrigin,
|
override var origin: IrDeclarationOrigin,
|
||||||
override val fir: FirConstructor,
|
override val fir: FirConstructor,
|
||||||
override val symbol: Fir2IrConstructorSymbol,
|
override val symbol: Fir2IrConstructorSymbol,
|
||||||
) : IrConstructor, AbstractFir2IrLazyDeclaration<FirConstructor, IrConstructor>, Fir2IrComponents by components {
|
) : IrConstructor(), AbstractFir2IrLazyDeclaration<FirConstructor, IrConstructor>, Fir2IrComponents by components {
|
||||||
init {
|
init {
|
||||||
symbol.bind(this)
|
symbol.bind(this)
|
||||||
classifierStorage.preCacheTypeParameters(fir)
|
classifierStorage.preCacheTypeParameters(fir)
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ class Fir2IrLazyProperty(
|
|||||||
override val fir: FirProperty,
|
override val fir: FirProperty,
|
||||||
override val symbol: Fir2IrPropertySymbol,
|
override val symbol: Fir2IrPropertySymbol,
|
||||||
override val isFakeOverride: Boolean
|
override val isFakeOverride: Boolean
|
||||||
) : IrProperty, AbstractFir2IrLazyDeclaration<FirProperty, IrProperty>, Fir2IrComponents by components {
|
) : IrProperty(), AbstractFir2IrLazyDeclaration<FirProperty, IrProperty>, Fir2IrComponents by components {
|
||||||
init {
|
init {
|
||||||
symbol.bind(this)
|
symbol.bind(this)
|
||||||
classifierStorage.preCacheTypeParameters(fir)
|
classifierStorage.preCacheTypeParameters(fir)
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ class Fir2IrLazySimpleFunction(
|
|||||||
firParent: FirRegularClass,
|
firParent: FirRegularClass,
|
||||||
override val symbol: Fir2IrSimpleFunctionSymbol,
|
override val symbol: Fir2IrSimpleFunctionSymbol,
|
||||||
override val isFakeOverride: Boolean
|
override val isFakeOverride: Boolean
|
||||||
) : IrSimpleFunction, AbstractFir2IrLazyDeclaration<FirSimpleFunction, IrSimpleFunction>, Fir2IrComponents by components {
|
) : IrSimpleFunction(), AbstractFir2IrLazyDeclaration<FirSimpleFunction, IrSimpleFunction>, Fir2IrComponents by components {
|
||||||
init {
|
init {
|
||||||
symbol.bind(this)
|
symbol.bind(this)
|
||||||
classifierStorage.preCacheTypeParameters(fir)
|
classifierStorage.preCacheTypeParameters(fir)
|
||||||
|
|||||||
+1
-1
@@ -32,7 +32,7 @@ class IrAnonymousInitializerImpl(
|
|||||||
override var origin: IrDeclarationOrigin,
|
override var origin: IrDeclarationOrigin,
|
||||||
override val symbol: IrAnonymousInitializerSymbol,
|
override val symbol: IrAnonymousInitializerSymbol,
|
||||||
override val isStatic: Boolean = false
|
override val isStatic: Boolean = false
|
||||||
) : IrAnonymousInitializer {
|
) : IrAnonymousInitializer() {
|
||||||
init {
|
init {
|
||||||
symbol.bind(this)
|
symbol.bind(this)
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -41,7 +41,7 @@ class IrClassImpl(
|
|||||||
override val isExpect: Boolean = false,
|
override val isExpect: Boolean = false,
|
||||||
override val isFun: Boolean = false,
|
override val isFun: Boolean = false,
|
||||||
override val source: SourceElement = SourceElement.NO_SOURCE
|
override val source: SourceElement = SourceElement.NO_SOURCE
|
||||||
) : IrClass {
|
) : IrClass() {
|
||||||
init {
|
init {
|
||||||
symbol.bind(this)
|
symbol.bind(this)
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -38,7 +38,7 @@ class IrConstructorImpl(
|
|||||||
override val isExternal: Boolean,
|
override val isExternal: Boolean,
|
||||||
override val isPrimary: Boolean,
|
override val isPrimary: Boolean,
|
||||||
override val isExpect: Boolean,
|
override val isExpect: Boolean,
|
||||||
) : IrConstructor {
|
) : IrConstructor() {
|
||||||
init {
|
init {
|
||||||
symbol.bind(this)
|
symbol.bind(this)
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -30,7 +30,7 @@ class IrEnumEntryImpl(
|
|||||||
override var origin: IrDeclarationOrigin,
|
override var origin: IrDeclarationOrigin,
|
||||||
override val symbol: IrEnumEntrySymbol,
|
override val symbol: IrEnumEntrySymbol,
|
||||||
override val name: Name
|
override val name: Name
|
||||||
) : IrEnumEntry {
|
) : IrEnumEntry() {
|
||||||
init {
|
init {
|
||||||
symbol.bind(this)
|
symbol.bind(this)
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -29,7 +29,7 @@ class IrErrorDeclarationImpl(
|
|||||||
override val startOffset: Int,
|
override val startOffset: Int,
|
||||||
override val endOffset: Int,
|
override val endOffset: Int,
|
||||||
override val descriptor: DeclarationDescriptor
|
override val descriptor: DeclarationDescriptor
|
||||||
) : IrErrorDeclaration {
|
) : IrErrorDeclaration() {
|
||||||
override var origin: IrDeclarationOrigin = IrDeclarationOrigin.DEFINED
|
override var origin: IrDeclarationOrigin = IrDeclarationOrigin.DEFINED
|
||||||
|
|
||||||
override val factory: IrFactory
|
override val factory: IrFactory
|
||||||
|
|||||||
+1
-1
@@ -38,7 +38,7 @@ class IrFieldImpl(
|
|||||||
override val isFinal: Boolean,
|
override val isFinal: Boolean,
|
||||||
override val isExternal: Boolean,
|
override val isExternal: Boolean,
|
||||||
override val isStatic: Boolean,
|
override val isStatic: Boolean,
|
||||||
) : IrField {
|
) : IrField() {
|
||||||
init {
|
init {
|
||||||
symbol.bind(this)
|
symbol.bind(this)
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -32,7 +32,7 @@ abstract class IrFunctionCommonImpl(
|
|||||||
override val isOperator: Boolean,
|
override val isOperator: Boolean,
|
||||||
override val isInfix: Boolean,
|
override val isInfix: Boolean,
|
||||||
override val isExpect: Boolean,
|
override val isExpect: Boolean,
|
||||||
) : IrSimpleFunction {
|
) : IrSimpleFunction() {
|
||||||
override val factory: IrFactory
|
override val factory: IrFactory
|
||||||
get() = IrFactoryImpl
|
get() = IrFactoryImpl
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -32,7 +32,7 @@ class IrLocalDelegatedPropertyImpl(
|
|||||||
override val name: Name,
|
override val name: Name,
|
||||||
override val type: IrType,
|
override val type: IrType,
|
||||||
override val isVar: Boolean
|
override val isVar: Boolean
|
||||||
) : IrLocalDelegatedProperty {
|
) : IrLocalDelegatedProperty() {
|
||||||
init {
|
init {
|
||||||
symbol.bind(this)
|
symbol.bind(this)
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -38,7 +38,7 @@ abstract class IrPropertyCommonImpl(
|
|||||||
override val isDelegated: Boolean,
|
override val isDelegated: Boolean,
|
||||||
override val isExternal: Boolean,
|
override val isExternal: Boolean,
|
||||||
override val isExpect: Boolean,
|
override val isExpect: Boolean,
|
||||||
) : IrProperty {
|
) : IrProperty() {
|
||||||
override val factory: IrFactory
|
override val factory: IrFactory
|
||||||
get() = IrFactoryImpl
|
get() = IrFactoryImpl
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -23,7 +23,7 @@ class IrTypeAliasImpl(
|
|||||||
override val expandedType: IrType,
|
override val expandedType: IrType,
|
||||||
override val isActual: Boolean,
|
override val isActual: Boolean,
|
||||||
override var origin: IrDeclarationOrigin
|
override var origin: IrDeclarationOrigin
|
||||||
) : IrTypeAlias {
|
) : IrTypeAlias() {
|
||||||
init {
|
init {
|
||||||
symbol.bind(this)
|
symbol.bind(this)
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -38,7 +38,7 @@ class IrTypeParameterImpl(
|
|||||||
override val index: Int,
|
override val index: Int,
|
||||||
override val isReified: Boolean,
|
override val isReified: Boolean,
|
||||||
override val variance: Variance
|
override val variance: Variance
|
||||||
) : IrTypeParameter {
|
) : IrTypeParameter() {
|
||||||
init {
|
init {
|
||||||
symbol.bind(this)
|
symbol.bind(this)
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -39,7 +39,7 @@ class IrValueParameterImpl(
|
|||||||
override val varargElementType: IrType?,
|
override val varargElementType: IrType?,
|
||||||
override val isCrossinline: Boolean,
|
override val isCrossinline: Boolean,
|
||||||
override val isNoinline: Boolean
|
override val isNoinline: Boolean
|
||||||
) : IrValueParameter {
|
) : IrValueParameter() {
|
||||||
@ObsoleteDescriptorBasedAPI
|
@ObsoleteDescriptorBasedAPI
|
||||||
override val descriptor: ParameterDescriptor
|
override val descriptor: ParameterDescriptor
|
||||||
get() = symbol.descriptor
|
get() = symbol.descriptor
|
||||||
|
|||||||
+2
-2
@@ -34,8 +34,8 @@ internal class PersistentIrAnonymousInitializer(
|
|||||||
origin: IrDeclarationOrigin,
|
origin: IrDeclarationOrigin,
|
||||||
override val symbol: IrAnonymousInitializerSymbol,
|
override val symbol: IrAnonymousInitializerSymbol,
|
||||||
override val isStatic: Boolean = false
|
override val isStatic: Boolean = false
|
||||||
) : PersistentIrDeclarationBase<AnonymousInitializerCarrier>,
|
) : IrAnonymousInitializer(),
|
||||||
IrAnonymousInitializer,
|
PersistentIrDeclarationBase<AnonymousInitializerCarrier>,
|
||||||
AnonymousInitializerCarrier {
|
AnonymousInitializerCarrier {
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
|||||||
+1
-2
@@ -44,9 +44,8 @@ internal class PersistentIrClass(
|
|||||||
override val isExpect: Boolean = false,
|
override val isExpect: Boolean = false,
|
||||||
override val isFun: Boolean = false,
|
override val isFun: Boolean = false,
|
||||||
override val source: SourceElement = SourceElement.NO_SOURCE
|
override val source: SourceElement = SourceElement.NO_SOURCE
|
||||||
) :
|
) : IrClass(),
|
||||||
PersistentIrDeclarationBase<ClassCarrier>,
|
PersistentIrDeclarationBase<ClassCarrier>,
|
||||||
IrClass,
|
|
||||||
ClassCarrier {
|
ClassCarrier {
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
|||||||
+1
-2
@@ -40,9 +40,8 @@ internal class PersistentIrConstructor(
|
|||||||
override val isExternal: Boolean,
|
override val isExternal: Boolean,
|
||||||
override val isPrimary: Boolean,
|
override val isPrimary: Boolean,
|
||||||
override val isExpect: Boolean
|
override val isExpect: Boolean
|
||||||
) :
|
) : IrConstructor(),
|
||||||
PersistentIrDeclarationBase<ConstructorCarrier>,
|
PersistentIrDeclarationBase<ConstructorCarrier>,
|
||||||
IrConstructor,
|
|
||||||
ConstructorCarrier {
|
ConstructorCarrier {
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
|||||||
+2
-2
@@ -32,8 +32,8 @@ internal class PersistentIrEnumEntry(
|
|||||||
origin: IrDeclarationOrigin,
|
origin: IrDeclarationOrigin,
|
||||||
override val symbol: IrEnumEntrySymbol,
|
override val symbol: IrEnumEntrySymbol,
|
||||||
override val name: Name
|
override val name: Name
|
||||||
) : PersistentIrDeclarationBase<EnumEntryCarrier>,
|
) : IrEnumEntry(),
|
||||||
IrEnumEntry,
|
PersistentIrDeclarationBase<EnumEntryCarrier>,
|
||||||
EnumEntryCarrier {
|
EnumEntryCarrier {
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
|||||||
+1
-1
@@ -31,7 +31,7 @@ internal class PersistentIrErrorDeclaration(
|
|||||||
override val startOffset: Int,
|
override val startOffset: Int,
|
||||||
override val endOffset: Int,
|
override val endOffset: Int,
|
||||||
override val descriptor: DeclarationDescriptor
|
override val descriptor: DeclarationDescriptor
|
||||||
) : PersistentIrDeclarationBase<ErrorCarrier>, IrErrorDeclaration, ErrorCarrier {
|
) : PersistentIrDeclarationBase<ErrorCarrier>, IrErrorDeclaration(), ErrorCarrier {
|
||||||
override var lastModified: Int = stageController.currentStage
|
override var lastModified: Int = stageController.currentStage
|
||||||
override var loweredUpTo: Int = stageController.currentStage
|
override var loweredUpTo: Int = stageController.currentStage
|
||||||
override var values: Array<Carrier>? = null
|
override var values: Array<Carrier>? = null
|
||||||
|
|||||||
+2
-2
@@ -40,8 +40,8 @@ internal class PersistentIrField(
|
|||||||
override val isFinal: Boolean,
|
override val isFinal: Boolean,
|
||||||
override val isExternal: Boolean,
|
override val isExternal: Boolean,
|
||||||
override val isStatic: Boolean
|
override val isStatic: Boolean
|
||||||
) : PersistentIrDeclarationBase<FieldCarrier>,
|
) : IrField(),
|
||||||
IrField,
|
PersistentIrDeclarationBase<FieldCarrier>,
|
||||||
FieldCarrier {
|
FieldCarrier {
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
|||||||
+1
-2
@@ -34,9 +34,8 @@ internal abstract class PersistentIrFunctionCommon(
|
|||||||
override val isOperator: Boolean,
|
override val isOperator: Boolean,
|
||||||
override val isInfix: Boolean,
|
override val isInfix: Boolean,
|
||||||
override val isExpect: Boolean,
|
override val isExpect: Boolean,
|
||||||
) :
|
) : IrSimpleFunction(),
|
||||||
PersistentIrDeclarationBase<FunctionCarrier>,
|
PersistentIrDeclarationBase<FunctionCarrier>,
|
||||||
IrSimpleFunction,
|
|
||||||
FunctionCarrier {
|
FunctionCarrier {
|
||||||
|
|
||||||
override var lastModified: Int = stageController.currentStage
|
override var lastModified: Int = stageController.currentStage
|
||||||
|
|||||||
+1
-1
@@ -37,7 +37,7 @@ internal class PersistentIrLocalDelegatedProperty(
|
|||||||
override val isVar: Boolean
|
override val isVar: Boolean
|
||||||
) :
|
) :
|
||||||
PersistentIrDeclarationBase<LocalDelegatedPropertyCarrier>,
|
PersistentIrDeclarationBase<LocalDelegatedPropertyCarrier>,
|
||||||
IrLocalDelegatedProperty,
|
IrLocalDelegatedProperty(),
|
||||||
LocalDelegatedPropertyCarrier {
|
LocalDelegatedPropertyCarrier {
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
|||||||
+2
-2
@@ -40,8 +40,8 @@ internal abstract class PersistentIrPropertyCommon(
|
|||||||
override val isDelegated: Boolean,
|
override val isDelegated: Boolean,
|
||||||
override val isExternal: Boolean,
|
override val isExternal: Boolean,
|
||||||
override val isExpect: Boolean,
|
override val isExpect: Boolean,
|
||||||
) : PersistentIrDeclarationBase<PropertyCarrier>,
|
) : IrProperty(),
|
||||||
IrProperty,
|
PersistentIrDeclarationBase<PropertyCarrier>,
|
||||||
PropertyCarrier {
|
PropertyCarrier {
|
||||||
|
|
||||||
override var lastModified: Int = stageController.currentStage
|
override var lastModified: Int = stageController.currentStage
|
||||||
|
|||||||
+1
-2
@@ -25,9 +25,8 @@ internal class PersistentIrTypeAlias(
|
|||||||
override val expandedType: IrType,
|
override val expandedType: IrType,
|
||||||
override val isActual: Boolean,
|
override val isActual: Boolean,
|
||||||
origin: IrDeclarationOrigin
|
origin: IrDeclarationOrigin
|
||||||
) :
|
) : IrTypeAlias(),
|
||||||
PersistentIrDeclarationBase<TypeAliasCarrier>,
|
PersistentIrDeclarationBase<TypeAliasCarrier>,
|
||||||
IrTypeAlias,
|
|
||||||
TypeAliasCarrier {
|
TypeAliasCarrier {
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
|||||||
+1
-2
@@ -40,9 +40,8 @@ internal class PersistentIrTypeParameter(
|
|||||||
override val index: Int,
|
override val index: Int,
|
||||||
override val isReified: Boolean,
|
override val isReified: Boolean,
|
||||||
override val variance: Variance
|
override val variance: Variance
|
||||||
) :
|
) : IrTypeParameter(),
|
||||||
PersistentIrDeclarationBase<TypeParameterCarrier>,
|
PersistentIrDeclarationBase<TypeParameterCarrier>,
|
||||||
IrTypeParameter,
|
|
||||||
TypeParameterCarrier {
|
TypeParameterCarrier {
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
|||||||
+1
-2
@@ -41,9 +41,8 @@ internal class PersistentIrValueParameter(
|
|||||||
override val varargElementType: IrType?,
|
override val varargElementType: IrType?,
|
||||||
override val isCrossinline: Boolean,
|
override val isCrossinline: Boolean,
|
||||||
override val isNoinline: Boolean
|
override val isNoinline: Boolean
|
||||||
) :
|
) : IrValueParameter(),
|
||||||
PersistentIrDeclarationBase<ValueParameterCarrier>,
|
PersistentIrDeclarationBase<ValueParameterCarrier>,
|
||||||
IrValueParameter,
|
|
||||||
ValueParameterCarrier {
|
ValueParameterCarrier {
|
||||||
|
|
||||||
@ObsoleteDescriptorBasedAPI
|
@ObsoleteDescriptorBasedAPI
|
||||||
|
|||||||
+5
-4
@@ -23,12 +23,13 @@ import org.jetbrains.kotlin.ir.symbols.IrAnonymousInitializerSymbol
|
|||||||
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
|
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
|
||||||
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
|
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
|
||||||
|
|
||||||
interface IrAnonymousInitializer : IrSymbolDeclaration<IrAnonymousInitializerSymbol> {
|
abstract class IrAnonymousInitializer : IrSymbolDeclaration<IrAnonymousInitializerSymbol> {
|
||||||
@ObsoleteDescriptorBasedAPI
|
@ObsoleteDescriptorBasedAPI
|
||||||
override val descriptor: ClassDescriptor // TODO special descriptor for anonymous initializer blocks
|
abstract override val descriptor: ClassDescriptor // TODO special descriptor for anonymous initializer blocks
|
||||||
val isStatic: Boolean
|
|
||||||
|
|
||||||
var body: IrBlockBody
|
abstract val isStatic: Boolean
|
||||||
|
|
||||||
|
abstract var body: IrBlockBody
|
||||||
|
|
||||||
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
|
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
|
||||||
visitor.visitAnonymousInitializer(this, data)
|
visitor.visitAnonymousInitializer(this, data)
|
||||||
|
|||||||
@@ -28,28 +28,28 @@ import org.jetbrains.kotlin.ir.util.transformIfNeeded
|
|||||||
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
|
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
|
||||||
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
|
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
|
||||||
|
|
||||||
interface IrClass :
|
abstract class IrClass :
|
||||||
IrSymbolDeclaration<IrClassSymbol>, IrDeclarationWithName, IrDeclarationWithVisibility,
|
IrSymbolDeclaration<IrClassSymbol>, IrDeclarationWithName, IrDeclarationWithVisibility,
|
||||||
IrDeclarationContainer, IrTypeParametersContainer, IrAttributeContainer, IrMetadataSourceOwner {
|
IrDeclarationContainer, IrTypeParametersContainer, IrAttributeContainer, IrMetadataSourceOwner {
|
||||||
|
|
||||||
@ObsoleteDescriptorBasedAPI
|
@ObsoleteDescriptorBasedAPI
|
||||||
override val descriptor: ClassDescriptor
|
abstract override val descriptor: ClassDescriptor
|
||||||
|
|
||||||
val kind: ClassKind
|
abstract val kind: ClassKind
|
||||||
var modality: Modality
|
abstract var modality: Modality
|
||||||
val isCompanion: Boolean
|
abstract val isCompanion: Boolean
|
||||||
val isInner: Boolean
|
abstract val isInner: Boolean
|
||||||
val isData: Boolean
|
abstract val isData: Boolean
|
||||||
val isExternal: Boolean
|
abstract val isExternal: Boolean
|
||||||
val isInline: Boolean
|
abstract val isInline: Boolean
|
||||||
val isExpect: Boolean
|
abstract val isExpect: Boolean
|
||||||
val isFun: Boolean
|
abstract val isFun: Boolean
|
||||||
|
|
||||||
val source: SourceElement
|
abstract val source: SourceElement
|
||||||
|
|
||||||
var superTypes: List<IrType>
|
abstract var superTypes: List<IrType>
|
||||||
|
|
||||||
var thisReceiver: IrValueParameter?
|
abstract var thisReceiver: IrValueParameter?
|
||||||
|
|
||||||
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
|
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
|
||||||
visitor.visitClass(this, data)
|
visitor.visitClass(this, data)
|
||||||
|
|||||||
@@ -21,11 +21,11 @@ import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI
|
|||||||
import org.jetbrains.kotlin.ir.symbols.IrConstructorSymbol
|
import org.jetbrains.kotlin.ir.symbols.IrConstructorSymbol
|
||||||
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
|
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
|
||||||
|
|
||||||
interface IrConstructor : IrFunction, IrSymbolDeclaration<IrConstructorSymbol> {
|
abstract class IrConstructor : IrFunction(), IrSymbolDeclaration<IrConstructorSymbol> {
|
||||||
@ObsoleteDescriptorBasedAPI
|
@ObsoleteDescriptorBasedAPI
|
||||||
override val descriptor: ClassConstructorDescriptor
|
abstract override val descriptor: ClassConstructorDescriptor
|
||||||
|
|
||||||
val isPrimary: Boolean
|
abstract val isPrimary: Boolean
|
||||||
|
|
||||||
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
|
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
|
||||||
visitor.visitConstructor(this, data)
|
visitor.visitConstructor(this, data)
|
||||||
|
|||||||
@@ -23,12 +23,12 @@ import org.jetbrains.kotlin.ir.symbols.IrEnumEntrySymbol
|
|||||||
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
|
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
|
||||||
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
|
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
|
||||||
|
|
||||||
interface IrEnumEntry : IrSymbolDeclaration<IrEnumEntrySymbol>, IrDeclarationWithName {
|
abstract class IrEnumEntry : IrSymbolDeclaration<IrEnumEntrySymbol>, IrDeclarationWithName {
|
||||||
@ObsoleteDescriptorBasedAPI
|
@ObsoleteDescriptorBasedAPI
|
||||||
override val descriptor: ClassDescriptor
|
abstract override val descriptor: ClassDescriptor
|
||||||
|
|
||||||
var correspondingClass: IrClass?
|
abstract var correspondingClass: IrClass?
|
||||||
var initializerExpression: IrExpressionBody?
|
abstract var initializerExpression: IrExpressionBody?
|
||||||
|
|
||||||
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
|
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
|
||||||
visitor.visitEnumEntry(this, data)
|
visitor.visitEnumEntry(this, data)
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ package org.jetbrains.kotlin.ir.declarations
|
|||||||
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
|
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
|
||||||
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
|
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
|
||||||
|
|
||||||
interface IrErrorDeclaration : IrDeclaration {
|
abstract class IrErrorDeclaration : IrDeclaration {
|
||||||
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
|
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
|
||||||
visitor.visitErrorDeclaration(this, data)
|
visitor.visitErrorDeclaration(this, data)
|
||||||
|
|
||||||
|
|||||||
@@ -14,21 +14,21 @@ import org.jetbrains.kotlin.ir.types.IrType
|
|||||||
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
|
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
|
||||||
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
|
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
|
||||||
|
|
||||||
interface IrField :
|
abstract class IrField :
|
||||||
IrSymbolDeclaration<IrFieldSymbol>,
|
IrSymbolDeclaration<IrFieldSymbol>,
|
||||||
IrDeclarationWithName, IrDeclarationWithVisibility, IrDeclarationParent, IrMetadataSourceOwner {
|
IrDeclarationWithName, IrDeclarationWithVisibility, IrDeclarationParent, IrMetadataSourceOwner {
|
||||||
|
|
||||||
@ObsoleteDescriptorBasedAPI
|
@ObsoleteDescriptorBasedAPI
|
||||||
override val descriptor: PropertyDescriptor
|
abstract override val descriptor: PropertyDescriptor
|
||||||
|
|
||||||
val type: IrType
|
abstract val type: IrType
|
||||||
val isFinal: Boolean
|
abstract val isFinal: Boolean
|
||||||
val isExternal: Boolean
|
abstract val isExternal: Boolean
|
||||||
val isStatic: Boolean
|
abstract val isStatic: Boolean
|
||||||
|
|
||||||
var initializer: IrExpressionBody?
|
abstract var initializer: IrExpressionBody?
|
||||||
|
|
||||||
var correspondingPropertySymbol: IrPropertySymbol?
|
abstract var correspondingPropertySymbol: IrPropertySymbol?
|
||||||
|
|
||||||
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
|
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
|
||||||
visitor.visitField(this, data)
|
visitor.visitField(this, data)
|
||||||
|
|||||||
@@ -27,25 +27,25 @@ import org.jetbrains.kotlin.ir.util.transformIfNeeded
|
|||||||
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
|
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
|
||||||
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
|
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
|
||||||
|
|
||||||
interface IrFunction :
|
abstract class IrFunction :
|
||||||
IrDeclarationWithName, IrDeclarationWithVisibility, IrTypeParametersContainer, IrSymbolOwner, IrDeclarationParent, IrReturnTarget,
|
IrDeclarationWithName, IrDeclarationWithVisibility, IrTypeParametersContainer, IrSymbolOwner, IrDeclarationParent, IrReturnTarget,
|
||||||
IrMetadataSourceOwner {
|
IrMetadataSourceOwner {
|
||||||
|
|
||||||
@ObsoleteDescriptorBasedAPI
|
@ObsoleteDescriptorBasedAPI
|
||||||
override val descriptor: FunctionDescriptor
|
abstract override val descriptor: FunctionDescriptor
|
||||||
override val symbol: IrFunctionSymbol
|
abstract override val symbol: IrFunctionSymbol
|
||||||
|
|
||||||
val isInline: Boolean // NB: there's an inline constructor for Array and each primitive array class
|
abstract val isInline: Boolean // NB: there's an inline constructor for Array and each primitive array class
|
||||||
val isExternal: Boolean
|
abstract val isExternal: Boolean
|
||||||
val isExpect: Boolean
|
abstract val isExpect: Boolean
|
||||||
|
|
||||||
var returnType: IrType
|
abstract var returnType: IrType
|
||||||
|
|
||||||
var dispatchReceiverParameter: IrValueParameter?
|
abstract var dispatchReceiverParameter: IrValueParameter?
|
||||||
var extensionReceiverParameter: IrValueParameter?
|
abstract var extensionReceiverParameter: IrValueParameter?
|
||||||
var valueParameters: List<IrValueParameter>
|
abstract var valueParameters: List<IrValueParameter>
|
||||||
|
|
||||||
var body: IrBody?
|
abstract var body: IrBody?
|
||||||
|
|
||||||
override fun <D> acceptChildren(visitor: IrElementVisitor<Unit, D>, data: D) {
|
override fun <D> acceptChildren(visitor: IrElementVisitor<Unit, D>, data: D) {
|
||||||
typeParameters.forEach { it.accept(visitor, data) }
|
typeParameters.forEach { it.accept(visitor, data) }
|
||||||
|
|||||||
+8
-8
@@ -23,21 +23,21 @@ import org.jetbrains.kotlin.ir.types.IrType
|
|||||||
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
|
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
|
||||||
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
|
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
|
||||||
|
|
||||||
interface IrLocalDelegatedProperty :
|
abstract class IrLocalDelegatedProperty :
|
||||||
IrDeclarationWithName,
|
IrDeclarationWithName,
|
||||||
IrSymbolOwner,
|
IrSymbolOwner,
|
||||||
IrMetadataSourceOwner {
|
IrMetadataSourceOwner {
|
||||||
|
|
||||||
@ObsoleteDescriptorBasedAPI
|
@ObsoleteDescriptorBasedAPI
|
||||||
override val descriptor: VariableDescriptorWithAccessors
|
abstract override val descriptor: VariableDescriptorWithAccessors
|
||||||
override val symbol: IrLocalDelegatedPropertySymbol
|
abstract override val symbol: IrLocalDelegatedPropertySymbol
|
||||||
|
|
||||||
val type: IrType
|
abstract val type: IrType
|
||||||
val isVar: Boolean
|
abstract val isVar: Boolean
|
||||||
|
|
||||||
var delegate: IrVariable
|
abstract var delegate: IrVariable
|
||||||
var getter: IrFunction
|
abstract var getter: IrFunction
|
||||||
var setter: IrFunction?
|
abstract var setter: IrFunction?
|
||||||
|
|
||||||
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
|
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
|
||||||
visitor.visitLocalDelegatedProperty(this, data)
|
visitor.visitLocalDelegatedProperty(this, data)
|
||||||
|
|||||||
@@ -22,22 +22,22 @@ import org.jetbrains.kotlin.ir.symbols.IrPropertySymbol
|
|||||||
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
|
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
|
||||||
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
|
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
|
||||||
|
|
||||||
interface IrProperty : IrOverridableMember, IrMetadataSourceOwner {
|
abstract class IrProperty : IrOverridableMember, IrMetadataSourceOwner {
|
||||||
@ObsoleteDescriptorBasedAPI
|
@ObsoleteDescriptorBasedAPI
|
||||||
override val descriptor: PropertyDescriptor
|
abstract override val descriptor: PropertyDescriptor
|
||||||
override val symbol: IrPropertySymbol
|
abstract override val symbol: IrPropertySymbol
|
||||||
|
|
||||||
val isVar: Boolean
|
abstract val isVar: Boolean
|
||||||
val isConst: Boolean
|
abstract val isConst: Boolean
|
||||||
val isLateinit: Boolean
|
abstract val isLateinit: Boolean
|
||||||
val isDelegated: Boolean
|
abstract val isDelegated: Boolean
|
||||||
val isExternal: Boolean
|
abstract val isExternal: Boolean
|
||||||
val isExpect: Boolean
|
abstract val isExpect: Boolean
|
||||||
val isFakeOverride: Boolean
|
abstract val isFakeOverride: Boolean
|
||||||
|
|
||||||
var backingField: IrField?
|
abstract var backingField: IrField?
|
||||||
var getter: IrSimpleFunction?
|
abstract var getter: IrSimpleFunction?
|
||||||
var setter: IrSimpleFunction?
|
abstract var setter: IrSimpleFunction?
|
||||||
|
|
||||||
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
|
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
|
||||||
visitor.visitProperty(this, data)
|
visitor.visitProperty(this, data)
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ import org.jetbrains.kotlin.ir.symbols.IrScriptSymbol
|
|||||||
|
|
||||||
//TODO: make IrScript as IrPackageFragment, because script is used as a file, not as a class
|
//TODO: make IrScript as IrPackageFragment, because script is used as a file, not as a class
|
||||||
//NOTE: declarations and statements stored separately
|
//NOTE: declarations and statements stored separately
|
||||||
interface IrScript : IrSymbolDeclaration<IrScriptSymbol>, IrDeclarationContainer, IrDeclarationWithName, IrDeclarationParent {
|
abstract class IrScript : IrSymbolDeclaration<IrScriptSymbol>, IrDeclarationContainer, IrDeclarationWithName, IrDeclarationParent {
|
||||||
val statements: MutableList<IrStatement>
|
abstract val statements: MutableList<IrStatement>
|
||||||
|
|
||||||
// NOTE: is the result of the FE conversion, because there script interpreted as a class and has receiver
|
// NOTE: is the result of the FE conversion, because there script interpreted as a class and has receiver
|
||||||
var thisReceiver: IrValueParameter
|
abstract var thisReceiver: IrValueParameter
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,20 +9,20 @@ import org.jetbrains.kotlin.ir.symbols.IrPropertySymbol
|
|||||||
import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol
|
import org.jetbrains.kotlin.ir.symbols.IrSimpleFunctionSymbol
|
||||||
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
|
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
|
||||||
|
|
||||||
interface IrSimpleFunction :
|
abstract class IrSimpleFunction :
|
||||||
IrFunction,
|
IrFunction(),
|
||||||
IrSymbolDeclaration<IrSimpleFunctionSymbol>,
|
IrSymbolDeclaration<IrSimpleFunctionSymbol>,
|
||||||
IrOverridableDeclaration<IrSimpleFunctionSymbol>,
|
IrOverridableDeclaration<IrSimpleFunctionSymbol>,
|
||||||
IrOverridableMember,
|
IrOverridableMember,
|
||||||
IrAttributeContainer {
|
IrAttributeContainer {
|
||||||
|
|
||||||
val isTailrec: Boolean
|
abstract val isTailrec: Boolean
|
||||||
val isSuspend: Boolean
|
abstract val isSuspend: Boolean
|
||||||
val isFakeOverride: Boolean
|
abstract val isFakeOverride: Boolean
|
||||||
val isOperator: Boolean
|
abstract val isOperator: Boolean
|
||||||
val isInfix: Boolean
|
abstract val isInfix: Boolean
|
||||||
|
|
||||||
var correspondingPropertySymbol: IrPropertySymbol?
|
abstract var correspondingPropertySymbol: IrPropertySymbol?
|
||||||
|
|
||||||
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
|
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
|
||||||
visitor.visitSimpleFunction(this, data)
|
visitor.visitSimpleFunction(this, data)
|
||||||
|
|||||||
@@ -13,17 +13,17 @@ import org.jetbrains.kotlin.ir.util.transformIfNeeded
|
|||||||
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
|
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
|
||||||
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
|
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
|
||||||
|
|
||||||
interface IrTypeAlias :
|
abstract class IrTypeAlias :
|
||||||
IrSymbolDeclaration<IrTypeAliasSymbol>,
|
IrSymbolDeclaration<IrTypeAliasSymbol>,
|
||||||
IrDeclarationWithName,
|
IrDeclarationWithName,
|
||||||
IrDeclarationWithVisibility,
|
IrDeclarationWithVisibility,
|
||||||
IrTypeParametersContainer {
|
IrTypeParametersContainer {
|
||||||
|
|
||||||
@ObsoleteDescriptorBasedAPI
|
@ObsoleteDescriptorBasedAPI
|
||||||
override val descriptor: TypeAliasDescriptor
|
abstract override val descriptor: TypeAliasDescriptor
|
||||||
|
|
||||||
val isActual: Boolean
|
abstract val isActual: Boolean
|
||||||
val expandedType: IrType
|
abstract val expandedType: IrType
|
||||||
|
|
||||||
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
|
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
|
||||||
visitor.visitTypeAlias(this, data)
|
visitor.visitTypeAlias(this, data)
|
||||||
|
|||||||
@@ -24,14 +24,14 @@ import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
|
|||||||
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
|
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
|
||||||
import org.jetbrains.kotlin.types.Variance
|
import org.jetbrains.kotlin.types.Variance
|
||||||
|
|
||||||
interface IrTypeParameter : IrSymbolDeclaration<IrTypeParameterSymbol>, IrDeclarationWithName {
|
abstract class IrTypeParameter : IrSymbolDeclaration<IrTypeParameterSymbol>, IrDeclarationWithName {
|
||||||
@ObsoleteDescriptorBasedAPI
|
@ObsoleteDescriptorBasedAPI
|
||||||
override val descriptor: TypeParameterDescriptor
|
abstract override val descriptor: TypeParameterDescriptor
|
||||||
|
|
||||||
val variance: Variance
|
abstract val variance: Variance
|
||||||
val index: Int
|
abstract val index: Int
|
||||||
val isReified: Boolean
|
abstract val isReified: Boolean
|
||||||
val superTypes: MutableList<IrType>
|
abstract val superTypes: MutableList<IrType>
|
||||||
|
|
||||||
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
|
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
|
||||||
visitor.visitTypeParameter(this, data)
|
visitor.visitTypeParameter(this, data)
|
||||||
|
|||||||
@@ -10,10 +10,10 @@ import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI
|
|||||||
import org.jetbrains.kotlin.ir.symbols.IrValueSymbol
|
import org.jetbrains.kotlin.ir.symbols.IrValueSymbol
|
||||||
import org.jetbrains.kotlin.ir.types.IrType
|
import org.jetbrains.kotlin.ir.types.IrType
|
||||||
|
|
||||||
interface IrValueDeclaration : IrDeclarationWithName, IrSymbolOwner {
|
abstract class IrValueDeclaration : IrDeclarationWithName, IrSymbolOwner {
|
||||||
@ObsoleteDescriptorBasedAPI
|
@ObsoleteDescriptorBasedAPI
|
||||||
override val descriptor: ValueDescriptor
|
abstract override val descriptor: ValueDescriptor
|
||||||
|
|
||||||
override val symbol: IrValueSymbol
|
abstract override val symbol: IrValueSymbol
|
||||||
val type: IrType
|
abstract val type: IrType
|
||||||
}
|
}
|
||||||
@@ -24,16 +24,16 @@ import org.jetbrains.kotlin.ir.types.IrType
|
|||||||
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
|
import org.jetbrains.kotlin.ir.visitors.IrElementTransformer
|
||||||
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
|
import org.jetbrains.kotlin.ir.visitors.IrElementVisitor
|
||||||
|
|
||||||
interface IrValueParameter : IrValueDeclaration, IrSymbolDeclaration<IrValueParameterSymbol> {
|
abstract class IrValueParameter : IrValueDeclaration(), IrSymbolDeclaration<IrValueParameterSymbol> {
|
||||||
@ObsoleteDescriptorBasedAPI
|
@ObsoleteDescriptorBasedAPI
|
||||||
override val descriptor: ParameterDescriptor
|
abstract override val descriptor: ParameterDescriptor
|
||||||
|
|
||||||
val index: Int
|
abstract val index: Int
|
||||||
val varargElementType: IrType?
|
abstract val varargElementType: IrType?
|
||||||
val isCrossinline: Boolean
|
abstract val isCrossinline: Boolean
|
||||||
val isNoinline: Boolean
|
abstract val isNoinline: Boolean
|
||||||
|
|
||||||
var defaultValue: IrExpressionBody?
|
abstract var defaultValue: IrExpressionBody?
|
||||||
|
|
||||||
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
|
override fun <R, D> accept(visitor: IrElementVisitor<R, D>, data: D): R =
|
||||||
visitor.visitValueParameter(this, data)
|
visitor.visitValueParameter(this, data)
|
||||||
|
|||||||
@@ -21,14 +21,13 @@ import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI
|
|||||||
import org.jetbrains.kotlin.ir.expressions.IrExpression
|
import org.jetbrains.kotlin.ir.expressions.IrExpression
|
||||||
import org.jetbrains.kotlin.ir.symbols.IrVariableSymbol
|
import org.jetbrains.kotlin.ir.symbols.IrVariableSymbol
|
||||||
|
|
||||||
interface IrVariable : IrValueDeclaration, IrSymbolDeclaration<IrVariableSymbol> {
|
abstract class IrVariable : IrValueDeclaration(), IrSymbolDeclaration<IrVariableSymbol> {
|
||||||
@ObsoleteDescriptorBasedAPI
|
@ObsoleteDescriptorBasedAPI
|
||||||
override val descriptor: VariableDescriptor
|
abstract override val descriptor: VariableDescriptor
|
||||||
|
|
||||||
val isVar: Boolean
|
abstract val isVar: Boolean
|
||||||
val isConst: Boolean
|
abstract val isConst: Boolean
|
||||||
val isLateinit: Boolean
|
abstract val isLateinit: Boolean
|
||||||
|
|
||||||
var initializer: IrExpression?
|
abstract var initializer: IrExpression?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ private val SCRIPT_ORIGIN = object : IrDeclarationOriginImpl("FIELD_FOR_OBJECT_I
|
|||||||
class IrScriptImpl(
|
class IrScriptImpl(
|
||||||
override val symbol: IrScriptSymbol,
|
override val symbol: IrScriptSymbol,
|
||||||
override val name: Name
|
override val name: Name
|
||||||
) : IrScript, IrDeclaration {
|
) : IrScript() {
|
||||||
override val startOffset: Int get() = UNDEFINED_OFFSET
|
override val startOffset: Int get() = UNDEFINED_OFFSET
|
||||||
override val endOffset: Int get() = UNDEFINED_OFFSET
|
override val endOffset: Int get() = UNDEFINED_OFFSET
|
||||||
override var origin: IrDeclarationOrigin = SCRIPT_ORIGIN
|
override var origin: IrDeclarationOrigin = SCRIPT_ORIGIN
|
||||||
@@ -44,7 +44,8 @@ class IrScriptImpl(
|
|||||||
override lateinit var thisReceiver: IrValueParameter
|
override lateinit var thisReceiver: IrValueParameter
|
||||||
|
|
||||||
@ObsoleteDescriptorBasedAPI
|
@ObsoleteDescriptorBasedAPI
|
||||||
override val descriptor: ScriptDescriptor = symbol.descriptor
|
override val descriptor: ScriptDescriptor
|
||||||
|
get() = symbol.descriptor
|
||||||
|
|
||||||
override val factory: IrFactory
|
override val factory: IrFactory
|
||||||
get() = error("Create IrScriptImpl directly")
|
get() = error("Create IrScriptImpl directly")
|
||||||
|
|||||||
@@ -40,8 +40,7 @@ class IrVariableImpl(
|
|||||||
override val isVar: Boolean,
|
override val isVar: Boolean,
|
||||||
override val isConst: Boolean,
|
override val isConst: Boolean,
|
||||||
override val isLateinit: Boolean
|
override val isLateinit: Boolean
|
||||||
) : IrVariable {
|
) : IrVariable() {
|
||||||
|
|
||||||
private var _parent: IrDeclarationParent? = null
|
private var _parent: IrDeclarationParent? = null
|
||||||
override var parent: IrDeclarationParent
|
override var parent: IrDeclarationParent
|
||||||
get() = _parent
|
get() = _parent
|
||||||
@@ -57,7 +56,8 @@ class IrVariableImpl(
|
|||||||
}
|
}
|
||||||
|
|
||||||
@ObsoleteDescriptorBasedAPI
|
@ObsoleteDescriptorBasedAPI
|
||||||
override val descriptor: VariableDescriptor get() = symbol.descriptor
|
override val descriptor: VariableDescriptor
|
||||||
|
get() = symbol.descriptor
|
||||||
|
|
||||||
override var initializer: IrExpression? = null
|
override var initializer: IrExpression? = null
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ class IrLazyClass(
|
|||||||
override val isFun: Boolean,
|
override val isFun: Boolean,
|
||||||
override val stubGenerator: DeclarationStubGenerator,
|
override val stubGenerator: DeclarationStubGenerator,
|
||||||
override val typeTranslator: TypeTranslator
|
override val typeTranslator: TypeTranslator
|
||||||
) : IrClass, IrLazyDeclarationBase {
|
) : IrClass(), IrLazyDeclarationBase {
|
||||||
init {
|
init {
|
||||||
symbol.bind(this)
|
symbol.bind(this)
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -33,7 +33,7 @@ class IrLazyConstructor(
|
|||||||
override val isExpect: Boolean,
|
override val isExpect: Boolean,
|
||||||
override val stubGenerator: DeclarationStubGenerator,
|
override val stubGenerator: DeclarationStubGenerator,
|
||||||
override val typeTranslator: TypeTranslator,
|
override val typeTranslator: TypeTranslator,
|
||||||
) : IrConstructor, IrLazyFunctionBase {
|
) : IrConstructor(), IrLazyFunctionBase {
|
||||||
override var parent: IrDeclarationParent by createLazyParent()
|
override var parent: IrDeclarationParent by createLazyParent()
|
||||||
|
|
||||||
override var annotations: List<IrConstructorCall> by createLazyAnnotations()
|
override var annotations: List<IrConstructorCall> by createLazyAnnotations()
|
||||||
|
|||||||
+1
-1
@@ -38,7 +38,7 @@ class IrLazyEnumEntryImpl(
|
|||||||
override val descriptor: ClassDescriptor,
|
override val descriptor: ClassDescriptor,
|
||||||
override val stubGenerator: DeclarationStubGenerator,
|
override val stubGenerator: DeclarationStubGenerator,
|
||||||
override val typeTranslator: TypeTranslator,
|
override val typeTranslator: TypeTranslator,
|
||||||
) : IrEnumEntry, IrLazyDeclarationBase {
|
) : IrEnumEntry(), IrLazyDeclarationBase {
|
||||||
init {
|
init {
|
||||||
symbol.bind(this)
|
symbol.bind(this)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ class IrLazyField(
|
|||||||
override val isStatic: Boolean,
|
override val isStatic: Boolean,
|
||||||
override val stubGenerator: DeclarationStubGenerator,
|
override val stubGenerator: DeclarationStubGenerator,
|
||||||
override val typeTranslator: TypeTranslator,
|
override val typeTranslator: TypeTranslator,
|
||||||
) : IrField, IrLazyDeclarationBase {
|
) : IrField(), IrLazyDeclarationBase {
|
||||||
init {
|
init {
|
||||||
symbol.bind(this)
|
symbol.bind(this)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ class IrLazyFunction(
|
|||||||
override val isInfix: Boolean,
|
override val isInfix: Boolean,
|
||||||
override val stubGenerator: DeclarationStubGenerator,
|
override val stubGenerator: DeclarationStubGenerator,
|
||||||
override val typeTranslator: TypeTranslator,
|
override val typeTranslator: TypeTranslator,
|
||||||
) : IrSimpleFunction, IrLazyFunctionBase {
|
) : IrSimpleFunction(), IrLazyFunctionBase {
|
||||||
override var parent: IrDeclarationParent by createLazyParent()
|
override var parent: IrDeclarationParent by createLazyParent()
|
||||||
|
|
||||||
override var annotations: List<IrConstructorCall> by createLazyAnnotations()
|
override var annotations: List<IrConstructorCall> by createLazyAnnotations()
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ class IrLazyProperty(
|
|||||||
override val stubGenerator: DeclarationStubGenerator,
|
override val stubGenerator: DeclarationStubGenerator,
|
||||||
override val typeTranslator: TypeTranslator,
|
override val typeTranslator: TypeTranslator,
|
||||||
bindingContext: BindingContext? = null
|
bindingContext: BindingContext? = null
|
||||||
) : IrProperty, IrLazyDeclarationBase {
|
) : IrProperty(), IrLazyDeclarationBase {
|
||||||
init {
|
init {
|
||||||
symbol.bind(this)
|
symbol.bind(this)
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -28,7 +28,7 @@ class IrLazyTypeAlias(
|
|||||||
override val isActual: Boolean,
|
override val isActual: Boolean,
|
||||||
override val stubGenerator: DeclarationStubGenerator,
|
override val stubGenerator: DeclarationStubGenerator,
|
||||||
override val typeTranslator: TypeTranslator,
|
override val typeTranslator: TypeTranslator,
|
||||||
) : IrTypeAlias, IrLazyDeclarationBase {
|
) : IrTypeAlias(), IrLazyDeclarationBase {
|
||||||
init {
|
init {
|
||||||
symbol.bind(this)
|
symbol.bind(this)
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -29,7 +29,7 @@ class IrLazyTypeParameter(
|
|||||||
override val variance: Variance,
|
override val variance: Variance,
|
||||||
override val stubGenerator: DeclarationStubGenerator,
|
override val stubGenerator: DeclarationStubGenerator,
|
||||||
override val typeTranslator: TypeTranslator,
|
override val typeTranslator: TypeTranslator,
|
||||||
) : IrTypeParameter, IrLazyDeclarationBase {
|
) : IrTypeParameter(), IrLazyDeclarationBase {
|
||||||
init {
|
init {
|
||||||
symbol.bind(this)
|
symbol.bind(this)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user