FIR2IR: remove redundant receiver generation from visitor
Now static functions have no dispatch receiver: they really shouldn't.
This commit is contained in:
@@ -36,9 +36,7 @@ import org.jetbrains.kotlin.ir.builders.*
|
||||
import org.jetbrains.kotlin.ir.declarations.*
|
||||
import org.jetbrains.kotlin.ir.declarations.impl.IrFieldImpl
|
||||
import org.jetbrains.kotlin.ir.declarations.impl.IrFileImpl
|
||||
import org.jetbrains.kotlin.ir.declarations.impl.IrValueParameterImpl
|
||||
import org.jetbrains.kotlin.ir.descriptors.IrBuiltIns
|
||||
import org.jetbrains.kotlin.ir.descriptors.WrappedValueParameterDescriptor
|
||||
import org.jetbrains.kotlin.ir.expressions.*
|
||||
import org.jetbrains.kotlin.ir.expressions.impl.*
|
||||
import org.jetbrains.kotlin.ir.symbols.*
|
||||
@@ -169,30 +167,8 @@ class Fir2IrVisitor(
|
||||
}
|
||||
}
|
||||
|
||||
private fun IrFunction.addDispatchReceiverParameter(containingClass: IrClass) {
|
||||
val thisOrigin = IrDeclarationOrigin.DEFINED
|
||||
val thisType = containingClass.thisReceiver!!.type
|
||||
val descriptor = WrappedValueParameterDescriptor()
|
||||
dispatchReceiverParameter = symbolTable.declareValueParameter(
|
||||
startOffset, endOffset, thisOrigin, descriptor,
|
||||
thisType
|
||||
) { symbol ->
|
||||
conversionScope.applyParentFromStackTo(
|
||||
IrValueParameterImpl(
|
||||
startOffset, endOffset, thisOrigin, symbol,
|
||||
Name.special("<this>"), -1, thisType,
|
||||
varargElementType = null, isCrossinline = false, isNoinline = false
|
||||
)
|
||||
)
|
||||
}.also { descriptor.bind(it) }
|
||||
}
|
||||
|
||||
private fun <T : IrFunction> T.setFunctionContent(descriptor: FunctionDescriptor, firFunction: FirFunction<*>?): T {
|
||||
conversionScope.withParent(this) {
|
||||
val containingClass = conversionScope.lastClass()
|
||||
if (firFunction !is FirConstructor && firFunction !is FirAnonymousFunction && containingClass != null) {
|
||||
addDispatchReceiverParameter(containingClass)
|
||||
}
|
||||
if (firFunction != null) {
|
||||
for ((valueParameter, firValueParameter) in valueParameters.zip(firFunction.valueParameters)) {
|
||||
valueParameter.setDefaultValue(firValueParameter)
|
||||
|
||||
+2
-4
@@ -75,11 +75,9 @@ FILE fqName:<root> fileName:/classes.kt
|
||||
ENUM_CONSTRUCTOR_CALL 'public constructor <init> (name: kotlin.String, ordinal: kotlin.Int) [primary] declared in kotlin.Enum'
|
||||
<E>: <root>.TestEnumClass
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:TestEnumClass modality:FINAL visibility:public superTypes:[kotlin.Enum<<root>.TestEnumClass>]'
|
||||
FUN name:values visibility:public modality:FINAL <> ($this:<root>.TestEnumClass) returnType:kotlin.Array<<root>.TestEnumClass>
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.TestEnumClass
|
||||
FUN name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<<root>.TestEnumClass>
|
||||
BLOCK_BODY
|
||||
FUN name:valueOf visibility:public modality:FINAL <> ($this:<root>.TestEnumClass, value:kotlin.String) returnType:<root>.TestEnumClass
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.TestEnumClass
|
||||
FUN name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:<root>.TestEnumClass
|
||||
VALUE_PARAMETER name:value index:0 type:kotlin.String
|
||||
BLOCK_BODY
|
||||
FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:kotlin.Any [fake_override]
|
||||
|
||||
+12
-24
@@ -12,11 +12,9 @@ FILE fqName:<root> fileName:/enum.kt
|
||||
ENUM_ENTRY name:TEST2
|
||||
init: EXPRESSION_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.TestEnum1'
|
||||
FUN name:values visibility:public modality:FINAL <> ($this:<root>.TestEnum1) returnType:kotlin.Array<<root>.TestEnum1>
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.TestEnum1
|
||||
FUN name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<<root>.TestEnum1>
|
||||
BLOCK_BODY
|
||||
FUN name:valueOf visibility:public modality:FINAL <> ($this:<root>.TestEnum1, value:kotlin.String) returnType:<root>.TestEnum1
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.TestEnum1
|
||||
FUN name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:<root>.TestEnum1
|
||||
VALUE_PARAMETER name:value index:0 type:kotlin.String
|
||||
BLOCK_BODY
|
||||
FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:kotlin.Any [fake_override]
|
||||
@@ -102,11 +100,9 @@ FILE fqName:<root> fileName:/enum.kt
|
||||
ENUM_CONSTRUCTOR_CALL 'private constructor <init> (x: kotlin.Int) [primary] declared in <root>.TestEnum2'
|
||||
x: CONST Int type=kotlin.Int value=3
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST3 modality:FINAL visibility:private superTypes:[<root>.TestEnum2]'
|
||||
FUN name:values visibility:public modality:FINAL <> ($this:<root>.TestEnum2) returnType:kotlin.Array<<root>.TestEnum2>
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.TestEnum2
|
||||
FUN name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<<root>.TestEnum2>
|
||||
BLOCK_BODY
|
||||
FUN name:valueOf visibility:public modality:FINAL <> ($this:<root>.TestEnum2, value:kotlin.String) returnType:<root>.TestEnum2
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.TestEnum2
|
||||
FUN name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:<root>.TestEnum2
|
||||
VALUE_PARAMETER name:value index:0 type:kotlin.String
|
||||
BLOCK_BODY
|
||||
FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:kotlin.Any [fake_override]
|
||||
@@ -166,11 +162,9 @@ FILE fqName:<root> fileName:/enum.kt
|
||||
message: CONST String type=kotlin.String value="Hello, world!"
|
||||
FUN name:foo visibility:public modality:ABSTRACT <> ($this:<root>.TestEnum3) returnType:kotlin.Unit
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.TestEnum3
|
||||
FUN name:values visibility:public modality:FINAL <> ($this:<root>.TestEnum3) returnType:kotlin.Array<<root>.TestEnum3>
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.TestEnum3
|
||||
FUN name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<<root>.TestEnum3>
|
||||
BLOCK_BODY
|
||||
FUN name:valueOf visibility:public modality:FINAL <> ($this:<root>.TestEnum3, value:kotlin.String) returnType:<root>.TestEnum3
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.TestEnum3
|
||||
FUN name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:<root>.TestEnum3
|
||||
VALUE_PARAMETER name:value index:0 type:kotlin.String
|
||||
BLOCK_BODY
|
||||
FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:kotlin.Any [fake_override]
|
||||
@@ -272,11 +266,9 @@ FILE fqName:<root> fileName:/enum.kt
|
||||
message: GET_ENUM 'ENUM_ENTRY name:TEST2' type=<root>.TestEnum4
|
||||
FUN name:foo visibility:public modality:ABSTRACT <> ($this:<root>.TestEnum4) returnType:kotlin.Unit
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.TestEnum4
|
||||
FUN name:values visibility:public modality:FINAL <> ($this:<root>.TestEnum4) returnType:kotlin.Array<<root>.TestEnum4>
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.TestEnum4
|
||||
FUN name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<<root>.TestEnum4>
|
||||
BLOCK_BODY
|
||||
FUN name:valueOf visibility:public modality:FINAL <> ($this:<root>.TestEnum4, value:kotlin.String) returnType:<root>.TestEnum4
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.TestEnum4
|
||||
FUN name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:<root>.TestEnum4
|
||||
VALUE_PARAMETER name:value index:0 type:kotlin.String
|
||||
BLOCK_BODY
|
||||
FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:kotlin.Any [fake_override]
|
||||
@@ -362,11 +354,9 @@ FILE fqName:<root> fileName:/enum.kt
|
||||
ENUM_CONSTRUCTOR_CALL 'private constructor <init> (x: kotlin.Int) [primary] declared in <root>.TestEnum5'
|
||||
x: CONST Int type=kotlin.Int value=0
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST3 modality:FINAL visibility:private superTypes:[<root>.TestEnum5]'
|
||||
FUN name:values visibility:public modality:FINAL <> ($this:<root>.TestEnum5) returnType:kotlin.Array<<root>.TestEnum5>
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.TestEnum5
|
||||
FUN name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<<root>.TestEnum5>
|
||||
BLOCK_BODY
|
||||
FUN name:valueOf visibility:public modality:FINAL <> ($this:<root>.TestEnum5, value:kotlin.String) returnType:<root>.TestEnum5
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.TestEnum5
|
||||
FUN name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:<root>.TestEnum5
|
||||
VALUE_PARAMETER name:value index:0 type:kotlin.String
|
||||
BLOCK_BODY
|
||||
FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:kotlin.Any [fake_override]
|
||||
@@ -449,11 +439,9 @@ FILE fqName:<root> fileName:/enum.kt
|
||||
x: CALL 'public final fun f (): kotlin.Int declared in <root>' type=kotlin.Int origin=null
|
||||
y: CALL 'public final fun f (): kotlin.Int declared in <root>' type=kotlin.Int origin=null
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:TEST modality:FINAL visibility:private superTypes:[<root>.TestEnum6]'
|
||||
FUN name:values visibility:public modality:FINAL <> ($this:<root>.TestEnum6) returnType:kotlin.Array<<root>.TestEnum6>
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.TestEnum6
|
||||
FUN name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<<root>.TestEnum6>
|
||||
BLOCK_BODY
|
||||
FUN name:valueOf visibility:public modality:FINAL <> ($this:<root>.TestEnum6, value:kotlin.String) returnType:<root>.TestEnum6
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.TestEnum6
|
||||
FUN name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:<root>.TestEnum6
|
||||
VALUE_PARAMETER name:value index:0 type:kotlin.String
|
||||
BLOCK_BODY
|
||||
FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:kotlin.Any [fake_override]
|
||||
|
||||
+14
-28
@@ -9,11 +9,9 @@ FILE fqName:<root> fileName:/enumClassModality.kt
|
||||
ENUM_ENTRY name:X1
|
||||
init: EXPRESSION_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.TestFinalEnum1'
|
||||
FUN name:values visibility:public modality:FINAL <> ($this:<root>.TestFinalEnum1) returnType:kotlin.Array<<root>.TestFinalEnum1>
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.TestFinalEnum1
|
||||
FUN name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<<root>.TestFinalEnum1>
|
||||
BLOCK_BODY
|
||||
FUN name:valueOf visibility:public modality:FINAL <> ($this:<root>.TestFinalEnum1, value:kotlin.String) returnType:<root>.TestFinalEnum1
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.TestFinalEnum1
|
||||
FUN name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:<root>.TestFinalEnum1
|
||||
VALUE_PARAMETER name:value index:0 type:kotlin.String
|
||||
BLOCK_BODY
|
||||
FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:kotlin.Any [fake_override]
|
||||
@@ -79,11 +77,9 @@ FILE fqName:<root> fileName:/enumClassModality.kt
|
||||
ENUM_CONSTRUCTOR_CALL 'private constructor <init> (x: kotlin.Int) [primary] declared in <root>.TestFinalEnum2'
|
||||
x: CONST Int type=kotlin.Int value=1
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:X1 modality:FINAL visibility:private superTypes:[<root>.TestFinalEnum2]'
|
||||
FUN name:values visibility:public modality:FINAL <> ($this:<root>.TestFinalEnum2) returnType:kotlin.Array<<root>.TestFinalEnum2>
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.TestFinalEnum2
|
||||
FUN name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<<root>.TestFinalEnum2>
|
||||
BLOCK_BODY
|
||||
FUN name:valueOf visibility:public modality:FINAL <> ($this:<root>.TestFinalEnum2, value:kotlin.String) returnType:<root>.TestFinalEnum2
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.TestFinalEnum2
|
||||
FUN name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:<root>.TestFinalEnum2
|
||||
VALUE_PARAMETER name:value index:0 type:kotlin.String
|
||||
BLOCK_BODY
|
||||
FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:kotlin.Any [fake_override]
|
||||
@@ -133,11 +129,9 @@ FILE fqName:<root> fileName:/enumClassModality.kt
|
||||
FUN name:doStuff visibility:public modality:FINAL <> ($this:<root>.TestFinalEnum3) returnType:kotlin.Unit
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.TestFinalEnum3
|
||||
BLOCK_BODY
|
||||
FUN name:values visibility:public modality:FINAL <> ($this:<root>.TestFinalEnum3) returnType:kotlin.Array<<root>.TestFinalEnum3>
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.TestFinalEnum3
|
||||
FUN name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<<root>.TestFinalEnum3>
|
||||
BLOCK_BODY
|
||||
FUN name:valueOf visibility:public modality:FINAL <> ($this:<root>.TestFinalEnum3, value:kotlin.String) returnType:<root>.TestFinalEnum3
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.TestFinalEnum3
|
||||
FUN name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:<root>.TestFinalEnum3
|
||||
VALUE_PARAMETER name:value index:0 type:kotlin.String
|
||||
BLOCK_BODY
|
||||
FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:kotlin.Any [fake_override]
|
||||
@@ -195,11 +189,9 @@ FILE fqName:<root> fileName:/enumClassModality.kt
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun toString (): kotlin.String declared in <root>.TestOpenEnum1.X1'
|
||||
CONST String type=kotlin.String value="X1"
|
||||
FUN name:values visibility:public modality:FINAL <> ($this:<root>.TestOpenEnum1) returnType:kotlin.Array<<root>.TestOpenEnum1>
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.TestOpenEnum1
|
||||
FUN name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<<root>.TestOpenEnum1>
|
||||
BLOCK_BODY
|
||||
FUN name:valueOf visibility:public modality:FINAL <> ($this:<root>.TestOpenEnum1, value:kotlin.String) returnType:<root>.TestOpenEnum1
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.TestOpenEnum1
|
||||
FUN name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:<root>.TestOpenEnum1
|
||||
VALUE_PARAMETER name:value index:0 type:kotlin.String
|
||||
BLOCK_BODY
|
||||
FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:kotlin.Any [fake_override]
|
||||
@@ -258,11 +250,9 @@ FILE fqName:<root> fileName:/enumClassModality.kt
|
||||
FUN name:foo visibility:public modality:OPEN <> ($this:<root>.TestOpenEnum2) returnType:kotlin.Unit
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.TestOpenEnum2
|
||||
BLOCK_BODY
|
||||
FUN name:values visibility:public modality:FINAL <> ($this:<root>.TestOpenEnum2) returnType:kotlin.Array<<root>.TestOpenEnum2>
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.TestOpenEnum2
|
||||
FUN name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<<root>.TestOpenEnum2>
|
||||
BLOCK_BODY
|
||||
FUN name:valueOf visibility:public modality:FINAL <> ($this:<root>.TestOpenEnum2, value:kotlin.String) returnType:<root>.TestOpenEnum2
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.TestOpenEnum2
|
||||
FUN name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:<root>.TestOpenEnum2
|
||||
VALUE_PARAMETER name:value index:0 type:kotlin.String
|
||||
BLOCK_BODY
|
||||
FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:kotlin.Any [fake_override]
|
||||
@@ -320,11 +310,9 @@ FILE fqName:<root> fileName:/enumClassModality.kt
|
||||
BLOCK_BODY
|
||||
FUN name:foo visibility:public modality:ABSTRACT <> ($this:<root>.TestAbstractEnum1) returnType:kotlin.Unit
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.TestAbstractEnum1
|
||||
FUN name:values visibility:public modality:FINAL <> ($this:<root>.TestAbstractEnum1) returnType:kotlin.Array<<root>.TestAbstractEnum1>
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.TestAbstractEnum1
|
||||
FUN name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<<root>.TestAbstractEnum1>
|
||||
BLOCK_BODY
|
||||
FUN name:valueOf visibility:public modality:FINAL <> ($this:<root>.TestAbstractEnum1, value:kotlin.String) returnType:<root>.TestAbstractEnum1
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.TestAbstractEnum1
|
||||
FUN name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:<root>.TestAbstractEnum1
|
||||
VALUE_PARAMETER name:value index:0 type:kotlin.String
|
||||
BLOCK_BODY
|
||||
FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:kotlin.Any [fake_override]
|
||||
@@ -397,11 +385,9 @@ FILE fqName:<root> fileName:/enumClassModality.kt
|
||||
FUN name:foo visibility:public modality:FINAL <> ($this:<root>.TestAbstractEnum2.X1) returnType:kotlin.Unit
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.TestAbstractEnum2.X1
|
||||
BLOCK_BODY
|
||||
FUN name:values visibility:public modality:FINAL <> ($this:<root>.TestAbstractEnum2) returnType:kotlin.Array<<root>.TestAbstractEnum2>
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.TestAbstractEnum2
|
||||
FUN name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<<root>.TestAbstractEnum2>
|
||||
BLOCK_BODY
|
||||
FUN name:valueOf visibility:public modality:FINAL <> ($this:<root>.TestAbstractEnum2, value:kotlin.String) returnType:<root>.TestAbstractEnum2
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.TestAbstractEnum2
|
||||
FUN name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:<root>.TestAbstractEnum2
|
||||
VALUE_PARAMETER name:value index:0 type:kotlin.String
|
||||
BLOCK_BODY
|
||||
FUN FAKE_OVERRIDE name:foo visibility:public modality:ABSTRACT <> ($this:<root>.IFoo) returnType:kotlin.Unit [fake_override]
|
||||
|
||||
@@ -122,11 +122,9 @@ FILE fqName:<root> fileName:/enumWithMultipleCtors.kt
|
||||
CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String origin=null
|
||||
$this: CALL 'public final fun <get-prop3> (): kotlin.String declared in <root>.A' type=kotlin.String origin=GET_PROPERTY
|
||||
$this: GET_VAR '<this>: <root>.A declared in <root>.A.f' type=<root>.A origin=null
|
||||
FUN name:values visibility:public modality:FINAL <> ($this:<root>.A) returnType:kotlin.Array<<root>.A>
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.A
|
||||
FUN name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<<root>.A>
|
||||
BLOCK_BODY
|
||||
FUN name:valueOf visibility:public modality:FINAL <> ($this:<root>.A, value:kotlin.String) returnType:<root>.A
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.A
|
||||
FUN name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:<root>.A
|
||||
VALUE_PARAMETER name:value index:0 type:kotlin.String
|
||||
BLOCK_BODY
|
||||
FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:kotlin.Any [fake_override]
|
||||
|
||||
@@ -31,11 +31,9 @@ FILE fqName:<root> fileName:/enumWithSecondaryCtor.kt
|
||||
BLOCK_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'private constructor <init> (x: kotlin.Int) [primary] declared in <root>.Test0'
|
||||
x: CONST Int type=kotlin.Int value=0
|
||||
FUN name:values visibility:public modality:FINAL <> ($this:<root>.Test0) returnType:kotlin.Array<<root>.Test0>
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Test0
|
||||
FUN name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<<root>.Test0>
|
||||
BLOCK_BODY
|
||||
FUN name:valueOf visibility:public modality:FINAL <> ($this:<root>.Test0, value:kotlin.String) returnType:<root>.Test0
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Test0
|
||||
FUN name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:<root>.Test0
|
||||
VALUE_PARAMETER name:value index:0 type:kotlin.String
|
||||
BLOCK_BODY
|
||||
FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:kotlin.Any [fake_override]
|
||||
@@ -114,11 +112,9 @@ FILE fqName:<root> fileName:/enumWithSecondaryCtor.kt
|
||||
BLOCK_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'private constructor <init> (x: kotlin.Int) [primary] declared in <root>.Test1'
|
||||
x: CONST Int type=kotlin.Int value=0
|
||||
FUN name:values visibility:public modality:FINAL <> ($this:<root>.Test1) returnType:kotlin.Array<<root>.Test1>
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Test1
|
||||
FUN name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<<root>.Test1>
|
||||
BLOCK_BODY
|
||||
FUN name:valueOf visibility:public modality:FINAL <> ($this:<root>.Test1, value:kotlin.String) returnType:<root>.Test1
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Test1
|
||||
FUN name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:<root>.Test1
|
||||
VALUE_PARAMETER name:value index:0 type:kotlin.String
|
||||
BLOCK_BODY
|
||||
FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:kotlin.Any [fake_override]
|
||||
@@ -209,11 +205,9 @@ FILE fqName:<root> fileName:/enumWithSecondaryCtor.kt
|
||||
x: CONST Int type=kotlin.Int value=0
|
||||
FUN name:foo visibility:public modality:ABSTRACT <> ($this:<root>.Test2) returnType:kotlin.Unit
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Test2
|
||||
FUN name:values visibility:public modality:FINAL <> ($this:<root>.Test2) returnType:kotlin.Array<<root>.Test2>
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Test2
|
||||
FUN name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<<root>.Test2>
|
||||
BLOCK_BODY
|
||||
FUN name:valueOf visibility:public modality:FINAL <> ($this:<root>.Test2, value:kotlin.String) returnType:<root>.Test2
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Test2
|
||||
FUN name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:<root>.Test2
|
||||
VALUE_PARAMETER name:value index:0 type:kotlin.String
|
||||
BLOCK_BODY
|
||||
FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:kotlin.Any [fake_override]
|
||||
|
||||
+2
-4
@@ -135,11 +135,9 @@ FILE fqName:<root> fileName:/classesWithAnnotations.kt
|
||||
ENUM_CONSTRUCTOR_CALL 'public constructor <init> (name: kotlin.String, ordinal: kotlin.Int) [primary] declared in kotlin.Enum'
|
||||
<E>: <root>.TestEnum
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_CLASS name:TestEnum modality:FINAL visibility:public superTypes:[kotlin.Enum<<root>.TestEnum>]'
|
||||
FUN name:values visibility:public modality:FINAL <> ($this:<root>.TestEnum) returnType:kotlin.Array<<root>.TestEnum>
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.TestEnum
|
||||
FUN name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<<root>.TestEnum>
|
||||
BLOCK_BODY
|
||||
FUN name:valueOf visibility:public modality:FINAL <> ($this:<root>.TestEnum, value:kotlin.String) returnType:<root>.TestEnum
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.TestEnum
|
||||
FUN name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:<root>.TestEnum
|
||||
VALUE_PARAMETER name:value index:0 type:kotlin.String
|
||||
BLOCK_BODY
|
||||
FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:kotlin.Any [fake_override]
|
||||
|
||||
+2
-4
@@ -67,11 +67,9 @@ FILE fqName:<root> fileName:/enumEntriesWithAnnotations.kt
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-x> (): kotlin.Int declared in <root>.TestEnum.ENTRY2'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
|
||||
receiver: GET_VAR '<this>: <root>.TestEnum.ENTRY2 declared in <root>.TestEnum.ENTRY2.<get-x>' type=<root>.TestEnum.ENTRY2 origin=null
|
||||
FUN name:values visibility:public modality:FINAL <> ($this:<root>.TestEnum) returnType:kotlin.Array<<root>.TestEnum>
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.TestEnum
|
||||
FUN name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<<root>.TestEnum>
|
||||
BLOCK_BODY
|
||||
FUN name:valueOf visibility:public modality:FINAL <> ($this:<root>.TestEnum, value:kotlin.String) returnType:<root>.TestEnum
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.TestEnum
|
||||
FUN name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:<root>.TestEnum
|
||||
VALUE_PARAMETER name:value index:0 type:kotlin.String
|
||||
BLOCK_BODY
|
||||
FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:kotlin.Any [fake_override]
|
||||
|
||||
+2
-4
@@ -18,11 +18,9 @@ FILE fqName:<root> fileName:/enumsInAnnotationArguments.kt
|
||||
ENUM_ENTRY name:D
|
||||
init: EXPRESSION_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.En'
|
||||
FUN name:values visibility:public modality:FINAL <> ($this:<root>.En) returnType:kotlin.Array<<root>.En>
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.En
|
||||
FUN name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<<root>.En>
|
||||
BLOCK_BODY
|
||||
FUN name:valueOf visibility:public modality:FINAL <> ($this:<root>.En, value:kotlin.String) returnType:<root>.En
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.En
|
||||
FUN name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:<root>.En
|
||||
VALUE_PARAMETER name:value index:0 type:kotlin.String
|
||||
BLOCK_BODY
|
||||
FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:kotlin.Any [fake_override]
|
||||
|
||||
+4
-8
@@ -12,11 +12,9 @@ FILE fqName:<root> fileName:/expectedEnumClass.kt
|
||||
ENUM_ENTRY name:BAR
|
||||
init: EXPRESSION_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.MyEnum'
|
||||
FUN name:values visibility:public modality:FINAL <> ($this:<root>.MyEnum) returnType:kotlin.Array<<root>.MyEnum>
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.MyEnum
|
||||
FUN name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<<root>.MyEnum>
|
||||
BLOCK_BODY
|
||||
FUN name:valueOf visibility:public modality:FINAL <> ($this:<root>.MyEnum, value:kotlin.String) returnType:<root>.MyEnum
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.MyEnum
|
||||
FUN name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:<root>.MyEnum
|
||||
VALUE_PARAMETER name:value index:0 type:kotlin.String
|
||||
BLOCK_BODY
|
||||
FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:kotlin.Any [fake_override]
|
||||
@@ -69,11 +67,9 @@ FILE fqName:<root> fileName:/expectedEnumClass.kt
|
||||
ENUM_ENTRY name:BAZ
|
||||
init: EXPRESSION_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.MyEnum'
|
||||
FUN name:values visibility:public modality:FINAL <> ($this:<root>.MyEnum) returnType:kotlin.Array<<root>.MyEnum>
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.MyEnum
|
||||
FUN name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<<root>.MyEnum>
|
||||
BLOCK_BODY
|
||||
FUN name:valueOf visibility:public modality:FINAL <> ($this:<root>.MyEnum, value:kotlin.String) returnType:<root>.MyEnum
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.MyEnum
|
||||
FUN name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:<root>.MyEnum
|
||||
VALUE_PARAMETER name:value index:0 type:kotlin.String
|
||||
BLOCK_BODY
|
||||
FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:kotlin.Any [fake_override]
|
||||
|
||||
@@ -46,11 +46,9 @@ FILE fqName:<root> fileName:/enumEntryAsReceiver.kt
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-value> visibility:public modality:ABSTRACT <> ($this:<root>.X) returnType:kotlin.Function0<kotlin.String>
|
||||
correspondingProperty: PROPERTY name:value visibility:public modality:ABSTRACT [val]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.X
|
||||
FUN name:values visibility:public modality:FINAL <> ($this:<root>.X) returnType:kotlin.Array<<root>.X>
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.X
|
||||
FUN name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<<root>.X>
|
||||
BLOCK_BODY
|
||||
FUN name:valueOf visibility:public modality:FINAL <> ($this:<root>.X, value:kotlin.String) returnType:<root>.X
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.X
|
||||
FUN name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:<root>.X
|
||||
VALUE_PARAMETER name:value index:0 type:kotlin.String
|
||||
BLOCK_BODY
|
||||
FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:kotlin.Any [fake_override]
|
||||
|
||||
+2
-4
@@ -96,11 +96,9 @@ FILE fqName:<root> fileName:/enumEntryReferenceFromEnumEntryClass.kt
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-anObject> (): <root>.MyEnum.Z.anObject.<no name provided> declared in <root>.MyEnum.Z'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:anObject type:<root>.MyEnum.Z.anObject.<no name provided> visibility:private [final]' type=<root>.MyEnum.Z.anObject.<no name provided> origin=null
|
||||
receiver: GET_VAR '<this>: <root>.MyEnum.Z declared in <root>.MyEnum.Z.<get-anObject>' type=<root>.MyEnum.Z origin=null
|
||||
FUN name:values visibility:public modality:FINAL <> ($this:<root>.MyEnum) returnType:kotlin.Array<<root>.MyEnum>
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.MyEnum
|
||||
FUN name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<<root>.MyEnum>
|
||||
BLOCK_BODY
|
||||
FUN name:valueOf visibility:public modality:FINAL <> ($this:<root>.MyEnum, value:kotlin.String) returnType:<root>.MyEnum
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.MyEnum
|
||||
FUN name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:<root>.MyEnum
|
||||
VALUE_PARAMETER name:value index:0 type:kotlin.String
|
||||
BLOCK_BODY
|
||||
FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:kotlin.Any [fake_override]
|
||||
|
||||
@@ -28,11 +28,9 @@ FILE fqName:<root> fileName:/objectAsCallable.kt
|
||||
ENUM_ENTRY name:X
|
||||
init: EXPRESSION_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.En'
|
||||
FUN name:values visibility:public modality:FINAL <> ($this:<root>.En) returnType:kotlin.Array<<root>.En>
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.En
|
||||
FUN name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<<root>.En>
|
||||
BLOCK_BODY
|
||||
FUN name:valueOf visibility:public modality:FINAL <> ($this:<root>.En, value:kotlin.String) returnType:<root>.En
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.En
|
||||
FUN name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:<root>.En
|
||||
VALUE_PARAMETER name:value index:0 type:kotlin.String
|
||||
BLOCK_BODY
|
||||
FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:kotlin.Any [fake_override]
|
||||
|
||||
+2
-4
@@ -38,11 +38,9 @@ FILE fqName:<root> fileName:/temporaryInEnumEntryInitializer.kt
|
||||
x: CALL 'public open fun toString (): kotlin.String declared in kotlin.Any' type=kotlin.String? origin=null
|
||||
$this: CALL 'public final fun <get-n> (): kotlin.Any? declared in <root>' type=kotlin.Any? origin=GET_PROPERTY
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS ENUM_ENTRY name:ENTRY modality:FINAL visibility:private superTypes:[<root>.En]'
|
||||
FUN name:values visibility:public modality:FINAL <> ($this:<root>.En) returnType:kotlin.Array<<root>.En>
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.En
|
||||
FUN name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<<root>.En>
|
||||
BLOCK_BODY
|
||||
FUN name:valueOf visibility:public modality:FINAL <> ($this:<root>.En, value:kotlin.String) returnType:<root>.En
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.En
|
||||
FUN name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:<root>.En
|
||||
VALUE_PARAMETER name:value index:0 type:kotlin.String
|
||||
BLOCK_BODY
|
||||
FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:kotlin.Any [fake_override]
|
||||
|
||||
+2
-4
@@ -9,11 +9,9 @@ FILE fqName:<root> fileName:/values.kt
|
||||
ENUM_ENTRY name:A
|
||||
init: EXPRESSION_BODY
|
||||
ENUM_CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.Enum'
|
||||
FUN name:values visibility:public modality:FINAL <> ($this:<root>.Enum) returnType:kotlin.Array<<root>.Enum>
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Enum
|
||||
FUN name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<<root>.Enum>
|
||||
BLOCK_BODY
|
||||
FUN name:valueOf visibility:public modality:FINAL <> ($this:<root>.Enum, value:kotlin.String) returnType:<root>.Enum
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Enum
|
||||
FUN name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:<root>.Enum
|
||||
VALUE_PARAMETER name:value index:0 type:kotlin.String
|
||||
BLOCK_BODY
|
||||
FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:kotlin.Any [fake_override]
|
||||
|
||||
@@ -42,11 +42,9 @@ FILE fqName:<root> fileName:/enumEntry.kt
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
FUN name:values visibility:public modality:FINAL <> ($this:<root>.Z) returnType:kotlin.Array<<root>.Z>
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Z
|
||||
FUN name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<<root>.Z>
|
||||
BLOCK_BODY
|
||||
FUN name:valueOf visibility:public modality:FINAL <> ($this:<root>.Z, value:kotlin.String) returnType:<root>.Z
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Z
|
||||
FUN name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:<root>.Z
|
||||
VALUE_PARAMETER name:value index:0 type:kotlin.String
|
||||
BLOCK_BODY
|
||||
FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum<E of kotlin.Enum>) returnType:kotlin.Any [fake_override]
|
||||
|
||||
Reference in New Issue
Block a user