diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/ConversionUtils.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/ConversionUtils.kt index 94e42601ae6..469669e4460 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/ConversionUtils.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/ConversionUtils.kt @@ -51,6 +51,7 @@ import org.jetbrains.kotlin.ir.symbols.* import org.jetbrains.kotlin.ir.symbols.impl.IrValueParameterSymbolImpl import org.jetbrains.kotlin.ir.types.* import org.jetbrains.kotlin.ir.types.impl.IrErrorTypeImpl +import org.jetbrains.kotlin.lexer.KtTokens import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.name.SpecialNames import org.jetbrains.kotlin.name.StandardClassIds @@ -495,6 +496,15 @@ internal fun FirReference.statementOrigin(): IrStatementOrigin? = when (this) { source?.kind is KtFakeSourceElementKind.DesugaredComponentFunctionCall -> IrStatementOrigin.COMPONENT_N.withIndex(name.asString().removePrefix(DATA_CLASS_COMPONENT_PREFIX).toInt()) + source?.kind is KtFakeSourceElementKind.DesugaredCompoundAssignment -> when (name) { + OperatorNameConventions.PLUS_ASSIGN -> IrStatementOrigin.PLUSEQ + OperatorNameConventions.MINUS_ASSIGN -> IrStatementOrigin.MINUSEQ + OperatorNameConventions.TIMES_ASSIGN -> IrStatementOrigin.MULTEQ + OperatorNameConventions.DIV_ASSIGN -> IrStatementOrigin.DIVEQ + OperatorNameConventions.MOD_ASSIGN, OperatorNameConventions.REM_ASSIGN -> IrStatementOrigin.PERCEQ + else -> null + } + else -> null } diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessCompositeOperators.fir.ir.txt b/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessCompositeOperators.fir.ir.txt index 344d9c8bae1..4e368c4e28a 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessCompositeOperators.fir.ir.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessCompositeOperators.fir.ir.txt @@ -177,7 +177,7 @@ FILE fqName: fileName:/arrayAccessCompositeOperators.kt FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:kotlin.Int) returnType:kotlin.Unit $receiver: VALUE_PARAMETER name:$this$with type:kotlin.Int BLOCK_BODY - CALL 'public final fun plusAssign ($context_receiver_0: kotlin.Int, other: .MyContainer): kotlin.Unit declared in ' type=kotlin.Unit origin=null + CALL 'public final fun plusAssign ($context_receiver_0: kotlin.Int, other: .MyContainer): kotlin.Unit declared in ' type=kotlin.Unit origin=PLUSEQ $receiver: GET_VAR 'var myContainer: .MyContainer declared in .box' type=.MyContainer origin=null $context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in .box.' type=kotlin.Int origin=null other: CONSTRUCTOR_CALL 'public constructor (i: kotlin.Int) declared in .MyContainer' type=.MyContainer origin=null diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/compoundAssignmentOperators.fir.ir.txt b/compiler/testData/ir/irText/declarations/contextReceivers/compoundAssignmentOperators.fir.ir.txt index e71366a7211..1b38af09a45 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/compoundAssignmentOperators.fir.ir.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/compoundAssignmentOperators.fir.ir.txt @@ -260,7 +260,7 @@ FILE fqName: fileName:/compoundAssignmentOperators.kt FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:kotlin.Int) returnType:kotlin.Unit $receiver: VALUE_PARAMETER name:$this$with type:kotlin.Int BLOCK_BODY - CALL 'public final fun plusAssign ($context_receiver_0: kotlin.Int, other: .Result): kotlin.Unit declared in ' type=kotlin.Unit origin=null + CALL 'public final fun plusAssign ($context_receiver_0: kotlin.Int, other: .Result): kotlin.Unit declared in ' type=kotlin.Unit origin=PLUSEQ $receiver: GET_VAR 'val result: .Result declared in .box' type=.Result origin=null $context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in .box.' type=kotlin.Int origin=null other: CALL 'public final fun plus ($context_receiver_0: kotlin.Int, other: .Result): .Result declared in ' type=.Result origin=PLUS @@ -269,7 +269,7 @@ FILE fqName: fileName:/compoundAssignmentOperators.kt $context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in .box.' type=kotlin.Int origin=null other: CONSTRUCTOR_CALL 'public constructor (i: kotlin.Int) declared in .Result' type=.Result origin=null i: CONST Int type=kotlin.Int value=1 - CALL 'public final fun minusAssign ($context_receiver_0: kotlin.Int, other: .Result): kotlin.Unit declared in ' type=kotlin.Unit origin=null + CALL 'public final fun minusAssign ($context_receiver_0: kotlin.Int, other: .Result): kotlin.Unit declared in ' type=kotlin.Unit origin=MINUSEQ $receiver: GET_VAR 'val result: .Result declared in .box' type=.Result origin=null $context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in .box.' type=kotlin.Int origin=null other: CALL 'public final fun minus ($context_receiver_0: kotlin.Int, other: .Result): .Result declared in ' type=.Result origin=MINUS @@ -278,7 +278,7 @@ FILE fqName: fileName:/compoundAssignmentOperators.kt $context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in .box.' type=kotlin.Int origin=null other: CONSTRUCTOR_CALL 'public constructor (i: kotlin.Int) declared in .Result' type=.Result origin=null i: CONST Int type=kotlin.Int value=0 - CALL 'public final fun timesAssign ($context_receiver_0: kotlin.Int, other: .Result): kotlin.Unit declared in ' type=kotlin.Unit origin=null + CALL 'public final fun timesAssign ($context_receiver_0: kotlin.Int, other: .Result): kotlin.Unit declared in ' type=kotlin.Unit origin=MULTEQ $receiver: GET_VAR 'val result: .Result declared in .box' type=.Result origin=null $context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in .box.' type=kotlin.Int origin=null other: CALL 'public final fun times ($context_receiver_0: kotlin.Int, other: .Result): .Result declared in ' type=.Result origin=MUL @@ -287,7 +287,7 @@ FILE fqName: fileName:/compoundAssignmentOperators.kt $context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in .box.' type=kotlin.Int origin=null other: CONSTRUCTOR_CALL 'public constructor (i: kotlin.Int) declared in .Result' type=.Result origin=null i: CONST Int type=kotlin.Int value=2 - CALL 'public final fun divAssign ($context_receiver_0: kotlin.Int, other: .Result): kotlin.Unit declared in ' type=kotlin.Unit origin=null + CALL 'public final fun divAssign ($context_receiver_0: kotlin.Int, other: .Result): kotlin.Unit declared in ' type=kotlin.Unit origin=DIVEQ $receiver: GET_VAR 'val result: .Result declared in .box' type=.Result origin=null $context_receiver_0: GET_VAR '$this$with: kotlin.Int declared in .box.' type=kotlin.Int origin=null other: CALL 'public final fun div ($context_receiver_0: kotlin.Int, other: .Result): .Result declared in ' type=.Result origin=DIV diff --git a/compiler/testData/ir/irText/expressions/augmentedAssignment2.fir.ir.txt b/compiler/testData/ir/irText/expressions/augmentedAssignment2.fir.ir.txt index 291131f9098..f21dd559feb 100644 --- a/compiler/testData/ir/irText/expressions/augmentedAssignment2.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/augmentedAssignment2.fir.ir.txt @@ -51,35 +51,35 @@ FILE fqName: fileName:/augmentedAssignment2.kt BLOCK_BODY VAR name:a type:.A [val] CONSTRUCTOR_CALL 'public constructor () declared in .A' type=.A origin=null - CALL 'public final fun plusAssign (s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=null + CALL 'public final fun plusAssign (s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=PLUSEQ $receiver: GET_VAR 'val a: .A declared in .testVariable' type=.A origin=null s: CONST String type=kotlin.String value="+=" - CALL 'public final fun minusAssign (s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=null + CALL 'public final fun minusAssign (s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=MINUSEQ $receiver: GET_VAR 'val a: .A declared in .testVariable' type=.A origin=null s: CONST String type=kotlin.String value="-=" - CALL 'public final fun timesAssign (s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=null + CALL 'public final fun timesAssign (s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=MULTEQ $receiver: GET_VAR 'val a: .A declared in .testVariable' type=.A origin=null s: CONST String type=kotlin.String value="*=" - CALL 'public final fun divAssign (s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=null + CALL 'public final fun divAssign (s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=DIVEQ $receiver: GET_VAR 'val a: .A declared in .testVariable' type=.A origin=null s: CONST String type=kotlin.String value="/=" - CALL 'public final fun remAssign (s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=null + CALL 'public final fun remAssign (s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=PERCEQ $receiver: GET_VAR 'val a: .A declared in .testVariable' type=.A origin=null s: CONST String type=kotlin.String value="*=" FUN name:testProperty visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY - CALL 'public final fun plusAssign (s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=null + CALL 'public final fun plusAssign (s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=PLUSEQ $receiver: CALL 'public final fun (): .A declared in ' type=.A origin=GET_PROPERTY s: CONST String type=kotlin.String value="+=" - CALL 'public final fun minusAssign (s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=null + CALL 'public final fun minusAssign (s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=MINUSEQ $receiver: CALL 'public final fun (): .A declared in ' type=.A origin=GET_PROPERTY s: CONST String type=kotlin.String value="-=" - CALL 'public final fun timesAssign (s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=null + CALL 'public final fun timesAssign (s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=MULTEQ $receiver: CALL 'public final fun (): .A declared in ' type=.A origin=GET_PROPERTY s: CONST String type=kotlin.String value="*=" - CALL 'public final fun divAssign (s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=null + CALL 'public final fun divAssign (s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=DIVEQ $receiver: CALL 'public final fun (): .A declared in ' type=.A origin=GET_PROPERTY s: CONST String type=kotlin.String value="/=" - CALL 'public final fun remAssign (s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=null + CALL 'public final fun remAssign (s: kotlin.String): kotlin.Unit declared in ' type=kotlin.Unit origin=PERCEQ $receiver: CALL 'public final fun (): .A declared in ' type=.A origin=GET_PROPERTY s: CONST String type=kotlin.String value="%=" diff --git a/compiler/testData/ir/irText/expressions/augmentedAssignmentWithExpression.fir.ir.txt b/compiler/testData/ir/irText/expressions/augmentedAssignmentWithExpression.fir.ir.txt index 4e335fd60d4..470f0dfd1bc 100644 --- a/compiler/testData/ir/irText/expressions/augmentedAssignmentWithExpression.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/augmentedAssignmentWithExpression.fir.ir.txt @@ -12,7 +12,7 @@ FILE fqName: fileName:/augmentedAssignmentWithExpression.kt FUN name:test1 visibility:public modality:FINAL <> ($this:.Host) returnType:kotlin.Unit $this: VALUE_PARAMETER name: type:.Host BLOCK_BODY - CALL 'public final fun plusAssign (x: kotlin.Int): kotlin.Unit declared in .Host' type=kotlin.Unit origin=null + CALL 'public final fun plusAssign (x: kotlin.Int): kotlin.Unit declared in .Host' type=kotlin.Unit origin=PLUSEQ $this: GET_VAR ': .Host declared in .Host.test1' type=.Host origin=null x: CONST Int type=kotlin.Int value=1 FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] @@ -35,18 +35,18 @@ FILE fqName: fileName:/augmentedAssignmentWithExpression.kt FUN name:test2 visibility:public modality:FINAL <> ($receiver:.Host) returnType:kotlin.Unit $receiver: VALUE_PARAMETER name: type:.Host BLOCK_BODY - CALL 'public final fun plusAssign (x: kotlin.Int): kotlin.Unit declared in .Host' type=kotlin.Unit origin=null + CALL 'public final fun plusAssign (x: kotlin.Int): kotlin.Unit declared in .Host' type=kotlin.Unit origin=PLUSEQ $this: GET_VAR ': .Host declared in .test2' type=.Host origin=null x: CONST Int type=kotlin.Int value=1 FUN name:test3 visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY - CALL 'public final fun plusAssign (x: kotlin.Int): kotlin.Unit declared in .Host' type=kotlin.Unit origin=null + CALL 'public final fun plusAssign (x: kotlin.Int): kotlin.Unit declared in .Host' type=kotlin.Unit origin=PLUSEQ $this: CALL 'public final fun foo (): .Host declared in ' type=.Host origin=null x: CONST Int type=kotlin.Int value=1 FUN name:test4 visibility:public modality:FINAL <> (a:kotlin.Function0<.Host>) returnType:kotlin.Unit VALUE_PARAMETER name:a index:0 type:kotlin.Function0<.Host> BLOCK_BODY - CALL 'public final fun plusAssign (x: kotlin.Int): kotlin.Unit declared in .Host' type=kotlin.Unit origin=null + CALL 'public final fun plusAssign (x: kotlin.Int): kotlin.Unit declared in .Host' type=kotlin.Unit origin=PLUSEQ $this: CALL 'public abstract fun invoke (): R of kotlin.Function0 declared in kotlin.Function0' type=.Host origin=INVOKE $this: GET_VAR 'a: kotlin.Function0<.Host> declared in .test4' type=kotlin.Function0<.Host> origin=VARIABLE_AS_FUNCTION x: CONST Int type=kotlin.Int value=1 diff --git a/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.fir.ir.txt b/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.fir.ir.txt index 546da584309..bb40aca467f 100644 --- a/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.fir.ir.txt @@ -247,7 +247,7 @@ FILE fqName: fileName:/complexAugmentedAssignment.kt $receiver: VALUE_PARAMETER name: type:.Host VALUE_PARAMETER name:v index:0 type:.B BLOCK_BODY - CALL 'public final fun plusAssign (b: .B): kotlin.Unit declared in .Host' type=kotlin.Unit origin=null + CALL 'public final fun plusAssign (b: .B): kotlin.Unit declared in .Host' type=kotlin.Unit origin=PLUSEQ $this: GET_VAR ': .Host declared in .test3' type=.Host origin=null $receiver: GET_VAR 'v: .B declared in .test3' type=.B origin=null b: CONSTRUCTOR_CALL 'public constructor (s: kotlin.Int) declared in .B' type=.B origin=null diff --git a/compiler/testData/ir/irText/expressions/kt16904.fir.ir.txt b/compiler/testData/ir/irText/expressions/kt16904.fir.ir.txt index 786549e9653..398bf685f95 100644 --- a/compiler/testData/ir/irText/expressions/kt16904.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/kt16904.fir.ir.txt @@ -77,7 +77,7 @@ FILE fqName: fileName:/kt16904.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in .A' INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Test1 modality:FINAL visibility:public superTypes:[.A]' - CALL 'public final fun plusAssign (x: kotlin.Int): kotlin.Unit declared in .B' type=kotlin.Unit origin=null + CALL 'public final fun plusAssign (x: kotlin.Int): kotlin.Unit declared in .B' type=kotlin.Unit origin=PLUSEQ $this: CALL 'public final fun (): .B declared in .Test1' type=.B origin=GET_PROPERTY $this: GET_VAR ': .Test1 declared in .Test1' type=.Test1 origin=null x: CONST Int type=kotlin.Int value=42 diff --git a/compiler/testData/ir/irText/expressions/kt30020.fir.ir.txt b/compiler/testData/ir/irText/expressions/kt30020.fir.ir.txt index 71062355a41..14bc2310c39 100644 --- a/compiler/testData/ir/irText/expressions/kt30020.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/kt30020.fir.ir.txt @@ -24,29 +24,29 @@ FILE fqName: fileName:/kt30020.kt VALUE_PARAMETER name:x index:0 type:.X VALUE_PARAMETER name:nx index:1 type:.X? BLOCK_BODY - CALL 'public final fun plusAssign (element: T of kotlin.collections.plusAssign): kotlin.Unit declared in kotlin.collections' type=kotlin.Unit origin=null + CALL 'public final fun plusAssign (element: T of kotlin.collections.plusAssign): kotlin.Unit declared in kotlin.collections' type=kotlin.Unit origin=PLUSEQ : kotlin.Int $receiver: CALL 'public abstract fun (): kotlin.collections.MutableList declared in .X' type=kotlin.collections.MutableList origin=GET_PROPERTY $this: GET_VAR 'x: .X declared in .test' type=.X origin=null element: CONST Int type=kotlin.Int value=1 - CALL 'public final fun plusAssign (element: T of kotlin.collections.plusAssign): kotlin.Unit declared in kotlin.collections' type=kotlin.Unit origin=null + CALL 'public final fun plusAssign (element: T of kotlin.collections.plusAssign): kotlin.Unit declared in kotlin.collections' type=kotlin.Unit origin=PLUSEQ : kotlin.Int $receiver: CALL 'public abstract fun f (): kotlin.collections.MutableList declared in .X' type=kotlin.collections.MutableList origin=null $this: GET_VAR 'x: .X declared in .test' type=.X origin=null element: CONST Int type=kotlin.Int value=2 - CALL 'public final fun plusAssign (element: T of kotlin.collections.plusAssign): kotlin.Unit declared in kotlin.collections' type=kotlin.Unit origin=null + CALL 'public final fun plusAssign (element: T of kotlin.collections.plusAssign): kotlin.Unit declared in kotlin.collections' type=kotlin.Unit origin=PLUSEQ : kotlin.Int $receiver: TYPE_OP type=kotlin.collections.MutableList origin=CAST typeOperand=kotlin.collections.MutableList CALL 'public abstract fun (): kotlin.collections.MutableList declared in .X' type=kotlin.collections.MutableList origin=GET_PROPERTY $this: GET_VAR 'x: .X declared in .test' type=.X origin=null element: CONST Int type=kotlin.Int value=3 - CALL 'public final fun plusAssign (element: T of kotlin.collections.plusAssign): kotlin.Unit declared in kotlin.collections' type=kotlin.Unit origin=null + CALL 'public final fun plusAssign (element: T of kotlin.collections.plusAssign): kotlin.Unit declared in kotlin.collections' type=kotlin.Unit origin=PLUSEQ : kotlin.Int $receiver: TYPE_OP type=kotlin.collections.MutableList origin=CAST typeOperand=kotlin.collections.MutableList CALL 'public abstract fun f (): kotlin.collections.MutableList declared in .X' type=kotlin.collections.MutableList origin=null $this: GET_VAR 'x: .X declared in .test' type=.X origin=null element: CONST Int type=kotlin.Int value=4 - CALL 'public final fun plusAssign (element: T of kotlin.collections.plusAssign): kotlin.Unit declared in kotlin.collections' type=kotlin.Unit origin=null + CALL 'public final fun plusAssign (element: T of kotlin.collections.plusAssign): kotlin.Unit declared in kotlin.collections' type=kotlin.Unit origin=PLUSEQ : kotlin.Int $receiver: CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.collections.MutableList origin=EXCLEXCL : kotlin.collections.MutableList @@ -64,7 +64,7 @@ FILE fqName: fileName:/kt30020.kt then: CALL 'public abstract fun (): kotlin.collections.MutableList declared in .X' type=kotlin.collections.MutableList origin=GET_PROPERTY $this: GET_VAR 'val tmp_0: .X? declared in .test' type=.X? origin=null element: CONST Int type=kotlin.Int value=5 - CALL 'public final fun plusAssign (element: T of kotlin.collections.plusAssign): kotlin.Unit declared in kotlin.collections' type=kotlin.Unit origin=null + CALL 'public final fun plusAssign (element: T of kotlin.collections.plusAssign): kotlin.Unit declared in kotlin.collections' type=kotlin.Unit origin=PLUSEQ : kotlin.Int $receiver: CALL 'public final fun CHECK_NOT_NULL (arg0: T0 of kotlin.internal.ir.CHECK_NOT_NULL?): {T0 of kotlin.internal.ir.CHECK_NOT_NULL & Any} declared in kotlin.internal.ir' type=kotlin.collections.MutableList origin=EXCLEXCL : kotlin.collections.MutableList @@ -85,7 +85,7 @@ FILE fqName: fileName:/kt30020.kt FUN name:testExtensionReceiver visibility:public modality:FINAL <> ($receiver:kotlin.collections.MutableList) returnType:kotlin.Unit $receiver: VALUE_PARAMETER name: type:kotlin.collections.MutableList BLOCK_BODY - CALL 'public final fun plusAssign (element: T of kotlin.collections.plusAssign): kotlin.Unit declared in kotlin.collections' type=kotlin.Unit origin=null + CALL 'public final fun plusAssign (element: T of kotlin.collections.plusAssign): kotlin.Unit declared in kotlin.collections' type=kotlin.Unit origin=PLUSEQ : kotlin.Int $receiver: GET_VAR ': kotlin.collections.MutableList declared in .testExtensionReceiver' type=kotlin.collections.MutableList origin=null element: CONST Int type=kotlin.Int value=100 @@ -98,7 +98,7 @@ FILE fqName: fileName:/kt30020.kt FUN name:testExplicitThis visibility:public modality:FINAL <> ($this:.AML) returnType:kotlin.Unit $this: VALUE_PARAMETER name: type:.AML BLOCK_BODY - CALL 'public final fun plusAssign (element: T of kotlin.collections.plusAssign): kotlin.Unit declared in kotlin.collections' type=kotlin.Unit origin=null + CALL 'public final fun plusAssign (element: T of kotlin.collections.plusAssign): kotlin.Unit declared in kotlin.collections' type=kotlin.Unit origin=PLUSEQ : kotlin.Int $receiver: GET_VAR ': .AML declared in .AML.testExplicitThis' type=.AML origin=null element: CONST Int type=kotlin.Int value=200 @@ -112,7 +112,7 @@ FILE fqName: fileName:/kt30020.kt FUN name:testOuterThis visibility:public modality:FINAL <> ($this:.AML.Inner) returnType:kotlin.Unit $this: VALUE_PARAMETER name: type:.AML.Inner BLOCK_BODY - CALL 'public final fun plusAssign (element: T of kotlin.collections.plusAssign): kotlin.Unit declared in kotlin.collections' type=kotlin.Unit origin=null + CALL 'public final fun plusAssign (element: T of kotlin.collections.plusAssign): kotlin.Unit declared in kotlin.collections' type=kotlin.Unit origin=PLUSEQ : kotlin.Int $receiver: GET_VAR ': .AML declared in .AML' type=.AML origin=null element: CONST Int type=kotlin.Int value=300 diff --git a/compiler/testData/ir/irText/expressions/kt45022.fir.ir.txt b/compiler/testData/ir/irText/expressions/kt45022.fir.ir.txt deleted file mode 100644 index 417dfce921c..00000000000 --- a/compiler/testData/ir/irText/expressions/kt45022.fir.ir.txt +++ /dev/null @@ -1,35 +0,0 @@ -FILE fqName: fileName:/kt45022.kt - TYPEALIAS name:AX visibility:public expandedType:.X - FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit - BLOCK_BODY - CALL 'public final fun plusAssign (any: kotlin.Any): kotlin.Unit declared in .X' type=kotlin.Unit origin=null - $this: GET_OBJECT 'CLASS OBJECT name:X modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.X - any: CONST Int type=kotlin.Int value=1 - CALL 'public final fun plusAssign (any: kotlin.Any): kotlin.Unit declared in .X' type=kotlin.Unit origin=null - $this: GET_OBJECT 'CLASS OBJECT name:X modality:FINAL visibility:public superTypes:[kotlin.Any]' type=.X - any: CONST Int type=kotlin.Int value=1 - CLASS OBJECT name:X modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.X - CONSTRUCTOR visibility:private <> () returnType:.X [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS OBJECT name:X modality:FINAL visibility:public superTypes:[kotlin.Any]' - FUN name:plusAssign visibility:public modality:FINAL <> ($this:.X, any:kotlin.Any) returnType:kotlin.Unit [operator] - $this: VALUE_PARAMETER name: type:.X - VALUE_PARAMETER name:any index:0 type:kotlin.Any - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun plusAssign (any: kotlin.Any): kotlin.Unit declared in .X' - GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit - FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] - overridden: - public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - VALUE_PARAMETER name:other index:0 type:kotlin.Any? - FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override] - overridden: - public open fun hashCode (): kotlin.Int declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override] - overridden: - public open fun toString (): kotlin.String declared in kotlin.Any - $this: VALUE_PARAMETER name: type:kotlin.Any diff --git a/compiler/testData/ir/irText/expressions/kt45022.kt b/compiler/testData/ir/irText/expressions/kt45022.kt index b8fd8d7083b..512d8888cb7 100644 --- a/compiler/testData/ir/irText/expressions/kt45022.kt +++ b/compiler/testData/ir/irText/expressions/kt45022.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // SKIP_KT_DUMP typealias AX = X diff --git a/compiler/testData/ir/irText/expressions/kt49203.fir.ir.txt b/compiler/testData/ir/irText/expressions/kt49203.fir.ir.txt index dd406913fed..133d04c0416 100644 --- a/compiler/testData/ir/irText/expressions/kt49203.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/kt49203.fir.ir.txt @@ -140,11 +140,11 @@ FILE fqName: fileName:/kt49203.kt FUN name:test visibility:public modality:FINAL <> (b:.B) returnType:kotlin.Unit VALUE_PARAMETER name:b index:0 type:.B BLOCK_BODY - CALL 'public final fun plusAssign (data: kotlin.String): kotlin.Unit declared in .X' type=kotlin.Unit origin=null + CALL 'public final fun plusAssign (data: kotlin.String): kotlin.Unit declared in .X' type=kotlin.Unit origin=PLUSEQ $this: CALL 'public final fun (): .X declared in .B' type=.X origin=GET_PROPERTY $this: GET_VAR 'b: .B declared in .test' type=.B origin=null data: CONST String type=kotlin.String value="x" - CALL 'public final fun plusAssign (data: kotlin.String): kotlin.Unit declared in .X' type=kotlin.Unit origin=null + CALL 'public final fun plusAssign (data: kotlin.String): kotlin.Unit declared in .X' type=kotlin.Unit origin=PLUSEQ $this: CALL 'public final fun (): .X declared in .B' type=.X origin=GET_PROPERTY $this: GET_VAR 'b: .B declared in .test' type=.B origin=null data: CONST String type=kotlin.String value="y" diff --git a/compiler/testData/ir/irText/expressions/lambdaInCAO.fir.ir.txt b/compiler/testData/ir/irText/expressions/lambdaInCAO.fir.ir.txt index c7695b3f103..92069b1f574 100644 --- a/compiler/testData/ir/irText/expressions/lambdaInCAO.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/lambdaInCAO.fir.ir.txt @@ -17,7 +17,7 @@ FILE fqName: fileName:/lambdaInCAO.kt FUN name:test1 visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit VALUE_PARAMETER name:a index:0 type:kotlin.Any BLOCK_BODY - CALL 'public final fun plusAssign (lambda: kotlin.Function0): kotlin.Unit declared in ' type=kotlin.Unit origin=null + CALL 'public final fun plusAssign (lambda: kotlin.Function0): kotlin.Unit declared in ' type=kotlin.Unit origin=PLUSEQ $receiver: GET_VAR 'a: kotlin.Any declared in .test1' type=kotlin.Any origin=null lambda: FUN_EXPR type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Unit diff --git a/compiler/testData/ir/irText/expressions/sam/samOperators.fir.ir.txt b/compiler/testData/ir/irText/expressions/sam/samOperators.fir.ir.txt index 9fae09d9221..14f07e3d66b 100644 --- a/compiler/testData/ir/irText/expressions/sam/samOperators.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/sam/samOperators.fir.ir.txt @@ -34,11 +34,11 @@ FILE fqName: fileName:/samOperators.kt FUN name:test3 visibility:public modality:FINAL <> ($receiver:.J) returnType:kotlin.Unit $receiver: VALUE_PARAMETER name: type:.J BLOCK_BODY - CALL 'public open fun plusAssign (i: @[FlexibleNullability] java.lang.Runnable?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null + CALL 'public open fun plusAssign (i: @[FlexibleNullability] java.lang.Runnable?): kotlin.Unit declared in .J' type=kotlin.Unit origin=PLUSEQ $this: GET_VAR ': .J declared in .test3' type=.J origin=null i: TYPE_OP type=@[FlexibleNullability] java.lang.Runnable? origin=SAM_CONVERSION typeOperand=@[FlexibleNullability] java.lang.Runnable? FUNCTION_REFERENCE 'public final fun f (): kotlin.Unit declared in ' type=kotlin.reflect.KFunction0 origin=null reflectionTarget= - CALL 'public open fun minusAssign (i: @[FlexibleNullability] java.lang.Runnable?): kotlin.Unit declared in .J' type=kotlin.Unit origin=null + CALL 'public open fun minusAssign (i: @[FlexibleNullability] java.lang.Runnable?): kotlin.Unit declared in .J' type=kotlin.Unit origin=MINUSEQ $this: GET_VAR ': .J declared in .test3' type=.J origin=null i: TYPE_OP type=@[FlexibleNullability] java.lang.Runnable? origin=SAM_CONVERSION typeOperand=@[FlexibleNullability] java.lang.Runnable? FUNCTION_REFERENCE 'public final fun f (): kotlin.Unit declared in ' type=kotlin.reflect.KFunction0 origin=null reflectionTarget= diff --git a/compiler/testData/ir/sourceRanges/augmentedAssignmentWithExpression.fir.txt b/compiler/testData/ir/sourceRanges/augmentedAssignmentWithExpression.fir.txt index f43ede49f19..a084e811a21 100644 --- a/compiler/testData/ir/sourceRanges/augmentedAssignmentWithExpression.fir.txt +++ b/compiler/testData/ir/sourceRanges/augmentedAssignmentWithExpression.fir.txt @@ -11,7 +11,7 @@ @5:4..7:5 FUN name:test1 visibility:public modality:FINAL <> ($this:test.Host) returnType:kotlin.Unit @5:4..7:5 VALUE_PARAMETER name: type:test.Host @5:16..7:5 BLOCK_BODY - @6:8..17 CALL 'public final fun plusAssign (x: kotlin.Int): kotlin.Unit [operator] declared in test.Host' type=kotlin.Unit origin=null + @6:8..17 CALL 'public final fun plusAssign (x: kotlin.Int): kotlin.Unit [operator] declared in test.Host' type=kotlin.Unit origin=PLUSEQ @6:8..12 GET_VAR ': test.Host declared in test.Host.test1' type=test.Host origin=null @6:16..17 CONST Int type=kotlin.Int value=1 @-1:-1..-1 FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] @@ -29,18 +29,18 @@ @12:0..14:1 FUN name:test2 visibility:public modality:FINAL <> ($receiver:test.Host) returnType:kotlin.Unit @12:4..8 VALUE_PARAMETER name: type:test.Host @12:17..14:1 BLOCK_BODY - @13:4..13 CALL 'public final fun plusAssign (x: kotlin.Int): kotlin.Unit [operator] declared in test.Host' type=kotlin.Unit origin=null + @13:4..13 CALL 'public final fun plusAssign (x: kotlin.Int): kotlin.Unit [operator] declared in test.Host' type=kotlin.Unit origin=PLUSEQ @13:4..8 GET_VAR ': test.Host declared in test.test2' type=test.Host origin=null @13:12..13 CONST Int type=kotlin.Int value=1 @16:0..18:1 FUN name:test3 visibility:public modality:FINAL <> () returnType:kotlin.Unit @16:12..18:1 BLOCK_BODY - @17:4..14 CALL 'public final fun plusAssign (x: kotlin.Int): kotlin.Unit [operator] declared in test.Host' type=kotlin.Unit origin=null + @17:4..14 CALL 'public final fun plusAssign (x: kotlin.Int): kotlin.Unit [operator] declared in test.Host' type=kotlin.Unit origin=PLUSEQ @17:4..9 CALL 'public final fun foo (): test.Host declared in test' type=test.Host origin=null @17:13..14 CONST Int type=kotlin.Int value=1 @20:0..22:1 FUN name:test4 visibility:public modality:FINAL <> (a:kotlin.Function0) returnType:kotlin.Unit @20:10..23 VALUE_PARAMETER name:a index:0 type:kotlin.Function0 @20:25..22:1 BLOCK_BODY - @21:4..12 CALL 'public final fun plusAssign (x: kotlin.Int): kotlin.Unit [operator] declared in test.Host' type=kotlin.Unit origin=null + @21:4..12 CALL 'public final fun plusAssign (x: kotlin.Int): kotlin.Unit [operator] declared in test.Host' type=kotlin.Unit origin=PLUSEQ @21:4..7 CALL 'public abstract fun invoke (): R of kotlin.Function0 [operator] declared in kotlin.Function0' type=test.Host origin=INVOKE @21:4..5 GET_VAR 'a: kotlin.Function0 declared in test.test4' type=kotlin.Function0 origin=VARIABLE_AS_FUNCTION @21:11..12 CONST Int type=kotlin.Int value=1