76ab631214
- Access underlying fields directly, instead of using accessors. This is safe since data classes are always final. - Don't generate a temporary variable in hashCode to use as the accumulator. Both optimizations are effectively present in the current JVM backend and with these changes the generated code is much closer to what the current backend generates.
168 lines
16 KiB
Plaintext
Vendored
168 lines
16 KiB
Plaintext
Vendored
@0:0..4:1 FILE fqName:<root> fileName:/synthesizedDataClassMembers.kt
|
|
@0:0..4:1 CLASS CLASS name:C modality:FINAL visibility:public [data] superTypes:[kotlin.Any]
|
|
@0:0..4:1 VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.C
|
|
@0:5..4:1 CONSTRUCTOR visibility:public <> (x:kotlin.Int, y:kotlin.String, z:kotlin.Any) returnType:<root>.C [primary]
|
|
@1:8..18 VALUE_PARAMETER name:x index:0 type:kotlin.Int
|
|
@2:8..21 VALUE_PARAMETER name:y index:1 type:kotlin.String
|
|
@3:8..18 VALUE_PARAMETER name:z index:2 type:kotlin.Any
|
|
@0:0..4:1 BLOCK_BODY
|
|
@0:0..4:1 DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
|
@0:0..4:1 INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:C modality:FINAL visibility:public [data] superTypes:[kotlin.Any]'
|
|
@1:8..18 PROPERTY name:x visibility:public modality:FINAL [val]
|
|
@1:8..18 FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]
|
|
@1:8..18 EXPRESSION_BODY
|
|
@1:8..18 GET_VAR 'x: kotlin.Int declared in <root>.C.<init>' type=kotlin.Int origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
|
@1:8..18 FUN DEFAULT_PROPERTY_ACCESSOR name:<get-x> visibility:public modality:FINAL <> ($this:<root>.C) returnType:kotlin.Int
|
|
@1:8..18 VALUE_PARAMETER name:<this> type:<root>.C
|
|
@1:8..18 BLOCK_BODY
|
|
@1:8..18 RETURN type=kotlin.Nothing from='public final fun <get-x> (): kotlin.Int declared in <root>.C'
|
|
@1:8..18 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
|
|
@1:8..18 GET_VAR '<this>: <root>.C declared in <root>.C.<get-x>' type=<root>.C origin=null
|
|
@2:8..21 PROPERTY name:y visibility:public modality:FINAL [val]
|
|
@2:8..21 FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]
|
|
@2:8..21 EXPRESSION_BODY
|
|
@2:8..21 GET_VAR 'y: kotlin.String declared in <root>.C.<init>' type=kotlin.String origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
|
@2:8..21 FUN DEFAULT_PROPERTY_ACCESSOR name:<get-y> visibility:public modality:FINAL <> ($this:<root>.C) returnType:kotlin.String
|
|
@2:8..21 VALUE_PARAMETER name:<this> type:<root>.C
|
|
@2:8..21 BLOCK_BODY
|
|
@2:8..21 RETURN type=kotlin.Nothing from='public final fun <get-y> (): kotlin.String declared in <root>.C'
|
|
@2:8..21 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
|
|
@2:8..21 GET_VAR '<this>: <root>.C declared in <root>.C.<get-y>' type=<root>.C origin=null
|
|
@3:8..18 PROPERTY name:z visibility:public modality:FINAL [val]
|
|
@3:8..18 FIELD PROPERTY_BACKING_FIELD name:z type:kotlin.Any visibility:private [final]
|
|
@3:8..18 EXPRESSION_BODY
|
|
@3:8..18 GET_VAR 'z: kotlin.Any declared in <root>.C.<init>' type=kotlin.Any origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
|
@3:8..18 FUN DEFAULT_PROPERTY_ACCESSOR name:<get-z> visibility:public modality:FINAL <> ($this:<root>.C) returnType:kotlin.Any
|
|
@3:8..18 VALUE_PARAMETER name:<this> type:<root>.C
|
|
@3:8..18 BLOCK_BODY
|
|
@3:8..18 RETURN type=kotlin.Nothing from='public final fun <get-z> (): kotlin.Any declared in <root>.C'
|
|
@3:8..18 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:z type:kotlin.Any visibility:private [final]' type=kotlin.Any origin=null
|
|
@3:8..18 GET_VAR '<this>: <root>.C declared in <root>.C.<get-z>' type=<root>.C origin=null
|
|
@1:8..18 FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:<root>.C) returnType:kotlin.Int
|
|
@1:8..18 VALUE_PARAMETER name:<this> type:<root>.C
|
|
@1:8..18 BLOCK_BODY
|
|
@1:8..18 RETURN type=kotlin.Nothing from='public final fun component1 (): kotlin.Int declared in <root>.C'
|
|
@1:8..18 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
|
|
@1:8..18 GET_VAR '<this>: <root>.C declared in <root>.C.component1' type=<root>.C origin=null
|
|
@2:8..21 FUN GENERATED_DATA_CLASS_MEMBER name:component2 visibility:public modality:FINAL <> ($this:<root>.C) returnType:kotlin.String
|
|
@2:8..21 VALUE_PARAMETER name:<this> type:<root>.C
|
|
@2:8..21 BLOCK_BODY
|
|
@2:8..21 RETURN type=kotlin.Nothing from='public final fun component2 (): kotlin.String declared in <root>.C'
|
|
@2:8..21 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
|
|
@2:8..21 GET_VAR '<this>: <root>.C declared in <root>.C.component2' type=<root>.C origin=null
|
|
@3:8..18 FUN GENERATED_DATA_CLASS_MEMBER name:component3 visibility:public modality:FINAL <> ($this:<root>.C) returnType:kotlin.Any
|
|
@3:8..18 VALUE_PARAMETER name:<this> type:<root>.C
|
|
@3:8..18 BLOCK_BODY
|
|
@3:8..18 RETURN type=kotlin.Nothing from='public final fun component3 (): kotlin.Any declared in <root>.C'
|
|
@3:8..18 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:z type:kotlin.Any visibility:private [final]' type=kotlin.Any origin=null
|
|
@3:8..18 GET_VAR '<this>: <root>.C declared in <root>.C.component3' type=<root>.C origin=null
|
|
@0:0..4:1 FUN GENERATED_DATA_CLASS_MEMBER name:copy visibility:public modality:FINAL <> ($this:<root>.C, x:kotlin.Int, y:kotlin.String, z:kotlin.Any) returnType:<root>.C
|
|
@0:0..4:1 VALUE_PARAMETER name:<this> type:<root>.C
|
|
@1:8..18 VALUE_PARAMETER name:x index:0 type:kotlin.Int
|
|
@0:0..4:1 EXPRESSION_BODY
|
|
@0:0..4:1 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
|
|
@0:0..4:1 GET_VAR '<this>: <root>.C declared in <root>.C.copy' type=<root>.C origin=null
|
|
@2:8..21 VALUE_PARAMETER name:y index:1 type:kotlin.String
|
|
@0:0..4:1 EXPRESSION_BODY
|
|
@0:0..4:1 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
|
|
@0:0..4:1 GET_VAR '<this>: <root>.C declared in <root>.C.copy' type=<root>.C origin=null
|
|
@3:8..18 VALUE_PARAMETER name:z index:2 type:kotlin.Any
|
|
@0:0..4:1 EXPRESSION_BODY
|
|
@0:0..4:1 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:z type:kotlin.Any visibility:private [final]' type=kotlin.Any origin=null
|
|
@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 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
|
|
@0:0..4:1 FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.C) returnType:kotlin.String
|
|
@0:0..4:1 VALUE_PARAMETER name:<this> type:<root>.C
|
|
@0:0..4:1 BLOCK_BODY
|
|
@0:0..4:1 RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.C'
|
|
@0:0..4:1 STRING_CONCATENATION type=kotlin.String
|
|
@0:0..4:1 CONST String type=kotlin.String value="C("
|
|
@0:0..4:1 CONST String type=kotlin.String value="x="
|
|
@0:0..4:1 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
|
|
@0:0..4:1 GET_VAR '<this>: <root>.C declared in <root>.C.toString' type=<root>.C origin=null
|
|
@0:0..4:1 CONST String type=kotlin.String value=", "
|
|
@0:0..4:1 CONST String type=kotlin.String value="y="
|
|
@0:0..4:1 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
|
|
@0:0..4:1 GET_VAR '<this>: <root>.C declared in <root>.C.toString' type=<root>.C origin=null
|
|
@0:0..4:1 CONST String type=kotlin.String value=", "
|
|
@0:0..4:1 CONST String type=kotlin.String value="z="
|
|
@0:0..4:1 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:z type:kotlin.Any visibility:private [final]' type=kotlin.Any origin=null
|
|
@0:0..4:1 GET_VAR '<this>: <root>.C declared in <root>.C.toString' type=<root>.C origin=null
|
|
@0:0..4:1 CONST String type=kotlin.String value=")"
|
|
@0:0..4:1 FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.C) returnType:kotlin.Int
|
|
@0:0..4:1 VALUE_PARAMETER name:<this> type:<root>.C
|
|
@0:0..4:1 BLOCK_BODY
|
|
@0:0..4:1 RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.C'
|
|
@0:0..4:1 CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
|
|
@0:0..4:1 CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
|
|
@0:0..4:1 CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
|
|
@0:0..4:1 CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
|
|
@0:0..4:1 CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
|
|
@0:0..4:1 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
|
|
@0:0..4:1 GET_VAR '<this>: <root>.C declared in <root>.C.hashCode' type=<root>.C origin=null
|
|
@0:0..4:1 CONST Int type=kotlin.Int value=31
|
|
@0:0..4:1 CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.String' type=kotlin.Int origin=null
|
|
@0:0..4:1 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
|
|
@0:0..4:1 GET_VAR '<this>: <root>.C declared in <root>.C.hashCode' type=<root>.C origin=null
|
|
@0:0..4:1 CONST Int type=kotlin.Int value=31
|
|
@0:0..4:1 CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null
|
|
@0:0..4:1 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:z type:kotlin.Any visibility:private [final]' type=kotlin.Any origin=null
|
|
@0:0..4:1 GET_VAR '<this>: <root>.C declared in <root>.C.hashCode' type=<root>.C origin=null
|
|
@0:0..4:1 FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:<root>.C, other:kotlin.Any?) returnType:kotlin.Boolean
|
|
@0:0..4:1 VALUE_PARAMETER name:<this> type:<root>.C
|
|
@0:0..4:1 VALUE_PARAMETER name:other index:0 type:kotlin.Any?
|
|
@0:0..4:1 BLOCK_BODY
|
|
@0:0..4:1 WHEN type=kotlin.Unit origin=null
|
|
@0:0..4:1 BRANCH
|
|
@0:0..4:1 CALL 'public final fun EQEQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQEQ
|
|
@0:0..4:1 GET_VAR '<this>: <root>.C declared in <root>.C.equals' type=<root>.C origin=null
|
|
@0:0..4:1 GET_VAR 'other: kotlin.Any? declared in <root>.C.equals' type=kotlin.Any? origin=null
|
|
@0:0..4:1 RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.C'
|
|
@0:0..4:1 CONST Boolean type=kotlin.Boolean value=true
|
|
@0:0..4:1 WHEN type=kotlin.Unit origin=null
|
|
@0:0..4:1 BRANCH
|
|
@0:0..4:1 TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=<root>.C
|
|
@0:0..4:1 GET_VAR 'other: kotlin.Any? declared in <root>.C.equals' type=kotlin.Any? origin=null
|
|
@0:0..4:1 RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.C'
|
|
@0:0..4:1 CONST Boolean type=kotlin.Boolean value=false
|
|
@0:0..4:1 VAR IR_TEMPORARY_VARIABLE name:tmp0_other_with_cast type:<root>.C [val]
|
|
@0:0..4:1 TYPE_OP type=<root>.C origin=CAST typeOperand=<root>.C
|
|
@0:0..4:1 GET_VAR 'other: kotlin.Any? declared in <root>.C.equals' type=kotlin.Any? origin=null
|
|
@0:0..4:1 WHEN type=kotlin.Unit origin=null
|
|
@0:0..4:1 BRANCH
|
|
@0:0..4:1 CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ
|
|
@0:0..4:1 CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ
|
|
@0:0..4:1 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
|
|
@0:0..4:1 GET_VAR '<this>: <root>.C declared in <root>.C.equals' type=<root>.C origin=null
|
|
@0:0..4:1 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
|
|
@0:0..4:1 GET_VAR 'val tmp0_other_with_cast: <root>.C [val] declared in <root>.C.equals' type=<root>.C origin=null
|
|
@0:0..4:1 RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.C'
|
|
@0:0..4:1 CONST Boolean type=kotlin.Boolean value=false
|
|
@0:0..4:1 WHEN type=kotlin.Unit origin=null
|
|
@0:0..4:1 BRANCH
|
|
@0:0..4:1 CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ
|
|
@0:0..4:1 CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ
|
|
@0:0..4:1 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
|
|
@0:0..4:1 GET_VAR '<this>: <root>.C declared in <root>.C.equals' type=<root>.C origin=null
|
|
@0:0..4:1 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
|
|
@0:0..4:1 GET_VAR 'val tmp0_other_with_cast: <root>.C [val] declared in <root>.C.equals' type=<root>.C origin=null
|
|
@0:0..4:1 RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.C'
|
|
@0:0..4:1 CONST Boolean type=kotlin.Boolean value=false
|
|
@0:0..4:1 WHEN type=kotlin.Unit origin=null
|
|
@0:0..4:1 BRANCH
|
|
@0:0..4:1 CALL 'public final fun not (): kotlin.Boolean declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ
|
|
@0:0..4:1 CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ
|
|
@0:0..4:1 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:z type:kotlin.Any visibility:private [final]' type=kotlin.Any origin=null
|
|
@0:0..4:1 GET_VAR '<this>: <root>.C declared in <root>.C.equals' type=<root>.C origin=null
|
|
@0:0..4:1 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:z type:kotlin.Any visibility:private [final]' type=kotlin.Any origin=null
|
|
@0:0..4:1 GET_VAR 'val tmp0_other_with_cast: <root>.C [val] declared in <root>.C.equals' type=<root>.C origin=null
|
|
@0:0..4:1 RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.C'
|
|
@0:0..4:1 CONST Boolean type=kotlin.Boolean value=false
|
|
@0:0..4:1 RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.C'
|
|
@0:0..4:1 CONST Boolean type=kotlin.Boolean value=true
|