FIR2IR: cache enum entry classes properly
This commit is contained in:
+24
-31
@@ -8,6 +8,7 @@ package org.jetbrains.kotlin.fir.backend
|
||||
import org.jetbrains.kotlin.descriptors.DeclarationDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.Modality
|
||||
import org.jetbrains.kotlin.descriptors.Visibilities
|
||||
import org.jetbrains.kotlin.descriptors.Visibility
|
||||
import org.jetbrains.kotlin.fir.FirSession
|
||||
import org.jetbrains.kotlin.fir.declarations.*
|
||||
import org.jetbrains.kotlin.fir.declarations.impl.FirDefaultPropertyGetter
|
||||
@@ -286,44 +287,20 @@ class Fir2IrDeclarationStorage(
|
||||
return getCachedIrClass(klass) ?: createIrClass(klass)
|
||||
}
|
||||
|
||||
private fun createIrAnonymousObject(anonymousObject: FirAnonymousObject): IrClass {
|
||||
private fun createIrAnonymousObject(
|
||||
anonymousObject: FirAnonymousObject,
|
||||
visibility: Visibility = Visibilities.LOCAL,
|
||||
name: Name = Name.special("<no name provided>"),
|
||||
irParent: IrClass? = null
|
||||
): IrClass {
|
||||
val descriptor = WrappedClassDescriptor()
|
||||
val origin = IrDeclarationOrigin.DEFINED
|
||||
val modality = Modality.FINAL
|
||||
val visibility = Visibilities.LOCAL
|
||||
val result = anonymousObject.convertWithOffsets { startOffset, endOffset ->
|
||||
irSymbolTable.declareClass(startOffset, endOffset, origin, descriptor, modality, visibility) { symbol ->
|
||||
IrClassImpl(
|
||||
startOffset, endOffset, origin, symbol,
|
||||
Name.special("<no name provided>"), anonymousObject.classKind,
|
||||
visibility, modality,
|
||||
isCompanion = false, isInner = false, isData = false,
|
||||
isExternal = false, isInline = false, isExpect = false, isFun = false
|
||||
).apply {
|
||||
descriptor.bind(this)
|
||||
setThisReceiver()
|
||||
}
|
||||
}
|
||||
}.declareSupertypesAndTypeParameters(anonymousObject)
|
||||
localStorage.putLocalClass(anonymousObject, result)
|
||||
return result
|
||||
}
|
||||
|
||||
fun getIrAnonymousObject(anonymousObject: FirAnonymousObject): IrClass {
|
||||
localStorage.getLocalClass(anonymousObject)?.let { return it }
|
||||
return createIrAnonymousObject(anonymousObject)
|
||||
}
|
||||
|
||||
private fun getIrEnumEntryClass(enumEntry: FirEnumEntry, anonymousObject: FirAnonymousObject, irParent: IrClass?): IrClass {
|
||||
val descriptor = WrappedClassDescriptor()
|
||||
val origin = IrDeclarationOrigin.DEFINED
|
||||
val modality = Modality.FINAL
|
||||
val visibility = Visibilities.PRIVATE
|
||||
return anonymousObject.convertWithOffsets { startOffset, endOffset ->
|
||||
irSymbolTable.declareClass(startOffset, endOffset, origin, descriptor, modality, visibility) { symbol ->
|
||||
IrClassImpl(
|
||||
startOffset, endOffset, origin, symbol,
|
||||
enumEntry.name, anonymousObject.classKind,
|
||||
name, anonymousObject.classKind,
|
||||
visibility, modality,
|
||||
isCompanion = false, isInner = false, isData = false,
|
||||
isExternal = false, isInline = false, isExpect = false, isFun = false
|
||||
@@ -336,6 +313,22 @@ class Fir2IrDeclarationStorage(
|
||||
}
|
||||
}
|
||||
}.declareSupertypesAndTypeParameters(anonymousObject)
|
||||
localStorage.putLocalClass(anonymousObject, result)
|
||||
return result
|
||||
}
|
||||
|
||||
fun getIrAnonymousObject(
|
||||
anonymousObject: FirAnonymousObject,
|
||||
visibility: Visibility = Visibilities.LOCAL,
|
||||
name: Name = Name.special("<no name provided>"),
|
||||
irParent: IrClass? = null
|
||||
): IrClass {
|
||||
localStorage.getLocalClass(anonymousObject)?.let { return it }
|
||||
return createIrAnonymousObject(anonymousObject, visibility, name, irParent)
|
||||
}
|
||||
|
||||
private fun getIrEnumEntryClass(enumEntry: FirEnumEntry, anonymousObject: FirAnonymousObject, irParent: IrClass?): IrClass {
|
||||
return getIrAnonymousObject(anonymousObject, Visibilities.PRIVATE, enumEntry.name, irParent)
|
||||
}
|
||||
|
||||
private fun getIrTypeParameter(
|
||||
|
||||
+11
-11
@@ -75,7 +75,7 @@ FILE fqName:<root> fileName:/enum.kt
|
||||
ENUM_ENTRY name:TEST1
|
||||
class: CLASS ENUM_ENTRY name:TEST1 modality:FINAL visibility:private superTypes:[<root>.TestEnum2]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestEnum2.TEST1
|
||||
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<no name provided> [primary]
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.TestEnum2.TEST1 [primary]
|
||||
BLOCK_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'private constructor <init> (x: kotlin.Int) [primary] declared in <root>.TestEnum2'
|
||||
x: CONST Int type=kotlin.Int value=1
|
||||
@@ -83,7 +83,7 @@ FILE fqName:<root> fileName:/enum.kt
|
||||
ENUM_ENTRY name:TEST2
|
||||
class: CLASS ENUM_ENTRY name:TEST2 modality:FINAL visibility:private superTypes:[<root>.TestEnum2]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestEnum2.TEST2
|
||||
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<no name provided> [primary]
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.TestEnum2.TEST2 [primary]
|
||||
BLOCK_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'private constructor <init> (x: kotlin.Int) [primary] declared in <root>.TestEnum2'
|
||||
x: CONST Int type=kotlin.Int value=2
|
||||
@@ -91,7 +91,7 @@ FILE fqName:<root> fileName:/enum.kt
|
||||
ENUM_ENTRY name:TEST3
|
||||
class: CLASS ENUM_ENTRY name:TEST3 modality:FINAL visibility:private superTypes:[<root>.TestEnum2]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestEnum2.TEST3
|
||||
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<no name provided> [primary]
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.TestEnum2.TEST3 [primary]
|
||||
BLOCK_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'private constructor <init> (x: kotlin.Int) [primary] declared in <root>.TestEnum2'
|
||||
x: CONST Int type=kotlin.Int value=3
|
||||
@@ -147,7 +147,7 @@ FILE fqName:<root> fileName:/enum.kt
|
||||
ENUM_ENTRY name:TEST
|
||||
class: CLASS ENUM_ENTRY name:TEST modality:FINAL visibility:private superTypes:[<root>.TestEnum3]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestEnum3.TEST
|
||||
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<no name provided> [primary]
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.TestEnum3.TEST [primary]
|
||||
BLOCK_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.TestEnum3'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST modality:FINAL visibility:private superTypes:[<root>.TestEnum3]'
|
||||
@@ -221,7 +221,7 @@ FILE fqName:<root> fileName:/enum.kt
|
||||
ENUM_ENTRY name:TEST1
|
||||
class: CLASS ENUM_ENTRY name:TEST1 modality:FINAL visibility:private superTypes:[<root>.TestEnum4]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestEnum4.TEST1
|
||||
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<no name provided> [primary]
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.TestEnum4.TEST1 [primary]
|
||||
BLOCK_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'private constructor <init> (x: kotlin.Int) [primary] declared in <root>.TestEnum4'
|
||||
x: CONST Int type=kotlin.Int value=1
|
||||
@@ -234,7 +234,7 @@ FILE fqName:<root> fileName:/enum.kt
|
||||
ENUM_ENTRY name:TEST2
|
||||
class: CLASS ENUM_ENTRY name:TEST2 modality:FINAL visibility:private superTypes:[<root>.TestEnum4]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestEnum4.TEST2
|
||||
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<no name provided> [primary]
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.TestEnum4.TEST2 [primary]
|
||||
BLOCK_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'private constructor <init> (x: kotlin.Int) [primary] declared in <root>.TestEnum4'
|
||||
x: CONST Int type=kotlin.Int value=2
|
||||
@@ -251,7 +251,7 @@ FILE fqName:<root> fileName:/enum.kt
|
||||
ANONYMOUS_INITIALIZER isStatic=false
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:z type:kotlin.Int visibility:private [final]' type=kotlin.Unit origin=null
|
||||
receiver: GET_VAR '<this>: <uninitialized parent>.<no name provided> declared in <no parent>.<no name provided>' type=<uninitialized parent>.<no name provided> origin=null
|
||||
receiver: GET_VAR '<this>: <root>.TestEnum4.TEST2 declared in <root>.TestEnum4.TEST2' type=<root>.TestEnum4.TEST2 origin=null
|
||||
value: GET_VAR 'x: kotlin.Int declared in <root>.TestEnum4.<init>' type=kotlin.Int origin=null
|
||||
FUN name:foo visibility:public modality:FINAL <> ($this:<root>.TestEnum4.TEST2) returnType:kotlin.Unit
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.TestEnum4.TEST2
|
||||
@@ -325,21 +325,21 @@ FILE fqName:<root> fileName:/enum.kt
|
||||
ENUM_ENTRY name:TEST1
|
||||
class: CLASS ENUM_ENTRY name:TEST1 modality:FINAL visibility:private superTypes:[<root>.TestEnum5]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestEnum5.TEST1
|
||||
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<no name provided> [primary]
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.TestEnum5.TEST1 [primary]
|
||||
BLOCK_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'private constructor <init> (x: kotlin.Int) [primary] declared in <root>.TestEnum5'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST1 modality:FINAL visibility:private superTypes:[<root>.TestEnum5]'
|
||||
ENUM_ENTRY name:TEST2
|
||||
class: CLASS ENUM_ENTRY name:TEST2 modality:FINAL visibility:private superTypes:[<root>.TestEnum5]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestEnum5.TEST2
|
||||
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<no name provided> [primary]
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.TestEnum5.TEST2 [primary]
|
||||
BLOCK_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'private constructor <init> (x: kotlin.Int) [primary] declared in <root>.TestEnum5'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST2 modality:FINAL visibility:private superTypes:[<root>.TestEnum5]'
|
||||
ENUM_ENTRY name:TEST3
|
||||
class: CLASS ENUM_ENTRY name:TEST3 modality:FINAL visibility:private superTypes:[<root>.TestEnum5]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestEnum5.TEST3
|
||||
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<no name provided> [primary]
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.TestEnum5.TEST3 [primary]
|
||||
BLOCK_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'private constructor <init> (x: kotlin.Int) [primary] declared in <root>.TestEnum5'
|
||||
x: CONST Int type=kotlin.Int value=0
|
||||
@@ -423,7 +423,7 @@ FILE fqName:<root> fileName:/enum.kt
|
||||
ENUM_ENTRY name:TEST
|
||||
class: CLASS ENUM_ENTRY name:TEST modality:FINAL visibility:private superTypes:[<root>.TestEnum6]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestEnum6.TEST
|
||||
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<no name provided> [primary]
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.TestEnum6.TEST [primary]
|
||||
BLOCK_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'private constructor <init> (x: kotlin.Int, y: kotlin.Int) [primary] declared in <root>.TestEnum6'
|
||||
x: CALL 'public final fun f (): kotlin.Int declared in <root>' type=kotlin.Int origin=null
|
||||
|
||||
@@ -72,7 +72,7 @@ FILE fqName:<root> fileName:/enumClassModality.kt
|
||||
ENUM_ENTRY name:X1
|
||||
class: CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:private superTypes:[<root>.TestFinalEnum2]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestFinalEnum2.X1
|
||||
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<no name provided> [primary]
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.TestFinalEnum2.X1 [primary]
|
||||
BLOCK_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'private constructor <init> (x: kotlin.Int) [primary] declared in <root>.TestFinalEnum2'
|
||||
x: CONST Int type=kotlin.Int value=1
|
||||
@@ -182,7 +182,7 @@ FILE fqName:<root> fileName:/enumClassModality.kt
|
||||
ENUM_ENTRY name:X1
|
||||
class: CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:private superTypes:[<root>.TestOpenEnum1]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestOpenEnum1.X1
|
||||
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<no name provided> [primary]
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.TestOpenEnum1.X1 [primary]
|
||||
BLOCK_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.TestOpenEnum1'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:private superTypes:[<root>.TestOpenEnum1]'
|
||||
@@ -242,7 +242,7 @@ FILE fqName:<root> fileName:/enumClassModality.kt
|
||||
ENUM_ENTRY name:X1
|
||||
class: CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:private superTypes:[<root>.TestOpenEnum2]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestOpenEnum2.X1
|
||||
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<no name provided> [primary]
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.TestOpenEnum2.X1 [primary]
|
||||
BLOCK_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.TestOpenEnum2'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:private superTypes:[<root>.TestOpenEnum2]'
|
||||
@@ -303,7 +303,7 @@ FILE fqName:<root> fileName:/enumClassModality.kt
|
||||
ENUM_ENTRY name:X1
|
||||
class: CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:private superTypes:[<root>.TestAbstractEnum1]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestAbstractEnum1.X1
|
||||
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<no name provided> [primary]
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.TestAbstractEnum1.X1 [primary]
|
||||
BLOCK_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.TestAbstractEnum1'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:private superTypes:[<root>.TestAbstractEnum1]'
|
||||
@@ -380,7 +380,7 @@ FILE fqName:<root> fileName:/enumClassModality.kt
|
||||
ENUM_ENTRY name:X1
|
||||
class: CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:private superTypes:[<root>.TestAbstractEnum2]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestAbstractEnum2.X1
|
||||
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<no name provided> [primary]
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.TestAbstractEnum2.X1 [primary]
|
||||
BLOCK_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.TestAbstractEnum2'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:private superTypes:[<root>.TestAbstractEnum2]'
|
||||
|
||||
@@ -4,7 +4,7 @@ FILE fqName:<root> fileName:/enumWithMultipleCtors.kt
|
||||
ENUM_ENTRY name:X
|
||||
class: CLASS ENUM_ENTRY name:X modality:FINAL visibility:private superTypes:[<root>.A]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.A.X
|
||||
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<no name provided> [primary]
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.A.X [primary]
|
||||
BLOCK_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'private constructor <init> (arg: kotlin.String) declared in <root>.A'
|
||||
arg: CONST String type=kotlin.String value="asd"
|
||||
@@ -12,7 +12,7 @@ FILE fqName:<root> fileName:/enumWithMultipleCtors.kt
|
||||
ENUM_ENTRY name:Y
|
||||
class: CLASS ENUM_ENTRY name:Y modality:FINAL visibility:private superTypes:[<root>.A]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.A.Y
|
||||
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<no name provided> [primary]
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.A.Y [primary]
|
||||
BLOCK_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'private constructor <init> () declared in <root>.A'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:Y modality:FINAL visibility:private superTypes:[<root>.A]'
|
||||
@@ -27,7 +27,7 @@ FILE fqName:<root> fileName:/enumWithMultipleCtors.kt
|
||||
ENUM_ENTRY name:Z
|
||||
class: CLASS ENUM_ENTRY name:Z modality:FINAL visibility:private superTypes:[<root>.A]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.A.Z
|
||||
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<no name provided> [primary]
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.A.Z [primary]
|
||||
BLOCK_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'private constructor <init> (x: kotlin.Int) declared in <root>.A'
|
||||
x: CONST Int type=kotlin.Int value=5
|
||||
|
||||
@@ -21,7 +21,7 @@ FILE fqName:<root> fileName:/enumWithSecondaryCtor.kt
|
||||
ENUM_ENTRY name:ZERO
|
||||
class: CLASS ENUM_ENTRY name:ZERO modality:FINAL visibility:private superTypes:[<root>.Test0]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Test0.ZERO
|
||||
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<no name provided> [primary]
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.Test0.ZERO [primary]
|
||||
BLOCK_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'private constructor <init> () declared in <root>.Test0'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:ZERO modality:FINAL visibility:private superTypes:[<root>.Test0]'
|
||||
@@ -92,14 +92,14 @@ FILE fqName:<root> fileName:/enumWithSecondaryCtor.kt
|
||||
ENUM_ENTRY name:ZERO
|
||||
class: CLASS ENUM_ENTRY name:ZERO modality:FINAL visibility:private superTypes:[<root>.Test1]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Test1.ZERO
|
||||
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<no name provided> [primary]
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.Test1.ZERO [primary]
|
||||
BLOCK_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'private constructor <init> () declared in <root>.Test1'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:ZERO modality:FINAL visibility:private superTypes:[<root>.Test1]'
|
||||
ENUM_ENTRY name:ONE
|
||||
class: CLASS ENUM_ENTRY name:ONE modality:FINAL visibility:private superTypes:[<root>.Test1]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Test1.ONE
|
||||
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<no name provided> [primary]
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.Test1.ONE [primary]
|
||||
BLOCK_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'private constructor <init> (x: kotlin.Int) [primary] declared in <root>.Test1'
|
||||
x: CONST Int type=kotlin.Int value=1
|
||||
@@ -171,7 +171,7 @@ FILE fqName:<root> fileName:/enumWithSecondaryCtor.kt
|
||||
ENUM_ENTRY name:ZERO
|
||||
class: CLASS ENUM_ENTRY name:ZERO modality:FINAL visibility:private superTypes:[<root>.Test2]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Test2.ZERO
|
||||
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<no name provided> [primary]
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.Test2.ZERO [primary]
|
||||
BLOCK_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'private constructor <init> () declared in <root>.Test2'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:ZERO modality:FINAL visibility:private superTypes:[<root>.Test2]'
|
||||
@@ -183,7 +183,7 @@ FILE fqName:<root> fileName:/enumWithSecondaryCtor.kt
|
||||
ENUM_ENTRY name:ONE
|
||||
class: CLASS ENUM_ENTRY name:ONE modality:FINAL visibility:private superTypes:[<root>.Test2]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Test2.ONE
|
||||
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<no name provided> [primary]
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.Test2.ONE [primary]
|
||||
BLOCK_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'private constructor <init> (x: kotlin.Int) [primary] declared in <root>.Test2'
|
||||
x: CONST Int type=kotlin.Int value=1
|
||||
|
||||
+2
-2
@@ -39,7 +39,7 @@ FILE fqName:<root> fileName:/enumEntriesWithAnnotations.kt
|
||||
annotations:
|
||||
TestAnn(x = 'ENTRY1')
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestEnum.ENTRY1
|
||||
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<no name provided> [primary]
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.TestEnum.ENTRY1 [primary]
|
||||
BLOCK_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.TestEnum'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:ENTRY1 modality:FINAL visibility:private superTypes:[<root>.TestEnum]'
|
||||
@@ -48,7 +48,7 @@ FILE fqName:<root> fileName:/enumEntriesWithAnnotations.kt
|
||||
annotations:
|
||||
TestAnn(x = 'ENTRY2')
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.TestEnum.ENTRY2
|
||||
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<no name provided> [primary]
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.TestEnum.ENTRY2 [primary]
|
||||
BLOCK_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.TestEnum'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:ENTRY2 modality:FINAL visibility:private superTypes:[<root>.TestEnum]'
|
||||
|
||||
@@ -9,7 +9,7 @@ FILE fqName:<root> fileName:/enumEntryAsReceiver.kt
|
||||
ENUM_ENTRY name:B
|
||||
class: CLASS ENUM_ENTRY name:B modality:FINAL visibility:private superTypes:[<root>.X]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.X.B
|
||||
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<no name provided> [primary]
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.X.B [primary]
|
||||
BLOCK_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.X'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:B modality:FINAL visibility:private superTypes:[<root>.X]'
|
||||
@@ -32,7 +32,7 @@ FILE fqName:<root> fileName:/enumEntryAsReceiver.kt
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.String declared in <root>.X.B.value'
|
||||
CALL 'public final fun <get-value2> (): kotlin.String declared in <root>.X.B' type=kotlin.String origin=GET_PROPERTY
|
||||
$this: GET_VAR '<this>: <uninitialized parent>.<no name provided> declared in <no parent>.<no name provided>' type=<uninitialized parent>.<no name provided> origin=null
|
||||
$this: GET_VAR '<this>: <root>.X.B declared in <root>.X.B' type=<root>.X.B origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-value> visibility:public modality:FINAL <> ($this:<root>.X.B) returnType:kotlin.Function0<kotlin.String>
|
||||
correspondingProperty: PROPERTY name:value visibility:public modality:FINAL [val]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.X.B
|
||||
|
||||
+9
-9
@@ -9,7 +9,7 @@ FILE fqName:<root> fileName:/enumEntryReferenceFromEnumEntryClass.kt
|
||||
ENUM_ENTRY name:Z
|
||||
class: CLASS ENUM_ENTRY name:Z modality:FINAL visibility:private superTypes:[<root>.MyEnum]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.MyEnum.Z
|
||||
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<no name provided> [primary]
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.MyEnum.Z [primary]
|
||||
BLOCK_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.MyEnum'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:Z modality:FINAL visibility:private superTypes:[<root>.MyEnum]'
|
||||
@@ -39,10 +39,10 @@ FILE fqName:<root> fileName:/enumEntryReferenceFromEnumEntryClass.kt
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.MyEnum.Z
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:private' type=kotlin.Unit origin=null
|
||||
receiver: GET_VAR '<this>: <uninitialized parent>.<no name provided> declared in <no parent>.<no name provided>' type=<uninitialized parent>.<no name provided> origin=null
|
||||
receiver: GET_VAR '<this>: <root>.MyEnum.Z declared in <root>.MyEnum.Z' type=<root>.MyEnum.Z origin=null
|
||||
value: CONST Int type=kotlin.Int value=1
|
||||
CALL 'public final fun foo (): kotlin.Unit declared in <root>.MyEnum.Z' type=kotlin.Unit origin=null
|
||||
$this: GET_VAR '<this>: <uninitialized parent>.<no name provided> declared in <no parent>.<no name provided>' type=<uninitialized parent>.<no name provided> origin=null
|
||||
$this: GET_VAR '<this>: <root>.MyEnum.Z declared in <root>.MyEnum.Z' type=<root>.MyEnum.Z origin=null
|
||||
PROPERTY name:aLambda visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:aLambda type:kotlin.Function0<kotlin.Unit> visibility:private [final]
|
||||
EXPRESSION_BODY
|
||||
@@ -50,10 +50,10 @@ FILE fqName:<root> fileName:/enumEntryReferenceFromEnumEntryClass.kt
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:private' type=kotlin.Unit origin=null
|
||||
receiver: GET_VAR '<this>: <uninitialized parent>.<no name provided> declared in <no parent>.<no name provided>' type=<uninitialized parent>.<no name provided> origin=null
|
||||
receiver: GET_VAR '<this>: <root>.MyEnum.Z declared in <root>.MyEnum.Z' type=<root>.MyEnum.Z origin=null
|
||||
value: CONST Int type=kotlin.Int value=1
|
||||
CALL 'public final fun foo (): kotlin.Unit declared in <root>.MyEnum.Z' type=kotlin.Unit origin=null
|
||||
$this: GET_VAR '<this>: <uninitialized parent>.<no name provided> declared in <no parent>.<no name provided>' type=<uninitialized parent>.<no name provided> origin=null
|
||||
$this: GET_VAR '<this>: <root>.MyEnum.Z declared in <root>.MyEnum.Z' type=<root>.MyEnum.Z origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-aLambda> visibility:public modality:FINAL <> ($this:<root>.MyEnum.Z) returnType:kotlin.Function0<kotlin.Unit>
|
||||
correspondingProperty: PROPERTY name:aLambda visibility:public modality:FINAL [val]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.MyEnum.Z
|
||||
@@ -74,18 +74,18 @@ FILE fqName:<root> fileName:/enumEntryReferenceFromEnumEntryClass.kt
|
||||
ANONYMOUS_INITIALIZER isStatic=false
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:private' type=kotlin.Unit origin=null
|
||||
receiver: GET_VAR '<this>: <uninitialized parent>.<no name provided> declared in <no parent>.<no name provided>' type=<uninitialized parent>.<no name provided> origin=null
|
||||
receiver: GET_VAR '<this>: <root>.MyEnum.Z declared in <root>.MyEnum.Z' type=<root>.MyEnum.Z origin=null
|
||||
value: CONST Int type=kotlin.Int value=1
|
||||
CALL 'public final fun foo (): kotlin.Unit declared in <root>.MyEnum.Z' type=kotlin.Unit origin=null
|
||||
$this: GET_VAR '<this>: <uninitialized parent>.<no name provided> declared in <no parent>.<no name provided>' type=<uninitialized parent>.<no name provided> origin=null
|
||||
$this: GET_VAR '<this>: <root>.MyEnum.Z declared in <root>.MyEnum.Z' type=<root>.MyEnum.Z origin=null
|
||||
FUN name:test visibility:public modality:FINAL <> ($this:<root>.MyEnum.Z.anObject.<no name provided>) returnType:kotlin.Unit
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.MyEnum.Z.anObject.<no name provided>
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:counter type:kotlin.Int visibility:private' type=kotlin.Unit origin=null
|
||||
receiver: GET_VAR '<this>: <uninitialized parent>.<no name provided> declared in <no parent>.<no name provided>' type=<uninitialized parent>.<no name provided> origin=null
|
||||
receiver: GET_VAR '<this>: <root>.MyEnum.Z declared in <root>.MyEnum.Z' type=<root>.MyEnum.Z origin=null
|
||||
value: CONST Int type=kotlin.Int value=1
|
||||
CALL 'public final fun foo (): kotlin.Unit declared in <root>.MyEnum.Z' type=kotlin.Unit origin=null
|
||||
$this: GET_VAR '<this>: <uninitialized parent>.<no name provided> declared in <no parent>.<no name provided>' type=<uninitialized parent>.<no name provided> origin=null
|
||||
$this: GET_VAR '<this>: <root>.MyEnum.Z declared in <root>.MyEnum.Z' type=<root>.MyEnum.Z origin=null
|
||||
CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.MyEnum.Z.anObject.<no name provided>' type=<root>.MyEnum.Z.anObject.<no name provided> origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-anObject> visibility:public modality:FINAL <> ($this:<root>.MyEnum.Z) returnType:<root>.MyEnum.Z.anObject.<no name provided>
|
||||
correspondingProperty: PROPERTY name:anObject visibility:public modality:FINAL [val]
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ FILE fqName:<root> fileName:/temporaryInEnumEntryInitializer.kt
|
||||
ENUM_ENTRY name:ENTRY
|
||||
class: CLASS ENUM_ENTRY name:ENTRY modality:FINAL visibility:private superTypes:[<root>.En]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.En.ENTRY
|
||||
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<no name provided> [primary]
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.En.ENTRY [primary]
|
||||
BLOCK_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'private constructor <init> (x: kotlin.String?) [primary] declared in <root>.En'
|
||||
x: CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String? origin=null
|
||||
|
||||
@@ -9,7 +9,7 @@ FILE fqName:<root> fileName:/enumEntry.kt
|
||||
ENUM_ENTRY name:ENTRY
|
||||
class: CLASS ENUM_ENTRY name:ENTRY modality:FINAL visibility:private superTypes:[<root>.Z]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Z.ENTRY
|
||||
CONSTRUCTOR visibility:private <> () returnType:<uninitialized parent>.<no name provided> [primary]
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.Z.ENTRY [primary]
|
||||
BLOCK_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.Z'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:ENTRY modality:FINAL visibility:private superTypes:[<root>.Z]'
|
||||
@@ -26,7 +26,7 @@ FILE fqName:<root> fileName:/enumEntry.kt
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Z.ENTRY.A
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun test (): kotlin.Unit declared in <root>.Z.ENTRY' type=kotlin.Unit origin=null
|
||||
$this: GET_VAR '<this>: <uninitialized parent>.<no name provided> declared in <no parent>.<no name provided>' type=<uninitialized parent>.<no name provided> origin=null
|
||||
$this: GET_VAR '<this>: <root>.Z.ENTRY declared in <root>.Z.ENTRY' type=<root>.Z.ENTRY origin=null
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
|
||||
|
||||
Reference in New Issue
Block a user