[FIR2IR] Properly set statement origin for all parts of += calls

^KT-65649 Fixed
This commit is contained in:
Dmitriy Novozhilov
2024-02-27 11:04:41 +02:00
committed by Space Team
parent e4537cb9f0
commit dd94de3a34
43 changed files with 129 additions and 1294 deletions
@@ -125,7 +125,7 @@ FILE fqName:<root> fileName:/compoundAssignmentOperators.kt
$receiver: VALUE_PARAMETER name:$this$with type:kotlin.Int
BLOCK_BODY
CALL 'public final fun plusAssign ($context_receiver_0: kotlin.Int, other: <root>.Result): kotlin.Unit declared in <root>' type=kotlin.Unit origin=PLUSEQ
$receiver: GET_VAR 'val result: <root>.Result declared in <root>.box' type=<root>.Result origin=null
$receiver: GET_VAR 'val result: <root>.Result declared in <root>.box' type=<root>.Result origin=PLUSEQ
$context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
other: CALL 'public final fun plus ($context_receiver_0: kotlin.Int, other: <root>.Result): <root>.Result declared in <root>' type=<root>.Result origin=PLUS
$receiver: CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
@@ -134,7 +134,7 @@ FILE fqName:<root> fileName:/compoundAssignmentOperators.kt
other: CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
i: CONST Int type=kotlin.Int value=1
CALL 'public final fun minusAssign ($context_receiver_0: kotlin.Int, other: <root>.Result): kotlin.Unit declared in <root>' type=kotlin.Unit origin=MINUSEQ
$receiver: GET_VAR 'val result: <root>.Result declared in <root>.box' type=<root>.Result origin=null
$receiver: GET_VAR 'val result: <root>.Result declared in <root>.box' type=<root>.Result origin=MINUSEQ
$context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
other: CALL 'public final fun minus ($context_receiver_0: kotlin.Int, other: <root>.Result): <root>.Result declared in <root>' type=<root>.Result origin=MINUS
$receiver: CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
@@ -143,7 +143,7 @@ FILE fqName:<root> fileName:/compoundAssignmentOperators.kt
other: CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
i: CONST Int type=kotlin.Int value=0
CALL 'public final fun timesAssign ($context_receiver_0: kotlin.Int, other: <root>.Result): kotlin.Unit declared in <root>' type=kotlin.Unit origin=MULTEQ
$receiver: GET_VAR 'val result: <root>.Result declared in <root>.box' type=<root>.Result origin=null
$receiver: GET_VAR 'val result: <root>.Result declared in <root>.box' type=<root>.Result origin=MULTEQ
$context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
other: CALL 'public final fun times ($context_receiver_0: kotlin.Int, other: <root>.Result): <root>.Result declared in <root>' type=<root>.Result origin=MUL
$receiver: CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
@@ -152,7 +152,7 @@ FILE fqName:<root> fileName:/compoundAssignmentOperators.kt
other: CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
i: CONST Int type=kotlin.Int value=2
CALL 'public final fun divAssign ($context_receiver_0: kotlin.Int, other: <root>.Result): kotlin.Unit declared in <root>' type=kotlin.Unit origin=DIVEQ
$receiver: GET_VAR 'val result: <root>.Result declared in <root>.box' type=<root>.Result origin=null
$receiver: GET_VAR 'val result: <root>.Result declared in <root>.box' type=<root>.Result origin=DIVEQ
$context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in <root>.box.<anonymous>' type=kotlin.Int origin=null
other: CALL 'public final fun div ($context_receiver_0: kotlin.Int, other: <root>.Result): <root>.Result declared in <root>' type=<root>.Result origin=DIV
$receiver: CONSTRUCTOR_CALL 'public constructor <init> (i: kotlin.Int) declared in <root>.Result' type=<root>.Result origin=null
@@ -186,7 +186,7 @@ FILE fqName:<root> fileName:/compoundAssignmentOperators.kt
VALUE_PARAMETER name:other index:1 type:<root>.Result
BLOCK_BODY
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
other: GET_VAR '$context_receiver_0: kotlin.Int declared in <root>.div' type=kotlin.Int origin=null
RETURN type=kotlin.Nothing from='public final fun div ($context_receiver_0: kotlin.Int, other: <root>.Result): <root>.Result declared in <root>'
@@ -203,12 +203,12 @@ FILE fqName:<root> fileName:/compoundAssignmentOperators.kt
VALUE_PARAMETER name:other index:1 type:<root>.Result
BLOCK_BODY
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
other: GET_VAR '$context_receiver_0: kotlin.Int declared in <root>.divAssign' type=kotlin.Int origin=null
CALL 'public final fun <set-i> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.Result' type=kotlin.Unit origin=EQ
$this: GET_VAR '<this>: <root>.Result declared in <root>.divAssign' type=<root>.Result origin=null
<set-?>: CALL 'public final fun div (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
<set-?>: CALL 'public final fun div (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=DIVEQ
$this: CALL 'public final fun <get-i> (): kotlin.Int declared in <root>.Result' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Result declared in <root>.divAssign' type=<root>.Result origin=null
other: CALL 'public final fun <get-i> (): kotlin.Int declared in <root>.Result' type=kotlin.Int origin=GET_PROPERTY
@@ -220,7 +220,7 @@ FILE fqName:<root> fileName:/compoundAssignmentOperators.kt
VALUE_PARAMETER name:other index:1 type:<root>.Result
BLOCK_BODY
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
other: GET_VAR '$context_receiver_0: kotlin.Int declared in <root>.minus' type=kotlin.Int origin=null
RETURN type=kotlin.Nothing from='public final fun minus ($context_receiver_0: kotlin.Int, other: <root>.Result): <root>.Result declared in <root>'
@@ -237,12 +237,12 @@ FILE fqName:<root> fileName:/compoundAssignmentOperators.kt
VALUE_PARAMETER name:other index:1 type:<root>.Result
BLOCK_BODY
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
other: GET_VAR '$context_receiver_0: kotlin.Int declared in <root>.minusAssign' type=kotlin.Int origin=null
CALL 'public final fun <set-i> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.Result' type=kotlin.Unit origin=EQ
$this: GET_VAR '<this>: <root>.Result declared in <root>.minusAssign' type=<root>.Result origin=null
<set-?>: CALL 'public final fun minus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
<set-?>: CALL 'public final fun minus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=MINUSEQ
$this: CALL 'public final fun <get-i> (): kotlin.Int declared in <root>.Result' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Result declared in <root>.minusAssign' type=<root>.Result origin=null
other: CALL 'public final fun <get-i> (): kotlin.Int declared in <root>.Result' type=kotlin.Int origin=GET_PROPERTY
@@ -254,7 +254,7 @@ FILE fqName:<root> fileName:/compoundAssignmentOperators.kt
VALUE_PARAMETER name:other index:1 type:<root>.Result
BLOCK_BODY
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
other: GET_VAR '$context_receiver_0: kotlin.Int declared in <root>.plus' type=kotlin.Int origin=null
RETURN type=kotlin.Nothing from='public final fun plus ($context_receiver_0: kotlin.Int, other: <root>.Result): <root>.Result declared in <root>'
@@ -271,12 +271,12 @@ FILE fqName:<root> fileName:/compoundAssignmentOperators.kt
VALUE_PARAMETER name:other index:1 type:<root>.Result
BLOCK_BODY
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
other: GET_VAR '$context_receiver_0: kotlin.Int declared in <root>.plusAssign' type=kotlin.Int origin=null
CALL 'public final fun <set-i> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.Result' type=kotlin.Unit origin=EQ
$this: GET_VAR '<this>: <root>.Result declared in <root>.plusAssign' type=<root>.Result origin=null
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public final fun <get-i> (): kotlin.Int declared in <root>.Result' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Result declared in <root>.plusAssign' type=<root>.Result origin=null
other: CALL 'public final fun <get-i> (): kotlin.Int declared in <root>.Result' type=kotlin.Int origin=GET_PROPERTY
@@ -288,7 +288,7 @@ FILE fqName:<root> fileName:/compoundAssignmentOperators.kt
VALUE_PARAMETER name:other index:1 type:<root>.Result
BLOCK_BODY
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
other: GET_VAR '$context_receiver_0: kotlin.Int declared in <root>.times' type=kotlin.Int origin=null
RETURN type=kotlin.Nothing from='public final fun times ($context_receiver_0: kotlin.Int, other: <root>.Result): <root>.Result declared in <root>'
@@ -305,12 +305,12 @@ FILE fqName:<root> fileName:/compoundAssignmentOperators.kt
VALUE_PARAMETER name:other index:1 type:<root>.Result
BLOCK_BODY
CALL 'public final fun <set-operationScore> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
<set-?>: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ
$this: CALL 'public final fun <get-operationScore> (): kotlin.Int declared in <root>' type=kotlin.Int origin=GET_PROPERTY
other: GET_VAR '$context_receiver_0: kotlin.Int declared in <root>.timesAssign' type=kotlin.Int origin=null
CALL 'public final fun <set-i> (<set-?>: kotlin.Int): kotlin.Unit declared in <root>.Result' type=kotlin.Unit origin=EQ
$this: GET_VAR '<this>: <root>.Result declared in <root>.timesAssign' type=<root>.Result origin=null
<set-?>: CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null
<set-?>: CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=MULTEQ
$this: CALL 'public final fun <get-i> (): kotlin.Int declared in <root>.Result' type=kotlin.Int origin=GET_PROPERTY
$this: GET_VAR '<this>: <root>.Result declared in <root>.timesAssign' type=<root>.Result origin=null
other: CALL 'public final fun <get-i> (): kotlin.Int declared in <root>.Result' type=kotlin.Int origin=GET_PROPERTY