IR: more consolidation of synthetic member generation for data class.

This commit is contained in:
Jinseong Jeon
2020-04-15 13:45:54 -07:00
committed by Dmitriy Novozhilov
parent 7f02d57d88
commit 9f1ecadd65
22 changed files with 354 additions and 403 deletions
@@ -22,20 +22,19 @@ FILE fqName:<root> fileName:/dataClassesGeneric.kt
$this: VALUE_PARAMETER name:<this> type:<root>.Test1<T of <root>.Test1>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun component1 (): T of <root>.Test1 declared in <root>.Test1'
CALL 'public final fun <get-x> (): T of <root>.Test1 declared in <root>.Test1' type=T of <root>.Test1 origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Test1<T of <root>.Test1> declared in <root>.Test1.component1' type=<root>.Test1<T of <root>.Test1> origin=null
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T of <root>.Test1 visibility:private [final]' type=T of <root>.Test1 origin=null
receiver: GET_VAR '<this>: <root>.Test1<T of <root>.Test1> declared in <root>.Test1.component1' type=<root>.Test1<T of <root>.Test1> origin=null
FUN name:copy visibility:public modality:FINAL <> ($this:<root>.Test1<T of <root>.Test1>, x:T of <root>.Test1) returnType:<root>.Test1<T of <root>.Test1>
$this: VALUE_PARAMETER name:<this> type:<root>.Test1<T of <root>.Test1>
VALUE_PARAMETER name:x index:0 type:T of <root>.Test1
EXPRESSION_BODY
CALL 'public final fun <get-x> (): T of <root>.Test1 declared in <root>.Test1' type=T of <root>.Test1 origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Test1<T of <root>.Test1> declared in <root>.Test1.copy' type=<root>.Test1<T of <root>.Test1> origin=null
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T of <root>.Test1 visibility:private [final]' type=T of <root>.Test1 origin=null
receiver: 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'
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>: <none>
x: CALL 'public final fun <get-x> (): T of <root>.Test1 declared in <root>.Test1' type=IrErrorType origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Test1<T of <root>.Test1> declared in <root>.Test1.copy' type=<root>.Test1<T of <root>.Test1> origin=null
<class: T>: kotlin.Any
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:equals visibility:public modality:OPEN <> ($this:<root>.Test1<T of <root>.Test1>, other:kotlin.Any?) returnType:kotlin.Boolean
$this: VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name:<this> type:<root>.Test1<T of <root>.Test1>
VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name:other index:0 type:kotlin.Any?
@@ -117,20 +116,19 @@ FILE fqName:<root> fileName:/dataClassesGeneric.kt
$this: VALUE_PARAMETER name:<this> type:<root>.Test2<T of <root>.Test2>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun component1 (): T of <root>.Test2 declared in <root>.Test2'
CALL 'public final fun <get-x> (): T of <root>.Test2 declared in <root>.Test2' type=T of <root>.Test2 origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Test2<T of <root>.Test2> declared in <root>.Test2.component1' type=<root>.Test2<T of <root>.Test2> origin=null
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T of <root>.Test2 visibility:private [final]' type=T of <root>.Test2 origin=null
receiver: GET_VAR '<this>: <root>.Test2<T of <root>.Test2> declared in <root>.Test2.component1' type=<root>.Test2<T of <root>.Test2> origin=null
FUN name:copy visibility:public modality:FINAL <> ($this:<root>.Test2<T of <root>.Test2>, x:T of <root>.Test2) returnType:<root>.Test2<T of <root>.Test2>
$this: VALUE_PARAMETER name:<this> type:<root>.Test2<T of <root>.Test2>
VALUE_PARAMETER name:x index:0 type:T of <root>.Test2
EXPRESSION_BODY
CALL 'public final fun <get-x> (): T of <root>.Test2 declared in <root>.Test2' type=T of <root>.Test2 origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Test2<T of <root>.Test2> declared in <root>.Test2.copy' type=<root>.Test2<T of <root>.Test2> origin=null
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T of <root>.Test2 visibility:private [final]' type=T of <root>.Test2 origin=null
receiver: 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'
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>: <none>
x: CALL 'public final fun <get-x> (): T of <root>.Test2 declared in <root>.Test2' type=IrErrorType origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Test2<T of <root>.Test2> declared in <root>.Test2.copy' type=<root>.Test2<T of <root>.Test2> origin=null
<class: T>: kotlin.Any
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:equals visibility:public modality:OPEN <> ($this:<root>.Test2<T of <root>.Test2>, other:kotlin.Any?) returnType:kotlin.Boolean
$this: VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name:<this> type:<root>.Test2<T of <root>.Test2>
VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name:other index:0 type:kotlin.Any?
@@ -203,20 +201,19 @@ FILE fqName:<root> fileName:/dataClassesGeneric.kt
$this: VALUE_PARAMETER name:<this> type:<root>.Test3<T of <root>.Test3>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun component1 (): kotlin.collections.List<T of <root>.Test3> declared in <root>.Test3'
CALL 'public final fun <get-x> (): kotlin.collections.List<T of <root>.Test3> declared in <root>.Test3' type=kotlin.collections.List<T of <root>.Test3> origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Test3<T of <root>.Test3> declared in <root>.Test3.component1' type=<root>.Test3<T of <root>.Test3> origin=null
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.collections.List<T of <root>.Test3> visibility:private [final]' type=kotlin.collections.List<T of <root>.Test3> origin=null
receiver: GET_VAR '<this>: <root>.Test3<T of <root>.Test3> declared in <root>.Test3.component1' type=<root>.Test3<T of <root>.Test3> origin=null
FUN name:copy visibility:public modality:FINAL <> ($this:<root>.Test3<T of <root>.Test3>, x:kotlin.collections.List<T of <root>.Test3>) returnType:<root>.Test3<T of <root>.Test3>
$this: VALUE_PARAMETER name:<this> type:<root>.Test3<T of <root>.Test3>
VALUE_PARAMETER name:x index:0 type:kotlin.collections.List<T of <root>.Test3>
EXPRESSION_BODY
CALL 'public final fun <get-x> (): kotlin.collections.List<T of <root>.Test3> declared in <root>.Test3' type=kotlin.collections.List<T of <root>.Test3> origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Test3<T of <root>.Test3> declared in <root>.Test3.copy' type=<root>.Test3<T of <root>.Test3> origin=null
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.collections.List<T of <root>.Test3> visibility:private [final]' type=kotlin.collections.List<T of <root>.Test3> origin=null
receiver: 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'
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>: <none>
x: CALL 'public final fun <get-x> (): kotlin.collections.List<T of <root>.Test3> declared in <root>.Test3' type=IrErrorType origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Test3<T of <root>.Test3> declared in <root>.Test3.copy' type=<root>.Test3<T of <root>.Test3> origin=null
<class: T>: kotlin.Any
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:equals visibility:public modality:OPEN <> ($this:<root>.Test3<T of <root>.Test3>, other:kotlin.Any?) returnType:kotlin.Boolean
$this: VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name:<this> type:<root>.Test3<T of <root>.Test3>
VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name:other index:0 type:kotlin.Any?
@@ -288,19 +285,18 @@ FILE fqName:<root> fileName:/dataClassesGeneric.kt
$this: VALUE_PARAMETER name:<this> type:<root>.Test4
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun component1 (): kotlin.collections.List<kotlin.String> declared in <root>.Test4'
CALL 'public final fun <get-x> (): kotlin.collections.List<kotlin.String> declared in <root>.Test4' type=kotlin.collections.List<kotlin.String> origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Test4 declared in <root>.Test4.component1' type=<root>.Test4 origin=null
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.collections.List<kotlin.String> visibility:private [final]' type=kotlin.collections.List<kotlin.String> origin=null
receiver: GET_VAR '<this>: <root>.Test4 declared in <root>.Test4.component1' type=<root>.Test4 origin=null
FUN name:copy visibility:public modality:FINAL <> ($this:<root>.Test4, x:kotlin.collections.List<kotlin.String>) returnType:<root>.Test4
$this: VALUE_PARAMETER name:<this> type:<root>.Test4
VALUE_PARAMETER name:x index:0 type:kotlin.collections.List<kotlin.String>
EXPRESSION_BODY
CALL 'public final fun <get-x> (): kotlin.collections.List<kotlin.String> declared in <root>.Test4' type=kotlin.collections.List<kotlin.String> origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Test4 declared in <root>.Test4.copy' type=<root>.Test4 origin=null
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.collections.List<kotlin.String> visibility:private [final]' type=kotlin.collections.List<kotlin.String> origin=null
receiver: 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'
CONSTRUCTOR_CALL 'public constructor <init> (x: kotlin.collections.List<kotlin.String>) [primary] declared in <root>.Test4' type=<root>.Test4 origin=null
x: CALL 'public final fun <get-x> (): kotlin.collections.List<kotlin.String> declared in <root>.Test4' type=IrErrorType origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Test4 declared in <root>.Test4.copy' 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:equals visibility:public modality:OPEN <> ($this:<root>.Test4, other:kotlin.Any?) returnType:kotlin.Boolean
$this: VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name:<this> type:<root>.Test4
VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name:other index:0 type:kotlin.Any?