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 4b8bdd92031..28da9f88315 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 @@ -548,11 +548,12 @@ internal fun FirReference.statementOrigin(): IrStatementOrigin? = when (this) { 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 + OperatorNameConventions.PLUS_ASSIGN, OperatorNameConventions.PLUS -> IrStatementOrigin.PLUSEQ + OperatorNameConventions.MINUS_ASSIGN, OperatorNameConventions.MINUS -> IrStatementOrigin.MINUSEQ + OperatorNameConventions.TIMES_ASSIGN, OperatorNameConventions.TIMES -> IrStatementOrigin.MULTEQ + OperatorNameConventions.DIV_ASSIGN, OperatorNameConventions.DIV -> IrStatementOrigin.DIVEQ + OperatorNameConventions.MOD_ASSIGN, OperatorNameConventions.MOD, + OperatorNameConventions.REM_ASSIGN, OperatorNameConventions.REM -> IrStatementOrigin.PERCEQ else -> null } diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/CallAndReferenceGenerator.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/CallAndReferenceGenerator.kt index 49325d8f812..53975669e5e 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/CallAndReferenceGenerator.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/generators/CallAndReferenceGenerator.kt @@ -478,11 +478,23 @@ class CallAndReferenceGenerator( } is IrSimpleFunctionSymbol -> { require(firSymbol is FirCallableSymbol<*>) { "Illegal symbol: ${firSymbol!!::class}" } + val callOrigin = calleeReference.statementOrigin() + /* + * For `x += y` -> `x = x.plus(y)` receiver of call `plus` should also have an augmented assignment origin. + * But it's hard to detect this origin during conversion the receiver itself, so we update it afterward. + */ + if ( + explicitReceiverExpression != null && + calleeReference.source?.kind is KtFakeSourceElementKind.DesugaredCompoundAssignment && + callOrigin != null + ) { + explicitReceiverExpression.updateStatementOrigin(callOrigin) + } IrCallImpl( startOffset, endOffset, irType, symbol, typeArgumentsCount = firSymbol.typeParameterSymbols.size, valueArgumentsCount = firSymbol.valueParametersSize(), - origin = calleeReference.statementOrigin(), + origin = callOrigin, superQualifierSymbol = dispatchReceiver?.superQualifierSymbol() ) } @@ -1343,4 +1355,12 @@ class CallAndReferenceGenerator( "Unresolved reference: ${calleeReference.render()}" ) } + + private fun IrExpression.updateStatementOrigin(newOrigin: IrStatementOrigin) { + when (this) { + is IrFieldAccessExpression -> origin = origin ?: newOrigin + is IrMemberAccessExpression<*> -> origin = origin ?: newOrigin + is IrValueAccessExpression -> origin = origin ?: newOrigin + } + } } diff --git a/compiler/testData/codegen/box/fir/noSymbolForIntRangeIterator.fir.ir.txt b/compiler/testData/codegen/box/fir/noSymbolForIntRangeIterator.fir.ir.txt index 51020f2e92e..eb57c2cc6b1 100644 --- a/compiler/testData/codegen/box/fir/noSymbolForIntRangeIterator.fir.ir.txt +++ b/compiler/testData/codegen/box/fir/noSymbolForIntRangeIterator.fir.ir.txt @@ -43,7 +43,7 @@ FILE fqName: fileName:/noSymbolForIntRangeIterator.kt VALUE_PARAMETER name:it index:0 type:kotlin.String BLOCK_BODY CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.Unit origin=EQ - : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ $this: CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY other: BLOCK type=kotlin.Int origin=ELVIS VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Int? [val] 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 939920c6ba0..d8a0e018dcb 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessCompositeOperators.fir.ir.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/arrayAccessCompositeOperators.fir.ir.txt @@ -125,7 +125,7 @@ FILE fqName: fileName:/arrayAccessCompositeOperators.kt $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=PLUSEQ - $receiver: GET_VAR 'var myContainer: .MyContainer declared in .box' type=.MyContainer origin=null + $receiver: GET_VAR 'var myContainer: .MyContainer declared in .box' type=.MyContainer origin=PLUSEQ $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 i: CALL 'public final fun get ($context_receiver_0: kotlin.Int, index: kotlin.Int): kotlin.Int declared in ' type=kotlin.Int origin=GET_ARRAY_ELEMENT @@ -165,7 +165,7 @@ FILE fqName: fileName:/arrayAccessCompositeOperators.kt VALUE_PARAMETER name:index index:1 type:kotlin.Int BLOCK_BODY CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.Unit origin=EQ - : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ $this: CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY other: GET_VAR '$context_receiver_0: kotlin.Int declared in .get' type=kotlin.Int origin=null RETURN type=kotlin.Nothing from='public final fun get ($context_receiver_0: kotlin.Int, index: kotlin.Int): kotlin.Int declared in ' @@ -185,7 +185,7 @@ FILE fqName: fileName:/arrayAccessCompositeOperators.kt VALUE_PARAMETER name:$context_receiver_0 index:0 type:kotlin.Int BLOCK_BODY CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.Unit origin=EQ - : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ $this: CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY other: GET_VAR '$context_receiver_0: kotlin.Int declared in .inc' type=kotlin.Int origin=null RETURN type=kotlin.Nothing from='public final fun inc ($context_receiver_0: kotlin.Int): .MyContainer declared in ' @@ -201,12 +201,12 @@ FILE fqName: fileName:/arrayAccessCompositeOperators.kt VALUE_PARAMETER name:other index:1 type:.MyContainer BLOCK_BODY CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.Unit origin=EQ - : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ $this: CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY other: GET_VAR '$context_receiver_0: kotlin.Int declared in .plusAssign' type=kotlin.Int origin=null CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in .MyContainer' type=kotlin.Unit origin=EQ $this: GET_VAR ': .MyContainer declared in .plusAssign' type=.MyContainer origin=null - : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ $this: CALL 'public final fun (): kotlin.Int declared in .MyContainer' type=kotlin.Int origin=GET_PROPERTY $this: GET_VAR ': .MyContainer declared in .plusAssign' type=.MyContainer origin=null other: CALL 'public final fun (): kotlin.Int declared in .MyContainer' type=kotlin.Int origin=GET_PROPERTY 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 060beba0f67..501e51a3149 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/compoundAssignmentOperators.fir.ir.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/compoundAssignmentOperators.fir.ir.txt @@ -125,7 +125,7 @@ FILE fqName: 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: .Result): kotlin.Unit declared in ' type=kotlin.Unit origin=PLUSEQ - $receiver: GET_VAR 'val result: .Result declared in .box' type=.Result origin=null + $receiver: GET_VAR 'val result: .Result declared in .box' type=.Result origin=PLUSEQ $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 $receiver: CONSTRUCTOR_CALL 'public constructor (i: kotlin.Int) declared in .Result' type=.Result origin=null @@ -134,7 +134,7 @@ FILE fqName: fileName:/compoundAssignmentOperators.kt 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=MINUSEQ - $receiver: GET_VAR 'val result: .Result declared in .box' type=.Result origin=null + $receiver: GET_VAR 'val result: .Result declared in .box' type=.Result origin=MINUSEQ $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 $receiver: CONSTRUCTOR_CALL 'public constructor (i: kotlin.Int) declared in .Result' type=.Result origin=null @@ -143,7 +143,7 @@ FILE fqName: fileName:/compoundAssignmentOperators.kt 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=MULTEQ - $receiver: GET_VAR 'val result: .Result declared in .box' type=.Result origin=null + $receiver: GET_VAR 'val result: .Result declared in .box' type=.Result origin=MULTEQ $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 $receiver: CONSTRUCTOR_CALL 'public constructor (i: kotlin.Int) declared in .Result' type=.Result origin=null @@ -152,7 +152,7 @@ FILE fqName: fileName:/compoundAssignmentOperators.kt 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=DIVEQ - $receiver: GET_VAR 'val result: .Result declared in .box' type=.Result origin=null + $receiver: GET_VAR 'val result: .Result declared in .box' type=.Result origin=DIVEQ $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 $receiver: CONSTRUCTOR_CALL 'public constructor (i: kotlin.Int) declared in .Result' type=.Result origin=null @@ -186,7 +186,7 @@ FILE fqName: fileName:/compoundAssignmentOperators.kt VALUE_PARAMETER name:other index:1 type:.Result BLOCK_BODY CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.Unit origin=EQ - : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ $this: CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY other: GET_VAR '$context_receiver_0: kotlin.Int declared in .div' type=kotlin.Int origin=null RETURN type=kotlin.Nothing from='public final fun div ($context_receiver_0: kotlin.Int, other: .Result): .Result declared in ' @@ -203,12 +203,12 @@ FILE fqName: fileName:/compoundAssignmentOperators.kt VALUE_PARAMETER name:other index:1 type:.Result BLOCK_BODY CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.Unit origin=EQ - : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ $this: CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY other: GET_VAR '$context_receiver_0: kotlin.Int declared in .divAssign' type=kotlin.Int origin=null CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in .Result' type=kotlin.Unit origin=EQ $this: GET_VAR ': .Result declared in .divAssign' type=.Result origin=null - : CALL 'public final fun div (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun div (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=DIVEQ $this: CALL 'public final fun (): kotlin.Int declared in .Result' type=kotlin.Int origin=GET_PROPERTY $this: GET_VAR ': .Result declared in .divAssign' type=.Result origin=null other: CALL 'public final fun (): kotlin.Int declared in .Result' type=kotlin.Int origin=GET_PROPERTY @@ -220,7 +220,7 @@ FILE fqName: fileName:/compoundAssignmentOperators.kt VALUE_PARAMETER name:other index:1 type:.Result BLOCK_BODY CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.Unit origin=EQ - : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ $this: CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY other: GET_VAR '$context_receiver_0: kotlin.Int declared in .minus' type=kotlin.Int origin=null RETURN type=kotlin.Nothing from='public final fun minus ($context_receiver_0: kotlin.Int, other: .Result): .Result declared in ' @@ -237,12 +237,12 @@ FILE fqName: fileName:/compoundAssignmentOperators.kt VALUE_PARAMETER name:other index:1 type:.Result BLOCK_BODY CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.Unit origin=EQ - : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ $this: CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY other: GET_VAR '$context_receiver_0: kotlin.Int declared in .minusAssign' type=kotlin.Int origin=null CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in .Result' type=kotlin.Unit origin=EQ $this: GET_VAR ': .Result declared in .minusAssign' type=.Result origin=null - : CALL 'public final fun minus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun minus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=MINUSEQ $this: CALL 'public final fun (): kotlin.Int declared in .Result' type=kotlin.Int origin=GET_PROPERTY $this: GET_VAR ': .Result declared in .minusAssign' type=.Result origin=null other: CALL 'public final fun (): kotlin.Int declared in .Result' type=kotlin.Int origin=GET_PROPERTY @@ -254,7 +254,7 @@ FILE fqName: fileName:/compoundAssignmentOperators.kt VALUE_PARAMETER name:other index:1 type:.Result BLOCK_BODY CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.Unit origin=EQ - : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ $this: CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY other: GET_VAR '$context_receiver_0: kotlin.Int declared in .plus' type=kotlin.Int origin=null RETURN type=kotlin.Nothing from='public final fun plus ($context_receiver_0: kotlin.Int, other: .Result): .Result declared in ' @@ -271,12 +271,12 @@ FILE fqName: fileName:/compoundAssignmentOperators.kt VALUE_PARAMETER name:other index:1 type:.Result BLOCK_BODY CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.Unit origin=EQ - : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ $this: CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY other: GET_VAR '$context_receiver_0: kotlin.Int declared in .plusAssign' type=kotlin.Int origin=null CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in .Result' type=kotlin.Unit origin=EQ $this: GET_VAR ': .Result declared in .plusAssign' type=.Result origin=null - : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ $this: CALL 'public final fun (): kotlin.Int declared in .Result' type=kotlin.Int origin=GET_PROPERTY $this: GET_VAR ': .Result declared in .plusAssign' type=.Result origin=null other: CALL 'public final fun (): kotlin.Int declared in .Result' type=kotlin.Int origin=GET_PROPERTY @@ -288,7 +288,7 @@ FILE fqName: fileName:/compoundAssignmentOperators.kt VALUE_PARAMETER name:other index:1 type:.Result BLOCK_BODY CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.Unit origin=EQ - : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ $this: CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY other: GET_VAR '$context_receiver_0: kotlin.Int declared in .times' type=kotlin.Int origin=null RETURN type=kotlin.Nothing from='public final fun times ($context_receiver_0: kotlin.Int, other: .Result): .Result declared in ' @@ -305,12 +305,12 @@ FILE fqName: fileName:/compoundAssignmentOperators.kt VALUE_PARAMETER name:other index:1 type:.Result BLOCK_BODY CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.Unit origin=EQ - : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ $this: CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY other: GET_VAR '$context_receiver_0: kotlin.Int declared in .timesAssign' type=kotlin.Int origin=null CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in .Result' type=kotlin.Unit origin=EQ $this: GET_VAR ': .Result declared in .timesAssign' type=.Result origin=null - : CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=MULTEQ $this: CALL 'public final fun (): kotlin.Int declared in .Result' type=kotlin.Int origin=GET_PROPERTY $this: GET_VAR ': .Result declared in .timesAssign' type=.Result origin=null other: CALL 'public final fun (): kotlin.Int declared in .Result' type=kotlin.Int origin=GET_PROPERTY diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/contextualInlineCall.fir.ir.txt b/compiler/testData/ir/irText/declarations/contextReceivers/contextualInlineCall.fir.ir.txt deleted file mode 100644 index 3d07aec3131..00000000000 --- a/compiler/testData/ir/irText/declarations/contextReceivers/contextualInlineCall.fir.ir.txt +++ /dev/null @@ -1,208 +0,0 @@ -FILE fqName: fileName:/contextualInlineCall.kt - CLASS CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.A - PROPERTY name:a visibility:public modality:FINAL [val] - FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.Any? visibility:private [final] - EXPRESSION_BODY - GET_VAR 'a: kotlin.Any? declared in .A.' type=kotlin.Any? origin=INITIALIZE_PROPERTY_FROM_PARAMETER - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:.A) returnType:kotlin.Any? - correspondingProperty: PROPERTY name:a visibility:public modality:FINAL [val] - $this: VALUE_PARAMETER name: type:.A - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Any? declared in .A' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.Any? visibility:private [final]' type=kotlin.Any? origin=null - receiver: GET_VAR ': .A declared in .A.' type=.A origin=null - CONSTRUCTOR visibility:public <> (a:kotlin.Any?) returnType:.A [primary] - VALUE_PARAMETER name:a index:0 type:kotlin.Any? - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Any]' - 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 - CLASS CLASS name:Context modality:FINAL visibility:public superTypes:[kotlin.Any] - $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Context - CONSTRUCTOR visibility:public <> () returnType:.Context [primary] - BLOCK_BODY - DELEGATING_CONSTRUCTOR_CALL 'public constructor () declared in kotlin.Any' - INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Context modality:FINAL visibility:public superTypes:[kotlin.Any]' - 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 - FUN name:c visibility:public modality:FINAL <> ($this:.Context) returnType:kotlin.Int - $this: VALUE_PARAMETER name: type:.Context - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun c (): kotlin.Int declared in .Context' - CONST Int type=kotlin.Int value=1 - FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in ' - CALL 'public final fun with (receiver: T of kotlin.with, block: @[ExtensionFunctionType] kotlin.Function1): R of kotlin.with declared in kotlin' type=kotlin.Nothing origin=null - : .Context - : kotlin.Nothing - receiver: CONSTRUCTOR_CALL 'public constructor () declared in .Context' type=.Context origin=null - block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1<.Context, kotlin.Nothing> origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:.Context) returnType:kotlin.Nothing - $receiver: VALUE_PARAMETER name:$this$with type:.Context - BLOCK_BODY - VAR name:result type:kotlin.Int [var] - CONST Int type=kotlin.Int value=0 - SET_VAR 'var result: kotlin.Int declared in .box.' type=kotlin.Unit origin=PLUSEQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var result: kotlin.Int declared in .box.' type=kotlin.Int origin=null - other: CALL 'public final fun testInline ($context_receiver_0: .Context): kotlin.Int declared in ' type=kotlin.Int origin=null - $context_receiver_0: GET_VAR '$this$with: .Context declared in .box.' type=.Context origin=null - SET_VAR 'var result: kotlin.Int declared in .box.' type=kotlin.Unit origin=PLUSEQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var result: kotlin.Int declared in .box.' type=kotlin.Int origin=null - other: CALL 'public final fun testInlineWithArg ($context_receiver_0: .Context, i: kotlin.Int): kotlin.Int declared in ' type=kotlin.Int origin=null - $context_receiver_0: GET_VAR '$this$with: .Context declared in .box.' type=.Context origin=null - i: CONST Int type=kotlin.Int value=1 - SET_VAR 'var result: kotlin.Int declared in .box.' type=kotlin.Unit origin=PLUSEQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var result: kotlin.Int declared in .box.' type=kotlin.Int origin=null - other: CALL 'public final fun testInlineWithExtensionAndArg ($context_receiver_0: .Context, i: kotlin.Int): kotlin.Int declared in ' type=kotlin.Int origin=null - $receiver: CONST Int type=kotlin.Int value=1 - $context_receiver_0: GET_VAR '$this$with: .Context declared in .box.' type=.Context origin=null - i: CONST Int type=kotlin.Int value=1 - SET_VAR 'var result: kotlin.Int declared in .box.' type=kotlin.Unit origin=PLUSEQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var result: kotlin.Int declared in .box.' type=kotlin.Int origin=null - other: CALL 'public final fun testInlineWithExtensionAndMultipleArgs ($context_receiver_0: .Context, i1: kotlin.Int, i2: kotlin.Int): kotlin.Int declared in ' type=kotlin.Int origin=null - $receiver: CONST Int type=kotlin.Int value=1 - $context_receiver_0: GET_VAR '$this$with: .Context declared in .box.' type=.Context origin=null - i1: CONST Int type=kotlin.Int value=1 - i2: CONST Int type=kotlin.Int value=2 - CALL 'public final fun with (receiver: T of kotlin.with, block: @[ExtensionFunctionType] kotlin.Function1): R of kotlin.with declared in kotlin' type=kotlin.Unit origin=null - : .A - : kotlin.Unit - receiver: CONSTRUCTOR_CALL 'public constructor (a: kotlin.Any?) declared in .A' type=.A origin=null - a: CONST Int type=kotlin.Int value=1 - block: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1<.A, kotlin.Unit> origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:.A) returnType:kotlin.Unit - $receiver: VALUE_PARAMETER name:$this$with type:.A - BLOCK_BODY - SET_VAR 'var result: kotlin.Int declared in .box.' type=kotlin.Unit origin=PLUSEQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var result: kotlin.Int declared in .box.' type=kotlin.Int origin=null - other: CALL 'public final fun testInlineWithExtensionAndMultipleContextsAndArgs ($context_receiver_0: .Context, $context_receiver_1: .A, i1: kotlin.Int, i2: kotlin.Int): kotlin.Int declared in ' type=kotlin.Int origin=null - $receiver: CONST Int type=kotlin.Int value=1 - $context_receiver_0: GET_VAR '$this$with: .Context declared in .box.' type=.Context origin=null - $context_receiver_1: GET_VAR '$this$with: .A declared in .box..' type=.A origin=null - i1: CONST Int type=kotlin.Int value=1 - i2: CONST Int type=kotlin.Int value=2 - SET_VAR 'var result: kotlin.Int declared in .box.' type=kotlin.Unit origin=PLUSEQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var result: kotlin.Int declared in .box.' type=kotlin.Int origin=null - other: CALL 'public final fun testInlineWithExtensionAndMultipleContextsAndArgs ($context_receiver_0: .Context, $context_receiver_1: .A, i1: kotlin.Int, i2: kotlin.Int): kotlin.Int declared in ' type=kotlin.Int origin=null - $receiver: CONST Int type=kotlin.Int value=1 - $context_receiver_0: GET_VAR '$this$with: .Context declared in .box.' type=.Context origin=null - $context_receiver_1: GET_VAR '$this$with: .A declared in .box..' type=.A origin=null - RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in ' - WHEN type=kotlin.String origin=IF - BRANCH - if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'var result: kotlin.Int declared in .box.' type=kotlin.Int origin=null - arg1: CONST Int type=kotlin.Int value=23 - then: CONST String type=kotlin.String value="OK" - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: CONST String type=kotlin.String value="fail" - FUN name:testInline visibility:public modality:FINAL <> ($context_receiver_0:.Context) returnType:kotlin.Int [inline] - contextReceiverParametersCount: 1 - VALUE_PARAMETER name:$context_receiver_0 index:0 type:.Context - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun testInline ($context_receiver_0: .Context): kotlin.Int declared in ' - CALL 'public final fun c (): kotlin.Int declared in .Context' type=kotlin.Int origin=null - $this: GET_VAR '$context_receiver_0: .Context declared in .testInline' type=.Context origin=null - FUN name:testInlineWithArg visibility:public modality:FINAL <> ($context_receiver_0:.Context, i:kotlin.Int) returnType:kotlin.Int [inline] - contextReceiverParametersCount: 1 - VALUE_PARAMETER name:$context_receiver_0 index:0 type:.Context - VALUE_PARAMETER name:i index:1 type:kotlin.Int - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun testInlineWithArg ($context_receiver_0: .Context, i: kotlin.Int): kotlin.Int declared in ' - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUS - $this: GET_VAR 'i: kotlin.Int declared in .testInlineWithArg' type=kotlin.Int origin=null - other: CALL 'public final fun c (): kotlin.Int declared in .Context' type=kotlin.Int origin=null - $this: GET_VAR '$context_receiver_0: .Context declared in .testInlineWithArg' type=.Context origin=null - FUN name:testInlineWithExtensionAndArg visibility:public modality:FINAL <> ($receiver:kotlin.Int, $context_receiver_0:.Context, i:kotlin.Int) returnType:kotlin.Int [inline] - contextReceiverParametersCount: 1 - $receiver: VALUE_PARAMETER name: type:kotlin.Int - VALUE_PARAMETER name:$context_receiver_0 index:0 type:.Context - VALUE_PARAMETER name:i index:1 type:kotlin.Int - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun testInlineWithExtensionAndArg ($context_receiver_0: .Context, i: kotlin.Int): kotlin.Int declared in ' - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUS - $this: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUS - $this: GET_VAR ': kotlin.Int declared in .testInlineWithExtensionAndArg' type=kotlin.Int origin=null - other: GET_VAR 'i: kotlin.Int declared in .testInlineWithExtensionAndArg' type=kotlin.Int origin=null - other: CALL 'public final fun c (): kotlin.Int declared in .Context' type=kotlin.Int origin=null - $this: GET_VAR '$context_receiver_0: .Context declared in .testInlineWithExtensionAndArg' type=.Context origin=null - FUN name:testInlineWithExtensionAndMultipleArgs visibility:public modality:FINAL <> ($receiver:kotlin.Int, $context_receiver_0:.Context, i1:kotlin.Int, i2:kotlin.Int) returnType:kotlin.Int [inline] - contextReceiverParametersCount: 1 - $receiver: VALUE_PARAMETER name: type:kotlin.Int - VALUE_PARAMETER name:$context_receiver_0 index:0 type:.Context - VALUE_PARAMETER name:i1 index:1 type:kotlin.Int - VALUE_PARAMETER name:i2 index:2 type:kotlin.Int - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun testInlineWithExtensionAndMultipleArgs ($context_receiver_0: .Context, i1: kotlin.Int, i2: kotlin.Int): kotlin.Int declared in ' - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUS - $this: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUS - $this: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUS - $this: GET_VAR ': kotlin.Int declared in .testInlineWithExtensionAndMultipleArgs' type=kotlin.Int origin=null - other: GET_VAR 'i1: kotlin.Int declared in .testInlineWithExtensionAndMultipleArgs' type=kotlin.Int origin=null - other: GET_VAR 'i2: kotlin.Int declared in .testInlineWithExtensionAndMultipleArgs' type=kotlin.Int origin=null - other: CALL 'public final fun c (): kotlin.Int declared in .Context' type=kotlin.Int origin=null - $this: GET_VAR '$context_receiver_0: .Context declared in .testInlineWithExtensionAndMultipleArgs' type=.Context origin=null - FUN name:testInlineWithExtensionAndMultipleContextsAndArgs visibility:public modality:FINAL <> ($receiver:kotlin.Int, $context_receiver_0:.Context, $context_receiver_1:.A, i1:kotlin.Int, i2:kotlin.Int) returnType:kotlin.Int [inline] - contextReceiverParametersCount: 2 - $receiver: VALUE_PARAMETER name: type:kotlin.Int - VALUE_PARAMETER name:$context_receiver_0 index:0 type:.Context - VALUE_PARAMETER name:$context_receiver_1 index:1 type:.A - VALUE_PARAMETER name:i1 index:2 type:kotlin.Int - EXPRESSION_BODY - CONST Int type=kotlin.Int value=1 - VALUE_PARAMETER name:i2 index:3 type:kotlin.Int - EXPRESSION_BODY - CONST Int type=kotlin.Int value=2 - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun testInlineWithExtensionAndMultipleContextsAndArgs ($context_receiver_0: .Context, $context_receiver_1: .A, i1: kotlin.Int, i2: kotlin.Int): kotlin.Int declared in ' - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUS - $this: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUS - $this: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUS - $this: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUS - $this: GET_VAR ': kotlin.Int declared in .testInlineWithExtensionAndMultipleContextsAndArgs' type=kotlin.Int origin=null - other: GET_VAR 'i1: kotlin.Int declared in .testInlineWithExtensionAndMultipleContextsAndArgs' type=kotlin.Int origin=null - other: GET_VAR 'i2: kotlin.Int declared in .testInlineWithExtensionAndMultipleContextsAndArgs' type=kotlin.Int origin=null - other: CALL 'public final fun c (): kotlin.Int declared in .Context' type=kotlin.Int origin=null - $this: GET_VAR '$context_receiver_0: .Context declared in .testInlineWithExtensionAndMultipleContextsAndArgs' type=.Context origin=null - other: WHEN type=kotlin.Int origin=IF - BRANCH - if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: CALL 'public final fun (): kotlin.Any? declared in .A' type=kotlin.Any? origin=GET_PROPERTY - $this: GET_VAR '$context_receiver_1: .A declared in .testInlineWithExtensionAndMultipleContextsAndArgs' type=.A origin=null - arg1: CONST Null type=kotlin.Nothing? value=null - then: CONST Int type=kotlin.Int value=0 - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: CONST Int type=kotlin.Int value=1 diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/contextualInlineCall.fir.kt.txt b/compiler/testData/ir/irText/declarations/contextReceivers/contextualInlineCall.fir.kt.txt deleted file mode 100644 index a06137781af..00000000000 --- a/compiler/testData/ir/irText/declarations/contextReceivers/contextualInlineCall.fir.kt.txt +++ /dev/null @@ -1,69 +0,0 @@ -class A { - val a: Any? - field = a - get - - constructor(a: Any?) /* primary */ { - super/*Any*/() - /* () */ - - } - -} - -class Context { - constructor() /* primary */ { - super/*Any*/() - /* () */ - - } - - fun c(): Int { - return 1 - } - -} - -fun box(): String { - return with(receiver = Context(), block = local fun Context.(): Nothing { - var result: Int = 0 - result = result.plus(other = testInline($context_receiver_0 = $this$with)) - result = result.plus(other = testInlineWithArg($context_receiver_0 = $this$with, i = 1)) - result = result.plus(other = 1.testInlineWithExtensionAndArg($context_receiver_0 = $this$with, i = 1)) - result = result.plus(other = 1.testInlineWithExtensionAndMultipleArgs($context_receiver_0 = $this$with, i1 = 1, i2 = 2)) - with(receiver = A(a = 1), block = local fun A.() { - result = result.plus(other = 1.testInlineWithExtensionAndMultipleContextsAndArgs($context_receiver_0 = $this$with, $context_receiver_1 = $this$with, i1 = 1, i2 = 2)) - result = result.plus(other = 1.testInlineWithExtensionAndMultipleContextsAndArgs($context_receiver_0 = $this$with, $context_receiver_1 = $this$with)) - } -) - return when { - EQEQ(arg0 = result, arg1 = 23) -> "OK" - else -> "fail" - } - } -) -} - -inline fun testInline($context_receiver_0: Context): Int { - return $context_receiver_0.c() -} - -inline fun testInlineWithArg($context_receiver_0: Context, i: Int): Int { - return i.plus(other = $context_receiver_0.c()) -} - -inline fun Int.testInlineWithExtensionAndArg($context_receiver_0: Context, i: Int): Int { - return .plus(other = i).plus(other = $context_receiver_0.c()) -} - -inline fun Int.testInlineWithExtensionAndMultipleArgs($context_receiver_0: Context, i1: Int, i2: Int): Int { - return .plus(other = i1).plus(other = i2).plus(other = $context_receiver_0.c()) -} - -inline fun Int.testInlineWithExtensionAndMultipleContextsAndArgs($context_receiver_0: Context, $context_receiver_1: A, i1: Int = 1, i2: Int = 2): Int { - return .plus(other = i1).plus(other = i2).plus(other = $context_receiver_0.c()).plus(other = when { - EQEQ(arg0 = $context_receiver_1.(), arg1 = null) -> 0 - else -> 1 - }) -} - diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/contextualInlineCall.kt b/compiler/testData/ir/irText/declarations/contextReceivers/contextualInlineCall.kt index d6cb032ba65..f447670e651 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/contextualInlineCall.kt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/contextualInlineCall.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // !LANGUAGE: +ContextReceivers class Context { diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/delegatedPropertiesOperators.fir.ir.txt b/compiler/testData/ir/irText/declarations/contextReceivers/delegatedPropertiesOperators.fir.ir.txt index d8d08e47033..c81c61d402b 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/delegatedPropertiesOperators.fir.ir.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/delegatedPropertiesOperators.fir.ir.txt @@ -60,7 +60,7 @@ FILE fqName: fileName:/delegatedPropertiesOperators.kt VALUE_PARAMETER name:property index:2 type:kotlin.reflect.KProperty<*> BLOCK_BODY CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.Unit origin=EQ - : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ $this: CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY other: GET_VAR '$context_receiver_0: kotlin.Int declared in .Delegate.getValue' type=kotlin.Int origin=null RETURN type=kotlin.Nothing from='public final fun getValue ($context_receiver_0: kotlin.Int, thisRef: kotlin.Any?, property: kotlin.reflect.KProperty<*>): kotlin.String declared in .Delegate' @@ -75,7 +75,7 @@ FILE fqName: fileName:/delegatedPropertiesOperators.kt VALUE_PARAMETER name:value index:3 type:kotlin.String BLOCK_BODY CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.Unit origin=EQ - : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ $this: CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY other: GET_VAR '$context_receiver_0: kotlin.Int declared in .Delegate.setValue' type=kotlin.Int origin=null CALL 'public final fun (: kotlin.String): kotlin.Unit declared in .Delegate' type=kotlin.Unit origin=EQ diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/iteratorOperator.fir.ir.txt b/compiler/testData/ir/irText/declarations/contextReceivers/iteratorOperator.fir.ir.txt index dd1770b16db..22678a0bb26 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/iteratorOperator.fir.ir.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/iteratorOperator.fir.ir.txt @@ -282,8 +282,8 @@ FILE fqName: fileName:/iteratorOperator.kt $this: GET_VAR 'val tmp_4: .CounterIterator declared in .box.' type=.CounterIterator origin=null BLOCK type=kotlin.Unit origin=null SET_VAR 'var result: kotlin.Int declared in .box' type=kotlin.Unit origin=PLUSEQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var result: kotlin.Int declared in .box' type=kotlin.Int origin=null + CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ + $this: GET_VAR 'var result: kotlin.Int declared in .box' type=kotlin.Int origin=PLUSEQ other: GET_VAR 'val i: kotlin.Int declared in .box.' type=kotlin.Int origin=null RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in ' WHEN type=kotlin.String origin=IF diff --git a/compiler/testData/ir/irText/declarations/contextReceivers/unaryOperators.fir.ir.txt b/compiler/testData/ir/irText/declarations/contextReceivers/unaryOperators.fir.ir.txt index b72d79dea87..e90272bf5ec 100644 --- a/compiler/testData/ir/irText/declarations/contextReceivers/unaryOperators.fir.ir.txt +++ b/compiler/testData/ir/irText/declarations/contextReceivers/unaryOperators.fir.ir.txt @@ -177,7 +177,7 @@ FILE fqName: fileName:/unaryOperators.kt VALUE_PARAMETER name:$context_receiver_0 index:0 type:kotlin.Int BLOCK_BODY CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.Unit origin=EQ - : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ $this: CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY other: GET_VAR '$context_receiver_0: kotlin.Int declared in .dec' type=kotlin.Int origin=null RETURN type=kotlin.Nothing from='public final fun dec ($context_receiver_0: kotlin.Int): .Result declared in ' @@ -192,7 +192,7 @@ FILE fqName: fileName:/unaryOperators.kt VALUE_PARAMETER name:$context_receiver_0 index:0 type:kotlin.Int BLOCK_BODY CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.Unit origin=EQ - : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ $this: CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY other: GET_VAR '$context_receiver_0: kotlin.Int declared in .inc' type=kotlin.Int origin=null RETURN type=kotlin.Nothing from='public final fun inc ($context_receiver_0: kotlin.Int): .Result declared in ' @@ -207,7 +207,7 @@ FILE fqName: fileName:/unaryOperators.kt VALUE_PARAMETER name:$context_receiver_0 index:0 type:kotlin.Int BLOCK_BODY CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.Unit origin=EQ - : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ $this: CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY other: GET_VAR '$context_receiver_0: kotlin.Int declared in .unaryMinus' type=kotlin.Int origin=null RETURN type=kotlin.Nothing from='public final fun unaryMinus ($context_receiver_0: kotlin.Int): .Result declared in ' @@ -221,7 +221,7 @@ FILE fqName: fileName:/unaryOperators.kt VALUE_PARAMETER name:$context_receiver_0 index:0 type:kotlin.Int BLOCK_BODY CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.Unit origin=EQ - : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ $this: CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY other: GET_VAR '$context_receiver_0: kotlin.Int declared in .unaryPlus' type=kotlin.Int origin=null RETURN type=kotlin.Nothing from='public final fun unaryPlus ($context_receiver_0: kotlin.Int): .Result declared in ' diff --git a/compiler/testData/ir/irText/declarations/delegate/delegationEvaluationOrder1.fir.ir.txt b/compiler/testData/ir/irText/declarations/delegate/delegationEvaluationOrder1.fir.ir.txt index 17546733cdf..2093dd641b6 100644 --- a/compiler/testData/ir/irText/declarations/delegate/delegationEvaluationOrder1.fir.ir.txt +++ b/compiler/testData/ir/irText/declarations/delegate/delegationEvaluationOrder1.fir.ir.txt @@ -66,7 +66,7 @@ FILE fqName:foo fileName:/delegationEvaluationOrder1.kt ANONYMOUS_INITIALIZER isStatic=false BLOCK_BODY CALL 'public final fun (: kotlin.String): kotlin.Unit declared in foo' type=kotlin.Unit origin=EQ - : CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=null + : CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=PLUSEQ $this: CALL 'public final fun (): kotlin.String declared in foo' type=kotlin.String origin=GET_PROPERTY other: CONST String type=kotlin.String value=":Derived" CONSTRUCTOR visibility:public <> () returnType:foo.Derived [primary] @@ -108,7 +108,7 @@ FILE fqName:foo fileName:/delegationEvaluationOrder1.kt ANONYMOUS_INITIALIZER isStatic=false BLOCK_BODY CALL 'public final fun (: kotlin.String): kotlin.Unit declared in foo' type=kotlin.Unit origin=EQ - : CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=null + : CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=PLUSEQ $this: CALL 'public final fun (): kotlin.String declared in foo' type=kotlin.String origin=GET_PROPERTY other: CONST String type=kotlin.String value=":Derived" CONSTRUCTOR visibility:public <> () returnType:foo.Derived1 [primary] @@ -147,7 +147,7 @@ FILE fqName:foo fileName:/delegationEvaluationOrder1.kt ANONYMOUS_INITIALIZER isStatic=false BLOCK_BODY CALL 'public final fun (: kotlin.String): kotlin.Unit declared in foo' type=kotlin.Unit origin=EQ - : CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=null + : CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=PLUSEQ $this: CALL 'public final fun (): kotlin.String declared in foo' type=kotlin.String origin=GET_PROPERTY other: CONST String type=kotlin.String value=":DerivedBase" CONSTRUCTOR visibility:public <> () returnType:foo.DerivedBase [primary] @@ -196,7 +196,7 @@ FILE fqName:foo fileName:/delegationEvaluationOrder1.kt FUN name:newBase visibility:public modality:FINAL <> () returnType:foo.Base BLOCK_BODY CALL 'public final fun (: kotlin.String): kotlin.Unit declared in foo' type=kotlin.Unit origin=EQ - : CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=null + : CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=PLUSEQ $this: CALL 'public final fun (): kotlin.String declared in foo' type=kotlin.String origin=GET_PROPERTY other: CONST String type=kotlin.String value=":newBase" RETURN type=kotlin.Nothing from='public final fun newBase (): foo.Base declared in foo' diff --git a/compiler/testData/ir/irText/declarations/delegate/delegationEvaluationOrder2.fir.ir.txt b/compiler/testData/ir/irText/declarations/delegate/delegationEvaluationOrder2.fir.ir.txt index 9fd7b745ebd..c899aed7423 100644 --- a/compiler/testData/ir/irText/declarations/delegate/delegationEvaluationOrder2.fir.ir.txt +++ b/compiler/testData/ir/irText/declarations/delegate/delegationEvaluationOrder2.fir.ir.txt @@ -113,7 +113,7 @@ FILE fqName:foo fileName:/delegationEvaluationOrder2.kt ANONYMOUS_INITIALIZER isStatic=false BLOCK_BODY CALL 'public final fun (: kotlin.String): kotlin.Unit declared in foo' type=kotlin.Unit origin=EQ - : CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=null + : CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=PLUSEQ $this: CALL 'public final fun (): kotlin.String declared in foo' type=kotlin.String origin=GET_PROPERTY other: CONST String type=kotlin.String value=":Derived" CONSTRUCTOR visibility:public <> () returnType:foo.Derived [primary] @@ -172,7 +172,7 @@ FILE fqName:foo fileName:/delegationEvaluationOrder2.kt ANONYMOUS_INITIALIZER isStatic=false BLOCK_BODY CALL 'public final fun (: kotlin.String): kotlin.Unit declared in foo' type=kotlin.Unit origin=EQ - : CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=null + : CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=PLUSEQ $this: CALL 'public final fun (): kotlin.String declared in foo' type=kotlin.String origin=GET_PROPERTY other: CONST String type=kotlin.String value=":Derived" CONSTRUCTOR visibility:public <> () returnType:foo.Derived1 [primary] @@ -231,7 +231,7 @@ FILE fqName:foo fileName:/delegationEvaluationOrder2.kt ANONYMOUS_INITIALIZER isStatic=false BLOCK_BODY CALL 'public final fun (: kotlin.String): kotlin.Unit declared in foo' type=kotlin.Unit origin=EQ - : CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=null + : CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=PLUSEQ $this: CALL 'public final fun (): kotlin.String declared in foo' type=kotlin.String origin=GET_PROPERTY other: CONST String type=kotlin.String value=":Derived" CONSTRUCTOR visibility:public <> () returnType:foo.Derived2 [primary] @@ -284,7 +284,7 @@ FILE fqName:foo fileName:/delegationEvaluationOrder2.kt ANONYMOUS_INITIALIZER isStatic=false BLOCK_BODY CALL 'public final fun (: kotlin.String): kotlin.Unit declared in foo' type=kotlin.Unit origin=EQ - : CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=null + : CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=PLUSEQ $this: CALL 'public final fun (): kotlin.String declared in foo' type=kotlin.String origin=GET_PROPERTY other: CONST String type=kotlin.String value=":DerivedBase" CONSTRUCTOR visibility:public <> () returnType:foo.DerivedBase [primary] @@ -353,7 +353,7 @@ FILE fqName:foo fileName:/delegationEvaluationOrder2.kt FUN name:newBase visibility:public modality:FINAL <> () returnType:foo.Base BLOCK_BODY CALL 'public final fun (: kotlin.String): kotlin.Unit declared in foo' type=kotlin.Unit origin=EQ - : CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=null + : CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=PLUSEQ $this: CALL 'public final fun (): kotlin.String declared in foo' type=kotlin.String origin=GET_PROPERTY other: CONST String type=kotlin.String value=":newBase" RETURN type=kotlin.Nothing from='public final fun newBase (): foo.Base declared in foo' @@ -362,7 +362,7 @@ FILE fqName:foo fileName:/delegationEvaluationOrder2.kt FUN name:newBase2 visibility:public modality:FINAL <> () returnType:foo.Base2 BLOCK_BODY CALL 'public final fun (: kotlin.String): kotlin.Unit declared in foo' type=kotlin.Unit origin=EQ - : CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=null + : CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=PLUSEQ $this: CALL 'public final fun (): kotlin.String declared in foo' type=kotlin.String origin=GET_PROPERTY other: CONST String type=kotlin.String value=":newBase2" RETURN type=kotlin.Nothing from='public final fun newBase2 (): foo.Base2 declared in foo' diff --git a/compiler/testData/ir/irText/declarations/kt47527.fir.ir.txt b/compiler/testData/ir/irText/declarations/kt47527.fir.ir.txt index 7dfeef85bb3..3dc866c1ab4 100644 --- a/compiler/testData/ir/irText/declarations/kt47527.fir.ir.txt +++ b/compiler/testData/ir/irText/declarations/kt47527.fir.ir.txt @@ -4,8 +4,8 @@ FILE fqName: fileName:/kt47527.kt VAR name:result type:kotlin.String [var] CONST String type=kotlin.String value="" SET_VAR 'var result: kotlin.String declared in .box' type=kotlin.Unit origin=EQ - CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=null - $this: GET_VAR 'var result: kotlin.String declared in .box' type=kotlin.String origin=null + CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=PLUSEQ + $this: GET_VAR 'var result: kotlin.String declared in .box' type=kotlin.String origin=PLUSEQ other: BLOCK type=kotlin.String origin=ELVIS VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.String? [val] CALL 'public final fun test_1 (value: kotlin.Any?): kotlin.String? declared in ' type=kotlin.String? origin=null @@ -21,8 +21,8 @@ FILE fqName: fileName:/kt47527.kt if: CONST Boolean type=kotlin.Boolean value=true then: GET_VAR 'val tmp_0: kotlin.String? declared in .box' type=kotlin.String? origin=null SET_VAR 'var result: kotlin.String declared in .box' type=kotlin.Unit origin=EQ - CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=null - $this: GET_VAR 'var result: kotlin.String declared in .box' type=kotlin.String origin=null + CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=PLUSEQ + $this: GET_VAR 'var result: kotlin.String declared in .box' type=kotlin.String origin=PLUSEQ other: BLOCK type=kotlin.String origin=ELVIS VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.String? [val] CALL 'public final fun test_2 (value: kotlin.Any?): kotlin.String? declared in ' type=kotlin.String? origin=null diff --git a/compiler/testData/ir/irText/declarations/localDelegatedProperties.fir.ir.txt b/compiler/testData/ir/irText/declarations/localDelegatedProperties.fir.ir.txt index 31c49bfd258..9e8efc4c885 100644 --- a/compiler/testData/ir/irText/declarations/localDelegatedProperties.fir.ir.txt +++ b/compiler/testData/ir/irText/declarations/localDelegatedProperties.fir.ir.txt @@ -57,6 +57,6 @@ FILE fqName: fileName:/localDelegatedProperties.kt $this: GET_VAR 'val tmp_0: kotlin.Int declared in .test2' type=kotlin.Int origin=null GET_VAR 'val tmp_0: kotlin.Int declared in .test2' type=kotlin.Int origin=null CALL 'local final fun (: kotlin.Int): kotlin.Unit declared in .test2' type=kotlin.Unit origin=PLUSEQ - : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ $this: CALL 'local final fun (): kotlin.Int declared in .test2' type=kotlin.Int origin=GET_LOCAL_PROPERTY other: CONST Int type=kotlin.Int value=1 diff --git a/compiler/testData/ir/irText/expressions/augmentedAssignment1.fir.ir.txt b/compiler/testData/ir/irText/expressions/augmentedAssignment1.fir.ir.txt index ce4d4fe3985..26ea0a3a4c8 100644 --- a/compiler/testData/ir/irText/expressions/augmentedAssignment1.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/augmentedAssignment1.fir.ir.txt @@ -17,23 +17,23 @@ FILE fqName: fileName:/augmentedAssignment1.kt FUN name:testProperty visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.Unit origin=EQ - : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ $this: CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY other: CONST Int type=kotlin.Int value=1 CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.Unit origin=EQ - : CALL 'public final fun minus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun minus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=MINUSEQ $this: CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY other: CONST Int type=kotlin.Int value=2 CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.Unit origin=EQ - : CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=MULTEQ $this: CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY other: CONST Int type=kotlin.Int value=3 CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.Unit origin=EQ - : CALL 'public final fun div (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun div (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=DIVEQ $this: CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY other: CONST Int type=kotlin.Int value=4 CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in ' type=kotlin.Unit origin=EQ - : CALL 'public final fun rem (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun rem (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PERCEQ $this: CALL 'public final fun (): kotlin.Int declared in ' type=kotlin.Int origin=GET_PROPERTY other: CONST Int type=kotlin.Int value=5 FUN name:testVariable visibility:public modality:FINAL <> () returnType:kotlin.Unit @@ -41,22 +41,22 @@ FILE fqName: fileName:/augmentedAssignment1.kt VAR name:x type:kotlin.Int [var] CONST Int type=kotlin.Int value=0 SET_VAR 'var x: kotlin.Int declared in .testVariable' type=kotlin.Unit origin=PLUSEQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var x: kotlin.Int declared in .testVariable' type=kotlin.Int origin=null + CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ + $this: GET_VAR 'var x: kotlin.Int declared in .testVariable' type=kotlin.Int origin=PLUSEQ other: CONST Int type=kotlin.Int value=1 SET_VAR 'var x: kotlin.Int declared in .testVariable' type=kotlin.Unit origin=MINUSEQ - CALL 'public final fun minus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var x: kotlin.Int declared in .testVariable' type=kotlin.Int origin=null + CALL 'public final fun minus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=MINUSEQ + $this: GET_VAR 'var x: kotlin.Int declared in .testVariable' type=kotlin.Int origin=MINUSEQ other: CONST Int type=kotlin.Int value=2 SET_VAR 'var x: kotlin.Int declared in .testVariable' type=kotlin.Unit origin=EQ - CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var x: kotlin.Int declared in .testVariable' type=kotlin.Int origin=null + CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=MULTEQ + $this: GET_VAR 'var x: kotlin.Int declared in .testVariable' type=kotlin.Int origin=MULTEQ other: CONST Int type=kotlin.Int value=3 SET_VAR 'var x: kotlin.Int declared in .testVariable' type=kotlin.Unit origin=EQ - CALL 'public final fun div (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var x: kotlin.Int declared in .testVariable' type=kotlin.Int origin=null + CALL 'public final fun div (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=DIVEQ + $this: GET_VAR 'var x: kotlin.Int declared in .testVariable' type=kotlin.Int origin=DIVEQ other: CONST Int type=kotlin.Int value=4 SET_VAR 'var x: kotlin.Int declared in .testVariable' type=kotlin.Unit origin=EQ - CALL 'public final fun rem (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var x: kotlin.Int declared in .testVariable' type=kotlin.Int origin=null + CALL 'public final fun rem (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PERCEQ + $this: GET_VAR 'var x: kotlin.Int declared in .testVariable' type=kotlin.Int origin=PERCEQ other: CONST Int type=kotlin.Int value=5 diff --git a/compiler/testData/ir/irText/expressions/augmentedAssignment2.fir.ir.txt b/compiler/testData/ir/irText/expressions/augmentedAssignment2.fir.ir.txt index 834e28ff81f..f7cec0424be 100644 --- a/compiler/testData/ir/irText/expressions/augmentedAssignment2.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/augmentedAssignment2.fir.ir.txt @@ -65,19 +65,19 @@ FILE fqName: fileName:/augmentedAssignment2.kt 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=PLUSEQ - $receiver: GET_VAR 'val a: .A declared in .testVariable' type=.A origin=null + $receiver: GET_VAR 'val a: .A declared in .testVariable' type=.A origin=PLUSEQ s: CONST String type=kotlin.String value="+=" 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 + $receiver: GET_VAR 'val a: .A declared in .testVariable' type=.A origin=MINUSEQ s: CONST String type=kotlin.String value="-=" 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 + $receiver: GET_VAR 'val a: .A declared in .testVariable' type=.A origin=MULTEQ s: CONST String type=kotlin.String value="*=" 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 + $receiver: GET_VAR 'val a: .A declared in .testVariable' type=.A origin=DIVEQ s: CONST String type=kotlin.String value="/=" 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 + $receiver: GET_VAR 'val a: .A declared in .testVariable' type=.A origin=PERCEQ s: CONST String type=kotlin.String value="*=" FUN name:timesAssign visibility:public modality:FINAL <> ($receiver:.A, s:kotlin.String) returnType:kotlin.Unit [operator] $receiver: VALUE_PARAMETER name: type:.A diff --git a/compiler/testData/ir/irText/expressions/augmentedAssignmentWithExpression.fir.ir.txt b/compiler/testData/ir/irText/expressions/augmentedAssignmentWithExpression.fir.ir.txt index 9dfdfc5920d..4028f82ee40 100644 --- a/compiler/testData/ir/irText/expressions/augmentedAssignmentWithExpression.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/augmentedAssignmentWithExpression.fir.ir.txt @@ -26,7 +26,7 @@ FILE fqName: fileName:/augmentedAssignmentWithExpression.kt $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=PLUSEQ - $this: GET_VAR ': .Host declared in .Host.test1' type=.Host origin=null + $this: GET_VAR ': .Host declared in .Host.test1' type=.Host origin=PLUSEQ x: CONST Int type=kotlin.Int value=1 FUN name:foo visibility:public modality:FINAL <> () returnType:.Host BLOCK_BODY @@ -36,12 +36,12 @@ FILE fqName: fileName:/augmentedAssignmentWithExpression.kt $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=PLUSEQ - $this: GET_VAR ': .Host declared in .test2' type=.Host origin=null + $this: GET_VAR ': .Host declared in .test2' type=.Host origin=PLUSEQ 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=PLUSEQ - $this: CALL 'public final fun foo (): .Host declared in ' type=.Host origin=null + $this: CALL 'public final fun foo (): .Host declared in ' type=.Host origin=PLUSEQ 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> diff --git a/compiler/testData/ir/irText/expressions/breakContinueInWhen.fir.ir.txt b/compiler/testData/ir/irText/expressions/breakContinueInWhen.fir.ir.txt index fea24a107f0..52353fc5268 100644 --- a/compiler/testData/ir/irText/expressions/breakContinueInWhen.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/breakContinueInWhen.fir.ir.txt @@ -83,8 +83,8 @@ FILE fqName: fileName:/breakContinueInWhen.kt arg1: CONST Int type=kotlin.Int value=2 then: CONTINUE label=null loop.label=null SET_VAR 'var s: kotlin.String declared in .testContinueDoWhile' type=kotlin.Unit origin=EQ - CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=null - $this: GET_VAR 'var s: kotlin.String declared in .testContinueDoWhile' type=kotlin.String origin=null + CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=PLUSEQ + $this: GET_VAR 'var s: kotlin.String declared in .testContinueDoWhile' type=kotlin.String origin=PLUSEQ other: STRING_CONCATENATION type=kotlin.String GET_VAR 'var k: kotlin.Int declared in .testContinueDoWhile' type=kotlin.Int origin=null CONST String type=kotlin.String value=";" diff --git a/compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.fir.ir.txt b/compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.fir.ir.txt deleted file mode 100644 index 632536e66db..00000000000 --- a/compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.fir.ir.txt +++ /dev/null @@ -1,94 +0,0 @@ -FILE fqName: fileName:/withVarargViewedAsArray.kt - FUN name:nsum visibility:public modality:FINAL <> (args:kotlin.Array) returnType:kotlin.Int - VALUE_PARAMETER name:args index:0 type:kotlin.Array varargElementType:kotlin.Number [vararg] - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun nsum (vararg args: kotlin.Number): kotlin.Int declared in ' - CALL 'public final fun sum (vararg args: kotlin.Int): kotlin.Int declared in ' type=kotlin.Int origin=null - args: VARARG type=kotlin.IntArray varargElementType=kotlin.Int - SPREAD_ELEMENT - CONSTRUCTOR_CALL 'public constructor (size: kotlin.Int, init: kotlin.Function1) declared in kotlin.IntArray' type=kotlin.IntArray origin=null - size: CALL 'public final fun (): kotlin.Int declared in kotlin.Array' type=kotlin.Int origin=GET_PROPERTY - $this: GET_VAR 'args: kotlin.Array declared in .nsum' type=kotlin.Array origin=null - init: FUN_EXPR type=kotlin.Function1 origin=LAMBDA - FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:kotlin.Int) returnType:kotlin.Int - VALUE_PARAMETER name:it index:0 type:kotlin.Int - BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun (it: kotlin.Int): kotlin.Int declared in .nsum' - CALL 'public abstract fun toInt (): kotlin.Int declared in kotlin.Number' type=kotlin.Int origin=null - $this: CALL 'public final fun get (index: kotlin.Int): T of kotlin.Array declared in kotlin.Array' type=kotlin.Number origin=GET_ARRAY_ELEMENT - $this: GET_VAR 'args: kotlin.Array declared in .nsum' type=kotlin.Array origin=null - index: GET_VAR 'it: kotlin.Int declared in .nsum.' type=kotlin.Int origin=null - FUN name:sum visibility:public modality:FINAL <> (args:kotlin.IntArray) returnType:kotlin.Int - VALUE_PARAMETER name:args index:0 type:kotlin.IntArray varargElementType:kotlin.Int [vararg] - BLOCK_BODY - VAR name:result type:kotlin.Int [var] - CONST Int type=kotlin.Int value=0 - BLOCK type=kotlin.Unit origin=FOR_LOOP - VAR FOR_LOOP_ITERATOR name:tmp_0 type:kotlin.collections.IntIterator [val] - CALL 'public final fun iterator (): kotlin.collections.IntIterator declared in kotlin.IntArray' type=kotlin.collections.IntIterator origin=FOR_LOOP_ITERATOR - $this: GET_VAR 'args: kotlin.IntArray declared in .sum' type=kotlin.IntArray origin=null - WHILE label=null origin=FOR_LOOP_INNER_WHILE - condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.IntIterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT - $this: GET_VAR 'val tmp_0: kotlin.collections.IntIterator declared in .sum' type=kotlin.collections.IntIterator origin=null - body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE - VAR FOR_LOOP_VARIABLE name:arg type:kotlin.Int [val] - CALL 'public final fun next (): kotlin.Int declared in kotlin.collections.IntIterator' type=kotlin.Int origin=FOR_LOOP_NEXT - $this: GET_VAR 'val tmp_0: kotlin.collections.IntIterator declared in .sum' type=kotlin.collections.IntIterator origin=null - SET_VAR 'var result: kotlin.Int declared in .sum' type=kotlin.Unit origin=PLUSEQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var result: kotlin.Int declared in .sum' type=kotlin.Int origin=null - other: GET_VAR 'val arg: kotlin.Int declared in .sum' type=kotlin.Int origin=null - RETURN type=kotlin.Nothing from='public final fun sum (vararg args: kotlin.Int): kotlin.Int declared in ' - GET_VAR 'var result: kotlin.Int declared in .sum' type=kotlin.Int origin=null - FUN name:testArrayAndDefaults visibility:public modality:FINAL <> () returnType:kotlin.Unit - BLOCK_BODY - CALL 'public final fun useStringArray (fn: kotlin.Function1, kotlin.Unit>): kotlin.Unit declared in ' type=kotlin.Unit origin=null - fn: BLOCK type=kotlin.Function1, kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE - FUN ADAPTER_FOR_CALLABLE_REFERENCE name:zap visibility:local modality:FINAL <> (p0:kotlin.Array) returnType:kotlin.Unit - VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Array - BLOCK_BODY - CALL 'public final fun zap (vararg b: kotlin.String, k: kotlin.Int): kotlin.Unit declared in ' type=kotlin.Unit origin=null - b: VARARG type=kotlin.Array varargElementType=kotlin.String - SPREAD_ELEMENT - GET_VAR 'p0: kotlin.Array declared in .testArrayAndDefaults.zap' type=kotlin.Array origin=null - FUNCTION_REFERENCE 'local final fun zap (p0: kotlin.Array): kotlin.Unit declared in .testArrayAndDefaults' type=kotlin.Function1, kotlin.Unit> origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun zap (vararg b: kotlin.String, k: kotlin.Int): kotlin.Unit declared in - FUN name:testArrayAsVararg visibility:public modality:FINAL <> () returnType:kotlin.Unit - BLOCK_BODY - CALL 'public final fun useArray (fn: kotlin.Function1, kotlin.Int>): kotlin.Unit declared in ' type=kotlin.Unit origin=null - fn: FUNCTION_REFERENCE 'public final fun nsum (vararg args: kotlin.Number): kotlin.Int declared in ' type=kotlin.reflect.KFunction1, kotlin.Int> origin=null reflectionTarget= - FUN name:testPlainArgs visibility:public modality:FINAL <> () returnType:kotlin.Unit - BLOCK_BODY - CALL 'public final fun usePlainArgs (fn: kotlin.Function2): kotlin.Unit declared in ' type=kotlin.Unit origin=null - fn: BLOCK type=kotlin.Function2 origin=ADAPTED_FUNCTION_REFERENCE - FUN ADAPTER_FOR_CALLABLE_REFERENCE name:sum visibility:local modality:FINAL <> (p0:kotlin.Int, p1:kotlin.Int) returnType:kotlin.Int - VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.Int - VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p1 index:1 type:kotlin.Int - BLOCK_BODY - RETURN type=kotlin.Nothing from='local final fun sum (p0: kotlin.Int, p1: kotlin.Int): kotlin.Int declared in .testPlainArgs' - CALL 'public final fun sum (vararg args: kotlin.Int): kotlin.Int declared in ' type=kotlin.Int origin=null - args: VARARG type=kotlin.IntArray varargElementType=kotlin.Int - GET_VAR 'p0: kotlin.Int declared in .testPlainArgs.sum' type=kotlin.Int origin=null - GET_VAR 'p1: kotlin.Int declared in .testPlainArgs.sum' type=kotlin.Int origin=null - FUNCTION_REFERENCE 'local final fun sum (p0: kotlin.Int, p1: kotlin.Int): kotlin.Int declared in .testPlainArgs' type=kotlin.Function2 origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun sum (vararg args: kotlin.Int): kotlin.Int declared in - FUN name:testPrimitiveArrayAsVararg visibility:public modality:FINAL <> () returnType:kotlin.Unit - BLOCK_BODY - CALL 'public final fun usePrimitiveArray (fn: kotlin.Function1): kotlin.Unit declared in ' type=kotlin.Unit origin=null - fn: FUNCTION_REFERENCE 'public final fun sum (vararg args: kotlin.Int): kotlin.Int declared in ' type=kotlin.reflect.KFunction1 origin=null reflectionTarget= - FUN name:useArray visibility:public modality:FINAL <> (fn:kotlin.Function1, kotlin.Int>) returnType:kotlin.Unit - VALUE_PARAMETER name:fn index:0 type:kotlin.Function1, kotlin.Int> - BLOCK_BODY - FUN name:usePlainArgs visibility:public modality:FINAL <> (fn:kotlin.Function2) returnType:kotlin.Unit - VALUE_PARAMETER name:fn index:0 type:kotlin.Function2 - BLOCK_BODY - FUN name:usePrimitiveArray visibility:public modality:FINAL <> (fn:kotlin.Function1) returnType:kotlin.Unit - VALUE_PARAMETER name:fn index:0 type:kotlin.Function1 - BLOCK_BODY - FUN name:useStringArray visibility:public modality:FINAL <> (fn:kotlin.Function1, kotlin.Unit>) returnType:kotlin.Unit - VALUE_PARAMETER name:fn index:0 type:kotlin.Function1, kotlin.Unit> - BLOCK_BODY - FUN name:zap visibility:public modality:FINAL <> (b:kotlin.Array, k:kotlin.Int) returnType:kotlin.Unit - VALUE_PARAMETER name:b index:0 type:kotlin.Array varargElementType:kotlin.String [vararg] - VALUE_PARAMETER name:k index:1 type:kotlin.Int - EXPRESSION_BODY - CONST Int type=kotlin.Int value=42 - BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.fir.kt.txt b/compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.fir.kt.txt deleted file mode 100644 index 0efc3c3c939..00000000000 --- a/compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.fir.kt.txt +++ /dev/null @@ -1,62 +0,0 @@ -fun nsum(vararg args: Number): Int { - return sum(args = [*IntArray(size = args.(), init = local fun (it: Int): Int { - return args.get(index = it).toInt() - } -)]) -} - -fun sum(vararg args: Int): Int { - var result: Int = 0 - { // BLOCK - val tmp_0: IntIterator = args.iterator() - while (tmp_0.hasNext()) { // BLOCK - val arg: Int = tmp_0.next() - result = result.plus(other = arg) - } - } - return result -} - -fun testArrayAndDefaults() { - useStringArray(fn = { // BLOCK - local fun zap(p0: Array) { - zap(b = [*p0]) - } - - ::zap - }) -} - -fun testArrayAsVararg() { - useArray(fn = ::nsum) -} - -fun testPlainArgs() { - usePlainArgs(fn = { // BLOCK - local fun sum(p0: Int, p1: Int): Int { - return sum(args = [p0, p1]) - } - - ::sum - }) -} - -fun testPrimitiveArrayAsVararg() { - usePrimitiveArray(fn = ::sum) -} - -fun useArray(fn: Function1, Int>) { -} - -fun usePlainArgs(fn: Function2) { -} - -fun usePrimitiveArray(fn: Function1) { -} - -fun useStringArray(fn: Function1, Unit>) { -} - -fun zap(vararg b: String, k: Int = 42) { -} - diff --git a/compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.kt b/compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.kt index b73d421b400..b40c3d7625e 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.kt +++ b/compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL fun sum(vararg args: Int): Int { var result = 0 for (arg in args) diff --git a/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.fir.ir.txt b/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.fir.ir.txt index 5d954351324..b2d92090a1c 100644 --- a/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.fir.ir.txt @@ -66,7 +66,7 @@ FILE fqName: fileName:/complexAugmentedAssignment.kt BLOCK_BODY CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in .B' type=kotlin.Unit origin=EQ $this: GET_VAR ': .B declared in .Host.plusAssign' type=.B origin=null - : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ $this: CALL 'public final fun (): kotlin.Int declared in .B' type=kotlin.Int origin=GET_PROPERTY $this: GET_VAR ': .B declared in .Host.plusAssign' type=.B origin=null other: CALL 'public final fun (): kotlin.Int declared in .B' type=kotlin.Int origin=GET_PROPERTY @@ -249,6 +249,6 @@ FILE fqName: fileName:/complexAugmentedAssignment.kt BLOCK_BODY 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 + $receiver: GET_VAR 'v: .B declared in .test3' type=.B origin=PLUSEQ b: CONSTRUCTOR_CALL 'public constructor (s: kotlin.Int) declared in .B' type=.B origin=null s: CONST Int type=kotlin.Int value=1000 diff --git a/compiler/testData/ir/irText/expressions/field.fir.ir.txt b/compiler/testData/ir/irText/expressions/field.fir.ir.txt deleted file mode 100644 index 336253dd059..00000000000 --- a/compiler/testData/ir/irText/expressions/field.fir.ir.txt +++ /dev/null @@ -1,33 +0,0 @@ -FILE fqName: fileName:/field.kt - PROPERTY name:testSimple visibility:public modality:FINAL [var] - FIELD PROPERTY_BACKING_FIELD name:testSimple type:kotlin.Int visibility:private [static] - EXPRESSION_BODY - CONST Int type=kotlin.Int value=0 - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Int - correspondingProperty: PROPERTY name:testSimple visibility:public modality:FINAL [var] - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in ' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:testSimple type:kotlin.Int visibility:private [static]' type=kotlin.Int origin=null - FUN name: visibility:public modality:FINAL <> (value:kotlin.Int) returnType:kotlin.Unit - correspondingProperty: PROPERTY name:testSimple visibility:public modality:FINAL [var] - VALUE_PARAMETER name:value index:0 type:kotlin.Int - BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:testSimple type:kotlin.Int visibility:private [static]' type=kotlin.Unit origin=EQ - value: GET_VAR 'value: kotlin.Int declared in .' type=kotlin.Int origin=null - PROPERTY name:testAugmented visibility:public modality:FINAL [var] - FIELD PROPERTY_BACKING_FIELD name:testAugmented type:kotlin.Int visibility:private [static] - EXPRESSION_BODY - CONST Int type=kotlin.Int value=0 - FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Int - correspondingProperty: PROPERTY name:testAugmented visibility:public modality:FINAL [var] - BLOCK_BODY - RETURN type=kotlin.Nothing from='public final fun (): kotlin.Int declared in ' - GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:testAugmented type:kotlin.Int visibility:private [static]' type=kotlin.Int origin=null - FUN name: visibility:public modality:FINAL <> (value:kotlin.Int) returnType:kotlin.Unit - correspondingProperty: PROPERTY name:testAugmented visibility:public modality:FINAL [var] - VALUE_PARAMETER name:value index:0 type:kotlin.Int - BLOCK_BODY - SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:testAugmented type:kotlin.Int visibility:private [static]' type=kotlin.Unit origin=PLUSEQ - value: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:testAugmented type:kotlin.Int visibility:private [static]' type=kotlin.Int origin=null - other: GET_VAR 'value: kotlin.Int declared in .' type=kotlin.Int origin=null diff --git a/compiler/testData/ir/irText/expressions/field.fir.kt.txt b/compiler/testData/ir/irText/expressions/field.fir.kt.txt deleted file mode 100644 index 810d860b9b1..00000000000 --- a/compiler/testData/ir/irText/expressions/field.fir.kt.txt +++ /dev/null @@ -1,13 +0,0 @@ -var testSimple: Int - field = 0 - get - set(value: Int) { - #testSimple = value - } - -var testAugmented: Int - field = 0 - get - set(value: Int) { - #testAugmented = #testAugmented.plus(other = value) - } diff --git a/compiler/testData/ir/irText/expressions/field.kt b/compiler/testData/ir/irText/expressions/field.kt index 0b217296122..c3f95fffb10 100644 --- a/compiler/testData/ir/irText/expressions/field.kt +++ b/compiler/testData/ir/irText/expressions/field.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL var testSimple: Int = 0 set(value) { field = value diff --git a/compiler/testData/ir/irText/expressions/ifWithAssignment.fir.ir.txt b/compiler/testData/ir/irText/expressions/ifWithAssignment.fir.ir.txt deleted file mode 100644 index 9eb5fd1fc9d..00000000000 --- a/compiler/testData/ir/irText/expressions/ifWithAssignment.fir.ir.txt +++ /dev/null @@ -1,121 +0,0 @@ -FILE fqName: fileName:/ifWithAssignment.kt - FUN name:topLevelMethod visibility:public modality:FINAL <> () returnType:kotlin.Unit - BLOCK_BODY - VAR name:z type:kotlin.Int [var] - CONST Int type=kotlin.Int value=1 - WHEN type=kotlin.Unit origin=IF - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: BLOCK type=kotlin.Unit origin=null - SET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Unit origin=EQ - CONST Int type=kotlin.Int value=2 - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: BLOCK type=kotlin.Unit origin=null - SET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Unit origin=EQ - CONST Int type=kotlin.Int value=3 - WHEN type=kotlin.Unit origin=IF - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: SET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Unit origin=EQ - CONST Int type=kotlin.Int value=4 - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: SET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Unit origin=EQ - CONST Int type=kotlin.Int value=5 - WHEN type=kotlin.Unit origin=IF - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: BLOCK type=kotlin.Unit origin=null - SET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Unit origin=PLUSEQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - other: CONST Int type=kotlin.Int value=6 - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: BLOCK type=kotlin.Unit origin=null - SET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Unit origin=PLUSEQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - other: CONST Int type=kotlin.Int value=7 - WHEN type=kotlin.Unit origin=IF - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: SET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Unit origin=PLUSEQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - other: CONST Int type=kotlin.Int value=8 - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: SET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Unit origin=PLUSEQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - other: CONST Int type=kotlin.Int value=9 - BLOCK type=kotlin.Unit origin=WHEN - VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.Int [val] - GET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - WHEN type=kotlin.Unit origin=WHEN - BRANCH - if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val tmp_0: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - arg1: CONST Int type=kotlin.Int value=1 - then: BLOCK type=kotlin.Unit origin=null - SET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Unit origin=EQ - CONST Int type=kotlin.Int value=10 - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: BLOCK type=kotlin.Unit origin=null - SET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Unit origin=EQ - CONST Int type=kotlin.Int value=11 - BLOCK type=kotlin.Unit origin=WHEN - VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Int [val] - GET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - WHEN type=kotlin.Unit origin=WHEN - BRANCH - if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val tmp_1: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - arg1: CONST Int type=kotlin.Int value=1 - then: SET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Unit origin=EQ - CONST Int type=kotlin.Int value=12 - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: SET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Unit origin=EQ - CONST Int type=kotlin.Int value=13 - BLOCK type=kotlin.Unit origin=WHEN - VAR IR_TEMPORARY_VARIABLE name:tmp_2 type:kotlin.Int [val] - GET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - WHEN type=kotlin.Unit origin=WHEN - BRANCH - if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val tmp_2: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - arg1: CONST Int type=kotlin.Int value=1 - then: BLOCK type=kotlin.Unit origin=null - SET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Unit origin=PLUSEQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - other: CONST Int type=kotlin.Int value=14 - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: BLOCK type=kotlin.Unit origin=null - SET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Unit origin=PLUSEQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - other: CONST Int type=kotlin.Int value=15 - BLOCK type=kotlin.Unit origin=WHEN - VAR IR_TEMPORARY_VARIABLE name:tmp_3 type:kotlin.Int [val] - GET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - WHEN type=kotlin.Unit origin=WHEN - BRANCH - if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val tmp_3: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - arg1: CONST Int type=kotlin.Int value=1 - then: SET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Unit origin=PLUSEQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - other: CONST Int type=kotlin.Int value=16 - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: SET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Unit origin=PLUSEQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - other: CONST Int type=kotlin.Int value=17 diff --git a/compiler/testData/ir/irText/expressions/ifWithAssignment.fir.kt.txt b/compiler/testData/ir/irText/expressions/ifWithAssignment.fir.kt.txt deleted file mode 100644 index 7f39276f2c1..00000000000 --- a/compiler/testData/ir/irText/expressions/ifWithAssignment.fir.kt.txt +++ /dev/null @@ -1,63 +0,0 @@ -fun topLevelMethod() { - var z: Int = 1 - when { - true -> { // BLOCK - z = 2 - } - else -> { // BLOCK - z = 3 - } - } - when { - true -> z = 4 - else -> z = 5 - } - when { - true -> { // BLOCK - z = z.plus(other = 6) - } - else -> { // BLOCK - z = z.plus(other = 7) - } - } - when { - true -> z = z.plus(other = 8) - else -> z = z.plus(other = 9) - } - { // BLOCK - val tmp_0: Int = z - when { - EQEQ(arg0 = tmp_0, arg1 = 1) -> { // BLOCK - z = 10 - } - else -> { // BLOCK - z = 11 - } - } - } - { // BLOCK - val tmp_1: Int = z - when { - EQEQ(arg0 = tmp_1, arg1 = 1) -> z = 12 - else -> z = 13 - } - } - { // BLOCK - val tmp_2: Int = z - when { - EQEQ(arg0 = tmp_2, arg1 = 1) -> { // BLOCK - z = z.plus(other = 14) - } - else -> { // BLOCK - z = z.plus(other = 15) - } - } - } - { // BLOCK - val tmp_3: Int = z - when { - EQEQ(arg0 = tmp_3, arg1 = 1) -> z = z.plus(other = 16) - else -> z = z.plus(other = 17) - } - } -} diff --git a/compiler/testData/ir/irText/expressions/ifWithAssignment.kt b/compiler/testData/ir/irText/expressions/ifWithAssignment.kt index c0fc1b1d7ce..06813a7d4dd 100644 --- a/compiler/testData/ir/irText/expressions/ifWithAssignment.kt +++ b/compiler/testData/ir/irText/expressions/ifWithAssignment.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL fun topLevelMethod() { var z = 1 if(true) { z = 2 } else { z = 3 } diff --git a/compiler/testData/ir/irText/expressions/ifWithLoop.fir.ir.txt b/compiler/testData/ir/irText/expressions/ifWithLoop.fir.ir.txt deleted file mode 100644 index 83b58deabad..00000000000 --- a/compiler/testData/ir/irText/expressions/ifWithLoop.fir.ir.txt +++ /dev/null @@ -1,355 +0,0 @@ -FILE fqName: fileName:/ifWithLoop.kt - FUN name:topLevelMethod visibility:public modality:FINAL <> () returnType:kotlin.Unit - BLOCK_BODY - VAR name:z type:kotlin.Int [var] - CONST Int type=kotlin.Int value=1 - WHEN type=kotlin.Unit origin=IF - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: BLOCK type=kotlin.Unit origin=null - BLOCK type=kotlin.Unit origin=FOR_LOOP - VAR FOR_LOOP_ITERATOR name:tmp_0 type:kotlin.collections.IntIterator [val] - CALL 'public open fun iterator (): kotlin.collections.IntIterator declared in kotlin.ranges.IntRange' type=kotlin.collections.IntIterator origin=FOR_LOOP_ITERATOR - $this: CALL 'public final fun rangeTo (other: kotlin.Int): kotlin.ranges.IntRange declared in kotlin.Int' type=kotlin.ranges.IntRange origin=RANGE - $this: CONST Int type=kotlin.Int value=0 - other: CONST Int type=kotlin.Int value=2 - WHILE label=null origin=FOR_LOOP_INNER_WHILE - condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.IntIterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT - $this: GET_VAR 'val tmp_0: kotlin.collections.IntIterator declared in .topLevelMethod' type=kotlin.collections.IntIterator origin=null - body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE - VAR FOR_LOOP_VARIABLE name:i type:kotlin.Int [val] - CALL 'public final fun next (): kotlin.Int declared in kotlin.collections.IntIterator' type=kotlin.Int origin=FOR_LOOP_NEXT - $this: GET_VAR 'val tmp_0: kotlin.collections.IntIterator declared in .topLevelMethod' type=kotlin.collections.IntIterator origin=null - SET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Unit origin=PLUSEQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - other: GET_VAR 'val i: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: BLOCK type=kotlin.Unit origin=null - BLOCK type=kotlin.Unit origin=FOR_LOOP - VAR FOR_LOOP_ITERATOR name:tmp_1 type:kotlin.collections.IntIterator [val] - CALL 'public open fun iterator (): kotlin.collections.IntIterator declared in kotlin.ranges.IntRange' type=kotlin.collections.IntIterator origin=FOR_LOOP_ITERATOR - $this: CALL 'public final fun rangeTo (other: kotlin.Int): kotlin.ranges.IntRange declared in kotlin.Int' type=kotlin.ranges.IntRange origin=RANGE - $this: CONST Int type=kotlin.Int value=0 - other: CONST Int type=kotlin.Int value=3 - WHILE label=null origin=FOR_LOOP_INNER_WHILE - condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.IntIterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT - $this: GET_VAR 'val tmp_1: kotlin.collections.IntIterator declared in .topLevelMethod' type=kotlin.collections.IntIterator origin=null - body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE - VAR FOR_LOOP_VARIABLE name:i type:kotlin.Int [val] - CALL 'public final fun next (): kotlin.Int declared in kotlin.collections.IntIterator' type=kotlin.Int origin=FOR_LOOP_NEXT - $this: GET_VAR 'val tmp_1: kotlin.collections.IntIterator declared in .topLevelMethod' type=kotlin.collections.IntIterator origin=null - SET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Unit origin=PLUSEQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - other: GET_VAR 'val i: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - WHEN type=kotlin.Unit origin=IF - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: BLOCK type=kotlin.Unit origin=FOR_LOOP - VAR FOR_LOOP_ITERATOR name:tmp_2 type:kotlin.collections.IntIterator [val] - CALL 'public open fun iterator (): kotlin.collections.IntIterator declared in kotlin.ranges.IntRange' type=kotlin.collections.IntIterator origin=FOR_LOOP_ITERATOR - $this: CALL 'public final fun rangeTo (other: kotlin.Int): kotlin.ranges.IntRange declared in kotlin.Int' type=kotlin.ranges.IntRange origin=RANGE - $this: CONST Int type=kotlin.Int value=0 - other: CONST Int type=kotlin.Int value=4 - WHILE label=null origin=FOR_LOOP_INNER_WHILE - condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.IntIterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT - $this: GET_VAR 'val tmp_2: kotlin.collections.IntIterator declared in .topLevelMethod' type=kotlin.collections.IntIterator origin=null - body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE - VAR FOR_LOOP_VARIABLE name:i type:kotlin.Int [val] - CALL 'public final fun next (): kotlin.Int declared in kotlin.collections.IntIterator' type=kotlin.Int origin=FOR_LOOP_NEXT - $this: GET_VAR 'val tmp_2: kotlin.collections.IntIterator declared in .topLevelMethod' type=kotlin.collections.IntIterator origin=null - SET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Unit origin=PLUSEQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - other: GET_VAR 'val i: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: BLOCK type=kotlin.Unit origin=FOR_LOOP - VAR FOR_LOOP_ITERATOR name:tmp_3 type:kotlin.collections.IntIterator [val] - CALL 'public open fun iterator (): kotlin.collections.IntIterator declared in kotlin.ranges.IntRange' type=kotlin.collections.IntIterator origin=FOR_LOOP_ITERATOR - $this: CALL 'public final fun rangeTo (other: kotlin.Int): kotlin.ranges.IntRange declared in kotlin.Int' type=kotlin.ranges.IntRange origin=RANGE - $this: CONST Int type=kotlin.Int value=0 - other: CONST Int type=kotlin.Int value=5 - WHILE label=null origin=FOR_LOOP_INNER_WHILE - condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.IntIterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT - $this: GET_VAR 'val tmp_3: kotlin.collections.IntIterator declared in .topLevelMethod' type=kotlin.collections.IntIterator origin=null - body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE - VAR FOR_LOOP_VARIABLE name:i type:kotlin.Int [val] - CALL 'public final fun next (): kotlin.Int declared in kotlin.collections.IntIterator' type=kotlin.Int origin=FOR_LOOP_NEXT - $this: GET_VAR 'val tmp_3: kotlin.collections.IntIterator declared in .topLevelMethod' type=kotlin.collections.IntIterator origin=null - SET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Unit origin=PLUSEQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - other: GET_VAR 'val i: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - WHEN type=kotlin.Unit origin=IF - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: BLOCK type=kotlin.Unit origin=null - WHILE label=null origin=WHILE_LOOP - condition: CONST Boolean type=kotlin.Boolean value=false - body: SET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Unit origin=PLUSEQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - other: CONST Int type=kotlin.Int value=6 - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: BLOCK type=kotlin.Unit origin=null - WHILE label=null origin=WHILE_LOOP - condition: CONST Boolean type=kotlin.Boolean value=false - body: SET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Unit origin=PLUSEQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - other: CONST Int type=kotlin.Int value=7 - WHEN type=kotlin.Unit origin=IF - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: WHILE label=null origin=WHILE_LOOP - condition: CONST Boolean type=kotlin.Boolean value=false - body: SET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Unit origin=PLUSEQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - other: CONST Int type=kotlin.Int value=8 - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: WHILE label=null origin=WHILE_LOOP - condition: CONST Boolean type=kotlin.Boolean value=false - body: SET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Unit origin=PLUSEQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - other: CONST Int type=kotlin.Int value=9 - WHEN type=kotlin.Unit origin=IF - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: BLOCK type=kotlin.Unit origin=null - BLOCK type=kotlin.Unit origin=null - DO_WHILE label=null origin=DO_WHILE_LOOP - body: COMPOSITE type=kotlin.Unit origin=null - SET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Unit origin=PLUSEQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - other: CONST Int type=kotlin.Int value=10 - condition: CONST Boolean type=kotlin.Boolean value=false - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: BLOCK type=kotlin.Unit origin=null - BLOCK type=kotlin.Unit origin=null - DO_WHILE label=null origin=DO_WHILE_LOOP - body: COMPOSITE type=kotlin.Unit origin=null - SET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Unit origin=PLUSEQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - other: CONST Int type=kotlin.Int value=11 - condition: CONST Boolean type=kotlin.Boolean value=false - WHEN type=kotlin.Unit origin=IF - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: BLOCK type=kotlin.Unit origin=null - DO_WHILE label=null origin=DO_WHILE_LOOP - body: COMPOSITE type=kotlin.Unit origin=null - SET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Unit origin=PLUSEQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - other: CONST Int type=kotlin.Int value=12 - condition: CONST Boolean type=kotlin.Boolean value=false - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: BLOCK type=kotlin.Unit origin=null - DO_WHILE label=null origin=DO_WHILE_LOOP - body: COMPOSITE type=kotlin.Unit origin=null - SET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Unit origin=PLUSEQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - other: CONST Int type=kotlin.Int value=13 - condition: CONST Boolean type=kotlin.Boolean value=false - BLOCK type=kotlin.Unit origin=WHEN - VAR IR_TEMPORARY_VARIABLE name:tmp_4 type:kotlin.Int [val] - GET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - WHEN type=kotlin.Unit origin=WHEN - BRANCH - if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val tmp_4: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - arg1: CONST Int type=kotlin.Int value=1 - then: BLOCK type=kotlin.Unit origin=null - BLOCK type=kotlin.Unit origin=FOR_LOOP - VAR FOR_LOOP_ITERATOR name:tmp_5 type:kotlin.collections.IntIterator [val] - CALL 'public open fun iterator (): kotlin.collections.IntIterator declared in kotlin.ranges.IntRange' type=kotlin.collections.IntIterator origin=FOR_LOOP_ITERATOR - $this: CALL 'public final fun rangeTo (other: kotlin.Int): kotlin.ranges.IntRange declared in kotlin.Int' type=kotlin.ranges.IntRange origin=RANGE - $this: CONST Int type=kotlin.Int value=0 - other: CONST Int type=kotlin.Int value=14 - WHILE label=null origin=FOR_LOOP_INNER_WHILE - condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.IntIterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT - $this: GET_VAR 'val tmp_5: kotlin.collections.IntIterator declared in .topLevelMethod' type=kotlin.collections.IntIterator origin=null - body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE - VAR FOR_LOOP_VARIABLE name:i type:kotlin.Int [val] - CALL 'public final fun next (): kotlin.Int declared in kotlin.collections.IntIterator' type=kotlin.Int origin=FOR_LOOP_NEXT - $this: GET_VAR 'val tmp_5: kotlin.collections.IntIterator declared in .topLevelMethod' type=kotlin.collections.IntIterator origin=null - SET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Unit origin=PLUSEQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - other: GET_VAR 'val i: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: BLOCK type=kotlin.Unit origin=null - BLOCK type=kotlin.Unit origin=FOR_LOOP - VAR FOR_LOOP_ITERATOR name:tmp_6 type:kotlin.collections.IntIterator [val] - CALL 'public open fun iterator (): kotlin.collections.IntIterator declared in kotlin.ranges.IntRange' type=kotlin.collections.IntIterator origin=FOR_LOOP_ITERATOR - $this: CALL 'public final fun rangeTo (other: kotlin.Int): kotlin.ranges.IntRange declared in kotlin.Int' type=kotlin.ranges.IntRange origin=RANGE - $this: CONST Int type=kotlin.Int value=0 - other: CONST Int type=kotlin.Int value=15 - WHILE label=null origin=FOR_LOOP_INNER_WHILE - condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.IntIterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT - $this: GET_VAR 'val tmp_6: kotlin.collections.IntIterator declared in .topLevelMethod' type=kotlin.collections.IntIterator origin=null - body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE - VAR FOR_LOOP_VARIABLE name:i type:kotlin.Int [val] - CALL 'public final fun next (): kotlin.Int declared in kotlin.collections.IntIterator' type=kotlin.Int origin=FOR_LOOP_NEXT - $this: GET_VAR 'val tmp_6: kotlin.collections.IntIterator declared in .topLevelMethod' type=kotlin.collections.IntIterator origin=null - SET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Unit origin=PLUSEQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - other: GET_VAR 'val i: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - BLOCK type=kotlin.Unit origin=WHEN - VAR IR_TEMPORARY_VARIABLE name:tmp_7 type:kotlin.Int [val] - GET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - WHEN type=kotlin.Unit origin=WHEN - BRANCH - if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val tmp_7: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - arg1: CONST Int type=kotlin.Int value=1 - then: BLOCK type=kotlin.Unit origin=FOR_LOOP - VAR FOR_LOOP_ITERATOR name:tmp_8 type:kotlin.collections.IntIterator [val] - CALL 'public open fun iterator (): kotlin.collections.IntIterator declared in kotlin.ranges.IntRange' type=kotlin.collections.IntIterator origin=FOR_LOOP_ITERATOR - $this: CALL 'public final fun rangeTo (other: kotlin.Int): kotlin.ranges.IntRange declared in kotlin.Int' type=kotlin.ranges.IntRange origin=RANGE - $this: CONST Int type=kotlin.Int value=0 - other: CONST Int type=kotlin.Int value=16 - WHILE label=null origin=FOR_LOOP_INNER_WHILE - condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.IntIterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT - $this: GET_VAR 'val tmp_8: kotlin.collections.IntIterator declared in .topLevelMethod' type=kotlin.collections.IntIterator origin=null - body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE - VAR FOR_LOOP_VARIABLE name:i type:kotlin.Int [val] - CALL 'public final fun next (): kotlin.Int declared in kotlin.collections.IntIterator' type=kotlin.Int origin=FOR_LOOP_NEXT - $this: GET_VAR 'val tmp_8: kotlin.collections.IntIterator declared in .topLevelMethod' type=kotlin.collections.IntIterator origin=null - SET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Unit origin=PLUSEQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - other: GET_VAR 'val i: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: BLOCK type=kotlin.Unit origin=FOR_LOOP - VAR FOR_LOOP_ITERATOR name:tmp_9 type:kotlin.collections.IntIterator [val] - CALL 'public open fun iterator (): kotlin.collections.IntIterator declared in kotlin.ranges.IntRange' type=kotlin.collections.IntIterator origin=FOR_LOOP_ITERATOR - $this: CALL 'public final fun rangeTo (other: kotlin.Int): kotlin.ranges.IntRange declared in kotlin.Int' type=kotlin.ranges.IntRange origin=RANGE - $this: CONST Int type=kotlin.Int value=0 - other: CONST Int type=kotlin.Int value=17 - WHILE label=null origin=FOR_LOOP_INNER_WHILE - condition: CALL 'public abstract fun hasNext (): kotlin.Boolean declared in kotlin.collections.IntIterator' type=kotlin.Boolean origin=FOR_LOOP_HAS_NEXT - $this: GET_VAR 'val tmp_9: kotlin.collections.IntIterator declared in .topLevelMethod' type=kotlin.collections.IntIterator origin=null - body: BLOCK type=kotlin.Unit origin=FOR_LOOP_INNER_WHILE - VAR FOR_LOOP_VARIABLE name:i type:kotlin.Int [val] - CALL 'public final fun next (): kotlin.Int declared in kotlin.collections.IntIterator' type=kotlin.Int origin=FOR_LOOP_NEXT - $this: GET_VAR 'val tmp_9: kotlin.collections.IntIterator declared in .topLevelMethod' type=kotlin.collections.IntIterator origin=null - SET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Unit origin=PLUSEQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - other: GET_VAR 'val i: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - BLOCK type=kotlin.Unit origin=WHEN - VAR IR_TEMPORARY_VARIABLE name:tmp_10 type:kotlin.Int [val] - GET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - WHEN type=kotlin.Unit origin=WHEN - BRANCH - if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val tmp_10: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - arg1: CONST Int type=kotlin.Int value=1 - then: BLOCK type=kotlin.Unit origin=null - WHILE label=null origin=WHILE_LOOP - condition: CONST Boolean type=kotlin.Boolean value=false - body: SET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Unit origin=PLUSEQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - other: CONST Int type=kotlin.Int value=18 - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: BLOCK type=kotlin.Unit origin=null - WHILE label=null origin=WHILE_LOOP - condition: CONST Boolean type=kotlin.Boolean value=false - body: SET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Unit origin=PLUSEQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - other: CONST Int type=kotlin.Int value=19 - BLOCK type=kotlin.Unit origin=WHEN - VAR IR_TEMPORARY_VARIABLE name:tmp_11 type:kotlin.Int [val] - GET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - WHEN type=kotlin.Unit origin=WHEN - BRANCH - if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val tmp_11: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - arg1: CONST Int type=kotlin.Int value=1 - then: WHILE label=null origin=WHILE_LOOP - condition: CONST Boolean type=kotlin.Boolean value=false - body: SET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Unit origin=PLUSEQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - other: CONST Int type=kotlin.Int value=20 - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: WHILE label=null origin=WHILE_LOOP - condition: CONST Boolean type=kotlin.Boolean value=false - body: SET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Unit origin=PLUSEQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - other: CONST Int type=kotlin.Int value=21 - BLOCK type=kotlin.Unit origin=WHEN - VAR IR_TEMPORARY_VARIABLE name:tmp_12 type:kotlin.Int [val] - GET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - WHEN type=kotlin.Unit origin=WHEN - BRANCH - if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val tmp_12: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - arg1: CONST Int type=kotlin.Int value=1 - then: BLOCK type=kotlin.Unit origin=null - BLOCK type=kotlin.Unit origin=null - DO_WHILE label=null origin=DO_WHILE_LOOP - body: COMPOSITE type=kotlin.Unit origin=null - SET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Unit origin=PLUSEQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - other: CONST Int type=kotlin.Int value=22 - condition: CONST Boolean type=kotlin.Boolean value=false - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: BLOCK type=kotlin.Unit origin=null - BLOCK type=kotlin.Unit origin=null - DO_WHILE label=null origin=DO_WHILE_LOOP - body: COMPOSITE type=kotlin.Unit origin=null - SET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Unit origin=PLUSEQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - other: CONST Int type=kotlin.Int value=23 - condition: CONST Boolean type=kotlin.Boolean value=false - BLOCK type=kotlin.Unit origin=WHEN - VAR IR_TEMPORARY_VARIABLE name:tmp_13 type:kotlin.Int [val] - GET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - WHEN type=kotlin.Unit origin=WHEN - BRANCH - if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: GET_VAR 'val tmp_13: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - arg1: CONST Int type=kotlin.Int value=1 - then: BLOCK type=kotlin.Unit origin=null - DO_WHILE label=null origin=DO_WHILE_LOOP - body: COMPOSITE type=kotlin.Unit origin=null - SET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Unit origin=PLUSEQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - other: CONST Int type=kotlin.Int value=24 - condition: CONST Boolean type=kotlin.Boolean value=false - BRANCH - if: CONST Boolean type=kotlin.Boolean value=true - then: BLOCK type=kotlin.Unit origin=null - DO_WHILE label=null origin=DO_WHILE_LOOP - body: COMPOSITE type=kotlin.Unit origin=null - SET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Unit origin=PLUSEQ - CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null - $this: GET_VAR 'var z: kotlin.Int declared in .topLevelMethod' type=kotlin.Int origin=null - other: CONST Int type=kotlin.Int value=25 - condition: CONST Boolean type=kotlin.Boolean value=false diff --git a/compiler/testData/ir/irText/expressions/ifWithLoop.fir.kt.txt b/compiler/testData/ir/irText/expressions/ifWithLoop.fir.kt.txt deleted file mode 100644 index 990b27b9c26..00000000000 --- a/compiler/testData/ir/irText/expressions/ifWithLoop.fir.kt.txt +++ /dev/null @@ -1,173 +0,0 @@ -fun topLevelMethod() { - var z: Int = 1 - when { - true -> { // BLOCK - { // BLOCK - val tmp_0: IntIterator = 0.rangeTo(other = 2).iterator() - while (tmp_0.hasNext()) { // BLOCK - val i: Int = tmp_0.next() - z = z.plus(other = i) - } - } - } - else -> { // BLOCK - { // BLOCK - val tmp_1: IntIterator = 0.rangeTo(other = 3).iterator() - while (tmp_1.hasNext()) { // BLOCK - val i: Int = tmp_1.next() - z = z.plus(other = i) - } - } - } - } - when { - true -> { // BLOCK - val tmp_2: IntIterator = 0.rangeTo(other = 4).iterator() - while (tmp_2.hasNext()) { // BLOCK - val i: Int = tmp_2.next() - z = z.plus(other = i) - } - } - else -> { // BLOCK - val tmp_3: IntIterator = 0.rangeTo(other = 5).iterator() - while (tmp_3.hasNext()) { // BLOCK - val i: Int = tmp_3.next() - z = z.plus(other = i) - } - } - } - when { - true -> { // BLOCK - while (false) z = z.plus(other = 6) - } - else -> { // BLOCK - while (false) z = z.plus(other = 7) - } - } - when { - true -> while (false) z = z.plus(other = 8) - else -> while (false) z = z.plus(other = 9) - } - when { - true -> { // BLOCK - { // BLOCK - do// COMPOSITE { - z = z.plus(other = 10) - // } while (false) - } - } - else -> { // BLOCK - { // BLOCK - do// COMPOSITE { - z = z.plus(other = 11) - // } while (false) - } - } - } - when { - true -> { // BLOCK - do// COMPOSITE { - z = z.plus(other = 12) - // } while (false) - } - else -> { // BLOCK - do// COMPOSITE { - z = z.plus(other = 13) - // } while (false) - } - } - { // BLOCK - val tmp_4: Int = z - when { - EQEQ(arg0 = tmp_4, arg1 = 1) -> { // BLOCK - { // BLOCK - val tmp_5: IntIterator = 0.rangeTo(other = 14).iterator() - while (tmp_5.hasNext()) { // BLOCK - val i: Int = tmp_5.next() - z = z.plus(other = i) - } - } - } - else -> { // BLOCK - { // BLOCK - val tmp_6: IntIterator = 0.rangeTo(other = 15).iterator() - while (tmp_6.hasNext()) { // BLOCK - val i: Int = tmp_6.next() - z = z.plus(other = i) - } - } - } - } - } - { // BLOCK - val tmp_7: Int = z - when { - EQEQ(arg0 = tmp_7, arg1 = 1) -> { // BLOCK - val tmp_8: IntIterator = 0.rangeTo(other = 16).iterator() - while (tmp_8.hasNext()) { // BLOCK - val i: Int = tmp_8.next() - z = z.plus(other = i) - } - } - else -> { // BLOCK - val tmp_9: IntIterator = 0.rangeTo(other = 17).iterator() - while (tmp_9.hasNext()) { // BLOCK - val i: Int = tmp_9.next() - z = z.plus(other = i) - } - } - } - } - { // BLOCK - val tmp_10: Int = z - when { - EQEQ(arg0 = tmp_10, arg1 = 1) -> { // BLOCK - while (false) z = z.plus(other = 18) - } - else -> { // BLOCK - while (false) z = z.plus(other = 19) - } - } - } - { // BLOCK - val tmp_11: Int = z - when { - EQEQ(arg0 = tmp_11, arg1 = 1) -> while (false) z = z.plus(other = 20) - else -> while (false) z = z.plus(other = 21) - } - } - { // BLOCK - val tmp_12: Int = z - when { - EQEQ(arg0 = tmp_12, arg1 = 1) -> { // BLOCK - { // BLOCK - do// COMPOSITE { - z = z.plus(other = 22) - // } while (false) - } - } - else -> { // BLOCK - { // BLOCK - do// COMPOSITE { - z = z.plus(other = 23) - // } while (false) - } - } - } - } - { // BLOCK - val tmp_13: Int = z - when { - EQEQ(arg0 = tmp_13, arg1 = 1) -> { // BLOCK - do// COMPOSITE { - z = z.plus(other = 24) - // } while (false) - } - else -> { // BLOCK - do// COMPOSITE { - z = z.plus(other = 25) - // } while (false) - } - } - } -} diff --git a/compiler/testData/ir/irText/expressions/ifWithLoop.kt b/compiler/testData/ir/irText/expressions/ifWithLoop.kt index 2b99065ddf2..ff716f67bbb 100644 --- a/compiler/testData/ir/irText/expressions/ifWithLoop.kt +++ b/compiler/testData/ir/irText/expressions/ifWithLoop.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL fun topLevelMethod() { var z = 1 diff --git a/compiler/testData/ir/irText/expressions/javaSyntheticGenericPropretyAccess.fir.ir.txt b/compiler/testData/ir/irText/expressions/javaSyntheticGenericPropretyAccess.fir.ir.txt index ea345a7d2ae..bbfeb844c95 100644 --- a/compiler/testData/ir/irText/expressions/javaSyntheticGenericPropretyAccess.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/javaSyntheticGenericPropretyAccess.fir.ir.txt @@ -26,7 +26,7 @@ FILE fqName: fileName:/javaSyntheticGenericPropertyAccess.kt GET_VAR 'j: .J.test> declared in .test' type=.J.test> origin=null CALL 'public open fun setFoo (x: kotlin.Int): kotlin.Unit declared in .J' type=kotlin.Unit origin=EQ $this: GET_VAR 'val tmp_2: .J.test> declared in .test' type=.J.test> origin=null - x: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + x: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ $this: CALL 'public open fun getFoo (): kotlin.Int declared in .J' type=kotlin.Int origin=GET_PROPERTY $this: GET_VAR 'val tmp_2: .J.test> declared in .test' type=.J.test> origin=null other: CONST Int type=kotlin.Int value=1 diff --git a/compiler/testData/ir/irText/expressions/javaSyntheticPropertyAccess.fir.ir.txt b/compiler/testData/ir/irText/expressions/javaSyntheticPropertyAccess.fir.ir.txt index 4f13fca82e8..6425c4899b8 100644 --- a/compiler/testData/ir/irText/expressions/javaSyntheticPropertyAccess.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/javaSyntheticPropertyAccess.fir.ir.txt @@ -25,7 +25,7 @@ FILE fqName: fileName:/javaSyntheticPropertyAccess.kt GET_VAR 'j: .J declared in .test' type=.J origin=null CALL 'public open fun setFoo (x: kotlin.Int): kotlin.Unit declared in .J' type=kotlin.Unit origin=EQ $this: GET_VAR 'val tmp_2: .J declared in .test' type=.J origin=null - x: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + x: CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ $this: CALL 'public open fun getFoo (): kotlin.Int declared in .J' type=kotlin.Int origin=GET_PROPERTY $this: GET_VAR 'val tmp_2: .J declared in .test' type=.J origin=null other: CONST Int type=kotlin.Int value=1 diff --git a/compiler/testData/ir/irText/expressions/kt16904.fir.ir.txt b/compiler/testData/ir/irText/expressions/kt16904.fir.ir.txt index e2c2cd75699..804b89a1ea0 100644 --- a/compiler/testData/ir/irText/expressions/kt16904.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/kt16904.fir.ir.txt @@ -83,7 +83,7 @@ FILE fqName: fileName:/kt16904.kt x: CONST Int type=kotlin.Int value=42 CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in .Test1' type=kotlin.Unit origin=EQ $this: GET_VAR ': .Test1 declared in .Test1' type=.Test1 origin=null - : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ $this: CALL 'public final fun (): kotlin.Int declared in .Test1' type=kotlin.Int origin=GET_PROPERTY $this: GET_VAR ': .Test1 declared in .Test1' type=.Test1 origin=null other: CONST Int type=kotlin.Int value=42 diff --git a/compiler/testData/ir/irText/expressions/kt27933.fir.ir.txt b/compiler/testData/ir/irText/expressions/kt27933.fir.ir.txt index 26ed2acc007..2b96deeedd5 100644 --- a/compiler/testData/ir/irText/expressions/kt27933.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/kt27933.fir.ir.txt @@ -13,8 +13,8 @@ FILE fqName: fileName:/kt27933.kt BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: SET_VAR 'var r: kotlin.String declared in .box' type=kotlin.Unit origin=EQ - CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=null - $this: GET_VAR 'var r: kotlin.String declared in .box' type=kotlin.String origin=null + CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=PLUSEQ + $this: GET_VAR 'var r: kotlin.String declared in .box' type=kotlin.String origin=PLUSEQ other: CONST String type=kotlin.String value="O" WHEN type=kotlin.Unit origin=IF BRANCH @@ -22,8 +22,8 @@ FILE fqName: fileName:/kt27933.kt arg0: GET_VAR 'var r: kotlin.String declared in .box' type=kotlin.String origin=null arg1: CONST String type=kotlin.String value="O" then: SET_VAR 'var r: kotlin.String declared in .box' type=kotlin.Unit origin=EQ - CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=null - $this: GET_VAR 'var r: kotlin.String declared in .box' type=kotlin.String origin=null + CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=PLUSEQ + $this: GET_VAR 'var r: kotlin.String declared in .box' type=kotlin.String origin=PLUSEQ other: CONST String type=kotlin.String value="K" RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in ' GET_VAR 'var r: kotlin.String declared in .box' type=kotlin.String origin=null diff --git a/compiler/testData/ir/irText/expressions/kt30020.fir.ir.txt b/compiler/testData/ir/irText/expressions/kt30020.fir.ir.txt index 8394edee277..0510cd18198 100644 --- a/compiler/testData/ir/irText/expressions/kt30020.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/kt30020.fir.ir.txt @@ -26,7 +26,7 @@ FILE fqName: fileName:/kt30020.kt BLOCK_BODY 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 + $receiver: GET_VAR ': .AML declared in .AML' type=.AML origin=PLUSEQ element: CONST Int type=kotlin.Int value=300 CONSTRUCTOR visibility:public <> () returnType:.AML [primary] BLOCK_BODY @@ -150,7 +150,7 @@ FILE fqName: fileName:/kt30020.kt BLOCK_BODY 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 + $receiver: GET_VAR ': .AML declared in .AML.testExplicitThis' type=.AML origin=PLUSEQ element: CONST Int type=kotlin.Int value=200 PROPERTY FAKE_OVERRIDE name:size visibility:public modality:ABSTRACT [fake_override,val] overridden: @@ -192,7 +192,7 @@ FILE fqName: fileName:/kt30020.kt 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=PLUSEQ : kotlin.Int - $receiver: CALL 'public abstract fun f (): kotlin.collections.MutableList declared in .X' type=kotlin.collections.MutableList origin=null + $receiver: CALL 'public abstract fun f (): kotlin.collections.MutableList declared in .X' type=kotlin.collections.MutableList origin=PLUSEQ $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=PLUSEQ @@ -248,5 +248,5 @@ FILE fqName: fileName:/kt30020.kt BLOCK_BODY 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 + $receiver: GET_VAR ': kotlin.collections.MutableList declared in .testExtensionReceiver' type=kotlin.collections.MutableList origin=PLUSEQ element: CONST Int type=kotlin.Int value=100 diff --git a/compiler/testData/ir/irText/expressions/kt49203.fir.ir.txt b/compiler/testData/ir/irText/expressions/kt49203.fir.ir.txt index 46a74a26fa2..31190019b37 100644 --- a/compiler/testData/ir/irText/expressions/kt49203.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/kt49203.fir.ir.txt @@ -133,7 +133,7 @@ FILE fqName: fileName:/kt49203.kt BLOCK_BODY CALL 'public final fun (: kotlin.String): kotlin.Unit declared in .X' type=kotlin.Unit origin=EQ $this: GET_VAR ': .X declared in .X.plusAssign' type=.X origin=null - : CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=null + : CALL 'public final fun plus (other: kotlin.Any?): kotlin.String declared in kotlin.String' type=kotlin.String origin=PLUSEQ $this: CALL 'public final fun (): kotlin.String declared in .X' type=kotlin.String origin=GET_PROPERTY $this: GET_VAR ': .X declared in .X.plusAssign' type=.X origin=null other: GET_VAR 'data: kotlin.String declared in .X.plusAssign' type=kotlin.String origin=null diff --git a/compiler/testData/ir/irText/expressions/lambdaInCAO.fir.ir.txt b/compiler/testData/ir/irText/expressions/lambdaInCAO.fir.ir.txt index a043e06eea0..d29e2767b07 100644 --- a/compiler/testData/ir/irText/expressions/lambdaInCAO.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/lambdaInCAO.fir.ir.txt @@ -18,7 +18,7 @@ FILE fqName: fileName:/lambdaInCAO.kt 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=PLUSEQ - $receiver: GET_VAR 'a: kotlin.Any declared in .test1' type=kotlin.Any origin=null + $receiver: GET_VAR 'a: kotlin.Any declared in .test1' type=kotlin.Any origin=PLUSEQ lambda: FUN_EXPR type=kotlin.Function0 origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/sam/genericSamProjectedOut.fir.ir.txt b/compiler/testData/ir/irText/expressions/sam/genericSamProjectedOut.fir.ir.txt index e64aa396205..2ea28570e7a 100644 --- a/compiler/testData/ir/irText/expressions/sam/genericSamProjectedOut.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/sam/genericSamProjectedOut.fir.ir.txt @@ -33,8 +33,8 @@ FILE fqName: fileName:/genericSamProjectedOut.kt RETURN type=kotlin.Nothing from='local final fun (it: @[FlexibleNullability] kotlin.String?): kotlin.Unit declared in .test' GET_OBJECT 'CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public superTypes:[kotlin.Any]' type=kotlin.Unit SET_VAR 'var a: example.SomeJavaClass declared in .test' type=kotlin.Unit origin=EQ - CALL 'public open fun plus (hello: @[FlexibleNullability] example.Hello<@[FlexibleNullability] A of example.SomeJavaClass?>?): @[FlexibleNullability] example.SomeJavaClass<@[FlexibleNullability] A of example.SomeJavaClass?>? declared in example.SomeJavaClass' type=@[FlexibleNullability] example.SomeJavaClass? origin=null - $this: GET_VAR 'var a: example.SomeJavaClass declared in .test' type=example.SomeJavaClass origin=null + CALL 'public open fun plus (hello: @[FlexibleNullability] example.Hello<@[FlexibleNullability] A of example.SomeJavaClass?>?): @[FlexibleNullability] example.SomeJavaClass<@[FlexibleNullability] A of example.SomeJavaClass?>? declared in example.SomeJavaClass' type=@[FlexibleNullability] example.SomeJavaClass? origin=PLUSEQ + $this: GET_VAR 'var a: example.SomeJavaClass declared in .test' type=example.SomeJavaClass origin=PLUSEQ hello: TYPE_OP type=example.Hello origin=SAM_CONVERSION typeOperand=example.Hello FUN_EXPR type=kotlin.Function1<@[FlexibleNullability] kotlin.Nothing?, kotlin.Unit> origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> (it:@[FlexibleNullability] kotlin.String?) 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 452e718f93b..4ce95ddc9ee 100644 --- a/compiler/testData/ir/irText/expressions/sam/samOperators.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/sam/samOperators.fir.ir.txt @@ -35,10 +35,10 @@ FILE fqName: fileName:/samOperators.kt $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=PLUSEQ - $this: GET_VAR ': .J declared in .test3' type=.J origin=null + $this: GET_VAR ': .J declared in .test3' type=.J origin=PLUSEQ i: TYPE_OP type=java.lang.Runnable origin=SAM_CONVERSION typeOperand=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=MINUSEQ - $this: GET_VAR ': .J declared in .test3' type=.J origin=null + $this: GET_VAR ': .J declared in .test3' type=.J origin=MINUSEQ i: TYPE_OP type=java.lang.Runnable origin=SAM_CONVERSION typeOperand=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/irText/firProblems/AssignmentOperator.fir.ir.txt b/compiler/testData/ir/irText/firProblems/AssignmentOperator.fir.ir.txt index 7ffc4ecb3b9..fe5342f2d53 100644 --- a/compiler/testData/ir/irText/firProblems/AssignmentOperator.fir.ir.txt +++ b/compiler/testData/ir/irText/firProblems/AssignmentOperator.fir.ir.txt @@ -109,7 +109,7 @@ FILE fqName:foo fileName:/AssignmentOperator.kt t: GET_VAR 'val a: foo.A declared in foo.runMe' type=foo.A origin=null CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.A' type=kotlin.Unit origin=EQ $this: GET_VAR 'val tmp_0: foo.A declared in foo.runMe' type=foo.A origin=null - : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun plus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PLUSEQ $this: CALL 'public final fun (): kotlin.Int declared in foo.A' type=kotlin.Int origin=GET_PROPERTY $this: GET_VAR 'val tmp_0: foo.A declared in foo.runMe' type=foo.A origin=null other: CONST Int type=kotlin.Int value=20 @@ -120,7 +120,7 @@ FILE fqName:foo fileName:/AssignmentOperator.kt t: GET_VAR 'val a: foo.A declared in foo.runMe' type=foo.A origin=null CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.A' type=kotlin.Unit origin=EQ $this: GET_VAR 'val tmp_1: foo.A declared in foo.runMe' type=foo.A origin=null - : CALL 'public final fun minus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun minus (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=MINUSEQ $this: CALL 'public final fun (): kotlin.Int declared in foo.A' type=kotlin.Int origin=GET_PROPERTY $this: GET_VAR 'val tmp_1: foo.A declared in foo.runMe' type=foo.A origin=null other: CONST Int type=kotlin.Int value=20 @@ -131,7 +131,7 @@ FILE fqName:foo fileName:/AssignmentOperator.kt t: GET_VAR 'val a: foo.A declared in foo.runMe' type=foo.A origin=null CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.A' type=kotlin.Unit origin=EQ $this: GET_VAR 'val tmp_2: foo.A declared in foo.runMe' type=foo.A origin=null - : CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun times (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=MULTEQ $this: CALL 'public final fun (): kotlin.Int declared in foo.A' type=kotlin.Int origin=GET_PROPERTY $this: GET_VAR 'val tmp_2: foo.A declared in foo.runMe' type=foo.A origin=null other: CONST Int type=kotlin.Int value=2 @@ -142,7 +142,7 @@ FILE fqName:foo fileName:/AssignmentOperator.kt t: GET_VAR 'val a: foo.A declared in foo.runMe' type=foo.A origin=null CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.A' type=kotlin.Unit origin=EQ $this: GET_VAR 'val tmp_3: foo.A declared in foo.runMe' type=foo.A origin=null - : CALL 'public final fun div (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun div (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=DIVEQ $this: CALL 'public final fun (): kotlin.Int declared in foo.A' type=kotlin.Int origin=GET_PROPERTY $this: GET_VAR 'val tmp_3: foo.A declared in foo.runMe' type=foo.A origin=null other: CONST Int type=kotlin.Int value=5 @@ -153,7 +153,7 @@ FILE fqName:foo fileName:/AssignmentOperator.kt t: GET_VAR 'val a: foo.A declared in foo.runMe' type=foo.A origin=null CALL 'public final fun (: kotlin.Int): kotlin.Unit declared in foo.A' type=kotlin.Unit origin=EQ $this: GET_VAR 'val tmp_4: foo.A declared in foo.runMe' type=foo.A origin=null - : CALL 'public final fun rem (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=null + : CALL 'public final fun rem (other: kotlin.Int): kotlin.Int declared in kotlin.Int' type=kotlin.Int origin=PERCEQ $this: CALL 'public final fun (): kotlin.Int declared in foo.A' type=kotlin.Int origin=GET_PROPERTY $this: GET_VAR 'val tmp_4: foo.A declared in foo.runMe' type=foo.A origin=null other: CONST Int type=kotlin.Int value=3 diff --git a/compiler/testData/ir/sourceRanges/augmentedAssignmentWithExpression.fir.txt b/compiler/testData/ir/sourceRanges/augmentedAssignmentWithExpression.fir.txt index a315b356920..87adf9282e3 100644 --- a/compiler/testData/ir/sourceRanges/augmentedAssignmentWithExpression.fir.txt +++ b/compiler/testData/ir/sourceRanges/augmentedAssignmentWithExpression.fir.txt @@ -12,7 +12,7 @@ @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=PLUSEQ - @6:8..12 GET_VAR ': test.Host declared in test.Host.test1' type=test.Host origin=null + @6:8..12 GET_VAR ': test.Host declared in test.Host.test1' type=test.Host origin=PLUSEQ @6:16..17 CONST Int type=kotlin.Int value=1 @2:0..8:1 FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] @2:0..8:1 VALUE_PARAMETER name: type:kotlin.Any @@ -30,12 +30,12 @@ @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=PLUSEQ - @13:4..8 GET_VAR ': test.Host declared in test.test2' type=test.Host origin=null + @13:4..8 GET_VAR ': test.Host declared in test.test2' type=test.Host origin=PLUSEQ @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=PLUSEQ - @17:4..9 CALL 'public final fun foo (): test.Host declared in test' type=test.Host origin=null + @17:4..9 CALL 'public final fun foo (): test.Host declared in test' type=test.Host origin=PLUSEQ @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