psi2ir: generate IrConstructorCall elements in IR builder helpers
This commit is contained in:
+1
-1
@@ -275,7 +275,7 @@ class DataClassMembersGenerator(
|
||||
private fun MemberFunctionBuilder.getHashCodeOf(kotlinType: KotlinType, irValue: IrExpression): IrExpression {
|
||||
val hashCodeFunctionDescriptor = getHashCodeFunction(kotlinType)
|
||||
val hashCodeFunctionSymbol = declarationGenerator.context.symbolTable.referenceFunction(hashCodeFunctionDescriptor.original)
|
||||
return irCall(hashCodeFunctionSymbol, hashCodeFunctionDescriptor, context.irBuiltIns.intType).apply {
|
||||
return irCall(hashCodeFunctionSymbol, context.irBuiltIns.intType).apply {
|
||||
if (descriptor.dispatchReceiverParameter != null) {
|
||||
dispatchReceiver = irValue
|
||||
} else {
|
||||
|
||||
+3
-4
@@ -19,7 +19,7 @@ package org.jetbrains.kotlin.psi2ir.generators
|
||||
import org.jetbrains.kotlin.ir.IrStatement
|
||||
import org.jetbrains.kotlin.ir.expressions.IrStatementOrigin
|
||||
import org.jetbrains.kotlin.ir.expressions.impl.IrBlockImpl
|
||||
import org.jetbrains.kotlin.ir.expressions.impl.IrCallImpl
|
||||
import org.jetbrains.kotlin.ir.expressions.impl.IrConstructorCallImpl
|
||||
import org.jetbrains.kotlin.psi.KtClassOrObject
|
||||
import org.jetbrains.kotlin.psi.KtObjectLiteralExpression
|
||||
import org.jetbrains.kotlin.psi.psiUtil.endOffset
|
||||
@@ -36,7 +36,7 @@ class LocalClassGenerator(statementGenerator: StatementGenerator) : StatementGen
|
||||
irBlock.statements.add(irClass)
|
||||
|
||||
val objectConstructor = irClass.descriptor.unsubstitutedPrimaryConstructor
|
||||
?: throw AssertionError("Object literal should have a primary constructor: ${irClass.descriptor}")
|
||||
?: throw AssertionError("Object literal should have a primary constructor: ${irClass.descriptor}")
|
||||
assert(objectConstructor.dispatchReceiverParameter == null) {
|
||||
"Object literal constructor should have no dispatch receiver parameter: $objectConstructor"
|
||||
}
|
||||
@@ -48,10 +48,9 @@ class LocalClassGenerator(statementGenerator: StatementGenerator) : StatementGen
|
||||
}
|
||||
|
||||
irBlock.statements.add(
|
||||
IrCallImpl(
|
||||
IrConstructorCallImpl.fromSymbolDescriptor(
|
||||
startOffset, endOffset, objectLiteralType,
|
||||
context.symbolTable.referenceConstructor(objectConstructor),
|
||||
objectConstructor,
|
||||
IrStatementOrigin.OBJECT_LITERAL
|
||||
)
|
||||
)
|
||||
|
||||
@@ -203,7 +203,8 @@ fun IrBuilderWithScope.irGet(type: IrType, receiver: IrExpression?, getterSymbol
|
||||
IrGetterCallImpl(
|
||||
startOffset, endOffset,
|
||||
type,
|
||||
getterSymbol, getterSymbol.descriptor,
|
||||
getterSymbol as IrSimpleFunctionSymbol,
|
||||
getterSymbol.descriptor,
|
||||
typeArgumentsCount = 0,
|
||||
dispatchReceiver = receiver,
|
||||
extensionReceiver = null,
|
||||
@@ -214,7 +215,8 @@ fun IrBuilderWithScope.irSet(type: IrType, receiver: IrExpression?, getterSymbol
|
||||
IrSetterCallImpl(
|
||||
startOffset, endOffset,
|
||||
type,
|
||||
getterSymbol, getterSymbol.descriptor,
|
||||
getterSymbol as IrSimpleFunctionSymbol,
|
||||
getterSymbol.descriptor,
|
||||
typeArgumentsCount = 0,
|
||||
dispatchReceiver = receiver,
|
||||
extensionReceiver = null,
|
||||
@@ -222,42 +224,72 @@ fun IrBuilderWithScope.irSet(type: IrType, receiver: IrExpression?, getterSymbol
|
||||
origin = IrStatementOrigin.EQ
|
||||
)
|
||||
|
||||
fun IrBuilderWithScope.irCall(callee: IrFunctionSymbol, type: IrType, typeArguments: List<IrType> = emptyList()): IrCall =
|
||||
IrCallImpl(startOffset, endOffset, type, callee, callee.descriptor).apply {
|
||||
fun IrBuilderWithScope.irCall(
|
||||
callee: IrFunctionSymbol,
|
||||
type: IrType,
|
||||
typeArguments: List<IrType>
|
||||
): IrMemberAccessExpression =
|
||||
irCall(callee, type).apply {
|
||||
typeArguments.forEachIndexed { index, irType ->
|
||||
this.putTypeArgument(index, irType)
|
||||
}
|
||||
}
|
||||
|
||||
fun IrBuilderWithScope.irCallConstructor(callee: IrConstructorSymbol, typeArguments: List<IrType>): IrCall =
|
||||
IrCallImpl(startOffset, endOffset, callee.owner.returnType, callee, callee.descriptor, typeArguments.size, callee.owner.valueParameters.size).apply {
|
||||
typeArguments.forEachIndexed { index, irType ->
|
||||
this.putTypeArgument(index, irType)
|
||||
}
|
||||
TODO("IrConstructorCall")
|
||||
// IrCallImpl(startOffset, endOffset, callee.owner.returnType, callee, callee.descriptor, typeArguments.size, callee.owner.valueParameters.size).apply {
|
||||
// typeArguments.forEachIndexed { index, irType ->
|
||||
// this.putTypeArgument(index, irType)
|
||||
// }
|
||||
// }
|
||||
|
||||
fun IrBuilderWithScope.irCall(callee: IrSimpleFunctionSymbol, type: IrType): IrCall =
|
||||
IrCallImpl(startOffset, endOffset, type, callee, callee.descriptor)
|
||||
|
||||
fun IrBuilderWithScope.irCall(callee: IrConstructorSymbol, type: IrType): IrConstructorCall =
|
||||
IrConstructorCallImpl.fromSymbolDescriptor(startOffset, endOffset, type, callee)
|
||||
|
||||
fun IrBuilderWithScope.irCall(callee: IrFunctionSymbol, type: IrType): IrMemberAccessExpression =
|
||||
when (callee) {
|
||||
is IrConstructorSymbol -> irCall(callee, type)
|
||||
is IrSimpleFunctionSymbol -> irCall(callee, type)
|
||||
else -> throw AssertionError("Unexpected callee: $callee")
|
||||
}
|
||||
|
||||
fun IrBuilderWithScope.irCall(callee: IrFunctionSymbol): IrCall =
|
||||
IrCallImpl(startOffset, endOffset, callee.owner.returnType, callee, callee.descriptor)
|
||||
fun IrBuilderWithScope.irCall(callee: IrSimpleFunctionSymbol): IrCall =
|
||||
irCall(callee, callee.owner.returnType)
|
||||
|
||||
fun IrBuilderWithScope.irCall(callee: IrConstructorSymbol): IrConstructorCall =
|
||||
irCall(callee, callee.owner.returnType)
|
||||
|
||||
fun IrBuilderWithScope.irCall(callee: IrFunctionSymbol): IrMemberAccessExpression =
|
||||
irCall(callee, callee.owner.returnType)
|
||||
|
||||
fun IrBuilderWithScope.irCall(callee: IrFunctionSymbol, descriptor: FunctionDescriptor, type: IrType): IrCall =
|
||||
IrCallImpl(startOffset, endOffset, type, callee, descriptor)
|
||||
IrCallImpl(startOffset, endOffset, type, callee as IrSimpleFunctionSymbol, descriptor)
|
||||
|
||||
fun IrBuilderWithScope.irCall(callee: IrFunction): IrCall =
|
||||
irCall(callee.symbol, callee.descriptor, callee.returnType)
|
||||
fun IrBuilderWithScope.irCall(callee: IrFunction): IrMemberAccessExpression =
|
||||
irCall(callee.symbol)
|
||||
|
||||
fun IrBuilderWithScope.irCall(callee: IrFunction, origin: IrStatementOrigin): IrCall =
|
||||
IrCallImpl(startOffset, endOffset, callee.returnType, callee.symbol, callee.descriptor, origin)
|
||||
IrCallImpl(
|
||||
startOffset, endOffset, callee.returnType,
|
||||
callee.symbol as IrSimpleFunctionSymbol,
|
||||
callee.descriptor, origin
|
||||
)
|
||||
|
||||
fun IrBuilderWithScope.irDelegatingConstructorCall(callee: IrConstructor): IrDelegatingConstructorCall =
|
||||
IrDelegatingConstructorCallImpl(startOffset, endOffset, callee.returnType, callee.symbol, callee.descriptor,
|
||||
callee.parentAsClass.typeParameters.size, callee.valueParameters.size)
|
||||
IrDelegatingConstructorCallImpl(
|
||||
startOffset, endOffset, callee.returnType, callee.symbol, callee.descriptor,
|
||||
callee.parentAsClass.typeParameters.size, callee.valueParameters.size
|
||||
)
|
||||
|
||||
fun IrBuilderWithScope.irCallOp(
|
||||
callee: IrFunctionSymbol,
|
||||
type: IrType,
|
||||
dispatchReceiver: IrExpression,
|
||||
argument: IrExpression? = null
|
||||
): IrCall =
|
||||
): IrMemberAccessExpression =
|
||||
irCall(callee, type).apply {
|
||||
this.dispatchReceiver = dispatchReceiver
|
||||
if (argument != null)
|
||||
|
||||
@@ -207,7 +207,7 @@ FILE fqName:<root> fileName:/dataClassWithArrayMembers.kt
|
||||
$this: GET_VAR '<this>: <root>.Test1 declared in <root>.Test1.copy' type=<root>.Test1 origin=null
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun copy (stringArray: kotlin.Array<kotlin.String>, charArray: kotlin.CharArray, booleanArray: kotlin.BooleanArray, byteArray: kotlin.ByteArray, shortArray: kotlin.ShortArray, intArray: kotlin.IntArray, longArray: kotlin.LongArray, floatArray: kotlin.FloatArray, doubleArray: kotlin.DoubleArray): <root>.Test1 declared in <root>.Test1'
|
||||
CALL 'public constructor <init> (stringArray: kotlin.Array<kotlin.String>, charArray: kotlin.CharArray, booleanArray: kotlin.BooleanArray, byteArray: kotlin.ByteArray, shortArray: kotlin.ShortArray, intArray: kotlin.IntArray, longArray: kotlin.LongArray, floatArray: kotlin.FloatArray, doubleArray: kotlin.DoubleArray) [primary] declared in <root>.Test1' type=<root>.Test1 origin=null
|
||||
CONSTRUCTOR_CALL 'public constructor <init> (stringArray: kotlin.Array<kotlin.String>, charArray: kotlin.CharArray, booleanArray: kotlin.BooleanArray, byteArray: kotlin.ByteArray, shortArray: kotlin.ShortArray, intArray: kotlin.IntArray, longArray: kotlin.LongArray, floatArray: kotlin.FloatArray, doubleArray: kotlin.DoubleArray) [primary] declared in <root>.Test1' type=<root>.Test1 origin=null
|
||||
stringArray: GET_VAR 'stringArray: kotlin.Array<kotlin.String> declared in <root>.Test1.copy' type=kotlin.Array<kotlin.String> origin=null
|
||||
charArray: GET_VAR 'charArray: kotlin.CharArray declared in <root>.Test1.copy' type=kotlin.CharArray origin=null
|
||||
booleanArray: GET_VAR 'booleanArray: kotlin.BooleanArray declared in <root>.Test1.copy' type=kotlin.BooleanArray origin=null
|
||||
@@ -494,8 +494,8 @@ FILE fqName:<root> fileName:/dataClassWithArrayMembers.kt
|
||||
$this: GET_VAR '<this>: <root>.Test2<T of <root>.Test2> declared in <root>.Test2.copy' type=<root>.Test2<T of <root>.Test2> origin=null
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun copy (genericArray: kotlin.Array<T of <root>.Test2>): <root>.Test2<T of <root>.Test2> declared in <root>.Test2'
|
||||
CALL 'public constructor <init> (genericArray: kotlin.Array<T of <root>.Test2>) [primary] declared in <root>.Test2' type=<root>.Test2<T of <root>.Test2> origin=null
|
||||
<T>: T of <root>.Test2
|
||||
CONSTRUCTOR_CALL 'public constructor <init> (genericArray: kotlin.Array<T of <root>.Test2>) [primary] declared in <root>.Test2' type=<root>.Test2<T of <root>.Test2> origin=null
|
||||
<class: T>: T of <root>.Test2
|
||||
genericArray: GET_VAR 'genericArray: kotlin.Array<T of <root>.Test2> declared in <root>.Test2.copy' type=kotlin.Array<T of <root>.Test2> origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.Test2<T of <root>.Test2>) returnType:kotlin.String
|
||||
overridden:
|
||||
@@ -589,7 +589,7 @@ FILE fqName:<root> fileName:/dataClassWithArrayMembers.kt
|
||||
$this: GET_VAR '<this>: <root>.Test3 declared in <root>.Test3.copy' type=<root>.Test3 origin=null
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun copy (anyArrayN: kotlin.Array<kotlin.Any>?): <root>.Test3 declared in <root>.Test3'
|
||||
CALL 'public constructor <init> (anyArrayN: kotlin.Array<kotlin.Any>?) [primary] declared in <root>.Test3' type=<root>.Test3 origin=null
|
||||
CONSTRUCTOR_CALL 'public constructor <init> (anyArrayN: kotlin.Array<kotlin.Any>?) [primary] declared in <root>.Test3' type=<root>.Test3 origin=null
|
||||
anyArrayN: GET_VAR 'anyArrayN: kotlin.Array<kotlin.Any>? declared in <root>.Test3.copy' type=kotlin.Array<kotlin.Any>? origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.Test3) returnType:kotlin.String
|
||||
overridden:
|
||||
|
||||
+3
-3
@@ -75,7 +75,7 @@ FILE fqName:<root> fileName:/dataClasses.kt
|
||||
$this: GET_VAR '<this>: <root>.Test1 declared in <root>.Test1.copy' type=<root>.Test1 origin=null
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun copy (x: kotlin.Int, y: kotlin.String, z: kotlin.Any): <root>.Test1 declared in <root>.Test1'
|
||||
CALL 'public constructor <init> (x: kotlin.Int, y: kotlin.String, z: kotlin.Any) [primary] declared in <root>.Test1' type=<root>.Test1 origin=null
|
||||
CONSTRUCTOR_CALL 'public constructor <init> (x: kotlin.Int, y: kotlin.String, z: kotlin.Any) [primary] declared in <root>.Test1' type=<root>.Test1 origin=null
|
||||
x: GET_VAR 'x: kotlin.Int declared in <root>.Test1.copy' type=kotlin.Int origin=null
|
||||
y: GET_VAR 'y: kotlin.String declared in <root>.Test1.copy' type=kotlin.String origin=null
|
||||
z: GET_VAR 'z: kotlin.Any declared in <root>.Test1.copy' type=kotlin.Any origin=null
|
||||
@@ -214,7 +214,7 @@ FILE fqName:<root> fileName:/dataClasses.kt
|
||||
$this: GET_VAR '<this>: <root>.Test2 declared in <root>.Test2.copy' type=<root>.Test2 origin=null
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun copy (x: kotlin.Any?): <root>.Test2 declared in <root>.Test2'
|
||||
CALL 'public constructor <init> (x: kotlin.Any?) [primary] declared in <root>.Test2' type=<root>.Test2 origin=null
|
||||
CONSTRUCTOR_CALL 'public constructor <init> (x: kotlin.Any?) [primary] declared in <root>.Test2' type=<root>.Test2 origin=null
|
||||
x: GET_VAR 'x: kotlin.Any? declared in <root>.Test2.copy' type=kotlin.Any? origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.Test2) returnType:kotlin.String
|
||||
overridden:
|
||||
@@ -384,7 +384,7 @@ FILE fqName:<root> fileName:/dataClasses.kt
|
||||
$this: GET_VAR '<this>: <root>.Test3 declared in <root>.Test3.copy' type=<root>.Test3 origin=null
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun copy (d: kotlin.Double, dn: kotlin.Double?, f: kotlin.Float, df: kotlin.Float?): <root>.Test3 declared in <root>.Test3'
|
||||
CALL 'public constructor <init> (d: kotlin.Double, dn: kotlin.Double?, f: kotlin.Float, df: kotlin.Float?) [primary] declared in <root>.Test3' type=<root>.Test3 origin=null
|
||||
CONSTRUCTOR_CALL 'public constructor <init> (d: kotlin.Double, dn: kotlin.Double?, f: kotlin.Float, df: kotlin.Float?) [primary] declared in <root>.Test3' type=<root>.Test3 origin=null
|
||||
d: GET_VAR 'd: kotlin.Double declared in <root>.Test3.copy' type=kotlin.Double origin=null
|
||||
dn: GET_VAR 'dn: kotlin.Double? declared in <root>.Test3.copy' type=kotlin.Double? origin=null
|
||||
f: GET_VAR 'f: kotlin.Float declared in <root>.Test3.copy' type=kotlin.Float origin=null
|
||||
|
||||
@@ -32,8 +32,8 @@ FILE fqName:<root> fileName:/dataClassesGeneric.kt
|
||||
$this: GET_VAR '<this>: <root>.Test1<T of <root>.Test1> declared in <root>.Test1.copy' type=<root>.Test1<T of <root>.Test1> origin=null
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun copy (x: T of <root>.Test1): <root>.Test1<T of <root>.Test1> declared in <root>.Test1'
|
||||
CALL 'public constructor <init> (x: T of <root>.Test1) [primary] declared in <root>.Test1' type=<root>.Test1<T of <root>.Test1> origin=null
|
||||
<T>: T of <root>.Test1
|
||||
CONSTRUCTOR_CALL 'public constructor <init> (x: T of <root>.Test1) [primary] declared in <root>.Test1' type=<root>.Test1<T of <root>.Test1> origin=null
|
||||
<class: T>: T of <root>.Test1
|
||||
x: GET_VAR 'x: T of <root>.Test1 declared in <root>.Test1.copy' type=T of <root>.Test1 origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.Test1<T of <root>.Test1>) returnType:kotlin.String
|
||||
overridden:
|
||||
@@ -138,8 +138,8 @@ FILE fqName:<root> fileName:/dataClassesGeneric.kt
|
||||
$this: GET_VAR '<this>: <root>.Test2<T of <root>.Test2> declared in <root>.Test2.copy' type=<root>.Test2<T of <root>.Test2> origin=null
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun copy (x: T of <root>.Test2): <root>.Test2<T of <root>.Test2> declared in <root>.Test2'
|
||||
CALL 'public constructor <init> (x: T of <root>.Test2) [primary] declared in <root>.Test2' type=<root>.Test2<T of <root>.Test2> origin=null
|
||||
<T>: T of <root>.Test2
|
||||
CONSTRUCTOR_CALL 'public constructor <init> (x: T of <root>.Test2) [primary] declared in <root>.Test2' type=<root>.Test2<T of <root>.Test2> origin=null
|
||||
<class: T>: T of <root>.Test2
|
||||
x: GET_VAR 'x: T of <root>.Test2 declared in <root>.Test2.copy' type=T of <root>.Test2 origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.Test2<T of <root>.Test2>) returnType:kotlin.String
|
||||
overridden:
|
||||
@@ -233,8 +233,8 @@ FILE fqName:<root> fileName:/dataClassesGeneric.kt
|
||||
$this: GET_VAR '<this>: <root>.Test3<T of <root>.Test3> declared in <root>.Test3.copy' type=<root>.Test3<T of <root>.Test3> origin=null
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun copy (x: kotlin.collections.List<T of <root>.Test3>): <root>.Test3<T of <root>.Test3> declared in <root>.Test3'
|
||||
CALL 'public constructor <init> (x: kotlin.collections.List<T of <root>.Test3>) [primary] declared in <root>.Test3' type=<root>.Test3<T of <root>.Test3> origin=null
|
||||
<T>: T of <root>.Test3
|
||||
CONSTRUCTOR_CALL 'public constructor <init> (x: kotlin.collections.List<T of <root>.Test3>) [primary] declared in <root>.Test3' type=<root>.Test3<T of <root>.Test3> origin=null
|
||||
<class: T>: T of <root>.Test3
|
||||
x: GET_VAR 'x: kotlin.collections.List<T of <root>.Test3> declared in <root>.Test3.copy' type=kotlin.collections.List<T of <root>.Test3> origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.Test3<T of <root>.Test3>) returnType:kotlin.String
|
||||
overridden:
|
||||
@@ -327,7 +327,7 @@ FILE fqName:<root> fileName:/dataClassesGeneric.kt
|
||||
$this: GET_VAR '<this>: <root>.Test4 declared in <root>.Test4.copy' type=<root>.Test4 origin=null
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun copy (x: kotlin.collections.List<kotlin.String>): <root>.Test4 declared in <root>.Test4'
|
||||
CALL 'public constructor <init> (x: kotlin.collections.List<kotlin.String>) [primary] declared in <root>.Test4' type=<root>.Test4 origin=null
|
||||
CONSTRUCTOR_CALL 'public constructor <init> (x: kotlin.collections.List<kotlin.String>) [primary] declared in <root>.Test4' type=<root>.Test4 origin=null
|
||||
x: GET_VAR 'x: kotlin.collections.List<kotlin.String> declared in <root>.Test4.copy' type=kotlin.collections.List<kotlin.String> origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.Test4) returnType:kotlin.String
|
||||
overridden:
|
||||
|
||||
@@ -193,7 +193,7 @@ FILE fqName:<root> fileName:/delegatedImplementation.kt
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in <root>.IOther
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
CALL 'public constructor <init> () [primary] declared in <root>.otherImpl.<no name provided>' type=<root>.otherImpl.<no name provided> origin=OBJECT_LITERAL
|
||||
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.otherImpl.<no name provided>' type=<root>.otherImpl.<no name provided> origin=OBJECT_LITERAL
|
||||
CLASS CLASS name:Test1 modality:FINAL visibility:public superTypes:[<root>.IBase]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Test1
|
||||
CONSTRUCTOR visibility:public <> () returnType:<root>.Test1 [primary]
|
||||
|
||||
@@ -40,7 +40,7 @@ FILE fqName:<root> fileName:/lambdaInDataClassDefaultParameter.kt
|
||||
$this: GET_VAR '<this>: <root>.A declared in <root>.A.copy' type=<root>.A origin=null
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun copy (runA: @[ExtensionFunctionType] kotlin.Function2<<root>.A, kotlin.String, kotlin.Unit>): <root>.A declared in <root>.A'
|
||||
CALL 'public constructor <init> (runA: @[ExtensionFunctionType] kotlin.Function2<<root>.A, kotlin.String, kotlin.Unit>) [primary] declared in <root>.A' type=<root>.A origin=null
|
||||
CONSTRUCTOR_CALL 'public constructor <init> (runA: @[ExtensionFunctionType] kotlin.Function2<<root>.A, kotlin.String, kotlin.Unit>) [primary] declared in <root>.A' type=<root>.A origin=null
|
||||
runA: GET_VAR 'runA: @[ExtensionFunctionType] kotlin.Function2<<root>.A, kotlin.String, kotlin.Unit> declared in <root>.A.copy' type=@[ExtensionFunctionType] kotlin.Function2<<root>.A, kotlin.String, kotlin.Unit> origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.A) returnType:kotlin.String
|
||||
overridden:
|
||||
@@ -126,7 +126,7 @@ FILE fqName:<root> fileName:/lambdaInDataClassDefaultParameter.kt
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
CALL 'public constructor <init> () [primary] declared in <root>.B.<init>.<no name provided>' type=<root>.B.<init>.<no name provided> origin=OBJECT_LITERAL
|
||||
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.B.<init>.<no name provided>' type=<root>.B.<init>.<no name provided> origin=OBJECT_LITERAL
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:B modality:FINAL visibility:public [data] superTypes:[kotlin.Any]'
|
||||
@@ -155,7 +155,7 @@ FILE fqName:<root> fileName:/lambdaInDataClassDefaultParameter.kt
|
||||
$this: GET_VAR '<this>: <root>.B declared in <root>.B.copy' type=<root>.B origin=null
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun copy (x: kotlin.Any): <root>.B declared in <root>.B'
|
||||
CALL 'public constructor <init> (x: kotlin.Any) [primary] declared in <root>.B' type=<root>.B origin=null
|
||||
CONSTRUCTOR_CALL 'public constructor <init> (x: kotlin.Any) [primary] declared in <root>.B' type=<root>.B origin=null
|
||||
x: GET_VAR 'x: kotlin.Any declared in <root>.B.copy' type=kotlin.Any origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.B) returnType:kotlin.String
|
||||
overridden:
|
||||
|
||||
@@ -39,7 +39,7 @@ FILE fqName:<root> fileName:/objectLiteralExpressions.kt
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
CALL 'public constructor <init> () [primary] declared in <root>.test1.<no name provided>' type=<root>.test1.<no name provided> origin=OBJECT_LITERAL
|
||||
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.test1.<no name provided>' type=<root>.test1.<no name provided> origin=OBJECT_LITERAL
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test1> visibility:public modality:FINAL <> () returnType:kotlin.Any
|
||||
correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL [val]
|
||||
BLOCK_BODY
|
||||
@@ -75,7 +75,7 @@ FILE fqName:<root> fileName:/objectLiteralExpressions.kt
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in <root>.IFoo
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
CALL 'public constructor <init> () [primary] declared in <root>.test2.<no name provided>' type=<root>.test2.<no name provided> origin=OBJECT_LITERAL
|
||||
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.test2.<no name provided>' type=<root>.test2.<no name provided> origin=OBJECT_LITERAL
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test2> visibility:public modality:FINAL <> () returnType:<root>.IFoo
|
||||
correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [val]
|
||||
BLOCK_BODY
|
||||
@@ -143,7 +143,7 @@ FILE fqName:<root> fileName:/objectLiteralExpressions.kt
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in <root>.Outer.Inner
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
CALL 'public constructor <init> () [primary] declared in <root>.Outer.test3.<no name provided>' type=<root>.Outer.test3.<no name provided> origin=OBJECT_LITERAL
|
||||
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.Outer.test3.<no name provided>' type=<root>.Outer.test3.<no name provided> origin=OBJECT_LITERAL
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
|
||||
@@ -189,4 +189,4 @@ FILE fqName:<root> fileName:/objectLiteralExpressions.kt
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in <root>.Outer.Inner
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
CALL 'public constructor <init> () [primary] declared in <root>.test4.<no name provided>' type=<root>.test4.<no name provided> origin=OBJECT_LITERAL
|
||||
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.test4.<no name provided>' type=<root>.test4.<no name provided> origin=OBJECT_LITERAL
|
||||
|
||||
+3
-3
@@ -76,7 +76,7 @@ FILE fqName:<root> fileName:/classLiteralInAnnotation.kt
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
CALL 'public constructor <init> () [primary] declared in <root>.test2.<no name provided>' type=<root>.test2.<no name provided><T of <root>.test2> origin=OBJECT_LITERAL
|
||||
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.test2.<no name provided>' type=<root>.test2.<no name provided><T of <root>.test2> origin=OBJECT_LITERAL
|
||||
PROPERTY name:test3 visibility:public modality:FINAL [var]
|
||||
FUN name:<get-test3> visibility:public modality:FINAL <T> ($receiver:T of <root>.<get-test3>) returnType:kotlin.Any [inline]
|
||||
correspondingProperty: PROPERTY name:test3 visibility:public modality:FINAL [var]
|
||||
@@ -106,7 +106,7 @@ FILE fqName:<root> fileName:/classLiteralInAnnotation.kt
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
CALL 'public constructor <init> () [primary] declared in <root>.<get-test3>.<no name provided>' type=<root>.<get-test3>.<no name provided> origin=OBJECT_LITERAL
|
||||
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.<get-test3>.<no name provided>' type=<root>.<get-test3>.<no name provided> origin=OBJECT_LITERAL
|
||||
FUN name:<set-test3> visibility:public modality:FINAL <T> ($receiver:T of <root>.<set-test3>, v:kotlin.Any) returnType:kotlin.Unit [inline]
|
||||
correspondingProperty: PROPERTY name:test3 visibility:public modality:FINAL [var]
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?]
|
||||
@@ -136,4 +136,4 @@ FILE fqName:<root> fileName:/classLiteralInAnnotation.kt
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
CALL 'public constructor <init> () [primary] declared in <root>.<set-test3>.<no name provided>' type=<root>.<set-test3>.<no name provided> origin=OBJECT_LITERAL
|
||||
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.<set-test3>.<no name provided>' type=<root>.<set-test3>.<no name provided> origin=OBJECT_LITERAL
|
||||
|
||||
@@ -56,8 +56,8 @@ FILE fqName:<root> fileName:/dataClassMembers.kt
|
||||
$this: GET_VAR '<this>: <root>.Test<T of <root>.Test> declared in <root>.Test.copy' type=<root>.Test<T of <root>.Test> origin=null
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun copy (x: T of <root>.Test, y: kotlin.String): <root>.Test<T of <root>.Test> declared in <root>.Test'
|
||||
CALL 'public constructor <init> (x: T of <root>.Test, y: kotlin.String) [primary] declared in <root>.Test' type=<root>.Test<T of <root>.Test> origin=null
|
||||
<T>: T of <root>.Test
|
||||
CONSTRUCTOR_CALL 'public constructor <init> (x: T of <root>.Test, y: kotlin.String) [primary] declared in <root>.Test' type=<root>.Test<T of <root>.Test> origin=null
|
||||
<class: T>: T of <root>.Test
|
||||
x: GET_VAR 'x: T of <root>.Test declared in <root>.Test.copy' type=T of <root>.Test origin=null
|
||||
y: GET_VAR 'y: kotlin.String declared in <root>.Test.copy' type=kotlin.String origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.Test<T of <root>.Test>) returnType:kotlin.String
|
||||
|
||||
+1
-1
@@ -103,7 +103,7 @@ FILE fqName:<root> fileName:/enumEntryReferenceFromEnumEntryClass.kt
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
CALL 'public constructor <init> () [primary] declared in <root>.MyEnum.Z.anObject.<no name provided>' type=<root>.MyEnum.Z.anObject.<no name provided> origin=OBJECT_LITERAL
|
||||
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.MyEnum.Z.anObject.<no name provided>' type=<root>.MyEnum.Z.anObject.<no name provided> origin=OBJECT_LITERAL
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-anObject> visibility:public modality:FINAL <> ($this:<root>.MyEnum.Z) returnType:kotlin.Any
|
||||
correspondingProperty: PROPERTY name:anObject visibility:public modality:FINAL [val]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.MyEnum.Z
|
||||
|
||||
@@ -119,7 +119,7 @@ FILE fqName:<root> fileName:/multipleThisReferences.kt
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in <root>.Outer.Inner
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
CALL 'public constructor <init> () [primary] declared in <root>.Host.test.<no name provided>' type=<root>.Host.test.<no name provided> origin=OBJECT_LITERAL
|
||||
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.Host.test.<no name provided>' type=<root>.Host.test.<no name provided> origin=OBJECT_LITERAL
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any
|
||||
|
||||
@@ -157,7 +157,7 @@ FILE fqName:<root> fileName:/objectReference.kt
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
CALL 'public constructor <init> () [primary] declared in <root>.Z.anObject.<no name provided>' type=<root>.Z.anObject.<no name provided> origin=OBJECT_LITERAL
|
||||
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.Z.anObject.<no name provided>' type=<root>.Z.anObject.<no name provided> origin=OBJECT_LITERAL
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-anObject> visibility:public modality:FINAL <> ($this:<root>.Z) returnType:kotlin.Any
|
||||
correspondingProperty: PROPERTY name:anObject visibility:public modality:FINAL [val]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Z
|
||||
|
||||
@@ -110,4 +110,4 @@ FILE fqName:<root> fileName:/thisOfGenericOuterClass.kt
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in <root>.Outer.Inner
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
CALL 'public constructor <init> () [primary] declared in <root>.test.<no name provided>' type=<root>.test.<no name provided> origin=OBJECT_LITERAL
|
||||
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.test.<no name provided>' type=<root>.test.<no name provided> origin=OBJECT_LITERAL
|
||||
|
||||
+2
-2
@@ -24,7 +24,7 @@ FILE fqName:<root> fileName:/thisReferenceBeforeClassDeclared.kt
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in <root>.WithCompanion
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
CALL 'public constructor <init> () [primary] declared in <root>.test.<no name provided>' type=<root>.test.<no name provided> origin=OBJECT_LITERAL
|
||||
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.test.<no name provided>' type=<root>.test.<no name provided> origin=OBJECT_LITERAL
|
||||
VAR name:test2 type:<root>.test.<no name provided> [val]
|
||||
BLOCK type=<root>.test.<no name provided> origin=OBJECT_LITERAL
|
||||
CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.WithCompanion]
|
||||
@@ -48,7 +48,7 @@ FILE fqName:<root> fileName:/thisReferenceBeforeClassDeclared.kt
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in <root>.WithCompanion
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
CALL 'public constructor <init> () [primary] declared in <root>.test.<no name provided>' type=<root>.test.<no name provided> origin=OBJECT_LITERAL
|
||||
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.test.<no name provided>' type=<root>.test.<no name provided> origin=OBJECT_LITERAL
|
||||
CLASS CLASS name:WithCompanion modality:OPEN visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.WithCompanion
|
||||
CONSTRUCTOR visibility:public <> (a:<root>.WithCompanion.Companion) returnType:<root>.WithCompanion [primary]
|
||||
|
||||
@@ -53,7 +53,7 @@ FILE fqName:<root> fileName:/destructuringInLambda.kt
|
||||
$this: GET_VAR '<this>: <root>.A declared in <root>.A.copy' type=<root>.A origin=null
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun copy (x: kotlin.Int, y: kotlin.Int): <root>.A declared in <root>.A'
|
||||
CALL 'public constructor <init> (x: kotlin.Int, y: kotlin.Int) [primary] declared in <root>.A' type=<root>.A origin=null
|
||||
CONSTRUCTOR_CALL 'public constructor <init> (x: kotlin.Int, y: kotlin.Int) [primary] declared in <root>.A' type=<root>.A origin=null
|
||||
x: GET_VAR 'x: kotlin.Int declared in <root>.A.copy' type=kotlin.Int origin=null
|
||||
y: GET_VAR 'y: kotlin.Int declared in <root>.A.copy' type=kotlin.Int origin=null
|
||||
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.A) returnType:kotlin.String
|
||||
|
||||
+1
-1
@@ -72,7 +72,7 @@
|
||||
@0:0..4:1 GET_VAR '<this>: <root>.C declared in <root>.C.copy' type=<root>.C origin=null
|
||||
@0:0..4:1 BLOCK_BODY
|
||||
@0:0..4:1 RETURN type=kotlin.Nothing from='public final fun copy (x: kotlin.Int, y: kotlin.String, z: kotlin.Any): <root>.C declared in <root>.C'
|
||||
@0:0..4:1 CALL 'public constructor <init> (x: kotlin.Int, y: kotlin.String, z: kotlin.Any) [primary] declared in <root>.C' type=<root>.C origin=null
|
||||
@0:0..4:1 CONSTRUCTOR_CALL 'public constructor <init> (x: kotlin.Int, y: kotlin.String, z: kotlin.Any) [primary] declared in <root>.C' type=<root>.C origin=null
|
||||
@0:0..4:1 GET_VAR 'x: kotlin.Int declared in <root>.C.copy' type=kotlin.Int origin=null
|
||||
@0:0..4:1 GET_VAR 'y: kotlin.String declared in <root>.C.copy' type=kotlin.String origin=null
|
||||
@0:0..4:1 GET_VAR 'z: kotlin.Any declared in <root>.C.copy' type=kotlin.Any origin=null
|
||||
|
||||
Reference in New Issue
Block a user