Test: IR source ranges: make line/column -1 for negative offsets

Before this commit, test data for 'synthesizedDataClassMembers' test
was different between PSI and LT, because we had SYNTHETIC_OFFSET = -2
for synthetic functions and NaiveSourceBasedFileEntryImpl calculated
line/column as 0 for LT. In this commit the dumper was edited to
count -1 as line -1 / column -1 independent of a file entry used.
This commit is contained in:
Mikhail Glukhikh
2023-10-02 11:52:01 +02:00
committed by Space Team
parent 1d631500f5
commit 4ed6ece78b
2 changed files with 122 additions and 116 deletions
@@ -39,135 +39,135 @@
@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 [operator]
@1:8..18 VALUE_PARAMETER name:<this> type:<root>.C
@0:0..0 BLOCK_BODY
@0:0..0 RETURN type=kotlin.Nothing from='public final fun component1 (): kotlin.Int [operator] declared in <root>.C'
@0:0..0 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
@0:0..0 GET_VAR '<this>: <root>.C declared in <root>.C.component1' type=<root>.C origin=null
@-1:-1..-1 BLOCK_BODY
@-1:-1..-1 RETURN type=kotlin.Nothing from='public final fun component1 (): kotlin.Int [operator] declared in <root>.C'
@-1:-1..-1 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
@-1:-1..-1 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 [operator]
@2:8..21 VALUE_PARAMETER name:<this> type:<root>.C
@0:0..0 BLOCK_BODY
@0:0..0 RETURN type=kotlin.Nothing from='public final fun component2 (): kotlin.String [operator] declared in <root>.C'
@0:0..0 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
@0:0..0 GET_VAR '<this>: <root>.C declared in <root>.C.component2' type=<root>.C origin=null
@-1:-1..-1 BLOCK_BODY
@-1:-1..-1 RETURN type=kotlin.Nothing from='public final fun component2 (): kotlin.String [operator] declared in <root>.C'
@-1:-1..-1 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
@-1:-1..-1 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 [operator]
@3:8..18 VALUE_PARAMETER name:<this> type:<root>.C
@0:0..0 BLOCK_BODY
@0:0..0 RETURN type=kotlin.Nothing from='public final fun component3 (): kotlin.Any [operator] declared in <root>.C'
@0:0..0 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:z type:kotlin.Any visibility:private [final]' type=kotlin.Any origin=null
@0:0..0 GET_VAR '<this>: <root>.C declared in <root>.C.component3' type=<root>.C origin=null
@-1:-1..-1 BLOCK_BODY
@-1:-1..-1 RETURN type=kotlin.Nothing from='public final fun component3 (): kotlin.Any [operator] declared in <root>.C'
@-1:-1..-1 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:z type:kotlin.Any visibility:private [final]' type=kotlin.Any origin=null
@-1:-1..-1 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..0 EXPRESSION_BODY
@0:0..0 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
@0:0..0 GET_VAR '<this>: <root>.C declared in <root>.C.copy' type=<root>.C origin=null
@-1:-1..-1 EXPRESSION_BODY
@-1:-1..-1 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
@-1:-1..-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..0 EXPRESSION_BODY
@0:0..0 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
@0:0..0 GET_VAR '<this>: <root>.C declared in <root>.C.copy' type=<root>.C origin=null
@-1:-1..-1 EXPRESSION_BODY
@-1:-1..-1 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
@-1:-1..-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..0 EXPRESSION_BODY
@0:0..0 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:z type:kotlin.Any visibility:private [final]' type=kotlin.Any origin=null
@0:0..0 GET_VAR '<this>: <root>.C declared in <root>.C.copy' type=<root>.C origin=null
@0:0..0 BLOCK_BODY
@0:0..0 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..0 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..0 GET_VAR 'x: kotlin.Int declared in <root>.C.copy' type=kotlin.Int origin=null
@0:0..0 GET_VAR 'y: kotlin.String declared in <root>.C.copy' type=kotlin.String origin=null
@0:0..0 GET_VAR 'z: kotlin.Any declared in <root>.C.copy' type=kotlin.Any origin=null
@-1:-1..-1 EXPRESSION_BODY
@-1:-1..-1 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:z type:kotlin.Any visibility:private [final]' type=kotlin.Any origin=null
@-1:-1..-1 GET_VAR '<this>: <root>.C declared in <root>.C.copy' type=<root>.C origin=null
@-1:-1..-1 BLOCK_BODY
@-1:-1..-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'
@-1:-1..-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
@-1:-1..-1 GET_VAR 'x: kotlin.Int declared in <root>.C.copy' type=kotlin.Int origin=null
@-1:-1..-1 GET_VAR 'y: kotlin.String declared in <root>.C.copy' type=kotlin.String origin=null
@-1:-1..-1 GET_VAR 'z: kotlin.Any declared in <root>.C.copy' type=kotlin.Any origin=null
@-1:-1..-1 FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.C) returnType:kotlin.String
@-1:-1..-1 VALUE_PARAMETER name:<this> type:<root>.C
@0:0..0 BLOCK_BODY
@0:0..0 RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.C'
@0:0..0 STRING_CONCATENATION type=kotlin.String
@0:0..0 CONST String type=kotlin.String value="C("
@0:0..0 CONST String type=kotlin.String value="x="
@0:0..0 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
@0:0..0 GET_VAR '<this>: <root>.C declared in <root>.C.toString' type=<root>.C origin=null
@0:0..0 CONST String type=kotlin.String value=", "
@0:0..0 CONST String type=kotlin.String value="y="
@0:0..0 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
@0:0..0 GET_VAR '<this>: <root>.C declared in <root>.C.toString' type=<root>.C origin=null
@0:0..0 CONST String type=kotlin.String value=", "
@0:0..0 CONST String type=kotlin.String value="z="
@0:0..0 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:z type:kotlin.Any visibility:private [final]' type=kotlin.Any origin=null
@0:0..0 GET_VAR '<this>: <root>.C declared in <root>.C.toString' type=<root>.C origin=null
@0:0..0 CONST String type=kotlin.String value=")"
@-1:-1..-1 BLOCK_BODY
@-1:-1..-1 RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.C'
@-1:-1..-1 STRING_CONCATENATION type=kotlin.String
@-1:-1..-1 CONST String type=kotlin.String value="C("
@-1:-1..-1 CONST String type=kotlin.String value="x="
@-1:-1..-1 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
@-1:-1..-1 GET_VAR '<this>: <root>.C declared in <root>.C.toString' type=<root>.C origin=null
@-1:-1..-1 CONST String type=kotlin.String value=", "
@-1:-1..-1 CONST String type=kotlin.String value="y="
@-1:-1..-1 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
@-1:-1..-1 GET_VAR '<this>: <root>.C declared in <root>.C.toString' type=<root>.C origin=null
@-1:-1..-1 CONST String type=kotlin.String value=", "
@-1:-1..-1 CONST String type=kotlin.String value="z="
@-1:-1..-1 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:z type:kotlin.Any visibility:private [final]' type=kotlin.Any origin=null
@-1:-1..-1 GET_VAR '<this>: <root>.C declared in <root>.C.toString' type=<root>.C origin=null
@-1:-1..-1 CONST String type=kotlin.String value=")"
@-1:-1..-1 FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.C) returnType:kotlin.Int
@-1:-1..-1 VALUE_PARAMETER name:<this> type:<root>.C
@0:0..0 BLOCK_BODY
@0:0..0 VAR name:result type:kotlin.Int [var]
@0:0..0 CALL 'public open fun hashCode (): kotlin.Int [fake_override] declared in kotlin.Int' type=kotlin.Int origin=null
@0:0..0 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
@0:0..0 GET_VAR '<this>: <root>.C declared in <root>.C.hashCode' type=<root>.C origin=null
@0:0..0 SET_VAR 'var result: kotlin.Int [var] declared in <root>.C.hashCode' type=kotlin.Unit origin=EQ
@0:0..0 CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
@0:0..0 CALL 'public final fun times (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
@0:0..0 GET_VAR 'var result: kotlin.Int [var] declared in <root>.C.hashCode' type=kotlin.Int origin=null
@0:0..0 CONST Int type=kotlin.Int value=31
@0:0..0 CALL 'public open fun hashCode (): kotlin.Int [fake_override] declared in kotlin.String' type=kotlin.Int origin=null
@0:0..0 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
@0:0..0 GET_VAR '<this>: <root>.C declared in <root>.C.hashCode' type=<root>.C origin=null
@0:0..0 SET_VAR 'var result: kotlin.Int [var] declared in <root>.C.hashCode' type=kotlin.Unit origin=EQ
@0:0..0 CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
@0:0..0 CALL 'public final fun times (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
@0:0..0 GET_VAR 'var result: kotlin.Int [var] declared in <root>.C.hashCode' type=kotlin.Int origin=null
@0:0..0 CONST Int type=kotlin.Int value=31
@0:0..0 CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null
@0:0..0 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:z type:kotlin.Any visibility:private [final]' type=kotlin.Any origin=null
@0:0..0 GET_VAR '<this>: <root>.C declared in <root>.C.hashCode' type=<root>.C origin=null
@0:0..0 RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.C'
@0:0..0 GET_VAR 'var result: kotlin.Int [var] declared in <root>.C.hashCode' type=kotlin.Int origin=null
@-1:-1..-1 BLOCK_BODY
@-1:-1..-1 VAR name:result type:kotlin.Int [var]
@-1:-1..-1 CALL 'public open fun hashCode (): kotlin.Int [fake_override] declared in kotlin.Int' type=kotlin.Int origin=null
@-1:-1..-1 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
@-1:-1..-1 GET_VAR '<this>: <root>.C declared in <root>.C.hashCode' type=<root>.C origin=null
@-1:-1..-1 SET_VAR 'var result: kotlin.Int [var] declared in <root>.C.hashCode' type=kotlin.Unit origin=EQ
@-1:-1..-1 CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
@-1:-1..-1 CALL 'public final fun times (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
@-1:-1..-1 GET_VAR 'var result: kotlin.Int [var] declared in <root>.C.hashCode' type=kotlin.Int origin=null
@-1:-1..-1 CONST Int type=kotlin.Int value=31
@-1:-1..-1 CALL 'public open fun hashCode (): kotlin.Int [fake_override] declared in kotlin.String' type=kotlin.Int origin=null
@-1:-1..-1 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
@-1:-1..-1 GET_VAR '<this>: <root>.C declared in <root>.C.hashCode' type=<root>.C origin=null
@-1:-1..-1 SET_VAR 'var result: kotlin.Int [var] declared in <root>.C.hashCode' type=kotlin.Unit origin=EQ
@-1:-1..-1 CALL 'public final fun plus (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
@-1:-1..-1 CALL 'public final fun times (other: kotlin.Int): kotlin.Int [operator] declared in kotlin.Int' type=kotlin.Int origin=null
@-1:-1..-1 GET_VAR 'var result: kotlin.Int [var] declared in <root>.C.hashCode' type=kotlin.Int origin=null
@-1:-1..-1 CONST Int type=kotlin.Int value=31
@-1:-1..-1 CALL 'public open fun hashCode (): kotlin.Int declared in kotlin.Any' type=kotlin.Int origin=null
@-1:-1..-1 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:z type:kotlin.Any visibility:private [final]' type=kotlin.Any origin=null
@-1:-1..-1 GET_VAR '<this>: <root>.C declared in <root>.C.hashCode' type=<root>.C origin=null
@-1:-1..-1 RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.C'
@-1:-1..-1 GET_VAR 'var result: kotlin.Int [var] declared in <root>.C.hashCode' type=kotlin.Int origin=null
@-1:-1..-1 FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:<root>.C, other:kotlin.Any?) returnType:kotlin.Boolean [operator]
@-1:-1..-1 VALUE_PARAMETER name:<this> type:<root>.C
@-1:-1..-1 VALUE_PARAMETER name:other index:0 type:kotlin.Any?
@0:0..0 BLOCK_BODY
@0:0..0 WHEN type=kotlin.Unit origin=null
@0:0..0 BRANCH
@0:0..0 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..0 GET_VAR '<this>: <root>.C declared in <root>.C.equals' type=<root>.C origin=null
@0:0..0 GET_VAR 'other: kotlin.Any? declared in <root>.C.equals' type=kotlin.Any? origin=null
@0:0..0 RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in <root>.C'
@0:0..0 CONST Boolean type=kotlin.Boolean value=true
@0:0..0 WHEN type=kotlin.Unit origin=null
@0:0..0 BRANCH
@0:0..0 TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=<root>.C
@0:0..0 GET_VAR 'other: kotlin.Any? declared in <root>.C.equals' type=kotlin.Any? origin=null
@0:0..0 RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in <root>.C'
@0:0..0 CONST Boolean type=kotlin.Boolean value=false
@0:0..0 VAR IR_TEMPORARY_VARIABLE name:tmp0_other_with_cast type:<root>.C [val]
@0:0..0 TYPE_OP type=<root>.C origin=CAST typeOperand=<root>.C
@0:0..0 GET_VAR 'other: kotlin.Any? declared in <root>.C.equals' type=kotlin.Any? origin=null
@0:0..0 WHEN type=kotlin.Unit origin=null
@0:0..0 BRANCH
@0:0..0 CALL 'public final fun not (): kotlin.Boolean [operator] declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ
@0:0..0 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..0 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
@0:0..0 GET_VAR '<this>: <root>.C declared in <root>.C.equals' type=<root>.C origin=null
@0:0..0 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
@0:0..0 GET_VAR 'val tmp0_other_with_cast: <root>.C [val] declared in <root>.C.equals' type=<root>.C origin=null
@0:0..0 RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in <root>.C'
@0:0..0 CONST Boolean type=kotlin.Boolean value=false
@0:0..0 WHEN type=kotlin.Unit origin=null
@0:0..0 BRANCH
@0:0..0 CALL 'public final fun not (): kotlin.Boolean [operator] declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ
@0:0..0 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..0 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
@0:0..0 GET_VAR '<this>: <root>.C declared in <root>.C.equals' type=<root>.C origin=null
@0:0..0 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
@0:0..0 GET_VAR 'val tmp0_other_with_cast: <root>.C [val] declared in <root>.C.equals' type=<root>.C origin=null
@0:0..0 RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in <root>.C'
@0:0..0 CONST Boolean type=kotlin.Boolean value=false
@0:0..0 WHEN type=kotlin.Unit origin=null
@0:0..0 BRANCH
@0:0..0 CALL 'public final fun not (): kotlin.Boolean [operator] declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ
@0:0..0 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..0 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:z type:kotlin.Any visibility:private [final]' type=kotlin.Any origin=null
@0:0..0 GET_VAR '<this>: <root>.C declared in <root>.C.equals' type=<root>.C origin=null
@0:0..0 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:z type:kotlin.Any visibility:private [final]' type=kotlin.Any origin=null
@0:0..0 GET_VAR 'val tmp0_other_with_cast: <root>.C [val] declared in <root>.C.equals' type=<root>.C origin=null
@0:0..0 RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in <root>.C'
@0:0..0 CONST Boolean type=kotlin.Boolean value=false
@0:0..0 RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in <root>.C'
@0:0..0 CONST Boolean type=kotlin.Boolean value=true
@-1:-1..-1 BLOCK_BODY
@-1:-1..-1 WHEN type=kotlin.Unit origin=null
@-1:-1..-1 BRANCH
@-1:-1..-1 CALL 'public final fun EQEQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQEQ
@-1:-1..-1 GET_VAR '<this>: <root>.C declared in <root>.C.equals' type=<root>.C origin=null
@-1:-1..-1 GET_VAR 'other: kotlin.Any? declared in <root>.C.equals' type=kotlin.Any? origin=null
@-1:-1..-1 RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in <root>.C'
@-1:-1..-1 CONST Boolean type=kotlin.Boolean value=true
@-1:-1..-1 WHEN type=kotlin.Unit origin=null
@-1:-1..-1 BRANCH
@-1:-1..-1 TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=<root>.C
@-1:-1..-1 GET_VAR 'other: kotlin.Any? declared in <root>.C.equals' type=kotlin.Any? origin=null
@-1:-1..-1 RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in <root>.C'
@-1:-1..-1 CONST Boolean type=kotlin.Boolean value=false
@-1:-1..-1 VAR IR_TEMPORARY_VARIABLE name:tmp0_other_with_cast type:<root>.C [val]
@-1:-1..-1 TYPE_OP type=<root>.C origin=CAST typeOperand=<root>.C
@-1:-1..-1 GET_VAR 'other: kotlin.Any? declared in <root>.C.equals' type=kotlin.Any? origin=null
@-1:-1..-1 WHEN type=kotlin.Unit origin=null
@-1:-1..-1 BRANCH
@-1:-1..-1 CALL 'public final fun not (): kotlin.Boolean [operator] declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ
@-1:-1..-1 CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ
@-1:-1..-1 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
@-1:-1..-1 GET_VAR '<this>: <root>.C declared in <root>.C.equals' type=<root>.C origin=null
@-1:-1..-1 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
@-1:-1..-1 GET_VAR 'val tmp0_other_with_cast: <root>.C [val] declared in <root>.C.equals' type=<root>.C origin=null
@-1:-1..-1 RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in <root>.C'
@-1:-1..-1 CONST Boolean type=kotlin.Boolean value=false
@-1:-1..-1 WHEN type=kotlin.Unit origin=null
@-1:-1..-1 BRANCH
@-1:-1..-1 CALL 'public final fun not (): kotlin.Boolean [operator] declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ
@-1:-1..-1 CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ
@-1:-1..-1 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
@-1:-1..-1 GET_VAR '<this>: <root>.C declared in <root>.C.equals' type=<root>.C origin=null
@-1:-1..-1 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:y type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
@-1:-1..-1 GET_VAR 'val tmp0_other_with_cast: <root>.C [val] declared in <root>.C.equals' type=<root>.C origin=null
@-1:-1..-1 RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in <root>.C'
@-1:-1..-1 CONST Boolean type=kotlin.Boolean value=false
@-1:-1..-1 WHEN type=kotlin.Unit origin=null
@-1:-1..-1 BRANCH
@-1:-1..-1 CALL 'public final fun not (): kotlin.Boolean [operator] declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ
@-1:-1..-1 CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ
@-1:-1..-1 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:z type:kotlin.Any visibility:private [final]' type=kotlin.Any origin=null
@-1:-1..-1 GET_VAR '<this>: <root>.C declared in <root>.C.equals' type=<root>.C origin=null
@-1:-1..-1 GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:z type:kotlin.Any visibility:private [final]' type=kotlin.Any origin=null
@-1:-1..-1 GET_VAR 'val tmp0_other_with_cast: <root>.C [val] declared in <root>.C.equals' type=<root>.C origin=null
@-1:-1..-1 RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in <root>.C'
@-1:-1..-1 CONST Boolean type=kotlin.Boolean value=false
@-1:-1..-1 RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in <root>.C'
@-1:-1..-1 CONST Boolean type=kotlin.Boolean value=true
@0:0..4:1 VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.C
@@ -64,7 +64,13 @@ class IrSourceRangesDumpHandler(
val elementRenderer = RenderIrElementVisitor()
private fun printElement(element: IrElement) {
val sourceRangeInfo = fileEntry.getSourceRangeInfo(element.startOffset, element.endOffset)
var sourceRangeInfo = fileEntry.getSourceRangeInfo(element.startOffset, element.endOffset)
if (element.startOffset < 0) {
sourceRangeInfo = sourceRangeInfo.copy(startLineNumber = -1, startColumnNumber = -1)
}
if (element.endOffset < 0) {
sourceRangeInfo = sourceRangeInfo.copy(endLineNumber = -1, endColumnNumber = -1)
}
printer.println("@${sourceRangeInfo.render()} ${element.accept(elementRenderer, null)}")
}